var FS=Object.defineProperty;var nc=Object.getOwnPropertySymbols;var zS=Object.prototype.hasOwnProperty,GS=Object.prototype.propertyIsEnumerable;var ic=(r,t,e)=>t in r?FS(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Pu=(r,t)=>{for(var e in t||(t={}))zS.call(t,e)&&ic(r,e,t[e]);if(nc)for(var e of nc(t))GS.call(t,e)&&ic(r,e,t[e]);return r};var ac=(r,t,e)=>new Promise((n,i)=>{var a=u=>{try{s(e.next(u))}catch(l){i(l)}},o=u=>{try{s(e.throw(u))}catch(l){i(l)}},s=u=>u.done?n(u.value):Promise.resolve(u.value).then(a,o);s((e=e.apply(r,t)).next())});import{a4 as VS,av as HS,ab as WS,ad as US,bL as YS,J as XS,Y as oc,bM as ZS,bN as $S,bO as sc,n as qS,aS as KS}from"../jse/index-index-DT9LOzen.js";import{u as QS}from"./bootstrap-DToyB3NB.js";var sf=function(r,t){return sf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},sf(r,t)};function k(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");sf(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Ah=12,JS="sans-serif",Rn=Ah+"px "+JS,jS=20,tx=100,ex="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function rx(r){var t={};if(typeof JSON=="undefined")return t;for(var e=0;e=0)s=o*e.length;else for(var u=0;u18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect!="undefined",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11),t.domSupported=typeof document!="undefined";var s=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in s||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}var yx=".",Qr="___EC__COMPONENT__CONTAINER___",zy="___EC__EXTENDED_CLASS___";function $e(r){var t={main:"",sub:""};if(r){var e=r.split(yx);t.main=e[0]||"",t.sub=e[1]||""}return t}function mx(r){Oe(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function _x(r){return!!(r&&r[zy])}function Oh(r,t){r.$constructor=r,r.extend=function(e){var n=this,i;return Sx(n)?i=function(a){k(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(e.$constructor||n).apply(this,arguments)},Ph(i,this)),B(i.prototype,e),i[zy]=!0,i.extend=this.extend,i.superCall=Tx,i.superApply=Cx,i.superClass=n,i}}function Sx(r){return $(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function Gy(r,t){r.extend=t.extend}var xx=Math.round(Math.random()*10);function bx(r){var t=["__\0is_clz",xx++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function Tx(r,t){for(var e=[],n=2;n=0||a&&rt(a,u)<0)){var l=n.getShallow(u,t);l!=null&&(o[r[s][0]]=l)}}return o}}var Mx=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Ax=Pa(Mx),Dx=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return Ax(this,t,e)},r}(),Vy=function(){function r(t){this.value=t}return r}(),Ix=function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new Vy(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),Ka=function(){function r(t){this._list=new Ix,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var u=n.head;n.remove(u),delete i[u.key],a=u.value,this._lastRemovedEntry=u}s?s.value=e:s=new Vy(e),s.key=t,n.insertEntry(s),i[t]=s}return a},r.prototype.get=function(t){var e=this._map[t],n=this._list;if(e!=null)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),lf=new Ka(50);function Lx(r){if(typeof r=="string"){var t=lf.get(r);return t&&t.image}else return r}function Hy(r,t,e,n,i){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var a=lf.get(r),o={hostEl:e,cb:n,cbPayload:i};return a?(t=a.image,!Qs(t)&&a.pending.push(o)):(t=pr.loadImage(r,lc,lc),t.__zrImageSrc=r,lf.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function lc(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;td&&(d=_,pd&&(d=S,y=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},r.applyTransform=function(t,e,n){if(!n){t!==e&&r.copy(t,e);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=e.x*i+o,t.y=e.y*a+s,t.width=e.width*i,t.height=e.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Jr.x=tn.x=e.x,Jr.y=en.y=e.y,jr.x=en.x=e.x+e.width,jr.y=tn.y=e.y+e.height,Jr.transform(n),en.transform(n),jr.transform(n),tn.transform(n),t.x=lo(Jr.x,jr.x,tn.x,en.x),t.y=lo(Jr.y,jr.y,tn.y,en.y);var u=fo(Jr.x,jr.x,tn.x,en.x),l=fo(Jr.y,jr.y,tn.y,en.y);t.width=u-t.x,t.height=l-t.y},r}(),fc={};function ue(r,t){t=t||Rn;var e=fc[t];e||(e=fc[t]=new Ka(500));var n=e.get(r);return n==null&&(n=pr.measureText(r,t).width,e.put(r,n)),n}function hc(r,t,e,n){var i=ue(r,t),a=Nh(t),o=la(0,i,e),s=oi(0,a,n),u=new at(o,s,i,a);return u}function js(r,t,e,n){var i=((r||"")+"").split(` `),a=i.length;if(a===1)return hc(i[0],t,e,n);for(var o=new at(0,0,0,0),s=0;s=0?parseFloat(r)/100*t:parseFloat(r):r}function ps(r,t,e){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=e.height,o=e.width,s=a/2,u=e.x,l=e.y,f="left",h="top";if(n instanceof Array)u+=Ur(n[0],e.width),l+=Ur(n[1],e.height),f=null,h=null;else switch(n){case"left":u-=i,l+=s,f="right",h="middle";break;case"right":u+=i+o,l+=s,h="middle";break;case"top":u+=o/2,l-=i,f="center",h="bottom";break;case"bottom":u+=o/2,l+=a+i,f="center";break;case"inside":u+=o/2,l+=s,f="center",h="middle";break;case"insideLeft":u+=i,l+=s,h="middle";break;case"insideRight":u+=o-i,l+=s,f="right",h="middle";break;case"insideTop":u+=o/2,l+=i,f="center";break;case"insideBottom":u+=o/2,l+=a-i,f="center",h="bottom";break;case"insideTopLeft":u+=i,l+=i;break;case"insideTopRight":u+=o-i,l+=i,f="right";break;case"insideBottomLeft":u+=i,l+=a-i,h="bottom";break;case"insideBottomRight":u+=o-i,l+=a-i,f="right",h="bottom";break}return r=r||{},r.x=u,r.y=l,r.align=f,r.verticalAlign=h,r}var Ru=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Ex(r,t,e,n,i){var a={};return Uy(a,r,t,e,n,i),a.text}function Uy(r,t,e,n,i,a){if(!e){r.text="",r.isTruncated=!1;return}var o=(t+"").split(` `);a=Yy(e,n,i,a);for(var s=!1,u={},l=0,f=o.length;l=o;u++)s-=o;var l=ue(e,t);return l>s&&(e="",l=0),s=r-l,i.ellipsis=e,i.ellipsisWidth=l,i.contentWidth=s,i.containerWidth=r,i}function Xy(r,t,e){var n=e.containerWidth,i=e.font,a=e.contentWidth;if(!n){r.textLine="",r.isTruncated=!1;return}var o=ue(t,i);if(o<=n){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=e.maxIterations){t+=e.ellipsis;break}var u=s===0?Ox(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,u),o=ue(t,i)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function Ox(r,t,e,n){for(var i=0,a=0,o=r.length;ad&&l){var p=Math.floor(d/s);f=f||c.length>p,c=c.slice(0,p)}if(r&&a&&h!=null)for(var g=Yy(h,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),y={},m=0;ms&&Eu(e,r.substring(s,l),t,o),Eu(e,u[2],t,o,u[1]),s=Ru.lastIndex}si){var L=e.lines.length;x>0?(_.tokens=_.tokens.slice(0,x),y(_,w,S),e.lines=e.lines.slice(0,m+1)):e.lines=e.lines.slice(0,m),e.isTruncated=e.isTruncated||e.lines.length0&&d+n.accumWidth>n.width&&(f=t.split(` `),l=!0),n.accumWidth=d}else{var p=Zy(t,u,n.width,n.breakAll,n.accumWidth);n.accumWidth=p.accumWidth+v,h=p.linesWidths,f=p.lines}}else f=t.split(` `);for(var g=0;g=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Gx=tr(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function Vx(r){return zx(r)?!!Gx[r]:!0}function Zy(r,t,e,n,i){for(var a=[],o=[],s="",u="",l=0,f=0,h=0;he:i+f+v>e){f?(s||u)&&(d?(s||(s=u,u="",l=0,f=l),a.push(s),o.push(f-l),u+=c,l+=v,s="",f=l):(u&&(s+=u,u="",l=0),a.push(s),o.push(f),s=c,f=v)):d?(a.push(u),o.push(l),u=c,l=v):(a.push(c),o.push(v));continue}f+=v,d?(u+=c,l+=v):(u&&(s+=u,u="",l=0),s+=c)}return!a.length&&!s&&(s=r,u="",l=0),u&&(s+=u),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}function Gn(r,t){return r==null&&(r=0),t==null&&(t=0),[r,t]}function Hx(r,t){return r[0]=t[0],r[1]=t[1],r}function $y(r){return[r[0],r[1]]}function Wx(r,t,e){return r[0]=t,r[1]=e,r}function ff(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function Ux(r,t,e,n){return r[0]=t[0]+e[0]*n,r[1]=t[1]+e[1]*n,r}function qy(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function Bh(r){return Math.sqrt(Fh(r))}var Yx=Bh;function Fh(r){return r[0]*r[0]+r[1]*r[1]}var Xx=Fh;function Zx(r,t,e){return r[0]=t[0]*e[0],r[1]=t[1]*e[1],r}function $x(r,t,e){return r[0]=t[0]/e[0],r[1]=t[1]/e[1],r}function qx(r,t){return r[0]*t[0]+r[1]*t[1]}function Qo(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function Ky(r,t){var e=Bh(t);return e===0?(r[0]=0,r[1]=0):(r[0]=t[0]/e,r[1]=t[1]/e),r}function gs(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}var ys=gs;function Qy(r,t){return(r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1])}var Mn=Qy;function Kx(r,t){return r[0]=-t[0],r[1]=-t[1],r}function ya(r,t,e,n){return r[0]=t[0]+n*(e[0]-t[0]),r[1]=t[1]+n*(e[1]-t[1]),r}function Jt(r,t,e){var n=t[0],i=t[1];return r[0]=e[0]*n+e[2]*i+e[4],r[1]=e[1]*n+e[3]*i+e[5],r}function kr(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function Nr(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}const Qx=Object.freeze(Object.defineProperty({__proto__:null,add:ff,applyTransform:Jt,clone:$y,copy:Hx,create:Gn,dist:ys,distSquare:Mn,distance:gs,distanceSquare:Qy,div:$x,dot:qx,len:Bh,lenSquare:Fh,length:Yx,lengthSquare:Xx,lerp:ya,max:Nr,min:kr,mul:Zx,negate:Kx,normalize:Ky,scale:Qo,scaleAndAdd:Ux,set:Wx,sub:qy},Symbol.toStringTag,{value:"Module"}));var cc=Qa,Jx=5e-5;function rn(r){return r>Jx||r<-5e-5}var nn=[],Hn=[],Ou=Gr(),ku=Math.abs,Ja=function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return rn(this.rotation)||rn(this.x)||rn(this.y)||rn(this.scaleX-1)||rn(this.scaleY-1)||rn(this.skewX)||rn(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;if(!(e||t)){n&&(cc(n),this.invTransform=null);return}n=n||Gr(),e?this.getLocalTransform(n):cc(n),t&&(e?Vr(n,t,n):kh(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(nn);var n=nn[0]<0?-1:1,i=nn[1]<0?-1:1,a=((nn[0]-n)*e+n)/nn[0]||0,o=((nn[1]-i)*e+i)/nn[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Gr(),Li(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),e=Math.sqrt(e),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||Gr(),Vr(Hn,t.invTransform,e),e=Hn);var n=this.originX,i=this.originY;(n||i)&&(Ou[4]=n,Ou[5]=i,Vr(Hn,e,Ou),Hn[4]-=n,Hn[5]-=i,e=Hn),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&Jt(n,n,i),n},r.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&Jt(n,n,i),n},r.prototype.getLineScale=function(){var t=this.transform;return t&&ku(t[0]-1)>1e-10&&ku(t[3]-1)>1e-10?Math.sqrt(ku(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){jx(this,t)},r.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,u=t.anchorY,l=t.rotation||0,f=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,v=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||u){var d=n+s,p=i+u;e[4]=-d*a-c*p*o,e[5]=-p*o-v*d*a}else e[4]=e[5]=0;return e[0]=a,e[3]=o,e[1]=v*a,e[2]=c*o,l&&Js(e,e,l),e[4]+=n+f,e[5]+=i+h,e},r.initDefaultProps=function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),r}(),Ra=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function jx(r,t){for(var e=0;e-1e-8&&rJy||r<-1e-8}function Pt(r,t,e,n,i){var a=1-i;return a*a*(a*r+3*i*t)+i*i*(i*n+3*a*e)}function pc(r,t,e,n,i){var a=1-i;return 3*(((t-r)*a+2*(e-t)*i)*a+(n-e)*i*i)}function ms(r,t,e,n,i,a){var o=n+3*(t-e)-r,s=3*(e-t*2+r),u=3*(t-r),l=r-i,f=s*s-3*o*u,h=s*u-9*o*l,c=u*u-3*s*l,v=0;if(Br(f)&&Br(h))if(Br(s))a[0]=0;else{var d=-u/s;d>=0&&d<=1&&(a[v++]=d)}else{var p=h*h-4*f*c;if(Br(p)){var g=h/f,d=-s/o+g,y=-g/2;d>=0&&d<=1&&(a[v++]=d),y>=0&&y<=1&&(a[v++]=y)}else if(p>0){var m=Hr(p),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-ho(-_,vo):_=ho(_,vo),S<0?S=-ho(-S,vo):S=ho(S,vo);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(a[v++]=d)}else{var w=(2*f*s-3*o*h)/(2*Hr(f*f*f)),x=Math.acos(w)/3,b=Hr(f),T=Math.cos(x),d=(-s-2*b*T)/(3*o),y=(-s+b*(T+dc*Math.sin(x)))/(3*o),C=(-s+b*(T-dc*Math.sin(x)))/(3*o);d>=0&&d<=1&&(a[v++]=d),y>=0&&y<=1&&(a[v++]=y),C>=0&&C<=1&&(a[v++]=C)}}return v}function em(r,t,e,n,i){var a=6*e-12*t+6*r,o=9*t+3*n-3*r-9*e,s=3*t-3*r,u=0;if(Br(o)){if(tm(a)){var l=-s/a;l>=0&&l<=1&&(i[u++]=l)}}else{var f=a*a-4*o*s;if(Br(f))i[0]=-a/(2*o);else if(f>0){var h=Hr(f),l=(-a+h)/(2*o),c=(-a-h)/(2*o);l>=0&&l<=1&&(i[u++]=l),c>=0&&c<=1&&(i[u++]=c)}}return u}function Yr(r,t,e,n,i,a){var o=(t-r)*i+r,s=(e-t)*i+t,u=(n-e)*i+e,l=(s-o)*i+o,f=(u-s)*i+s,h=(f-l)*i+l;a[0]=r,a[1]=o,a[2]=l,a[3]=h,a[4]=h,a[5]=f,a[6]=u,a[7]=n}function rm(r,t,e,n,i,a,o,s,u,l,f){var h,c=.005,v=1/0,d,p,g,y;Xe[0]=u,Xe[1]=l;for(var m=0;m<1;m+=.05)ye[0]=Pt(r,e,i,o,m),ye[1]=Pt(t,n,a,s,m),g=Mn(Xe,ye),g=0&&g=0&&l<=1&&(i[u++]=l)}}else{var f=o*o-4*a*s;if(Br(f)){var l=-o/(2*a);l>=0&&l<=1&&(i[u++]=l)}else if(f>0){var h=Hr(f),l=(-o+h)/(2*a),c=(-o-h)/(2*a);l>=0&&l<=1&&(i[u++]=l),c>=0&&c<=1&&(i[u++]=c)}}return u}function nm(r,t,e){var n=r+e-2*t;return n===0?.5:(r-t)/n}function _s(r,t,e,n,i){var a=(t-r)*n+r,o=(e-t)*n+t,s=(o-a)*n+a;i[0]=r,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=e}function im(r,t,e,n,i,a,o,s,u){var l,f=.005,h=1/0;Xe[0]=o,Xe[1]=s;for(var c=0;c<1;c+=.05){ye[0]=Vt(r,e,i,c),ye[1]=Vt(t,n,a,c);var v=Mn(Xe,ye);v=0&&v=1?1:ms(0,n,a,1,u,s)&&Pt(0,i,o,1,s[0])}}}var iw=function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Wt,this.ondestroy=t.ondestroy||Wt,this.onrestart=t.onrestart||Wt,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var n=this._life,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var u=i%n;this._startTime=t-u,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=$(t)?t:ma[t]||am(t)},r}(),yc={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 Ee(r){return r=Math.round(r),r<0?0:r>255?255:r}function aw(r){return r=Math.round(r),r<0?0:r>360?360:r}function Ea(r){return r<0?0:r>1?1:r}function Nu(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Ee(parseFloat(t)/100*255):Ee(parseInt(t,10))}function An(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Ea(parseFloat(t)/100):Ea(parseFloat(t))}function Bu(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function Fr(r,t,e){return r+(t-r)*e}function ce(r,t,e,n,i){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r}function hf(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var om=new Ka(20),co=null;function Wn(r,t){co&&hf(co,t),co=om.put(r,co||t.slice())}function le(r,t){if(r){t=t||[];var e=om.get(r);if(e)return hf(t,e);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in yc)return hf(t,yc[n]),Wn(r,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){ce(t,0,0,0,1);return}return ce(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Wn(r,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){ce(t,0,0,0,1);return}return ce(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Wn(r,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var u=n.substr(0,o),l=n.substr(o+1,s-(o+1)).split(","),f=1;switch(u){case"rgba":if(l.length!==4)return l.length===3?ce(t,+l[0],+l[1],+l[2],1):ce(t,0,0,0,1);f=An(l.pop());case"rgb":if(l.length>=3)return ce(t,Nu(l[0]),Nu(l[1]),Nu(l[2]),l.length===3?f:An(l[3])),Wn(r,t),t;ce(t,0,0,0,1);return;case"hsla":if(l.length!==4){ce(t,0,0,0,1);return}return l[3]=An(l[3]),vf(l,t),Wn(r,t),t;case"hsl":if(l.length!==3){ce(t,0,0,0,1);return}return vf(l,t),Wn(r,t),t;default:return}}ce(t,0,0,0,1)}}function vf(r,t){var e=(parseFloat(r[0])%360+360)%360/360,n=An(r[1]),i=An(r[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],ce(t,Ee(Bu(o,a,e+1/3)*255),Ee(Bu(o,a,e)*255),Ee(Bu(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function ow(r){if(r){var t=r[0]/255,e=r[1]/255,n=r[2]/255,i=Math.min(t,e,n),a=Math.max(t,e,n),o=a-i,s=(a+i)/2,u,l;if(o===0)u=0,l=0;else{s<.5?l=o/(a+i):l=o/(2-a-i);var f=((a-t)/6+o/2)/o,h=((a-e)/6+o/2)/o,c=((a-n)/6+o/2)/o;t===a?u=c-h:e===a?u=1/3+f-c:n===a&&(u=2/3+h-f),u<0&&(u+=1),u>1&&(u-=1)}var v=[u*360,l,s];return r[3]!=null&&v.push(r[3]),v}}function cf(r,t){var e=le(r);if(e){for(var n=0;n<3;n++)t<0?e[n]=e[n]*(1-t)|0:e[n]=(255-e[n])*t+e[n]|0,e[n]>255?e[n]=255:e[n]<0&&(e[n]=0);return $r(e,e.length===4?"rgba":"rgb")}}function sw(r){var t=le(r);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function sm(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var n=r*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=t[i],s=t[a],u=n-i;return e[0]=Ee(Fr(o[0],s[0],u)),e[1]=Ee(Fr(o[1],s[1],u)),e[2]=Ee(Fr(o[2],s[2],u)),e[3]=Ea(Fr(o[3],s[3],u)),e}}var uw=sm;function zh(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var n=r*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=le(t[i]),s=le(t[a]),u=n-i,l=$r([Ee(Fr(o[0],s[0],u)),Ee(Fr(o[1],s[1],u)),Ee(Fr(o[2],s[2],u)),Ea(Fr(o[3],s[3],u))],"rgba");return e?{color:l,leftIndex:i,rightIndex:a,value:n}:l}}var lw=zh;function fw(r,t,e,n){var i=le(r);if(r)return i=ow(i),t!=null&&(i[0]=aw(t)),e!=null&&(i[1]=An(e)),n!=null&&(i[2]=An(n)),$r(vf(i),"rgba")}function hw(r,t){var e=le(r);if(e&&t!=null)return e[3]=Ea(t),$r(e,"rgba")}function $r(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function Oa(r,t){var e=le(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}function vw(){return $r([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var mc=new Ka(100);function df(r){if(W(r)){var t=mc.get(r);return t||(t=cf(r,-.1),mc.put(r,t)),t}else if($a(r)){var e=B({},r);return e.colorStops=G(r.colorStops,function(n){return{offset:n.offset,color:cf(n.color,-.1)}}),e}return r}const cw=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:sm,fastMapToColor:uw,lerp:zh,lift:cf,liftColor:df,lum:Oa,mapToColor:lw,modifyAlpha:hw,modifyHSL:fw,parse:le,random:vw,stringify:$r,toHex:sw},Symbol.toStringTag,{value:"Module"}));function dw(r){return r.type==="linear"}function pw(r){return r.type==="radial"}(function(){return Q.hasGlobalWindow&&$(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer!="undefined"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})();var pf=Array.prototype.slice;function ur(r,t,e){return(t-r)*e+r}function Fu(r,t,e,n){for(var i=t.length,a=0;an?t:r,a=Math.min(e,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var u=a;u=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=Sc,u=e;if(Yt(e)){var l=_w(e);s=l,(l===1&&!vt(e[0])||l===2&&!vt(e[0][0]))&&(o=!0)}else if(vt(e)&&!Ia(e))s=go;else if(W(e))if(!isNaN(+e))s=go;else{var f=le(e);f&&(u=f,s=fa)}else if($a(e)){var h=B({},u);h.colorStops=G(e.colorStops,function(v){return{offset:v.offset,color:le(v.color)}}),dw(e)?s=gf:pw(e)&&(s=yf),u=h}a===0?this.valType=s:(s!==this.valType||s===Sc)&&(o=!0),this.discrete=this.discrete||o;var c={time:t,value:u,rawValue:e,percent:0};return n&&(c.easing=n,c.easingFunc=$(n)?n:ma[n]||am(n)),i.push(c),c},r.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort(function(p,g){return p.time-g.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,u=yo(i),l=xc(i),f=0;f=0&&!(o[f].percent<=e);f--);f=c(f,s-2)}else{for(f=h;fe);f++);f=c(f-1,s-2)}d=o[f+1],v=o[f]}if(v&&d){this._lastFr=f,this._lastFrP=e;var g=d.percent-v.percent,y=g===0?1:c((e-v.percent)/g,1);d.easingFunc&&(y=d.easingFunc(y));var m=n?this._additiveValue:l?Hi:t[u];if((yo(a)||l)&&!m&&(m=this._additiveValue=[]),this.discrete)t[u]=y<1?v.rawValue:d.rawValue;else if(yo(a))a===ts?Fu(m,v[i],d[i],y):gw(m,v[i],d[i],y);else if(xc(a)){var _=v[i],S=d[i],w=a===gf;t[u]={type:w?"linear":"radial",x:ur(_.x,S.x,y),y:ur(_.y,S.y,y),colorStops:G(_.colorStops,function(b,T){var C=S.colorStops[T];return{offset:ur(b.offset,C.offset,y),color:jo(Fu([],b.color,C.color,y))}}),global:S.global},w?(t[u].x2=ur(_.x2,S.x2,y),t[u].y2=ur(_.y2,S.y2,y)):t[u].r=ur(_.r,S.r,y)}else if(l)Fu(m,v[i],d[i],y),n||(t[u]=jo(m));else{var x=ur(v[i],d[i],y);n?this._additiveValue=x:t[u]=x}n&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,n=this.propName,i=this._additiveValue;e===go?t[n]=t[n]+i:e===fa?(le(t[n],Hi),po(Hi,Hi,i,1),t[n]=jo(Hi)):e===ts?po(t[n],t[n],i,1):e===um&&_c(t[n],t[n],i,1)},r}(),Gh=function(){function r(t,e,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&i){$s("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,n){return this.whenWithKeys(t,e,mt(e),n)},r.prototype.whenWithKeys=function(t,e,n,i){for(var a=this._tracks,o=0;o0&&u.addKeyframe(0,Jo(l),i),this._trackKeys.push(s)}u.addKeyframe(t,Jo(e[s]),i)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}(),Fe=function(){function r(t){t&&(this._$eventProcessor=t)}return r.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof e=="function"&&(i=n,n=e,e=null),!n||!t)return this;var o=this._$eventProcessor;e!=null&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),a[t]||(a[t]=[]);for(var s=0;s=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;p&&this.canBeInsideText()?(y=n.insideFill,m=n.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=n.outsideFill,m=n.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)&&(u=!0,g.fill=y,g.stroke=m,g.autoStroke=_,g.align=o,g.verticalAlign=s,e.setDefaultTextStyle(g)),e.__dirty|=Qe,u&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Sf:_f},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n=typeof e=="string"&&le(e);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,$r(n,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},B(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(Y(t))for(var n=t,i=mt(n),a=0;a0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(zu,!1,t)},r.prototype.useState=function(t,e,n,i){var a=t===zu,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,u=this.stateTransition;if(!(rt(s,t)>=0&&(e||s.length===1))){var l;if(this.stateProxy&&!a&&(l=this.stateProxy(t)),l||(l=this.states&&this.states[t]),!l&&!a){$s("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(l);var f=!!(l&&l.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,l,this._normalState,e,!n&&!this.__inHover&&u&&u.duration>0,u);var h=this._textContent,c=this._textGuide;return h&&h.useState(t,e,n,f),c&&c.useState(t,e,n,f),a?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),l}}},r.prototype.useStates=function(t,e,n){if(!t.length)this.clearStates();else{var i=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var u=0;u0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}},r.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},r.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},r.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),a=rt(i,t),o=rt(i,e)>=0;a>=0?o?i.splice(a,1):i[a]=e:n&&!o&&i.push(e),this.useStates(i)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,a=[],o=0;o0&&e.during&&a[0].during(function(d,p){e.during(p)});for(var c=0;c0||i.force&&!o.length){var T=void 0,C=void 0,A=void 0;if(s){C={},c&&(T={});for(var S=0;S<_;S++){var y=p[S];C[y]=e[y],c?T[y]=n[y]:e[y]=n[y]}}else if(c){A={};for(var S=0;S<_;S++){var y=p[S];A[y]=Jo(e[y]),Cw(e,n,y)}}var w=new Gh(e,!1,!1,h?_t(d,function(I){return I.targetName===t}):null);w.targetName=t,i.scope&&(w.scope=i.scope),c&&T&&w.whenWithKeys(0,T,p),A&&w.whenWithKeys(0,A,p),w.whenWithKeys(l==null?500:l,s?C:n,p).delay(f||0),r.addAnimator(w,t),o.push(w)}}var xf="__zr_style_"+Math.round(Math.random()*10),Dn={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},eu={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Dn[xf]=!0;var wc=["z","z2","invisible"],Dw=["invisible"],Pi=function(r){k(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var n=mt(e),i=0;i1e-4){s[0]=r-e,s[1]=t-n,u[0]=r+e,u[1]=t+n;return}if(mo[0]=Xu(i)*e+r,mo[1]=Yu(i)*n+t,_o[0]=Xu(a)*e+r,_o[1]=Yu(a)*n+t,l(s,mo,_o),f(u,mo,_o),i=i%an,i<0&&(i=i+an),a=a%an,a<0&&(a=a+an),i>a&&!o?a+=an:ii&&(So[0]=Xu(v)*e+r,So[1]=Yu(v)*n+t,l(s,So,s),f(u,So,u))}var dt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},on=[],sn=[],Ve=[],Tr=[],He=[],We=[],Zu=Math.min,$u=Math.max,un=Math.cos,ln=Math.sin,ar=Math.abs,wf=Math.PI,Rr=wf*2,qu=typeof Float32Array!="undefined",Wi=[];function Ku(r){var t=Math.round(r/wf*1e8)/1e8;return t%2*wf}function vm(r,t){var e=Ku(r[0]);e<0&&(e+=Rr);var n=e-r[0],i=r[1];i+=n,!t&&i-e>=Rr?i=e+Rr:t&&e-i>=Rr?i=e-Rr:!t&&e>i?i=e+(Rr-Ku(e-i)):t&&e0&&(this._ux=ar(n/Ss/t)||0,this._uy=ar(n/Ss/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(dt.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var n=ar(t-this._xi),i=ar(e-this._yi),a=n>this._ux||i>this._uy;if(this.addData(dt.L,t,e),this._ctx&&a&&this._ctx.lineTo(t,e),a)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,n,i,a,o){return this._drawPendingPt(),this.addData(dt.C,t,e,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(dt.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},r.prototype.arc=function(t,e,n,i,a,o){this._drawPendingPt(),Wi[0]=i,Wi[1]=a,vm(Wi,o),i=Wi[0],a=Wi[1];var s=a-i;return this.addData(dt.A,t,e,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,a,o),this._xi=un(a)*n+t,this._yi=ln(a)*n+e,this},r.prototype.arcTo=function(t,e,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,a),this},r.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(dt.R,t,e,n,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(dt.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){var e=t.length;!(this.data&&this.data.length===e)&&qu&&(this.data=new Float32Array(e));for(var n=0;nf.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 t=[],e=0;e11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){Ve[0]=Ve[1]=He[0]=He[1]=Number.MAX_VALUE,Tr[0]=Tr[1]=We[0]=We[1]=-Number.MAX_VALUE;var t=this.data,e=0,n=0,i=0,a=0,o;for(o=0;on||ar(_)>i||c===e-1)&&(p=Math.sqrt(m*m+_*_),a=g,o=y);break}case dt.C:{var S=t[c++],w=t[c++],g=t[c++],y=t[c++],x=t[c++],b=t[c++];p=tw(a,o,S,w,g,y,x,b,10),a=x,o=b;break}case dt.Q:{var S=t[c++],w=t[c++],g=t[c++],y=t[c++];p=rw(a,o,S,w,g,y,10),a=g,o=y;break}case dt.A:var T=t[c++],C=t[c++],A=t[c++],D=t[c++],I=t[c++],L=t[c++],P=L+I;c+=1,d&&(s=un(I)*A+T,u=ln(I)*D+C),p=$u(A,D)*Zu(Rr,Math.abs(L)),a=un(P)*A+T,o=ln(P)*D+C;break;case dt.R:{s=a=t[c++],u=o=t[c++];var R=t[c++],E=t[c++];p=R*2+E*2;break}case dt.Z:{var m=s-a,_=u-o;p=Math.sqrt(m*m+_*_),a=s,o=u;break}}p>=0&&(l[h++]=p,f+=p)}return this._pathLen=f,f},r.prototype.rebuildPath=function(t,e){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,u,l,f,h,c,v=e<1,d,p,g=0,y=0,m,_=0,S,w;if(!(v&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,m=e*p,!m)))t:for(var x=0;x0&&(t.lineTo(S,w),_=0),b){case dt.M:s=l=n[x++],u=f=n[x++],t.moveTo(l,f);break;case dt.L:{h=n[x++],c=n[x++];var C=ar(h-l),A=ar(c-f);if(C>i||A>a){if(v){var D=d[y++];if(g+D>m){var I=(m-g)/D;t.lineTo(l*(1-I)+h*I,f*(1-I)+c*I);break t}g+=D}t.lineTo(h,c),l=h,f=c,_=0}else{var L=C*C+A*A;L>_&&(S=h,w=c,_=L)}break}case dt.C:{var P=n[x++],R=n[x++],E=n[x++],F=n[x++],O=n[x++],N=n[x++];if(v){var D=d[y++];if(g+D>m){var I=(m-g)/D;Yr(l,P,E,O,I,on),Yr(f,R,F,N,I,sn),t.bezierCurveTo(on[1],sn[1],on[2],sn[2],on[3],sn[3]);break t}g+=D}t.bezierCurveTo(P,R,E,F,O,N),l=O,f=N;break}case dt.Q:{var P=n[x++],R=n[x++],E=n[x++],F=n[x++];if(v){var D=d[y++];if(g+D>m){var I=(m-g)/D;_s(l,P,E,I,on),_s(f,R,F,I,sn),t.quadraticCurveTo(on[1],sn[1],on[2],sn[2]);break t}g+=D}t.quadraticCurveTo(P,R,E,F),l=E,f=F;break}case dt.A:var V=n[x++],H=n[x++],U=n[x++],et=n[x++],ft=n[x++],ct=n[x++],Nt=n[x++],re=!n[x++],Bt=U>et?U:et,Lt=ar(U-et)>.001,xt=ft+ct,K=!1;if(v){var D=d[y++];g+D>m&&(xt=ft+ct*(m-g)/D,K=!0),g+=D}if(Lt&&t.ellipse?t.ellipse(V,H,U,et,Nt,ft,xt,re):t.arc(V,H,Bt,ft,xt,re),K)break t;T&&(s=un(ft)*U+V,u=ln(ft)*et+H),l=un(xt)*U+V,f=ln(xt)*et+H;break;case dt.R:s=l=n[x],u=f=n[x+1],h=n[x++],c=n[x++];var nt=n[x++],Ge=n[x++];if(v){var D=d[y++];if(g+D>m){var Et=m-g;t.moveTo(h,c),t.lineTo(h+Zu(Et,nt),c),Et-=nt,Et>0&&t.lineTo(h+nt,c+Zu(Et,Ge)),Et-=Ge,Et>0&&t.lineTo(h+$u(nt-Et,0),c+Ge),Et-=nt,Et>0&&t.lineTo(h,c+$u(Ge-Et,0));break t}g+=D}t.rect(h,c,nt,Ge);break;case dt.Z:if(v){var D=d[y++];if(g+D>m){var I=(m-g)/D;t.lineTo(l*(1-I)+s*I,f*(1-I)+u*I);break t}g+=D}t.closePath(),l=s,f=u}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.CMD=dt,r.initDefaultProps=function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),r}();function Yn(r,t,e,n,i,a,o){if(i===0)return!1;var s=i,u=0,l=r;if(o>t+s&&o>n+s||or+s&&a>e+s||at+h&&f>n+h&&f>a+h&&f>s+h||fr+h&&l>e+h&&l>i+h&&l>o+h||lt+l&&u>n+l&&u>a+l||ur+l&&s>e+l&&s>i+l||se||f+li&&(i+=Ui);var c=Math.atan2(u,s);return c<0&&(c+=Ui),c>=n&&c<=i||c+Ui>=n&&c+Ui<=i}function lr(r,t,e,n,i,a){if(a>t&&a>n||ai?s:0}var Cr=gr.CMD,fn=Math.PI*2,Nw=1e-4;function Bw(r,t){return Math.abs(r-t)t&&l>n&&l>a&&l>s||l1&&Fw(),v=Pt(t,n,a,s,ge[0]),c>1&&(d=Pt(t,n,a,s,ge[1]))),c===2?gt&&s>n&&s>a||s=0&&l<=1){for(var f=0,h=Vt(t,n,a,l),c=0;ce||s<-e)return 0;var u=Math.sqrt(e*e-s*s);Zt[0]=-u,Zt[1]=u;var l=Math.abs(n-i);if(l<1e-4)return 0;if(l>=fn-1e-4){n=0,i=fn;var f=a?1:-1;return o>=Zt[0]+r&&o<=Zt[1]+r?f:0}if(n>i){var h=n;n=i,i=h}n<0&&(n+=fn,i+=fn);for(var c=0,v=0;v<2;v++){var d=Zt[v];if(d+r>o){var p=Math.atan2(s,d),f=a?1:-1;p<0&&(p=fn+p),(p>=n&&p<=i||p+fn>=n&&p+fn<=i)&&(p>Math.PI/2&&p1&&(e||(s+=lr(u,l,f,h,n,i))),g&&(u=a[d],l=a[d+1],f=u,h=l),p){case Cr.M:f=a[d++],h=a[d++],u=f,l=h;break;case Cr.L:if(e){if(Yn(u,l,a[d],a[d+1],t,n,i))return!0}else s+=lr(u,l,a[d],a[d+1],n,i)||0;u=a[d++],l=a[d++];break;case Cr.C:if(e){if(Ew(u,l,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=zw(u,l,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],n,i)||0;u=a[d++],l=a[d++];break;case Cr.Q:if(e){if(Ow(u,l,a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=Gw(u,l,a[d++],a[d++],a[d],a[d+1],n,i)||0;u=a[d++],l=a[d++];break;case Cr.A:var y=a[d++],m=a[d++],_=a[d++],S=a[d++],w=a[d++],x=a[d++];d+=1;var b=!!(1-a[d++]);c=Math.cos(w)*_+y,v=Math.sin(w)*S+m,g?(f=c,h=v):s+=lr(u,l,c,v,n,i);var T=(n-y)*S/_+y;if(e){if(kw(y,m,S,w,w+x,b,t,T,i))return!0}else s+=Vw(y,m,S,w,w+x,b,T,i);u=Math.cos(w+x)*_+y,l=Math.sin(w+x)*S+m;break;case Cr.R:f=u=a[d++],h=l=a[d++];var C=a[d++],A=a[d++];if(c=f+C,v=h+A,e){if(Yn(f,h,c,h,t,n,i)||Yn(c,h,c,v,t,n,i)||Yn(c,v,f,v,t,n,i)||Yn(f,v,f,h,t,n,i))return!0}else s+=lr(c,h,c,v,n,i),s+=lr(f,v,f,h,n,i);break;case Cr.Z:if(e){if(Yn(u,l,f,h,t,n,i))return!0}else s+=lr(u,l,f,h,n,i);u=f,l=h;break}}return!e&&!Bw(l,h)&&(s+=lr(u,l,f,h,n,i)||0),s!==0}function Hw(r,t,e){return cm(r,0,!1,t,e)}function Ww(r,t,e,n){return cm(r,t,!0,e,n)}var dm=q({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Dn),Uw={style:q({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},eu.style)},Qu=Ra.concat(["invisible","culling","z","z2","zlevel","parent"]),st=function(r){k(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(u){e.buildPath(u,e.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?_f:n>.2?xw:Sf}else if(e)return Sf}return _f},t.prototype.getInsideTextStroke=function(e){var n=this.style.fill;if(W(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Oa(e,0)0))},t.prototype.hasFill=function(){var e=this.style,n=e.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,n=this.style,i=!e;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&ha)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||i){s.copy(e);var u=n.strokeNoScale?this.getLineScale():1,l=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;l=Math.max(l,f==null?4:f)}u>1e-10&&(s.width+=l/u,s.height+=l/u,s.x-=l/u/2,s.y-=l/u/2)}return s}return e},t.prototype.contain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect(),o=this.style;if(e=i[0],n=i[1],a.contain(e,n)){var s=this.path;if(this.hasStroke()){var u=o.lineWidth,l=o.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(this.hasFill()||(u=Math.max(u,this.strokeContainThreshold)),Ww(s,u/l,e,n)))return!0}if(this.hasFill())return Hw(s,e,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=ha,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,n){e==="shape"?this.setShape(n):r.prototype.attrKV.call(this,e,n)},t.prototype.setShape=function(e,n){var i=this.shape;return i||(i=this.shape={}),typeof e=="string"?i[e]=n:B(i,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&ha)},t.prototype.createStyle=function(e){return qa(dm,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=B({},this.shape))},t.prototype._applyStateObj=function(e,n,i,a,o,s){r.prototype._applyStateObj.call(this,e,n,i,a,o,s);var u=!(n&&a),l;if(n&&n.shape?o?a?l=n.shape:(l=B({},i.shape),B(l,n.shape)):(l=B({},a?this.shape:i.shape),B(l,n.shape)):u&&(l=i.shape),l)if(o){this.shape=B({},this.shape);for(var f={},h=mt(l),c=0;c0},t.prototype.hasFill=function(){var e=this.style,n=e.fill;return n!=null&&n!=="none"},t.prototype.createStyle=function(e){return qa(Yw,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var n=e.text;n!=null?n+="":n="";var i=js(n,e.font,e.textAlign,e.textBaseline);if(i.x+=e.x||0,i.y+=e.y||0,this.hasStroke()){var a=e.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},t.initDefaultProps=function(){var e=t.prototype;e.dirtyRectTolerance=10}(),t}(Pi);xs.prototype.type="tspan";var Xw=q({x:0,y:0},Dn),Zw={style:q({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},eu.style)};function $w(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var er=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return qa(Xw,e)},t.prototype._getSize=function(e){var n=this.style,i=n[e];if(i!=null)return i;var a=$w(n.image)?n.image:this.__image;if(!a)return 0;var o=e==="width"?"height":"width",s=n[o];return s==null?a[e]:a[e]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return Zw},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new at(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Pi);er.prototype.type="image";function qw(r,t){var e=t.x,n=t.y,i=t.width,a=t.height,o=t.r,s,u,l,f;i<0&&(e=e+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=u=l=f=o:o instanceof Array?o.length===1?s=u=l=f=o[0]:o.length===2?(s=l=o[0],u=f=o[1]):o.length===3?(s=o[0],u=f=o[1],l=o[2]):(s=o[0],u=o[1],l=o[2],f=o[3]):s=u=l=f=0;var h;s+u>i&&(h=s+u,s*=i/h,u*=i/h),l+f>i&&(h=l+f,l*=i/h,f*=i/h),u+l>a&&(h=u+l,u*=a/h,l*=a/h),s+f>a&&(h=s+f,s*=a/h,f*=a/h),r.moveTo(e+s,n),r.lineTo(e+i-u,n),u!==0&&r.arc(e+i-u,n+u,u,-Math.PI/2,0),r.lineTo(e+i,n+a-l),l!==0&&r.arc(e+i-l,n+a-l,l,0,Math.PI/2),r.lineTo(e+f,n+a),f!==0&&r.arc(e+f,n+a-f,f,Math.PI/2,Math.PI),r.lineTo(e,n+s),s!==0&&r.arc(e+s,n+s,s,Math.PI,Math.PI*1.5)}var ui=Math.round;function pm(r,t,e){if(t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;r.x1=n,r.x2=i,r.y1=a,r.y2=o;var s=e&&e.lineWidth;return s&&(ui(n*2)===ui(i*2)&&(r.x1=r.x2=wn(n,s,!0)),ui(a*2)===ui(o*2)&&(r.y1=r.y2=wn(a,s,!0))),r}}function gm(r,t,e){if(t){var n=t.x,i=t.y,a=t.width,o=t.height;r.x=n,r.y=i,r.width=a,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=wn(n,s,!0),r.y=wn(i,s,!0),r.width=Math.max(wn(n+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(wn(i+o,s,!1)-r.y,o===0?0:1)),r}}function wn(r,t,e){if(!t)return r;var n=ui(r*2);return(n+ui(t))%2===0?n/2:(n+(e?1:-1))/2}var Kw=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),Qw={},wt=function(r){k(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new Kw},t.prototype.buildPath=function(e,n){var i,a,o,s;if(this.subPixelOptimize){var u=gm(Qw,n,this.style);i=u.x,a=u.y,o=u.width,s=u.height,u.r=n.r,n=u}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?qw(e,n):e.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(st);wt.prototype.type="rect";var Ac={fill:"#000"},Dc=2,Jw={style:q({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},eu.style)},Dt=function(r){k(t,r);function t(e){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Ac,n.attr(e),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,I=e.width!=null&&(e.overflow==="truncate"||e.overflow==="break"||e.overflow==="breakAll"),L=o.calculatedLineHeight,P=0;P=0&&(P=x[L],P.align==="right");)this._placeToken(P,e,T,y,I,"right",_),C-=P.width,I-=P.width,L--;for(D+=(a-(D-g)-(m-I)-C)/2;A<=L;)P=x[A],this._placeToken(P,e,T,y,D+P.width/2,"center",_),D+=P.width,A++;y+=T}},t.prototype._placeToken=function(e,n,i,a,o,s,u){var l=n.rich[e.styleName]||{};l.text=e.text;var f=e.verticalAlign,h=a+i/2;f==="top"?h=a+e.height/2:f==="bottom"&&(h=a+i-e.height/2);var c=!e.isLineHolder&&Ju(l);c&&this._renderBackground(l,n,s==="right"?o-e.width:s==="center"?o-e.width/2:o,h-e.height/2,e.width,e.height);var v=!!l.backgroundColor,d=e.textPadding;d&&(o=Oc(o,s,d),h-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(xs),g=p.createStyle();p.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=Ec("fill"in l?l.fill:"fill"in n?n.fill:(m=!0,y.fill)),w=Rc("stroke"in l?l.stroke:"stroke"in n?n.stroke:!v&&!u&&(!y.autoStroke||m)?(_=Dc,y.stroke):null),x=l.textShadowBlur>0||n.textShadowBlur>0;g.text=e.text,g.x=o,g.y=h,x&&(g.shadowBlur=l.textShadowBlur||n.textShadowBlur||0,g.shadowColor=l.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=l.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=l.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||Rn,g.opacity=vi(l.opacity,n.opacity,1),Lc(g,l),w&&(g.lineWidth=vi(l.lineWidth,n.lineWidth,_),g.lineDash=tt(l.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=w),S&&(g.fill=S);var b=e.contentWidth,T=e.contentHeight;p.setBoundingRect(new at(la(g.x,b,g.textAlign),oi(g.y,T,g.textBaseline),b,T))},t.prototype._renderBackground=function(e,n,i,a,o,s){var u=e.backgroundColor,l=e.borderWidth,f=e.borderColor,h=u&&u.image,c=u&&!h,v=e.borderRadius,d=this,p,g;if(c||e.lineHeight||l&&f){p=this._getOrCreateChild(wt),p.useStyle(p.createStyle()),p.style.fill=null;var y=p.shape;y.x=i,y.y=a,y.width=o,y.height=s,y.r=v,p.dirtyShape()}if(c){var m=p.style;m.fill=u||null,m.fillOpacity=tt(e.fillOpacity,1)}else if(h){g=this._getOrCreateChild(er),g.onload=function(){d.dirtyStyle()};var _=g.style;_.image=u.image,_.x=i,_.y=a,_.width=o,_.height=s}if(l&&f){var m=p.style;m.lineWidth=l,m.stroke=f,m.strokeOpacity=tt(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(p||g).style;S.shadowBlur=e.shadowBlur||0,S.shadowColor=e.shadowColor||"transparent",S.shadowOffsetX=e.shadowOffsetX||0,S.shadowOffsetY=e.shadowOffsetY||0,S.opacity=vi(e.opacity,n.opacity,1)},t.makeFont=function(e){var n="";return rb(e)&&(n=[e.fontStyle,e.fontWeight,eb(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),n&&Pe(n)||e.textFont||e.font},t}(Pi),jw={left:!0,right:1,center:1},tb={top:1,bottom:1,middle:1},Ic=["fontStyle","fontWeight","fontSize","fontFamily"];function eb(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Ah+"px":r+"px"}function Lc(r,t){for(var e=0;e0){if(r<=i)return o;if(r>=a)return s}else{if(r>=i)return o;if(r<=a)return s}else{if(r===i)return o;if(r===a)return s}return(r-i)/u*l+o}function pt(r,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return W(r)?ab(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function Mt(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),ym),r=(+r).toFixed(t),e?r:+r}function mm(r){return r.sort(function(t,e){return t-e}),r}function qe(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return _m(r)}function _m(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),n=e>0?+t.slice(e+1):0,i=e>0?e:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function Vh(r,t){var e=Math.log,n=Math.LN10,i=Math.floor(e(r[1]-r[0])/n),a=Math.round(e(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function ob(r,t,e){if(!r[t])return 0;var n=Sm(r,e);return n[t]||0}function Sm(r,t){var e=tr(r,function(v,d){return v+(isNaN(d)?0:d)},0);if(e===0)return[];for(var n=Math.pow(10,t),i=G(r,function(v){return(isNaN(v)?0:v)/e*n*100}),a=n*100,o=G(i,function(v){return Math.floor(v)}),s=tr(o,function(v,d){return v+d},0),u=G(i,function(v,d){return v-o[d]});sl&&(l=u[h],f=h);++o[f],u[f]=0,++s}return G(o,function(v){return v/n})}function sb(r,t){var e=Math.max(qe(r),qe(t)),n=r+t;return e>ym?n:Mt(n,e)}var ub=9007199254740991;function Hh(r){var t=Math.PI*2;return(r%t+t)%t}function ka(r){return r>-1e-4&&r=10&&t++,t}function Wh(r,t){var e=ru(r),n=Math.pow(10,e),i=r/n,a;return t?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,r=a*n,e>=-20?+r.toFixed(e<0?-e:0):r}function fb(r,t){var e=(r.length-1)*t+1,n=Math.floor(e),i=+r[n-1],a=e-n;return a?i+a*(r[n]-i):i}function hb(r){r.sort(function(u,l){return s(u,l,0)?-1:1});for(var t=-1/0,e=1,n=0;n=0,a=!1;if(r instanceof st){var o=Lm(r),s=i&&o.selectFill||o.normalFill,u=i&&o.selectStroke||o.normalStroke;if(Xn(s)||Xn(u)){n=n||{};var l=n.style||{};l.fill==="inherit"?(a=!0,n=B({},n),l=B({},l),l.fill=s):!Xn(l.fill)&&Xn(s)?(a=!0,n=B({},n),l=B({},l),l.fill=df(s)):!Xn(l.stroke)&&Xn(u)&&(a||(n=B({},n),l=B({},l)),l.stroke=df(u)),n.style=l}}if(n&&n.z2==null){a||(n=B({},n));var f=r.z2EmphasisLift;n.z2=r.z2+(f!=null?f:Db)}return n}function Ob(r,t,e){if(e&&e.z2==null){e=B({},e);var n=r.z2SelectLift;e.z2=r.z2+(n!=null?n:Ib)}return e}function kb(r,t,e){var n=rt(r.currentStates,t)>=0,i=r.style.opacity,a=n?null:Rb(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=B({},e),o=B({opacity:n?i:a.opacity*.1},o),e.style=o),e}function ju(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return Eb(this,r,t,e);if(r==="blur")return kb(this,r,e);if(r==="select")return Ob(this,r,e)}return e}function Nb(r){r.stateProxy=ju;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=ju),e&&(e.stateProxy=ju)}function Wc(r,t){!Bm(r,t)&&!r.__highByOuter&&xr(r,Pm)}function Uc(r,t){!Bm(r,t)&&!r.__highByOuter&&xr(r,Rm)}function xi(r,t){r.__highByOuter|=1<<(t||0),xr(r,Pm)}function wi(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&xr(r,Rm)}function Bb(r){xr(r,$h)}function Om(r){xr(r,Em)}function km(r){xr(r,Lb)}function Nm(r){xr(r,Pb)}function Bm(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function Fm(r){var t=r.getModel(),e=[],n=[];t.eachComponent(function(i,a){var o=Xh(a),s=i==="series",u=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&n.push(u),o.isBlured&&(u.group.traverse(function(l){Em(l)}),s&&e.push(a)),o.isBlured=!1}),M(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(e,!1,t)})}function Tf(r,t,e,n){var i=n.getModel();e=e||"coordinateSystem";function a(l,f){for(var h=0;h0){var s={dataIndex:o,seriesIndex:e.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function bs(r,t,e){zm(r,!0),xr(r,Nb),Ub(r,t,e)}function Wb(r){zm(r,!1)}function bi(r,t,e,n){n?Wb(r):bs(r,t,e)}function Ub(r,t,e){var n=it(r);t!=null?(n.focus=t,n.blurScope=e):n.focus&&(n.focus=null)}var Xc=["emphasis","blur","select"],Yb={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Ti(r,t,e,n){e=e||"itemStyle";for(var i=0;i1&&(o*=tl(d),s*=tl(d));var p=(i===a?-1:1)*tl((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,g=p*o*v/s,y=p*-s*c/o,m=(r+e)/2+wo(h)*g-xo(h)*y,_=(t+n)/2+xo(h)*g+wo(h)*y,S=Kc([1,0],[(c-g)/o,(v-y)/s]),w=[(c-g)/o,(v-y)/s],x=[(-1*c-g)/o,(-1*v-y)/s],b=Kc(w,x);if(Df(w,x)<=-1&&(b=Yi),Df(w,x)>=1&&(b=0),b<0){var T=Math.round(b/Yi*1e6)/1e6;b=Yi*2+T%2*Yi}f.addData(l,m,_,o,s,S,b,h,a)}var Kb=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Qb=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Jb(r){var t=new gr;if(!r)return t;var e=0,n=0,i=e,a=n,o,s=gr.CMD,u=r.match(Kb);if(!u)return t;for(var l=0;l=0&&(i.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,n){var i=rt(this._children,e);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(e,n){var i=this._children,a=i[n];if(e&&e!==this&&e.parent!==this&&e!==a){i[n]=e,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var n=this.__zr;n&&n!==e.__zr&&e.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(e){var n=this.__zr,i=this._children,a=rt(i,e);return a<0?this:(i.splice(a,1),e.parent=null,n&&e.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,n=this.__zr,i=0;iP*P+R*R&&(T=A,C=D),{cx:T,cy:C,x0:-f,y0:-h,x1:T*(i/w-1),y1:C*(i/w-1)}}function oT(r){var t;if(z(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function sT(r,t){var e,n=va(t.r,0),i=va(t.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var u=t.startAngle,l=t.endAngle;if(!(isNaN(u)||isNaN(l))){var f=t.cx,h=t.cy,c=!!t.clockwise,v=Jc(l-u),d=v>el&&v%el;if(d>Me&&(v=d),!(n>Me))r.moveTo(f,h);else if(v>el-Me)r.moveTo(f+n*$n(u),h+n*hn(u)),r.arc(f,h,n,u,l,!c),i>Me&&(r.moveTo(f+i*$n(l),h+i*hn(l)),r.arc(f,h,i,l,u,c));else{var p=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,w=void 0,x=void 0,b=void 0,T=void 0,C=void 0,A=void 0,D=void 0,I=void 0,L=void 0,P=void 0,R=n*$n(u),E=n*hn(u),F=i*$n(l),O=i*hn(l),N=v>Me;if(N){var V=t.cornerRadius;V&&(e=oT(V),p=e[0],g=e[1],y=e[2],m=e[3]);var H=Jc(n-i)/2;if(_=Ue(H,y),S=Ue(H,m),w=Ue(H,p),x=Ue(H,g),C=b=va(_,S),A=T=va(w,x),(b>Me||T>Me)&&(D=n*$n(l),I=n*hn(l),L=i*$n(u),P=i*hn(u),vMe){var Lt=Ue(y,C),xt=Ue(m,C),K=bo(L,P,R,E,n,Lt,c),nt=bo(D,I,F,O,n,xt,c);r.moveTo(f+K.cx+K.x0,h+K.cy+K.y0),C0&&r.arc(f+K.cx,h+K.cy,Lt,Ft(K.y0,K.x0),Ft(K.y1,K.x1),!c),r.arc(f,h,n,Ft(K.cy+K.y1,K.cx+K.x1),Ft(nt.cy+nt.y1,nt.cx+nt.x1),!c),xt>0&&r.arc(f+nt.cx,h+nt.cy,xt,Ft(nt.y1,nt.x1),Ft(nt.y0,nt.x0),!c))}else r.moveTo(f+R,h+E),r.arc(f,h,n,u,l,!c);if(!(i>Me)||!N)r.lineTo(f+F,h+O);else if(A>Me){var Lt=Ue(p,A),xt=Ue(g,A),K=bo(F,O,D,I,i,-xt,c),nt=bo(R,E,L,P,i,-Lt,c);r.lineTo(f+K.cx+K.x0,h+K.cy+K.y0),A0&&r.arc(f+K.cx,h+K.cy,xt,Ft(K.y0,K.x0),Ft(K.y1,K.x1),!c),r.arc(f,h,i,Ft(K.cy+K.y1,K.cx+K.x1),Ft(nt.cy+nt.y1,nt.cx+nt.x1),c),Lt>0&&r.arc(f+nt.cx,h+nt.cy,Lt,Ft(nt.y1,nt.x1),Ft(nt.y0,nt.x0),!c))}else r.lineTo(f+F,h+O),r.arc(f,h,i,l,u,c)}r.closePath()}}}var uT=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}(),Ne=function(r){k(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new uT},t.prototype.buildPath=function(e,n){sT(e,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(st);Ne.prototype.type="sector";var lT=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),eo=function(r){k(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new lT},t.prototype.buildPath=function(e,n){var i=n.cx,a=n.cy,o=Math.PI*2;e.moveTo(i+n.r,a),e.arc(i,a,n.r,0,o,!1),e.moveTo(i+n.r0,a),e.arc(i,a,n.r0,0,o,!0)},t}(st);eo.prototype.type="ring";function fT(r,t,e,n){var i=[],a=[],o=[],s=[],u,l,f,h;if(n){f=[1/0,1/0],h=[-1/0,-1/0];for(var c=0,v=r.length;c=2){if(n){var a=fT(i,n,e,t.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(e?o:o-1);s++){var u=a[s*2],l=a[s*2+1],f=i[(s+1)%o];r.bezierCurveTo(u[0],u[1],l[0],l[1],f[0],f[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;scn[1]){if(s=!1,a)return s;var f=Math.abs(cn[0]-vn[1]),h=Math.abs(vn[0]-cn[1]);Math.min(f,h)>i.len()&&(f0){var h=f.duration,c=f.delay,v=f.easing,d={duration:h,delay:c||0,easing:v,done:a,force:!!a||!!o,setToFinal:!l,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),a&&a()}function It(r,t,e,n,i,a){Jh("update",r,t,e,n,i,a)}function Rt(r,t,e,n,i,a){Jh("enter",r,t,e,n,i,a)}function pi(r){if(!r.__zr)return!0;for(var t=0;tMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function ed(r){return!r.isGroup}function wT(r){return r.shape!=null}function r0(r,t,e){if(!r||!t)return;function n(o){var s={};return o.traverse(function(u){ed(u)&&u.anid&&(s[u.anid]=u)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return wT(o)&&(s.shape=B({},o.shape)),s}var a=n(r);t.traverse(function(o){if(ed(o)&&o.anid){var s=a[o.anid];if(s){var u=i(o);o.attr(i(s)),It(o,u,e,it(o).dataIndex)}}})}function rv(r,t){return G(r,function(e){var n=e[0];n=As(n,t.x),n=Ds(n,t.x+t.width);var i=e[1];return i=As(i,t.y),i=Ds(i,t.y+t.height),[n,i]})}function n0(r,t){var e=As(r.x,t.x),n=Ds(r.x+r.width,t.x+t.width),i=As(r.y,t.y),a=Ds(r.y+r.height,t.y+t.height);if(n>=e&&a>=i)return{x:e,y:i,width:n-e,height:a-i}}function no(r,t,e){var n=B({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),q(i,e),new er(n)):lu(r.replace("path://",""),n,e,"center")}function bT(r,t,e,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=rl(v,d,f,h)/c;return!(g<0||g>1)}function rl(r,t,e,n){return r*n-e*t}function TT(r){return r<=1e-6&&r>=-1e-6}function io(r){var t=r.itemTooltipOption,e=r.componentModel,n=r.itemName,i=W(t)?{formatter:t}:t,a=e.mainType,o=e.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var u=r.formatterParamsExtra;u&&M(mt(u),function(f){ke(s,f)||(s[f]=u[f],s.$vars.push(f))});var l=it(r.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:n,option:q({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function rd(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function hu(r,t){if(r)if(z(r))for(var e=0;e1){var f=u.shift();u.length===1&&(n[s]=u[0]),this._update&&this._update(f,o)}else l===1?(n[s]=null,this._update&&this._update(u,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var s=0;s1&&c===1)this._updateManyToOne&&this._updateManyToOne(f,l),i[u]=null;else if(h===1&&c>1)this._updateOneToMany&&this._updateOneToMany(f,l),i[u]=null;else if(h===1&&c===1)this._update&&this._update(f,l),i[u]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(f,l),i[u]=null;else if(h>1)for(var v=0;v1)for(var s=0;sp&&(p=_)}v[0]=d,v[1]=p}},i=function(){return this._data?this._data.length/this._dimSize:0};hd=(t={},t[te+"_"+je]={pure:!0,appendData:a},t[te+"_"+Ni]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[be]={pure:!0,appendData:a},t[rr]={pure:!0,appendData:function(o){var s=this._data;M(o,function(u,l){for(var f=s[l]||(s[l]=[]),h=0;h<(u||[]).length;h++)f.push(u[h])})}},t[we]={appendData:a},t[Wr]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;st},gte:function(r,t){return r>=t}},KT=function(){function r(t,e){if(!vt(e)){var n="";ut(n)}this._opFn=b0[t],this._rvalFloat=yr(e)}return r.prototype.evaluate=function(t){return vt(t)?this._opFn(t,this._rvalFloat):this._opFn(yr(t),this._rvalFloat)},r}(),T0=function(){function r(t,e){var n=t==="desc";this._resultLT=n?1:-1,e==null&&(e=n?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var n=vt(t)?t:yr(t),i=vt(e)?e:yr(e),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=W(t),u=W(e);s&&(n=u?t:0),u&&(i=s?e:0)}return ni?-this._resultLT:0},r}(),QT=function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=yr(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(e=yr(t)===this._rvalFloat)}return this._isEQ?e:!e},r}();function JT(r,t){return r==="eq"||r==="ne"?new QT(r==="eq",t):ke(b0,r)?new KT(r,t):null}var du="undefined",jT=typeof Uint32Array===du?Array:Uint32Array,tC=typeof Uint16Array===du?Array:Uint16Array,C0=typeof Int32Array===du?Array:Int32Array,pd=typeof Float64Array===du?Array:Float64Array,M0={float:pd,int:C0,ordinal:Array,number:Array,time:pd},sl;function qn(r){return r>65535?jT:tC}function Kn(){return[1/0,-1/0]}function eC(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function gd(r,t,e,n,i){var a=M0[e||"float"];if(i){var o=r[t],s=o&&o.length;if(s!==n){for(var u=new a(n),l=0;lg[1]&&(g[1]=p)}return this._rawCount=this._count=u,{start:s,end:u}},r.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,u=this._rawExtent,l=G(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(n!=null&&nt)a=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks,a=i[t],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,u=-1,l=0,f=0,h=this.count();f=0&&u<0)&&(s=d,u=v,l=0),v===u&&(o[l++]=f))}return o.length=l,o},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a=h&&m<=c||isNaN(m))&&(u[l++]=p),p++}d=!0}else if(a===2){for(var g=v[i[0]],_=v[i[1]],S=t[i[1]][0],w=t[i[1]][1],y=0;y=h&&m<=c||isNaN(m))&&(x>=S&&x<=w||isNaN(x))&&(u[l++]=p),p++}d=!0}}if(!d)if(a===1)for(var y=0;y=h&&m<=c||isNaN(m))&&(u[l++]=b)}else for(var y=0;yt[A][1])&&(T=!1)}T&&(u[l++]=e.getRawIndex(y))}return ly[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,u=Math.floor(1/e),l=this.getRawIndex(0),f,h,c,v=new(qn(this._rawCount))(Math.min((Math.ceil(o/u)+2)*2,o));v[s++]=l;for(var d=1;df&&(f=h,c=S)}D>0&&Ds&&(p=s-f);for(var g=0;gd&&(d=m,v=f+g)}var _=this.getRawIndex(h),S=this.getRawIndex(v);hf-d&&(u=f-d,s.length=u);for(var p=0;ph[1]&&(h[1]=y),c[v++]=m}return a._count=v,a._indices=c,a._updateGetRawIdx(),a},r.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();au&&(u=h)}return o=[s,u],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,a=0;a=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function t(e,n,i,a){return as(e[a],this._dimensions[a])}sl={arrayRows:t,objectRows:function(e,n,i,a){return as(e[n],this._dimensions[a])},keyedColumns:t,original:function(e,n,i,a){var o=e&&(e.value==null?e:e.value);return as(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(e,n,i,a){return e[a]}}}(),r}(),rC=St(),nC={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},A0=function(){function r(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=L0(this.source)))},r.prototype.getSourceDimensionIndex=function(t){return tt(this._dimNameMap.get(t),-1)},r.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},r.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=y0(this.source),n=!P0(t),i="",a=[],o=0,s=0;o30}var Zi=Y,Mr=G,iC=typeof Int32Array=="undefined"?Array:Int32Array,aC="e\0\0",yd=-1,oC=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],sC=["_approximateExtent"],md,Mo,$i,qi,ul,Ki,ll,ov=function(){function r(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;D0(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},u=!1,l={},f=0;f=e)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,u=s===we;if(u&&!i.pure)for(var l=[],f=t;f0},r.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[e];return a==null&&(a=this.getVisual(e),z(a)?a=a.slice():Zi(a)&&(a=B({},a)),i[e]=a),a},r.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Zi(e)?B(i,e):i[e]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){Zi(t)?B(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?B(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;Ab(n,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){M(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:Mr(this.dimensions,this._getDimInfo,this),this.hostModel)),ul(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var n=this[t];$(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return e.apply(this,[i].concat(qs(arguments)))})},r.internalField=function(){md=function(t){var e=t._invertedIndicesMap;M(e,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=e[i]=new iC(o.categories.length);for(var u=0;u1&&(u+="__ec__"+f),i[e]=u}}}(),r}();function uC(r,t){return sv(r,t).dimensions}function sv(r,t){iv(r)||(r=p0(r)),t=t||{};var e=t.coordDimensions||[],n=t.dimensionsDefine||r.dimensionsDefine||[],i=Z(),a=[],o=fC(r,e,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&P0(o),u=n===r.dimensionsDefine,l=u?L0(r):I0(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var h=Z(f),c=new C0(o),v=0;v0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function fC(r,t,e,n){var i=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,n||0);return M(t,function(a){var o;Y(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function hC(r,t,e){if(e||t.hasKey(r)){for(var n=0;t.hasKey(r+n);)n++;r+=n}return t.set(r,!0),r}var fl={},pu=function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(t,e){var n=[];M(fl,function(i,a){var o=i.create(t,e);n=n.concat(o||[])}),this._coordinateSystems=n},r.prototype.update=function(t,e){M(this._coordinateSystems,function(n){n.update&&n.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(t,e){fl[t]=e},r.get=function(t){return fl[t]},r}(),vC=function(){function r(t){this.coordSysDims=[],this.axisMap=Z(),this.categoryAxisMap=Z(),this.coordSysName=t}return r}();function cC(r){var t=r.get("coordinateSystem"),e=new vC(t),n=dC[t];if(n)return n(r,e,e.axisMap,e.categoryAxisMap),e}var dC={cartesian2d:function(r,t,e,n){var i=r.getReferringComponents("xAxis",Qt).models[0],a=r.getReferringComponents("yAxis",Qt).models[0];t.coordSysDims=["x","y"],e.set("x",i),e.set("y",a),Qn(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),Qn(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,n){var i=r.getReferringComponents("singleAxis",Qt).models[0];t.coordSysDims=["single"],e.set("single",i),Qn(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(r,t,e,n){var i=r.getReferringComponents("polar",Qt).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",a),e.set("angle",o),Qn(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),Qn(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,n){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,n){var i=r.ecModel,a=i.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();M(a.parallelAxisIndex,function(s,u){var l=i.getComponent("parallelAxis",s),f=o[u];e.set(f,l),Qn(l)&&(n.set(f,l),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=u))})}};function Qn(r){return r.get("type")==="category"}function R0(r,t,e){e=e||{};var n=e.byIndex,i=e.stackedCoordDimension,a,o,s;pC(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var u=!!(r&&r.get("stack")),l,f,h,c;if(M(a,function(m,_){W(m)&&(a[_]=m={name:m}),u&&!m.isExtraCoord&&(!n&&!l&&m.ordinalMeta&&(l=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!i||i===m.coordDim)&&(f=m))}),f&&!n&&!l&&(n=!0),f){h="__\0ecstackresult_"+r.id,c="__\0ecstackedover_"+r.id,l&&(l.createInvertedIndices=!0);var v=f.coordDim,d=f.type,p=0;M(a,function(m){m.coordDim===v&&p++});var g={name:h,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:c,coordDim:c,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(c,d),y.storeDimIndex=s.ensureCalculationDimension(h,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(a.push(g),a.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:l&&l.name,isStackedByIndex:n,stackedOverDimension:c,stackResultDimension:h}}function pC(r){return!D0(r.schema)}function kn(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function E0(r,t){return kn(r,t)?r.getCalculationInfo("stackResultDimension"):t}function gC(r,t){var e=r.get("coordinateSystem"),n=pu.get(e),i;return t&&t.coordSysDims&&(i=G(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var u=s.get("type");o.type=ZT(u)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function yC(r,t,e){var n,i;return e&&M(r,function(a,o){var s=a.coordDim,u=e.categoryAxisMap.get(s);u&&(n==null&&(n=o),a.ordinalMeta=u.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(r[n].otherDims.itemName=0),n}function gu(r,t,e){e=e||{};var n=t.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===we;var o=cC(t),s=gC(t,o),u=e.useEncodeDefaulter,l=$(u)?u:u?lt(NT,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},h=sv(i,f),c=yC(h.dimensions,e.createInvertedIndices,o),v=a?null:n.getSharedDataStore(h),d=R0(t,{schema:h,store:v}),p=new ov(h,t);p.setCalculationInfo(d);var g=c!=null&&mC(i)?function(y,m,_,S){return S===c?_:this.defaultDimValueGetter(y,m,_,S)}:null;return p.hasItemOption=!1,p.initData(a?i:v,null,g),p}function mC(r){if(r.sourceFormat===we){var t=_C(r.data||[]);return!z(ja(t))}}function _C(r){for(var t=0;t=0&&s.push(u)}),s}}function O0(r,t){return j(j({},r,!0),t,!0)}var bC=Math.log(2);function Ef(r,t,e,n,i,a){var o=n+"-"+i,s=r.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var u=Math.round(Math.log((1<>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[u]+":0",i[l]+":0",n[1-u]+":auto",i[1-l]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return e}function MC(r,t,e){for(var n=e?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],u=!0,l=0;l<4;l++){var f=r[l].getBoundingClientRect(),h=2*l,c=f.left,v=f.top;o.push(c,v),u=u&&a&&c===a[h]&&v===a[h+1],s.push(r[l].offsetLeft,r[l].offsetTop)}return u&&i?i:(t.srcCoords=o,t[n]=e?_d(s,o):_d(o,s))}function k0(r){return r.nodeName.toUpperCase()==="CANVAS"}var AC=/([&<>"'])/g,DC={"&":"&","<":"<",">":">",'"':""","'":"'"};function Kt(r){return r==null?"":(r+"").replace(AC,function(t,e){return DC[e]})}const IC={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:". "}}}},LC={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Ls="ZH",uv="EN",gi=uv,os={},lv={},N0=Q.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||gi).toUpperCase();return r.indexOf(Ls)>-1?Ls:gi}():gi;function fv(r,t){r=r.toUpperCase(),lv[r]=new yt(t),os[r]=t}function PC(r){if(W(r)){var t=os[r.toUpperCase()]||{};return r===Ls||r===uv?J(t):j(J(t),J(os[gi]),!1)}else return j(J(r),J(os[gi]),!1)}function RC(r){return lv[r]}function EC(){return lv[gi]}fv(uv,IC);fv(Ls,LC);var hv=1e3,vv=hv*60,Ta=vv*60,me=Ta*24,xd=me*365,ca={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}"},Ao="{yyyy}-{MM}-{dd}",wd={year:"{yyyy}",month:"{yyyy}-{MM}",day:Ao,hour:Ao+" "+ca.hour,minute:Ao+" "+ca.minute,second:Ao+" "+ca.second,millisecond:ca.none},vl=["year","month","day","hour","minute","second","millisecond"],B0=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function $t(r,t){return r+="","0000".substr(0,t-r.length)+r}function yi(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 OC(r){return r===yi(r)}function kC(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function oo(r,t,e,n){var i=_e(r),a=i[cv(e)](),o=i[mi(e)]()+1,s=Math.floor((o-1)/3)+1,u=i[yu(e)](),l=i["get"+(e?"UTC":"")+"Day"](),f=i[Ga(e)](),h=(f-1)%12+1,c=i[mu(e)](),v=i[_u(e)](),d=i[Su(e)](),p=f>=12?"pm":"am",g=p.toUpperCase(),y=n instanceof yt?n:RC(n||N0)||EC(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),w=m.get("dayOfWeek"),x=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,$t(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,$t(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,$t(u,2)).replace(/{d}/g,u+"").replace(/{eeee}/g,w[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+"").replace(/{HH}/g,$t(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,$t(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,$t(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,$t(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,$t(d,3)).replace(/{S}/g,d+"")}function NC(r,t,e,n,i){var a=null;if(W(e))a=e;else if($(e))a=e(r.value,t,{level:r.level});else{var o=B({},ca);if(r.level>0)for(var s=0;s=0;--s)if(u[l]){a=u[l];break}a=a||o.none}if(z(a)){var h=r.level==null?0:r.level>=0?r.level:a.length+r.level;h=Math.min(h,a.length-1),a=a[h]}}return oo(new Date(r.value),a,i,n)}function F0(r,t){var e=_e(r),n=e[mi(t)]()+1,i=e[yu(t)](),a=e[Ga(t)](),o=e[mu(t)](),s=e[_u(t)](),u=e[Su(t)](),l=u===0,f=l&&s===0,h=f&&o===0,c=h&&a===0,v=c&&i===1,d=v&&n===1;return d?"year":v?"month":c?"day":h?"hour":f?"minute":l?"second":"millisecond"}function bd(r,t,e){var n=vt(r)?_e(r):r;switch(t=t||F0(r,e),t){case"year":return n[cv(e)]();case"half-year":return n[mi(e)]()>=6?1:0;case"quarter":return Math.floor((n[mi(e)]()+1)/4);case"month":return n[mi(e)]();case"day":return n[yu(e)]();case"half-day":return n[Ga(e)]()/24;case"hour":return n[Ga(e)]();case"minute":return n[mu(e)]();case"second":return n[_u(e)]();case"millisecond":return n[Su(e)]()}}function cv(r){return r?"getUTCFullYear":"getFullYear"}function mi(r){return r?"getUTCMonth":"getMonth"}function yu(r){return r?"getUTCDate":"getDate"}function Ga(r){return r?"getUTCHours":"getHours"}function mu(r){return r?"getUTCMinutes":"getMinutes"}function _u(r){return r?"getUTCSeconds":"getSeconds"}function Su(r){return r?"getUTCMilliseconds":"getMilliseconds"}function BC(r){return r?"setUTCFullYear":"setFullYear"}function z0(r){return r?"setUTCMonth":"setMonth"}function G0(r){return r?"setUTCDate":"setDate"}function V0(r){return r?"setUTCHours":"setHours"}function H0(r){return r?"setUTCMinutes":"setMinutes"}function W0(r){return r?"setUTCSeconds":"setSeconds"}function U0(r){return r?"setUTCMilliseconds":"setMilliseconds"}function FC(r,t,e,n,i,a,o,s){var u=new Dt({style:{text:r,font:t,align:e,verticalAlign:n,padding:i,rich:a,overflow:o?"truncate":null,lineHeight:s}});return u.getBoundingRect()}function dv(r){if(!wm(r))return W(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function pv(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,n){return n.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var so=Rh;function kf(r,t,e){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(f){return f&&Pe(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var u=o?_e(r):r;if(isNaN(+u)){if(s)return"-"}else return oo(u,n,e)}if(t==="ordinal")return cs(r)?i(r):vt(r)&&a(r)?r+"":"-";var l=yr(r);return a(l)?dv(l):cs(r)?i(r):typeof r=="boolean"?r+"":"-"}var Td=["a","b","c","d","e","f","g"],cl=function(r,t){return"{"+r+(t==null?"":t)+"}"};function gv(r,t,e){z(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a':'';var o=e.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function zC(r,t,e){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd yyyy`);var n=_e(t),i=e?"getUTC":"get",a=n[i+"FullYear"](),o=n[i+"Month"]()+1,s=n[i+"Date"](),u=n[i+"Hours"](),l=n[i+"Minutes"](),f=n[i+"Seconds"](),h=n[i+"Milliseconds"]();return r=r.replace("MM",$t(o,2)).replace("M",o).replace("yyyy",a).replace("yy",$t(a%100+"",2)).replace("dd",$t(s,2)).replace("d",s).replace("hh",$t(u,2)).replace("h",u).replace("mm",$t(l,2)).replace("m",l).replace("ss",$t(f,2)).replace("s",f).replace("SSS",$t(h,3)),r}function GC(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function Nn(r,t){return t=t||"transparent",W(r)?r:Y(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function Cd(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var ss=M,VC=["left","right","top","bottom","width","height"],Do=[["width","left","right"],["height","top","bottom"]];function yv(r,t,e,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;t.eachChild(function(u,l){var f=u.getBoundingRect(),h=t.childAt(l+1),c=h&&h.getBoundingRect(),v,d;if(r==="horizontal"){var p=f.width+(c?-c.x+f.x:0);v=a+p,v>n||u.newline?(a=0,v=p,o+=s+e,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(c?-c.y+f.y:0);d=o+g,d>i||u.newline?(a+=s+e,o=0,d=g,s=f.width):s=Math.max(s,f.width)}u.newline||(u.x=a,u.y=o,u.markRedraw(),r==="horizontal"?a=v+e:o=d+e)})}var _i=yv;lt(yv,"vertical");lt(yv,"horizontal");function Sr(r,t,e){e=so(e||0);var n=t.width,i=t.height,a=pt(r.left,n),o=pt(r.top,i),s=pt(r.right,n),u=pt(r.bottom,i),l=pt(r.width,n),f=pt(r.height,i),h=e[2]+e[0],c=e[1]+e[3],v=r.aspect;switch(isNaN(l)&&(l=n-s-c-a),isNaN(f)&&(f=i-u-h-o),v!=null&&(isNaN(l)&&isNaN(f)&&(v>n/i?l=n*.8:f=i*.8),isNaN(l)&&(l=v*f),isNaN(f)&&(f=l/v)),isNaN(a)&&(a=n-s-l-c),isNaN(o)&&(o=i-u-f-h),r.left||r.right){case"center":a=n/2-l/2-e[3];break;case"right":a=n-l-c;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-f/2-e[0];break;case"bottom":o=i-f-h;break}a=a||0,o=o||0,isNaN(l)&&(l=n-c-a-(s||0)),isNaN(f)&&(f=i-h-o-(u||0));var d=new at(a+e[3],o+e[0],l,f);return d.margin=e,d}function HC(r,t,e,n,i,a){a=a||r,a.x=r.x,a.y=r.y;var o;if(o=r.getBoundingRect(),r.needLocalTransform()){var s=r.getLocalTransform();o=o.clone(),o.applyTransform(s)}var u=Sr(q({width:o.width,height:o.height},t),e,n),l=u.x-o.x,f=u.y-o.y;return a.x+=l,a.y+=f,a===r&&r.markRedraw(),!0}function Va(r){var t=r.layoutMode||r.constructor.layoutMode;return Y(t)?t:t?{type:t}:null}function Mi(r,t,e){var n=e&&e.ignoreSize;!z(n)&&(n=[n,n]);var i=o(Do[0],0),a=o(Do[1],1);l(Do[0],r,i),l(Do[1],r,a);function o(f,h){var c={},v=0,d={},p=0,g=2;if(ss(f,function(_){d[_]=r[_]}),ss(f,function(_){s(t,_)&&(c[_]=d[_]=t[_]),u(c,_)&&v++,u(d,_)&&p++}),n[h])return u(t,f[1])?d[f[2]]=null:u(t,f[2])&&(d[f[1]]=null),d;if(p===g||!v)return d;if(v>=g)return c;for(var y=0;y=0;u--)s=j(s,i[u],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(e,n){var i=e+"Index",a=e+"Id";return to(this.ecModel,e,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(yt);Gy(ot,yt);Ks(ot);xC(ot);wC(ot,YC);function YC(r){var t=[];return M(ot.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=G(t,function(e){return $e(e).main}),r!=="dataset"&&rt(t,"dataset")<=0&&t.unshift("dataset"),t}var Md=St();St();var mv=function(){function r(){}return r.prototype.getColorFromPalette=function(t,e,n){var i=At(this.get("color",!0)),a=this.get("colorLayer",!0);return ZC(this,Md,i,a,t,e,n)},r.prototype.clearColorPalette=function(){$C(this,Md)},r}();function XC(r,t){for(var e=r.length,n=0;nt)return r[n];return r[e-1]}function ZC(r,t,e,n,i,a,o){a=a||r;var s=t(a),u=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var f=o==null||!n?e:XC(n,o);if(f=f||e,!(!f||!f.length)){var h=f[u];return i&&(l[i]=h),s.paletteIdx=(u+1)%f.length,h}}function $C(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var qC=/\{@(.+?)\}/g,KC=function(){function r(){}return r.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),a=n.getRawIndex(t),o=n.getName(t),s=n.getRawDataItem(t),u=n.getItemVisual(t,"style"),l=u&&u[n.getItemVisual(t,"drawType")||"fill"],f=u&&u.stroke,h=this.mainType,c=h==="series",v=n.userOutput&&n.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:o,dataIndex:a,data:s,dataType:e,value:i,color:l,borderColor:f,dimensionNames:v?v.fullDimensions:null,encode:v?v.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(t,e,n,i,a,o){e=e||"normal";var s=this.getData(n),u=this.getDataParams(t,n);if(o&&(u.value=o.interpolatedValue),i!=null&&z(u.value)&&(u.value=u.value[i]),!a){var l=s.getItemModel(t);a=l.get(e==="normal"?["label","formatter"]:[e,"label","formatter"])}if($(a))return u.status=e,u.dimensionIndex=i,a(u);if(W(a)){var f=gv(a,u);return f.replace(qC,function(h,c){var v=c.length,d=c;d.charAt(0)==="["&&d.charAt(v-1)==="]"&&(d=+d.slice(1,v-1));var p=Ci(s,t,d);if(o&&z(o.interpolatedValue)){var g=s.getDimensionIndex(d);g>=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(t,e){return Ci(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,n){},r}();function Ad(r){var t,e;return Y(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function Ca(r){return new QC(r)}var QC=function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,n=t&&t.skip;if(this._dirty&&e){var i=this.context;i.data=i.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,u=f(t&&t.modBy),l=t&&t.modDataCount||0;(o!==u||s!==l)&&(a="reset");function f(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=u,this._modDataCount=l;var c=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,d=Math.min(c!=null?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(h||v1&&n>0?s:o}};return a;function o(){return t=r?null:u9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),n=!!e.length,i,a;if(Io(t)){var o=t,s=void 0,u=void 0,l=void 0;if(n){var f=e[0];f.prepareSource(),l=f.getSource(),s=l.data,u=l.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),u=jt(s)?Wr:we,a=[];var h=this._getSourceMetaRawOption()||{},c=l&&l.metaRawOption||{},v=tt(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=tt(h.sourceHeader,c.sourceHeader),p=tt(h.dimensions,c.dimensions),g=v!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||p;i=g?[Pf(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:p},u)]:[]}else{var y=t;if(n){var m=this._applyTransform(e);i=m.sourceList,a=m.upstreamSignList}else{var _=y.get("source",!0);i=[Pf(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},r.prototype._applyTransform=function(t){var e=this._sourceHost,n=e.get("transform",!0),i=e.get("fromTransformResult",!0);if(i!=null){var a="";t.length!==1&&Ld(a)}var o,s=[],u=[];return M(t,function(l){l.prepareSource();var f=l.getSource(i||0),h="";i!=null&&!f&&Ld(h),s.push(f),u.push(l._getVersionSign())}),n?o=aM(n,s,{datasetIndex:e.componentIndex}):i!=null&&(o=[zT(s[0])]),{sourceList:o,upstreamSignList:u}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e1||e>0&&!r.noHeader;return M(r.blocks,function(i){var a=Q0(i);a>=t&&(t=a+ +(n&&(!a||Nf(i)&&!i.noHeader)))}),t}return 0}function fM(r,t,e,n){var i=t.noHeader,a=vM(Q0(t)),o=[],s=t.blocks||[];Oe(!s||z(s)),s=s||[];var u=r.orderMode;if(t.sortBlocks&&u){s=s.slice();var l={valueAsc:"asc",valueDesc:"desc"};if(ke(l,u)){var f=new T0(l[u],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else u==="seriesDesc"&&s.reverse()}M(s,function(p,g){var y=t.valueFormatter,m=K0(p)(y?B(B({},r),{valueFormatter:y}):r,p,g>0?a.html:0,n);m!=null&&o.push(m)});var h=r.renderMode==="richText"?o.join(a.richText):Bf(n,o.join(""),i?e:a.html);if(i)return h;var c=kf(t.header,"ordinal",r.useUTC),v=q0(n,r.renderMode).nameStyle,d=$0(n);return r.renderMode==="richText"?J0(r,c,v)+a.richText+h:Bf(n,'
'+Kt(c)+"
"+h,e)}function hM(r,t,e,n){var i=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,u=t.name,l=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=z(S)?S:[S],G(S,function(w,x){return kf(w,z(v)?v[x]:v,l)})};if(!(a&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),c=a?"":kf(u,"ordinal",l),v=t.valueType,d=o?[]:f(t.value,t.dataIndex),p=!s||!a,g=!s&&a,y=q0(n,i),m=y.nameStyle,_=y.valueStyle;return i==="richText"?(s?"":h)+(a?"":J0(r,c,m))+(o?"":pM(r,d,p,g,_)):Bf(n,(s?"":h)+(a?"":cM(c,!s,m))+(o?"":dM(d,p,g,_)),e)}}function Pd(r,t,e,n,i,a){if(r){var o=K0(r),s={useUTC:i,renderMode:e,orderMode:n,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function vM(r){return{html:uM[r],richText:lM[r]}}function Bf(r,t,e){var n='
',i="margin: "+e+"px 0 0",a=$0(r);return'
'+t+n+"
"}function cM(r,t,e){var n=t?"margin-left:2px":"";return''+Kt(r)+""}function dM(r,t,e,n){var i=e?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return r=z(r)?r:[r],''+G(r,function(o){return Kt(o)}).join("  ")+""}function J0(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function pM(r,t,e,n,i){var a=[i],o=n?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(z(t)?t.join(" "):t,a)}function j0(r,t){var e=r.getData().getItemVisual(t,"style"),n=e[r.visualDrawType];return Nn(n)}function t_(r,t){var e=r.get("padding");return e!=null?e:t==="richText"?[8,10]:10}var dl=function(){function r(){this.richTextStyles={},this._nextStyleNameId=bm()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,n){var i=n==="richText"?this._generateStyleName():null,a=Y0({color:e,type:t,renderMode:n,markerId:i});return W(a)?a:(this.richTextStyles[i]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var n={};z(e)?M(e,function(a){return B(n,a)}):B(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},r}();function gM(r){var t=r.series,e=r.dataIndex,n=r.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),u=z(s),l=j0(t,e),f,h,c,v;if(o>1||u&&!o){var d=yM(s,t,e,a,l);f=d.inlineValues,h=d.inlineValueTypes,c=d.blocks,v=d.inlineValues[0]}else if(o){var p=i.getDimensionInfo(a[0]);v=f=Ci(i,e,a[0]),h=p.type}else v=f=u?s[0]:s;var g=Uh(t),y=g&&t.name||"",m=i.getName(e),_=n?y:m;return Bn("section",{header:y,noHeader:n||!g,sortParam:v,blocks:[Bn("nameValue",{markerType:"item",markerColor:l,name:_,noName:!Pe(_),value:f,valueType:h,dataIndex:e})].concat(c||[])})}function yM(r,t,e,n,i){var a=t.getData(),o=tr(r,function(h,c,v){var d=a.getDimensionInfo(v);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],u=[],l=[];n.length?M(n,function(h){f(Ci(a,e,h),h)}):M(r,f);function f(h,c){var v=a.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?l.push(Bn("nameValue",{markerType:"subItem",markerColor:i,name:v.displayName,value:h,valueType:v.type})):(s.push(h),u.push(v.type)))}return{inlineValues:s,inlineValueTypes:u,blocks:l}}var Ar=St();function Lo(r,t){return r.getName(t)||r.getId(t)}var us="__universalTransitionEnabled",ee=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Ca({count:_M,reset:SM}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,i);var a=Ar(this).sourceManager=new Z0(this);a.prepareSource();var o=this.getInitialData(e,i);Ed(o,this),this.dataTask.context.data=o,Ar(this).dataBeforeProcessed=o,Rd(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,n){var i=Va(this),a=i?xu(e):{},o=this.subType;ot.hasClass(o)&&(o+="Series"),j(e,n.getTheme().get(this.subType)),j(e,this.getDefaultOption()),bf(e,"label",["show"]),this.fillDataTextStyle(e.data),i&&Mi(e,a,i)},t.prototype.mergeOption=function(e,n){e=j(this.option,e,!0),this.fillDataTextStyle(e.data);var i=Va(this);i&&Mi(this.option,e,i);var a=Ar(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(e,n);Ed(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Ar(this).dataBeforeProcessed=o,Rd(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!jt(e))for(var n=["show"],i=0;ithis.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,n,i){var a=this.ecModel,o=mv.prototype.getColorFromPalette.call(this,e,n,i);return o||(o=a.getColorFromPalette(e,n,i)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,n){this._innerSelect(this.getData(n),e)},t.prototype.unselect=function(e,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},t.prototype.isSelected=function(e,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Lo(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[us])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,n){var i,a,o=this.option,s=o.selectedMode,u=n.length;if(!(!s||!u)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Y(o.selectedMap)||(o.selectedMap={});for(var l=o.selectedMap,f=0;f0&&this._innerSelect(e,n)}},t.registerClass=function(e){return ot.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(ot);fe(ee,KC);fe(ee,mv);Gy(ee,ot);function Rd(r){var t=r.name;Uh(r)||(r.name=mM(r)||t)}function mM(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),n=[];return M(e,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function _M(r){return r.model.getRawData().count()}function SM(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),xM}function xM(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Ed(r,t){M(By(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,lt(wM,t))})}function wM(r,t){var e=Ff(r);return e&&e.setOutputEnd((t||this).count()),t}function Ff(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var n=e.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(r.uid))}return n}}var bM=st.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,n=t.cy,i=t.width/2,a=t.height/2;r.moveTo(e,n-a),r.lineTo(e+i,n+a),r.lineTo(e-i,n+a),r.closePath()}}),TM=st.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,n=t.cy,i=t.width/2,a=t.height/2;r.moveTo(e,n-a),r.lineTo(e+i,n),r.lineTo(e,n+a),r.lineTo(e-i,n),r.closePath()}}),CM=st.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.x,n=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),u=n-a+o+s,l=Math.asin(s/o),f=Math.cos(l)*o,h=Math.sin(l),c=Math.cos(l),v=o*.6,d=o*.7;r.moveTo(e-f,u+s),r.arc(e,u,o,Math.PI-l,Math.PI*2+l),r.bezierCurveTo(e+f-h*v,u+s+c*v,e,n-d,e,n),r.bezierCurveTo(e,n-d,e-f+h*v,u+s+c*v,e-f,u+s),r.closePath()}}),MM=st.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.height,n=t.width,i=t.x,a=t.y,o=n/3*2;r.moveTo(i,a),r.lineTo(i+o,a+e),r.lineTo(i,a+e/4*3),r.lineTo(i-o,a+e),r.lineTo(i,a),r.closePath()}}),AM={line:mr,rect:wt,roundRect:wt,square:wt,circle:Ri,diamond:TM,pin:CM,arrow:MM,triangle:bM},DM={line:function(r,t,e,n,i){i.x1=r,i.y1=t+n/2,i.x2=r+e,i.y2=t+n/2},rect:function(r,t,e,n,i){i.x=r,i.y=t,i.width=e,i.height=n},roundRect:function(r,t,e,n,i){i.x=r,i.y=t,i.width=e,i.height=n,i.r=Math.min(e,n)/4},square:function(r,t,e,n,i){var a=Math.min(e,n);i.x=r,i.y=t,i.width=a,i.height=a},circle:function(r,t,e,n,i){i.cx=r+e/2,i.cy=t+n/2,i.r=Math.min(e,n)/2},diamond:function(r,t,e,n,i){i.cx=r+e/2,i.cy=t+n/2,i.width=e,i.height=n},pin:function(r,t,e,n,i){i.x=r+e/2,i.y=t+n/2,i.width=e,i.height=n},arrow:function(r,t,e,n,i){i.x=r+e/2,i.y=t+n/2,i.width=e,i.height=n},triangle:function(r,t,e,n,i){i.cx=r+e/2,i.cy=t+n/2,i.width=e,i.height=n}},zf={};M(AM,function(r,t){zf[t]=new r});var IM=st.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,t,e){var n=ps(r,t,e),i=this.shape;return i&&i.symbolType==="pin"&&t.position==="inside"&&(n.y=e.y+e.height*.4),n},buildPath:function(r,t,e){var n=t.symbolType;if(n!=="none"){var i=zf[n];i||(n="rect",i=zf[n]),DM[n](t.x,t.y,t.width,t.height,i.shape),i.buildPath(r,i.shape,e)}}});function LM(r,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=r,e.fill=t||"#fff",e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=r:e.fill=r,this.markRedraw()}}function Xr(r,t,e,n,i,a,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var u;return r.indexOf("image://")===0?u=jh(r.slice(8),new at(t,e,n,i),o?"center":"cover"):r.indexOf("path://")===0?u=lu(r.slice(7),{},new at(t,e,n,i),o?"center":"cover"):u=new IM({shape:{symbolType:r,x:t,y:e,width:n,height:i}}),u.__isEmptyBrush=s,u.setColor=LM,a&&u.setColor(a),u}function e_(r){return z(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function r_(r,t){if(r!=null)return z(r)||(r=[r,r]),[pt(r[0],t[0])||0,pt(tt(r[1],r[0]),t[1])||0]}var PM=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e){return gu(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var n=new bt,i=Xr("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);n.add(i),i.setStyle(e.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,u=e.itemHeight*.8,l=Xr(s,(e.itemWidth-u)/2,(e.itemHeight-u)/2,u,u,e.itemStyle.fill);n.add(l),l.setStyle(e.itemStyle);var f=e.iconRotate==="inherit"?o:e.iconRotate||0;return l.rotation=f*Math.PI/180,l.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(l.style.stroke=l.style.fill,l.style.fill="#fff",l.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(ee);function Sv(r,t){var e=r.mapDimensionsAll("defaultedLabel"),n=e.length;if(n===1){var i=Ci(r,t,e[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(t[a])}return n.join(" ")}var xv=function(r){k(t,r);function t(e,n,i,a){var o=r.call(this)||this;return o.updateData(e,n,i,a),o}return t.prototype._createSymbol=function(e,n,i,a,o){this.removeAll();var s=Xr(e,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=RM,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){xi(this.childAt(0))},t.prototype.downplay=function(){wi(this.childAt(0))},t.prototype.setZ=function(e,n){var i=this.childAt(0);i.zlevel=e,i.z=n},t.prototype.setDraggable=function(e,n){var i=this.childAt(0);i.draggable=e,i.cursor=!n&&e?"move":i.cursor},t.prototype.updateData=function(e,n,i,a){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",s=e.hostModel,u=t.getSymbolSize(e,n),l=o!==this._symbolType,f=a&&a.disableAnimation;if(l){var h=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,u,h)}else{var c=this.childAt(0);c.silent=!1;var v={scaleX:u[0]/2,scaleY:u[1]/2};f?c.attr(v):It(c,v,s,n),Ba(c)}if(this._updateCommon(e,n,u,i,a),l){var c=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,Rt(c,v,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,n,i,a,o){var s=this.childAt(0),u=e.hostModel,l,f,h,c,v,d,p,g,y;if(a&&(l=a.emphasisItemStyle,f=a.blurItemStyle,h=a.selectItemStyle,c=a.focus,v=a.blurScope,p=a.labelStatesModels,g=a.hoverScale,y=a.cursorStyle,d=a.emphasisDisabled),!a||e.hasItemOption){var m=a&&a.itemModel?a.itemModel:e.getItemModel(n),_=m.getModel("emphasis");l=_.getModel("itemStyle").getItemStyle(),h=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),c=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),p=Oi(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=e.getItemVisual(n,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var w=r_(e.getItemVisual(n,"symbolOffset"),i);w&&(s.x=w[0],s.y=w[1]),y&&s.attr("cursor",y);var x=e.getItemVisual(n,"style"),b=x.fill;if(s instanceof er){var T=s.style;s.useStyle(B({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(B({},x)):s.useStyle(x),s.style.decal=null,s.setColor(b,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=e.getItemVisual(n,"liftZ"),A=this._z2;C!=null?A==null&&(this._z2=s.z2,s.z2+=C):A!=null&&(s.z2=A,this._z2=null);var D=o&&o.useNameLabel;Ei(s,p,{labelFetcher:u,labelDataIndex:n,defaultText:I,inheritColor:b,defaultOpacity:x.opacity});function I(R){return D?e.getName(R):Sv(e,R)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var L=s.ensureState("emphasis");L.style=l,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;L.scaleX=this._sizeX*P,L.scaleY=this._sizeY*P,this.setSymbolScale(1),bi(this,c,v,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,n,i){var a=this.childAt(0),o=it(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var u=a.getTextContent();u&&Cs(u,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Cs(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,n){return e_(e.getItemVisual(n,"symbolSize"))},t}(bt);function RM(r,t){this.parent.drift(r,t)}function pl(r,t,e,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(e))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function Od(r){return r!=null&&!Y(r)&&(r={isIgnore:r}),r||{}}function kd(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:Oi(t),cursorStyle:t.get("cursor")}}var EM=function(){function r(t){this.group=new bt,this._SymbolCtor=t||xv}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=Od(e);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=e.disableAnimation,u=kd(t),l={disableAnimation:s},f=e.getSymbolPoint||function(h){return t.getItemLayout(h)};a||n.removeAll(),t.diff(a).add(function(h){var c=f(h);if(pl(t,c,h,e)){var v=new o(t,h,u,l);v.setPosition(c),t.setItemGraphicEl(h,v),n.add(v)}}).update(function(h,c){var v=a.getItemGraphicEl(c),d=f(h);if(!pl(t,d,h,e)){n.remove(v);return}var p=t.getItemVisual(h,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==p)n.remove(v),v=new o(t,h,u,l),v.setPosition(d);else{v.updateData(t,h,u,l);var y={x:d[0],y:d[1]};s?v.attr(y):It(v,y,i)}n.add(v),t.setItemGraphicEl(h,v)}).remove(function(h){var c=a.getItemGraphicEl(h);c&&c.fadeOut(function(){n.remove(c)},i)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=kd(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,n){this._progressiveEls=[],n=Od(n);function i(u){u.isGroup||(u.incremental=!0,u.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a0?e=n[0]:n[1]<0&&(e=n[1]),e}function a_(r,t,e,n){var i=NaN;r.stacked&&(i=e.get(e.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=e.get(r.baseDim,n),o[1-a]=i,t.dataToPoint(o)}var o_=typeof Float32Array!="undefined",kM=o_?Float32Array:Array;function vr(r){return z(r)?o_?new Float32Array(r):r:new kM(r)}function NM(r,t){var e=[];return t.diff(r).add(function(n){e.push({cmd:"+",idx:n})}).update(function(n,i){e.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){e.push({cmd:"-",idx:n})}).execute(),e}function BM(r,t,e,n,i,a,o,s){for(var u=NM(r,t),l=[],f=[],h=[],c=[],v=[],d=[],p=[],g=i_(i,t,o),y=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_=i||p<0)break;if(Ln(y,m)){if(u){p+=a;continue}break}if(p===e)r[a>0?"moveTo":"lineTo"](y,m),h=y,c=m;else{var _=y-l,S=m-f;if(_*_+S*S<.5){p+=a;continue}if(o>0){for(var w=p+a,x=t[w*2],b=t[w*2+1];x===y&&b===m&&g=n||Ln(x,b))v=y,d=m;else{A=x-l,D=b-f;var P=y-l,R=x-y,E=m-f,F=b-m,O=void 0,N=void 0;if(s==="x"){O=Math.abs(P),N=Math.abs(R);var V=A>0?1:-1;v=y-V*O*o,d=m,I=y+V*N*o,L=m}else if(s==="y"){O=Math.abs(E),N=Math.abs(F);var H=D>0?1:-1;v=y,d=m-H*O*o,I=y,L=m+H*N*o}else O=Math.sqrt(P*P+E*E),N=Math.sqrt(R*R+F*F),C=N/(N+O),v=y-A*o*(1-C),d=m-D*o*(1-C),I=y+A*o*C,L=m+D*o*C,I=Dr(I,Ir(x,y)),L=Dr(L,Ir(b,m)),I=Ir(I,Dr(x,y)),L=Ir(L,Dr(b,m)),A=I-y,D=L-m,v=y-A*O/N,d=m-D*O/N,v=Dr(v,Ir(l,y)),d=Dr(d,Ir(f,m)),v=Ir(v,Dr(l,y)),d=Ir(d,Dr(f,m)),A=y-v,D=m-d,I=y+A*N/O,L=m+D*N/O}r.bezierCurveTo(h,c,v,d,y,m),h=I,c=L}else r.lineTo(y,m)}l=y,f=m,p+=a}return g}var s_=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),FM=function(r){k(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new s_},t.prototype.buildPath=function(e,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Ln(i[o*2-2],i[o*2-1]);o--);for(;a=0){var S=l?(d-u)*_+u:(v-s)*_+s;return l?[e,S]:[S,e]}s=v,u=d;break;case o.C:v=a[h++],d=a[h++],p=a[h++],g=a[h++],y=a[h++],m=a[h++];var w=l?ms(s,v,p,y,e,f):ms(u,d,g,m,e,f);if(w>0)for(var x=0;x=0){var S=l?Pt(u,d,g,m,b):Pt(s,v,p,y,b);return l?[e,S]:[S,e]}}s=y,u=m;break}}},t}(st),zM=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(s_),GM=function(r){k(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new zM},t.prototype.buildPath=function(e,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,u=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Ln(i[s*2-2],i[s*2-1]);s--);for(;ot){a?e.push(o(a,u,t)):i&&e.push(o(i,u,0),o(i,u,t));break}else i&&(e.push(o(i,u,0)),i=null),e.push(u),a=u}return e}function $M(r,t,e){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&t.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var u=t.getAxis(i),l=G(a.stops,function(_){return{coord:u.toGlobalCoord(u.dataToCoord(_.value)),color:_.color}}),f=l.length,h=a.outerColors.slice();f&&l[0].coord>l[f-1].coord&&(l.reverse(),h.reverse());var c=ZM(l,i==="x"?e.getWidth():e.getHeight()),v=c.length;if(!v&&f)return l[0].coord<0?h[1]?h[1]:l[f-1].color:h[0]?h[0]:l[0].color;var d=10,p=c[0].coord-d,g=c[v-1].coord+d,y=g-p;if(y<.001)return"transparent";M(c,function(_){_.offset=(_.coord-p)/y}),c.push({offset:v?c[v-1].offset:.5,color:h[1]||"transparent"}),c.unshift({offset:v?c[0].offset:.5,color:h[0]||"transparent"});var m=new Qh(0,0,0,0,c,!0);return m[i]=p,m[i+"2"]=g,m}}}function qM(r,t,e){var n=r.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=e.getAxesByScale("ordinal")[0];if(a&&!(i&&KM(a,t))){var o=t.mapDimension(a.dim),s={};return M(a.getViewLabels(),function(u){var l=a.scale.getRawOrdinalNumber(u.tickValue);s[l]=1}),function(u){return!s.hasOwnProperty(t.get(o,u))}}}}function KM(r,t){var e=r.getExtent(),n=Math.abs(e[1]-e[0])/r.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function QM(r,t){return isNaN(r)||isNaN(t)}function JM(r){for(var t=r.length/2;t>0&&QM(r[t*2-2],r[t*2-1]);t--);return t-1}function Hd(r,t){return[r[t*2],r[t*2+1]]}function jM(r,t,e){for(var n=r.length/2,i=e==="x"?0:1,a,o,s=0,u=-1,l=0;l=t||a>=t&&o<=t){u=l;break}s=l,a=o}return{range:[s,u],t:(t-a)/(o-a)}}function h_(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var N=d.getState("emphasis").style;N.lineWidth=+d.style.lineWidth+1}it(d).seriesIndex=e.seriesIndex,bi(d,E,F,O);var V=Vd(e.get("smooth")),H=e.get("smoothMonotone");if(d.setShape({smooth:V,smoothMonotone:H,connectNulls:b}),p){var U=s.getCalculationInfo("stackedOnSeries"),et=0;p.useStyle(q(l.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),U&&(et=Vd(U.get("smooth"))),p.setShape({smooth:V,stackedOnSmooth:et,smoothMonotone:H,connectNulls:b}),Ti(p,e,"areaStyle"),it(p).seriesIndex=e.seriesIndex,bi(p,E,F,O)}var ft=this._changePolyState;s.eachItemGraphicEl(function(ct){ct&&(ct.onHoverStateChange=ft)}),this._polyline.onHoverStateChange=ft,this._data=s,this._coordSys=a,this._stackedOnPoints=w,this._points=f,this._step=A,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,d),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,n){it(n).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,n,i,a){var o=e.getData(),s=On(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var u=o.getLayout("points"),l=o.getItemGraphicEl(s);if(!l){var f=u[s*2],h=u[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var c=e.get("zlevel")||0,v=e.get("z")||0;l=new xv(o,s),l.x=f,l.y=h,l.setZ(c,v);var d=l.getSymbolPath().getTextContent();d&&(d.zlevel=c,d.z=v,d.z2=this._polyline.z2+1),l.__temp=!0,o.setItemGraphicEl(s,l),l.stopSymbolAnimation(!0),this.group.add(l)}l.highlight()}else Ut.prototype.highlight.call(this,e,n,i,a)},t.prototype.downplay=function(e,n,i,a){var o=e.getData(),s=On(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var u=o.getItemGraphicEl(s);u&&(u.__temp?(o.setItemGraphicEl(s,null),this.group.remove(u)):u.downplay())}else Ut.prototype.downplay.call(this,e,n,i,a)},t.prototype._changePolyState=function(e){var n=this._polygon;Hc(this._polyline,e),n&&Hc(n,e)},t.prototype._newPolyline=function(e){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new FM({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(e,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new GM({shape:{points:e,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(e,n,i){var a,o,s=n.getBaseAxis(),u=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var l=e.hostModel,f=l.get("animationDuration");$(f)&&(f=f(null));var h=l.get("animationDelay")||0,c=$(h)?h(null):h;e.eachItemGraphicEl(function(v,d){var p=v;if(p){var g=[v.x,v.y],y=void 0,m=void 0,_=void 0;if(i)if(o){var S=i,w=n.pointToCoord(g);a?(y=S.startAngle,m=S.endAngle,_=-w[1]/180*Math.PI):(y=S.r0,m=S.r,_=w[0])}else{var x=i;a?(y=x.x,m=x.x+x.width,_=v.x):(y=x.y+x.height,m=x.y,_=v.y)}var b=m===y?0:(_-y)/(m-y);u&&(b=1-b);var T=$(h)?h(d):f*b+c,C=p.getSymbolPath(),A=C.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,n,i){var a=e.getModel("endLabel");if(h_(e)){var o=e.getData(),s=this._polyline,u=o.getLayout("points");if(!u){s.removeTextContent(),this._endLabel=null;return}var l=this._endLabel;l||(l=this._endLabel=new Dt({z2:200}),l.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=JM(u);f>=0&&(Ei(s,Oi(e,"endLabel"),{inheritColor:i,labelFetcher:e,labelDataIndex:f,defaultText:function(h,c,v){return v!=null?n_(o,v):Sv(o,h)},enableTextSetter:!0},tA(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,n,i,a,o,s,u){var l=this._endLabel,f=this._polyline;if(l){e<1&&a.originalX==null&&(a.originalX=l.x,a.originalY=l.y);var h=i.getLayout("points"),c=i.hostModel,v=c.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,g=u.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=n.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,w=(y?p:0)*(m?-1:1),x=(y?0:-p)*(m?-1:1),b=y?"x":"y",T=jM(h,S,b),C=T.range,A=C[1]-C[0],D=void 0;if(A>=1){if(A>1&&!v){var I=Hd(h,C[0]);l.attr({x:I[0]+w,y:I[1]+x}),o&&(D=c.getRawValue(C[0]))}else{var I=f.getPointOn(S,b);I&&l.attr({x:I[0]+w,y:I[1]+x});var L=c.getRawValue(C[0]),P=c.getRawValue(C[1]);o&&(D=Im(i,d,L,P,T.t))}a.lastFrameIndex=C[0]}else{var R=e===1||a.lastFrameIndex>0?C[0]:0,I=Hd(h,R);o&&(D=c.getRawValue(R)),l.attr({x:I[0]+w,y:I[1]+x})}if(o){var E=ki(l);typeof E.setLabelText=="function"&&E.setLabelText(D)}}},t.prototype._doUpdateAnimation=function(e,n,i,a,o,s,u){var l=this._polyline,f=this._polygon,h=e.hostModel,c=BM(this._data,e,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),v=c.current,d=c.stackedOnCurrent,p=c.next,g=c.stackedOnNext;if(o&&(d=Lr(c.stackedOnCurrent,c.current,i,o,u),v=Lr(c.current,null,i,o,u),g=Lr(c.stackedOnNext,c.next,i,o,u),p=Lr(c.next,null,i,o,u)),Gd(v,p)>3e3||f&&Gd(d,g)>3e3){l.stopAnimation(),l.setShape({points:p}),f&&(f.stopAnimation(),f.setShape({points:p,stackedOnPoints:g}));return}l.shape.__points=c.current,l.shape.points=v;var y={shape:{points:p}};c.current!==v&&(y.shape.__points=c.next),l.stopAnimation(),It(l,y,h),f&&(f.setShape({points:v,stackedOnPoints:d}),f.stopAnimation(),It(f,{shape:{stackedOnPoints:g}},h),l.shape.points!==f.shape.points&&(f.shape.points=l.shape.points));for(var m=[],_=c.status,S=0;S<_.length;S++){var w=_[S].cmd;if(w==="="){var x=e.getItemGraphicEl(_[S].idx1);x&&m.push({el:x,ptIdx:S})}}l.animators&&l.animators.length&&l.animators[0].during(function(){f&&f.dirtyShape();for(var b=l.shape.__points,T=0;Tt&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&a){var u=o.getBaseAxis(),l=o.getOtherAxis(u),f=u.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(f[1]-f[0])*(h||1),v=Math.round(s/c);if(isFinite(v)&&v>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/v)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(l.dim),1/v));var d=void 0;W(a)?d=nA[a]:$(a)&&(d=a),d&&t.setData(i.downSample(i.mapDimension(l.dim),1/v,d,iA))}}}}}function aA(r){r.registerChartView(eA),r.registerSeriesModel(PM),r.registerLayout(rA("line")),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,v_("line"))}var oA="__ec_stack_";function c_(r){return r.get("stack")||oA+r.seriesIndex}function Tv(r){return r.dim+r.index}function d_(r,t){var e=[];return t.eachSeriesByType(r,function(n){g_(n)&&e.push(n)}),e}function sA(r){var t={};M(r,function(u){var l=u.coordinateSystem,f=l.getBaseAxis();if(!(f.type!=="time"&&f.type!=="value"))for(var h=u.getData(),c=f.dim+"_"+f.index,v=h.getDimensionIndex(h.mapDimension(f.dim)),d=h.getStore(),p=0,g=d.count();p0&&(a=a===null?s:Math.min(a,s))}e[n]=a}}return e}function p_(r){var t=sA(r),e=[];return M(r,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var u=a.dim+"_"+a.index,l=t[u],f=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),c=Math.abs(h[1]-h[0]);s=l?f/c*l:f}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=pt(n.get("barWidth"),s),p=pt(n.get("barMaxWidth"),s),g=pt(n.get("barMinWidth")||(y_(n)?.5:1),s),y=n.get("barGap"),m=n.get("barCategoryGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:Tv(a),stackId:c_(n)})}),uA(e)}function uA(r){var t={};M(r,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},u=s.stacks;t[a]=s;var l=n.stackId;u[l]||s.autoWidthCount++,u[l]=u[l]||{width:0,maxWidth:0};var f=n.barWidth;f&&!u[l].width&&(u[l].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=n.barMaxWidth;h&&(u[l].maxWidth=h);var c=n.barMinWidth;c&&(u[l].minWidth=c);var v=n.barGap;v!=null&&(s.gap=v);var d=n.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return M(t,function(n,i){e[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var u=mt(a).length;s=Math.max(35-u*4,15)+"%"}var l=pt(s,o),f=pt(n.gap,1),h=n.remainedWidth,c=n.autoWidthCount,v=(h-l)/(c+(c-1)*f);v=Math.max(v,0),M(a,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,c--}else{var S=v;m&&mS&&(S=_),S!==v&&(y.width=S,h-=S+f*S,c--)}}),v=(h-l)/(c+(c-1)*f),v=Math.max(v,0);var d=0,p;M(a,function(y,m){y.width||(y.width=v),p=y,d+=y.width*(1+f)}),p&&(d-=p.width*f);var g=-d/2;M(a,function(y,m){e[i][m]=e[i][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),e}function lA(r,t,e){if(r&&t){var n=r[Tv(t)];return n}}function fA(r,t){var e=d_(r,t),n=p_(e);M(e,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),u=c_(i),l=n[Tv(s)][u],f=l.offset,h=l.width;a.setLayout({bandWidth:l.bandWidth,offset:f,size:h})})}function hA(r){return{seriesType:r,plan:wv(),reset:function(t){if(g_(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=e.getDimensionIndex(e.mapDimension(a.dim)),s=e.getDimensionIndex(e.mapDimension(i.dim)),u=t.get("showBackground",!0),l=e.mapDimension(a.dim),f=e.getCalculationInfo("stackResultDimension"),h=kn(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),c=a.isHorizontal(),v=vA(i,a),d=y_(t),p=t.get("barMinHeight")||0,g=f&&e.getDimensionIndex(f),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,S){for(var w=_.count,x=d&&vr(w*3),b=d&&u&&vr(w*3),T=d&&vr(w),C=n.master.getRect(),A=c?C.width:C.height,D,I=S.getStore(),L=0;(D=_.next())!=null;){var P=I.get(h?g:o,D),R=I.get(s,D),E=v,F=void 0;h&&(F=+P-I.get(o,D));var O=void 0,N=void 0,V=void 0,H=void 0;if(c){var U=n.dataToPoint([P,R]);if(h){var et=n.dataToPoint([F,R]);E=et[0]}O=E,N=U[1]+m,V=U[0]-E,H=y,Math.abs(V)0?e:1:e))}var Vf=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,n){return gu(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(e),s=a.dataToPoint(o);if(i)M(a.getAxes(),function(c,v){if(c.type==="category"&&n!=null){var d=c.getTicksCoords(),p=c.getTickModel().get("alignWithLabel"),g=o[v],y=n[v]==="x1"||n[v]==="y1";if(y&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[v]=c.toGlobalCoord(c.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,S=1,w=0;wg){_=(x+m)/2;break}w===1&&(S=b-d[0].tickValue)}_==null&&(m?m&&(_=d[d.length-1].coord):_=d[0].coord),s[v]=c.toGlobalCoord(_)}});else{var u=this.getData(),l=u.getLayout("offset"),f=u.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=l+f/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(ee);ee.registerClass(Vf);var cA=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return gu(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>e&&(e=n),e},t.prototype.brushSelector=function(e,n,i){return i.rect(n.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=O0(Vf.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}),t}(Vf),Ps="\0__throttleOriginMethod",Wd="\0__throttleRate",Ud="\0__throttleType";function wu(r,t,e){var n,i=0,a=0,o=null,s,u,l,f;t=t||0;function h(){a=new Date().getTime(),o=null,r.apply(u,l||[])}var c=function(){for(var v=[],d=0;d=0?h():o=setTimeout(h,-s),i=n};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){f=v},c}function m_(r,t,e,n){var i=r[t];if(i){var a=i[Ps]||i,o=i[Ud],s=i[Wd];if(s!==e||o!==n){if(e==null)return r[t]=a;i=r[t]=wu(a,e,n==="debounce"),i[Ps]=a,i[Ud]=n,i[Wd]=e}return i}}function Hf(r,t){var e=r[t];e&&e[Ps]&&(e.clear&&e.clear(),r[t]=e[Ps])}var dA=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}(),Yd=function(r){k(t,r);function t(e){var n=r.call(this,e)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new dA},t.prototype.buildPath=function(e,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),u=(s-o)*.5,l=o+u,f=n.startAngle,h=n.endAngle,c=n.clockwise,v=Math.PI*2,d=c?h-fMath.PI/2&&fs)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(e,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,n,i,a){if(this._isOrderChangedWithinSameData(e,n,i)){var o=this._dataSort(e,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,n,i){var a=n.baseAxis,o=this._dataSort(e,a,function(s){return e.get(e.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(e,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(e,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var n=this.group,i=this._data;e&&e.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Ms(a,e,it(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Ut),Xd={cartesian2d:function(r,t){var e=t.width<0?-1:1,n=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=r.x+r.width,a=r.y+r.height,o=yl(t.x,r.x),s=ml(t.x+t.width,i),u=yl(t.y,r.y),l=ml(t.y+t.height,a),f=si?s:o,t.y=h&&u>a?l:u,t.width=f?0:s-o,t.height=h?0:l-u,e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||h},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}var i=ml(t.r,r.r),a=yl(t.r0,r.r0);t.r=i,t.r0=a;var o=i-a<0;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},Zd={cartesian2d:function(r,t,e,n,i,a,o,s,u){var l=new wt({shape:B({},n),z2:1});if(l.__dataIndex=e,l.name="item",a){var f=l.shape,h=i?"height":"width";f[h]=0}return l},polar:function(r,t,e,n,i,a,o,s,u){var l=!i&&u?Yd:Ne,f=new l({shape:n,z2:1});f.name="item";var h=__(i);if(f.calculateTextPosition=pA(h,{isRoundCap:l===Yd}),a){var c=f.shape,v=i?"r":"endAngle",d={};c[v]=i?n.r0:n.startAngle,d[v]=n[v],(s?It:Rt)(f,{shape:d},a)}return f}};function _A(r,t){var e=r.get("realtimeSort",!0),n=t.getBaseAxis();if(e&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function $d(r,t,e,n,i,a,o,s){var u,l;a?(l={x:n.x,width:n.width},u={y:n.y,height:n.height}):(l={y:n.y,height:n.height},u={x:n.x,width:n.width}),s||(o?It:Rt)(e,{shape:u},t,i,null);var f=t?r.baseAxis.model:null;(o?It:Rt)(e,{shape:l},f,i)}function qd(r,t){for(var e=0;e0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(r,t,e){var n=r.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function wA(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function __(r){return function(t){var e=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+e;default:return n}}}(r)}function Qd(r,t,e,n,i,a,o,s){var u=t.getItemVisual(e,"style");if(s){if(!a.get("roundCap")){var f=r.shape,h=da(n.getModel("itemStyle"),f,!0);B(f,h),r.setShape(f)}}else{var l=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",l)}r.useStyle(u);var c=n.getShallow("cursor");c&&r.attr("cursor",c);var v=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",d=Oi(n);Ei(r,d,{labelFetcher:a,labelDataIndex:e,defaultText:Sv(a.getData(),e),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:v});var p=r.getTextContent();if(s&&p){var g=n.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,gA(r,g==="outside"?v:g,__(o),n.get(["label","rotate"]))}AT(p,d,a.getRawValue(e),function(m){return n_(t,m)});var y=n.getModel(["emphasis"]);bi(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),Ti(r,n),wA(i)&&(r.style.fill="none",r.style.stroke="none",M(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function bA(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var TA=function(){function r(){}return r}(),Jd=function(r){k(t,r);function t(e){var n=r.call(this,e)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new TA},t.prototype.buildPath=function(e,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],u=[],l=this.barWidth,f=0;f=0?e:null},30,!1);function CA(r,t,e){for(var n=r.baseDimIdx,i=1-n,a=r.shape.points,o=r.largeDataIndices,s=[],u=[],l=r.barWidth,f=0,h=a.length/3;f=s[0]&&t<=s[0]+u[0]&&e>=s[1]&&e<=s[1]+u[1])return o[f]}return-1}function S_(r,t,e){if(bv(e,"cartesian2d")){var n=t,i=e.getArea();return{x:r?n.x:i.x,y:r?i.y:n.y,width:r?n.width:i.width,height:r?i.height:n.height}}else{var i=e.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:r?i.r0:a.r0,r:r?i.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function MA(r,t,e){var n=r.type==="polar"?Ne:wt;return new n({shape:S_(t,e,r),silent:!0,z2:0})}function AA(r){r.registerChartView(mA),r.registerSeriesModel(cA),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,lt(fA,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,hA("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,v_("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}function DA(r,t){function e(n,i){var a=[];return n.eachComponent({mainType:"series",subType:r,query:i},function(o){a.push(o.seriesIndex)}),a}M([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(n){t(n[0],function(i,a,o){i=B({},i),o.dispatchAction(B(i,{type:n[1],seriesIndex:e(a,i)}))})})}function Jn(r,t,e,n,i){var a=r+t;e.isSilent(a)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,u=o.option.selectedMap,l=i.selected,f=0;fN?(H=R+T*N/2,U=H):(H=R+A,U=V-A),i.setItemLayout(O,{angle:N,startAngle:H,endAngle:U,clockwise:S,cx:u,cy:l,r0:h,r:w?fr(F,b,[h,f]):f}),R=V}),Li&&(i+=Qi);var v=Math.atan2(s,o);if(v<0&&(v+=Qi),v>=n&&v<=i||v+Qi>=n&&v+Qi<=i)return u[0]=f,u[1]=h,l-e;var d=e*Math.cos(n)+r,p=e*Math.sin(n)+t,g=e*Math.cos(i)+r,y=e*Math.sin(i)+t,m=(d-o)*(d-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(u[0]=d,u[1]=p,Math.sqrt(m)):(u[0]=g,u[1]=y,Math.sqrt(_))}function Rs(r,t,e,n,i,a,o,s){var u=i-r,l=a-t,f=e-r,h=n-t,c=Math.sqrt(f*f+h*h);f/=c,h/=c;var v=u*f+l*h,d=v/c;s&&(d=Math.min(Math.max(d,0),1)),d*=c;var p=o[0]=r+d*f,g=o[1]=t+d*h;return Math.sqrt((p-i)*(p-i)+(g-a)*(g-a))}function C_(r,t,e,n,i,a,o){e<0&&(r=r+e,e=-e),n<0&&(t=t+n,n=-n);var s=r+e,u=t+n,l=o[0]=Math.min(Math.max(i,r),s),f=o[1]=Math.min(Math.max(a,t),u);return Math.sqrt((l-i)*(l-i)+(f-a)*(f-a))}var Ie=[];function OA(r,t,e){var n=C_(t.x,t.y,t.width,t.height,r.x,r.y,Ie);return e.set(Ie[0],Ie[1]),n}function kA(r,t,e){for(var n=0,i=0,a=0,o=0,s,u,l=1/0,f=t.data,h=r.x,c=r.y,v=0;v0){t=t/180*Math.PI,Re.fromArray(r[0]),gt.fromArray(r[1]),Tt.fromArray(r[2]),X.sub(Ke,Re,gt),X.sub(Ze,Tt,gt);var e=Ke.len(),n=Ze.len();if(!(e<.001||n<.001)){Ke.scale(1/e),Ze.scale(1/n);var i=Ke.dot(Ze),a=Math.cos(t);if(a1&&X.copy(qt,Tt),qt.toArray(r[1])}}}}function NA(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,Re.fromArray(r[0]),gt.fromArray(r[1]),Tt.fromArray(r[2]),X.sub(Ke,gt,Re),X.sub(Ze,Tt,gt);var n=Ke.len(),i=Ze.len();if(!(n<.001||i<.001)){Ke.scale(1/n),Ze.scale(1/i);var a=Ke.dot(t),o=Math.cos(e);if(a=u)X.copy(qt,Tt);else{qt.scaleAndAdd(Ze,s/Math.tan(Math.PI/2-f));var h=Tt.x!==gt.x?(qt.x-gt.x)/(Tt.x-gt.x):(qt.y-gt.y)/(Tt.y-gt.y);if(isNaN(h))return;h<0?X.copy(qt,gt):h>1&&X.copy(qt,Tt)}qt.toArray(r[1])}}}}function _l(r,t,e,n){var i=e==="normal",a=i?r:r.ensureState(e);a.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?r.useStyle(s):a.style=s}function BA(r,t){var e=t.smooth,n=t.points;if(n)if(r.moveTo(n[0][0],n[0][1]),e>0&&n.length>=3){var i=ys(n[0],n[1]),a=ys(n[1],n[2]);if(!i||!a){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*e,s=ya([],n[1],n[0],o/i),u=ya([],n[1],n[2],o/a),l=ya([],s,u,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),r.bezierCurveTo(u[0],u[1],u[0],u[1],n[2][0],n[2][1])}else for(var f=1;f0){_(C*T,0,o);var A=C+x;A<0&&S(-A*T,1)}else S(-x*T,1)}}function _(x,b,T){x!==0&&(l=!0);for(var C=b;C0)for(var A=0;A0;A--){var P=T[A-1]*L;_(-P,A,o)}}}function w(x){var b=x<0?-1:1;x=Math.abs(x);for(var T=Math.ceil(x/(o-1)),C=0;C0?_(T,0,C+1):_(-T,o-C-1,o),x-=T,x<=0)return}return l}function FA(r,t,e,n){return L_(r,"x","width",t,e)}function P_(r,t,e,n){return L_(r,"y","height",t,e)}function R_(r){var t=[];r.sort(function(p,g){return g.priority-p.priority});var e=new at(0,0,0,0);function n(p){if(!p.ignore){var g=p.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}p.ignore=!0}for(var i=0;ie?y:g,w=Math.abs(_.label.y-e);if(w>=S.maxY){var x=_.label.x-t-_.len2*i,b=n+_.len,T=Math.abs(x)r.unconstrainedWidth?null:v:null;n.setStyle("width",d)}var p=n.getBoundingRect();a.width=p.width;var g=(n.style.margin||0)+2.1;a.height=p.height+g,a.y-=(a.height-h)/2}}}function Sl(r){return r.position==="center"}function VA(r){var t=r.getData(),e=[],n,i,a=!1,o=(r.get("minShowLabelAngle")||0)*zA,s=t.getLayout("viewRect"),u=t.getLayout("r"),l=s.width,f=s.x,h=s.y,c=s.height;function v(x){x.ignore=!0}function d(x){if(!x.ignore)return!0;for(var b in x.states)if(x.states[b].ignore===!1)return!0;return!1}t.each(function(x){var b=t.getItemGraphicEl(x),T=b.shape,C=b.getTextContent(),A=b.getTextGuideLine(),D=t.getItemModel(x),I=D.getModel("label"),L=I.get("position")||D.get(["emphasis","label","position"]),P=I.get("distanceToLabelLine"),R=I.get("alignTo"),E=pt(I.get("edgeDistance"),l),F=I.get("bleedMargin"),O=D.getModel("labelLine"),N=O.get("length");N=pt(N,l);var V=O.get("length2");if(V=pt(V,l),Math.abs(T.endAngle-T.startAngle)0?"right":"left":U>0?"left":"right"}var br=Math.PI,ir=0,Fi=I.get("rotate");if(vt(Fi))ir=Fi*(br/180);else if(L==="center")ir=0;else if(Fi==="radial"||Fi===!0){var NS=U<0?-H+br:-H;ir=NS}else if(Fi==="tangential"&&L!=="outside"&&L!=="outer"){var Vn=Math.atan2(U,et);Vn<0&&(Vn=br*2+Vn);var BS=et>0;BS&&(Vn=br+Vn),ir=Vn-br}if(a=!!ir,C.x=ft,C.y=ct,C.rotation=ir,C.setStyle({verticalAlign:"middle"}),Bt){C.setStyle({align:re});var Lu=C.states.select;Lu&&(Lu.x+=C.x,Lu.y+=C.y)}else{var zi=C.getBoundingRect().clone();zi.applyTransform(C.getComputedTransform());var rc=(C.style.margin||0)+2.1;zi.y-=rc/2,zi.height+=rc,e.push({label:C,labelLine:A,position:L,len:N,len2:V,minTurnAngle:O.get("minTurnAngle"),maxSurfaceAngle:O.get("maxSurfaceAngle"),surfaceNormal:new X(U,et),linePoints:Nt,textAlign:re,labelDistance:P,labelAlignTo:R,edgeDistance:E,bleedMargin:F,rect:zi,unconstrainedWidth:zi.width,labelStyleWidth:C.style.width})}b.setTextConfig({inside:Bt})}}),!a&&r.get("avoidLabelOverlap")&&GA(e,n,i,u,l,c,f,h);for(var p=0;p0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h=a.r0}},t.type="pie",t}(Ut);function O_(r,t,e){t=z(t)&&{coordDimensions:t}||B({encodeDefine:r.getEncode()},t);var n=r.getSource(),i=sv(n,t).dimensions,a=new ov(i,r);return a.initData(n,e),a}var k_=function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,e)},r}(),UA=St(),YA=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new k_(ht(this.getData,this),ht(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return O_(this,{coordDimensions:["value"],encodeDefaulter:lt(BT,this)})},t.prototype.getDataParams=function(e){var n=this.getData(),i=UA(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(u){o.push(u)}),a=i.seats=Sm(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=a[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){bf(e,"labelLine",["show"]);var n=e.labelLine,i=e.emphasis.labelLine;n.show=n.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},t.type="series.pie",t.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"},t}(ee);function XA(r){return{seriesType:r,reset:function(t,e){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(vt(o)&&!isNaN(o)&&o<0)})}}}function ZA(r){r.registerChartView(WA),r.registerSeriesModel(YA),DA("pie",r.registerAction),r.registerLayout(lt(LA,"pie")),r.registerProcessor(T_("pie")),r.registerProcessor(XA("pie"))}var jn=function(){function r(t,e){this.target=t,this.topTarget=e&&e.topTarget}return r}(),$A=function(){function r(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new jn(e,t),"dragstart",t.event))},r.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(a,o,t),this.handler.dispatchToElement(new jn(e,t),"drag",t.event);var s=this.handler.findHover(n,i,e).target,u=this._dropTarget;this._dropTarget=s,e!==s&&(u&&s!==u&&this.handler.dispatchToElement(new jn(u,t),"dragleave",t.event),s&&s!==u&&this.handler.dispatchToElement(new jn(s,t),"dragenter",t.event))}},r.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new jn(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new jn(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},r}(),qA=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xl=[],KA=Q.browser.firefox&&+Q.browser.version.split(".")[0]<39;function Wf(r,t,e,n){return e=e||{},n?ip(r,t,e):KA&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):ip(r,t,e),e}function ip(r,t,e){if(Q.domSupported&&r.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(k0(r)){var a=r.getBoundingClientRect();e.zrX=n-a.left,e.zrY=i-a.top;return}else if(Of(xl,r,n,i)){e.zrX=xl[0],e.zrY=xl[1];return}}e.zrX=e.zrY=0}function Cv(r){return r||window.event}function de(r,t,e){if(t=Cv(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Wf(r,o,t,e)}else{Wf(r,t,t,e);var a=QA(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&qA.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function QA(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,n=r.deltaY;if(e==null||n==null)return t;var i=Math.abs(n!==0?n:e),a=n>0?-1:n<0?1:e>0?-1:1;return 3*i*a}function Uf(r,t,e,n){r.addEventListener(t,e,n)}function JA(r,t,e,n){r.removeEventListener(t,e,n)}var N_=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0},jA=function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var a={points:[],touches:[],target:e,event:t},o=0,s=i.length;o1&&n&&n.length>1){var a=ap(n)/ap(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=tD(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}},B_="silent";function eD(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:rD}}function rD(){N_(this.event)}var nD=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Fe),Ji=function(){function r(t,e){this.x=t,this.y=e}return r}(),iD=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],bl=new at(0,0,0,0),F_=function(r){k(t,r);function t(e,n,i,a,o){var s=r.call(this)||this;return s._hovered=new Ji(0,0),s.storage=e,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new nD,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new $A(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(M(iD,function(n){e.on&&e.on(n,this[n],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var n=e.zrX,i=e.zrY,a=z_(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var u=this._hovered=a?new Ji(n,i):this.findHover(n,i),l=u.target,f=this.proxy;f.setCursor&&f.setCursor(l?l.cursor:"default"),s&&l!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(u,"mousemove",e),l&&l!==s&&this.dispatchToElement(u,"mouseover",e)},t.prototype.mouseout=function(e){var n=e.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new Ji(0,0)},t.prototype.dispatch=function(e,n){var i=this[e];i&&i.call(this,n)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var n=this.proxy;n.setCursor&&n.setCursor(e)},t.prototype.dispatchToElement=function(e,n,i){e=e||{};var a=e.target;if(!(a&&a.silent)){for(var o="on"+n,s=eD(n,e,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(u){typeof u[o]=="function"&&u[o].call(u,s),u.trigger&&u.trigger(n,s)}))}},t.prototype.findHover=function(e,n,i){var a=this.storage.getDisplayList(),o=new Ji(e,n);if(op(a,o,e,n,i),this._pointerSize&&!o.target){for(var s=[],u=this._pointerSize,l=u/2,f=new at(e-l,n-l,u,u),h=a.length-1;h>=0;h--){var c=a[h];c!==i&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(bl.copy(c.getBoundingRect()),c.transform&&bl.applyTransform(c.transform),bl.intersect(f)&&s.push(c))}if(s.length)for(var v=4,d=Math.PI/12,p=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function aD(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var n=r,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,e))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s||n.parent}return i?B_:!0}return!1}function op(r,t,e,n,i){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==i&&!o.ignore&&(s=aD(o,e,n))&&(!t.topTarget&&(t.topTarget=o),s!==B_)){t.target=o;break}}}function z_(r,t,e){var n=r.painter;return t<0||t>n.getWidth()||e<0||e>n.getHeight()}var G_=32,ji=7;function oD(r){for(var t=0;r>=G_;)t|=r&1,r>>=1;return r+t}function sp(r,t,e,n){var i=t+1;if(i===e)return 1;if(n(r[i++],r[t])<0){for(;i=0;)i++;return i-t}function sD(r,t,e){for(e--;t>>1,i(a,r[u])<0?s=u:o=u+1;var l=n-o;switch(l){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(;l>0;)r[o+l]=r[o+l-1],l--}r[o]=a}}function Tl(r,t,e,n,i,a){var o=0,s=0,u=1;if(a(r,t[e+i])>0){for(s=n-i;u0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s),o+=i,u+=i}else{for(s=i+1;us&&(u=s);var l=o;o=i-u,u=i-l}for(o++;o>>1);a(r,t[e+f])>0?o=f+1:u=f}return u}function Cl(r,t,e,n,i,a){var o=0,s=0,u=1;if(a(r,t[e+i])<0){for(s=i+1;us&&(u=s);var l=o;o=i-u,u=i-l}else{for(s=n-i;u=0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s),o+=i,u+=i}for(o++;o>>1);a(r,t[e+f])<0?u=f:o=f+1}return u}function uD(r,t){var e=ji,n,i,a=0,o=[];n=[],i=[];function s(v,d){n[a]=v,i[a]=d,a+=1}function u(){for(;a>1;){var v=a-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]i[v+1])break;f(v)}}function l(){for(;a>1;){var v=a-2;v>0&&i[v-1]=ji||b>=ji);if(T)break;w<0&&(w=0),w+=2}if(e=w,e<1&&(e=1),d===1){for(y=0;y=0;y--)r[x+y]=r[w+y];r[S]=o[_];return}for(var b=e;;){var T=0,C=0,A=!1;do if(t(o[_],r[m])<0){if(r[S--]=r[m--],T++,C=0,--d===0){A=!0;break}}else if(r[S--]=o[_--],C++,T=0,--g===1){A=!0;break}while((T|C)=0;y--)r[x+y]=r[w+y];if(d===0){A=!0;break}}if(r[S--]=o[_--],--g===1){A=!0;break}if(C=g-Tl(r[m],o,0,g,g-1,t),C!==0){for(S-=C,_-=C,g-=C,x=S+1,w=_+1,y=0;y=ji||C>=ji);if(A)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),g===1){for(S-=d,m-=d,x=S+1,w=m+1,y=d-1;y>=0;y--)r[x+y]=r[w+y];r[S]=o[_]}else{if(g===0)throw new Error;for(w=S-(g-1),y=0;ys&&(u=s),up(r,e,e+u,e+a,t),a=u}o.pushRun(e,a),o.mergeRuns(),i-=a,e+=a}while(i!==0);o.forceMergeRuns()}}var lp=!1;function Ml(){lp||(lp=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function fp(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var lD=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=fp}return r.prototype.traverse=function(t,e){for(var n=0;n0&&(f.__clipPaths=[]),isNaN(f.z)&&(Ml(),f.z=0),isNaN(f.z2)&&(Ml(),f.z2=0),isNaN(f.zlevel)&&(Ml(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var v=t.getTextContent();v&&this._updateAndAddDisplayable(v,e,n)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,n=t.length;e=0&&this._roots.splice(i,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}(),Os;Os=Q.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};function li(){return new Date().getTime()}var fD=function(r){k(t,r);function t(e){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var n=e.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(e){if(e.animation){var n=e.prev,i=e.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var n=e.getClip();n&&this.removeClip(n),e.animation=null},t.prototype.update=function(e){for(var n=li()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,e||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function n(){e._running&&(Os(n),!e._paused&&e.update())}Os(n)},t.prototype.start=function(){this._running||(this._time=li(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=li(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=li()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var n=e.next;e.prev=e.next=e.animation=null,e=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,n){n=n||{},this.start();var i=new Gh(e,n.loop);return this.addAnimator(i),i},t}(Fe),hD=300,Al=Q.domSupported,Dl=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=G(r,function(i){var a=i.replace("mouse","pointer");return e.hasOwnProperty(a)?a:i});return{mouse:r,touch:t,pointer:n}}(),hp={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},vp=!1;function Yf(r){var t=r.pointerType;return t==="pen"||t==="touch"}function vD(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 Il(r){r&&(r.zrByTouch=!0)}function cD(r,t){return de(r.dom,new dD(r,t),!0)}function V_(r,t){for(var e=t,n=!1;e&&e.nodeType!==9&&!(n=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return n}var dD=function(){function r(t,e){this.stopPropagation=Wt,this.stopImmediatePropagation=Wt,this.preventDefault=Wt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r}(),Ae={mousedown:function(r){r=de(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=de(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=de(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=de(this.dom,r);var t=r.toElement||r.relatedTarget;V_(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){vp=!0,r=de(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){vp||(r=de(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=de(this.dom,r),Il(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Ae.mousemove.call(this,r),Ae.mousedown.call(this,r)},touchmove:function(r){r=de(this.dom,r),Il(r),this.handler.processGesture(r,"change"),Ae.mousemove.call(this,r)},touchend:function(r){r=de(this.dom,r),Il(r),this.handler.processGesture(r,"end"),Ae.mouseup.call(this,r),+new Date-+this.__lastTouchMoment0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e=0;u--)a[u]&&!Na(a[u])?s=!0:(a[u]=null,!s&&o--);a.length=o,e[i]=a}}),delete e[pp],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,n){var i=this._componentsMap.get(e);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=t:e==="max"?r<=t:r===t}function zD(r,t){return r.join(",")===t.join(",")}var Te=M,Ha=Y,_p=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Pl(r){var t=r&&r.itemStyle;if(t)for(var e=0,n=_p.length;e=0;g--){var y=r[g];if(s||(d=y.data.rawIndexOf(y.stackedByDimension,v)),d>=0){var m=y.data.getByRawIndex(y.stackResultDimension,d);if(u==="all"||u==="positive"&&m>0||u==="negative"&&m<0||u==="samesign"&&c>=0&&m>0||u==="samesign"&&c<=0&&m<0){c=sb(c,m),p=m;break}}}return n[0]=c,n[1]=p,n})})}var Ot=function(){function r(){this.group=new bt,this.uid=ao("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,i){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,i){},r.prototype.updateLayout=function(t,e,n,i){},r.prototype.updateVisual=function(t,e,n,i){},r.prototype.toggleBlurSeries=function(t,e,n){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();Oh(Ot);Ks(Ot);var Tp=St(),Cp={itemStyle:Pa(l0,!0),lineStyle:Pa(u0,!0)},qD={lineStyle:"stroke",itemStyle:"fill"};function $_(r,t){var e=r.visualStyleMapper||Cp[t];return e||(console.warn("Unknown style type '"+t+"'."),Cp.itemStyle)}function q_(r,t){var e=r.visualDrawType||qD[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var KD={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=r.getModel(n),a=$_(r,n),o=a(i),s=i.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var u=q_(r,n),l=o[u],f=$(l)?l:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[u]||f||h){var c=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[u]||(o[u]=c,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||$(o.fill)?c:o.fill,o.stroke=o.stroke==="auto"||$(o.stroke)?c:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",u),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var p=r.getDataParams(d),g=B({},o);g[u]=f(p),v.setItemVisual(d,"style",g)}}}},ra=new yt,QD={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=$_(r,n),a=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var u=o.getRawDataItem(s);if(u&&u[n]){ra.option=u[n];var l=i(ra),f=o.ensureUniqueItemVisual(s,"style");B(f,l),ra.option.decal&&(o.setItemVisual(s,"decal",ra.option.decal),ra.option.decal.dirty=!0),a in l&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},JD={performRawSeries:!0,overallReset:function(r){var t=Z();r.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var i=e.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),Tp(e).scope=a}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var n=e.getRawData(),i={},a=e.getData(),o=Tp(e).scope,s=e.visualStyleAccessPath||"itemStyle",u=q_(e,s);a.each(function(l){var f=a.getRawIndex(l);i[f]=l}),n.each(function(l){var f=i[l],h=a.getItemVisual(f,"colorFromPalette");if(h){var c=a.ensureUniqueItemVisual(f,"style"),v=n.getName(l)||l+"",d=n.count();c[u]=e.getColorFromPalette(v,o,d)}})}})}},No=Math.PI;function jD(r,t){t=t||{},q(t,{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 e=new bt,n=new wt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(n);var i=new Dt({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new wt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(a);var o;return t.showSpinner&&(o=new ro({shape:{startAngle:-No/2,endAngle:-No/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:No*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:No*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=i.getBoundingRect().width,u=t.showSpinner?t.spinnerRadius:0,l=(r.getWidth()-u*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:u),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:l,cy:f}),a.setShape({x:l-u,y:f-u,width:u*2,height:u*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var K_=function(){function r(t,e,n,i){this._stageTaskMap=Z(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,u=s!=null?Math.ceil(s/o):null;return{step:o,modBy:u,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),u=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:u,large:s}},r.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=Z();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),e._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;M(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";Oe(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,e,n),i.overallReset&&this._createOverallStageTask(i,a,e,n)},this)},r.prototype.prepareView=function(t,e,n,i){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(e,a)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},r.prototype._performStageTasks=function(t,e,n,i){i=i||{};var a=!1,o=this;M(t,function(u,l){if(!(i.visualType&&i.visualType!==u.visualType)){var f=o._stageTaskMap.get(u.uid),h=f.seriesTaskMap,c=f.overallTask;if(c){var v,d=c.agentStubMap;d.each(function(g){s(i,g)&&(g.dirty(),v=!0)}),v&&c.dirty(),o.updatePayload(c,n);var p=o.getPerformArgs(c,i.block);d.each(function(g){g.perform(p)}),c.perform(p)&&(a=!0)}else h&&h.each(function(g,y){s(i,g)&&g.dirty();var m=o.getPerformArgs(g,i.block);m.skip=!u.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(m)&&(a=!0)})}});function s(u,l){return u.setDirty&&(!u.dirtyMap||u.dirtyMap.get(l.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(n){e=n.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,n,i){var a=this,o=e.seriesTaskMap,s=e.seriesTaskMap=Z(),u=t.seriesType,l=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):u?n.eachRawSeriesByType(u,f):l&&l(n,i).each(f);function f(h){var c=h.uid,v=s.set(c,o&&o.get(c)||Ca({plan:iI,reset:aI,count:sI}));v.context={model:h,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(h,v)}},r.prototype._createOverallStageTask=function(t,e,n,i){var a=this,o=e.overallTask=e.overallTask||Ca({reset:tI});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,u=o.agentStubMap=Z(),l=t.seriesType,f=t.getTargetSeries,h=!0,c=!1,v="";Oe(!t.createOnAllSeries,v),l?n.eachRawSeriesByType(l,d):f?f(n,i).each(d):(h=!1,M(n.getSeries(),d));function d(p){var g=p.uid,y=u.set(g,s&&s.get(g)||(c=!0,Ca({reset:eI,onDirty:nI})));y.context={model:p,overallProgress:h},y.agent=o,y.__block=h,a._pipe(p,y)}c&&o.dirty()},r.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},r.wrapStageHandler=function(t,e){return $(t)&&(t={overallReset:t,seriesType:uI(t)}),t.uid=ao("stageHandler"),e&&(t.visualType=e),t},r}();function tI(r){r.overallReset(r.ecModel,r.api,r.payload)}function eI(r){return r.overallProgress&&rI}function rI(){this.agent.dirty(),this.getDownstream().dirty()}function nI(){this.agent&&this.agent.dirty()}function iI(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function aI(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=At(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?G(t,function(e,n){return Q_(n)}):oI}var oI=Q_(0);function Q_(r){return function(t,e){var n=e.data,i=e.resetDefines[r];if(i&&i.dataEach)for(var a=t.start;a0&&v===l.length-c.length){var d=l.slice(0,v);d!=="data"&&(e.mainType=d,e[c.toLowerCase()]=u,f=!0)}}s.hasOwnProperty(l)&&(n[l]=u,f=!0),f||(i[l]=u)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},r.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var u=e.cptQuery,l=e.dataQuery;return f(u,o,"mainType")&&f(u,o,"subType")&&f(u,o,"index","componentIndex")&&f(u,o,"name")&&f(u,o,"id")&&f(l,a,"name")&&f(l,a,"dataIndex")&&f(l,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,i,a));function f(h,c,v,d){return h[v]==null||c[d||v]===h[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),Kf=["symbol","symbolSize","symbolRotate","symbolOffset"],Ip=Kf.concat(["symbolKeepAspect"]),hI={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&Tn(u)?u:.5;var l=r.createRadialGradient(o,s,0,o,s,u);return l}function Qf(r,t,e){for(var n=t.type==="radial"?_I(r,t,e):mI(r,t,e),i=t.colorStops,a=0;a0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:vt(r)?[r]:z(r)?r:null}function e1(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&xI(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(e){var i=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(e=G(e,function(a){return a/i}),n/=i)}return[e,n]}var wI=new gr(!0);function Ns(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function Lp(r){return typeof r=="string"&&r!=="none"}function Bs(r){var t=r.fill;return t!=null&&t!=="none"}function Pp(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function Rp(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function Jf(r,t,e){var n=Hy(t.image,t.__image,e);if(Qs(n)){var i=r.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Fy),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function bI(r,t,e,n){var i,a=Ns(e),o=Bs(e),s=e.strokePercent,u=s<1,l=!t.path;(!t.silent||u)&&l&&t.createPathProxy();var f=t.path||wI,h=t.__dirty;if(!n){var c=e.fill,v=e.stroke,d=o&&!!c.colorStops,p=a&&!!v.colorStops,g=o&&!!c.image,y=a&&!!v.image,m=void 0,_=void 0,S=void 0,w=void 0,x=void 0;(d||p)&&(x=t.getBoundingRect()),d&&(m=h?Qf(r,c,x):t.__canvasFillGradient,t.__canvasFillGradient=m),p&&(_=h?Qf(r,v,x):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(S=h||!t.__canvasFillPattern?Jf(r,c,t):t.__canvasFillPattern,t.__canvasFillPattern=S),y&&(w=h||!t.__canvasStrokePattern?Jf(r,v,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),d?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),p?r.strokeStyle=_:y&&(w?r.strokeStyle=w:a=!1)}var b=t.getGlobalScale();f.setScale(b[0],b[1],t.segmentIgnoreThreshold);var T,C;r.setLineDash&&e.lineDash&&(i=e1(t),T=i[0],C=i[1]);var A=!0;(l||h&ha)&&(f.setDPR(r.dpr),u?f.setContext(null):(f.setContext(r),A=!1),f.reset(),t.buildPath(f,t.shape,n),f.toStatic(),t.pathUpdated()),A&&f.rebuildPath(r,u?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),n||(e.strokeFirst?(a&&Rp(r,e),o&&Pp(r,e)):(o&&Pp(r,e),a&&Rp(r,e))),T&&r.setLineDash([])}function TI(r,t,e){var n=t.__image=Hy(e.image,t.__image,t,t.onload);if(!(!n||!Qs(n))){var i=e.x||0,a=e.y||0,o=t.getWidth(),s=t.getHeight(),u=n.width/n.height;if(o==null&&s!=null?o=s*u:s==null&&o!=null?s=o/u:o==null&&s==null&&(o=n.width,s=n.height),e.sWidth&&e.sHeight){var l=e.sx||0,f=e.sy||0;r.drawImage(n,l,f,e.sWidth,e.sHeight,i,a,o,s)}else if(e.sx&&e.sy){var l=e.sx,f=e.sy,h=o-l,c=s-f;r.drawImage(n,l,f,h,c,i,a,o,s)}else r.drawImage(n,i,a,o,s)}}function CI(r,t,e){var n,i=e.text;if(i!=null&&(i+=""),i){r.font=e.font||Rn,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var a=void 0,o=void 0;r.setLineDash&&e.lineDash&&(n=e1(t),a=n[0],o=n[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),e.strokeFirst?(Ns(e)&&r.strokeText(i,e.x,e.y),Bs(e)&&r.fillText(i,e.x,e.y)):(Bs(e)&&r.fillText(i,e.x,e.y),Ns(e)&&r.strokeText(i,e.x,e.y)),a&&r.setLineDash([])}}var Ep=["shadowBlur","shadowOffsetX","shadowOffsetY"],Op=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function r1(r,t,e,n,i){var a=!1;if(!n&&(e=e||{},t===e))return!1;if(n||t.opacity!==e.opacity){se(r,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?Dn.opacity:o}(n||t.blend!==e.blend)&&(a||(se(r,i),a=!0),r.globalCompositeOperation=t.blend||Dn.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,n,i){if(!this[zt]){if(this._disposed){this.id;return}var a,o,s;if(Y(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[zt]=!0,!this._model||n){var u=new kD(this._api),l=this._theme,f=this._model=new Mv;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,l,this._locale,u)}this._model.setOption(e,{replaceMerge:o},eh);var h={seriesTransition:s,optionChanged:!0};if(i)this[ie]={silent:a,updateParams:h},this[zt]=!1,this.getZr().wakeUp();else{try{ei(this),Pr.update.call(this,null,h)}catch(c){throw this[ie]=null,this[zt]=!1,c}this._ssr||this._zr.flush(),this[ie]=null,this[zt]=!1,na.call(this,a),ia.call(this,a)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Q.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var n=this._zr.painter;return n.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(Q.svgSupported){var e=this._zr,n=e.storage.getDisplayList();return M(n,function(i){i.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var n=e.excludeComponents,i=this._model,a=[],o=this;M(n,function(u){i.eachComponent({mainType:u},function(l){var f=o._componentsMap[l.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return M(a,function(u){u.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var n=e.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(Vs[i]){var u=s,l=s,f=-s,h=-s,c=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();M(Pn,function(_,S){if(_.group===i){var w=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(J(e)),x=_.getDom().getBoundingClientRect();u=a(x.left,u),l=a(x.top,l),f=o(x.right,f),h=o(x.bottom,h),c.push({dom:w,left:x.left,top:x.top})}}),u*=v,l*=v,f*=v,h*=v;var d=f-u,p=h-l,g=pr.createCanvas(),y=Zf(g,{renderer:n?"svg":"canvas"});if(y.resize({width:d,height:p}),n){var m="";return M(c,function(_){var S=_.left-u,w=_.top-l;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return e.connectedBackgroundColor&&y.add(new wt({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),M(c,function(_){var S=new er({style:{x:_.left*v-u,y:_.top*v-l,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,n){return Bl(this,"convertToPixel",e,n)},t.prototype.convertFromPixel=function(e,n){return Bl(this,"convertFromPixel",e,n)},t.prototype.containPixel=function(e,n){if(this._disposed){this.id;return}var i=this._model,a,o=Sa(i,e);return M(o,function(s,u){u.indexOf("Models")>=0&&M(s,function(l){var f=l.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(u==="seriesModels"){var h=this._chartsMap[l.__viewId];h&&h.containPoint&&(a=a||h.containPoint(n,l))}},this)},this),!!a},t.prototype.getVisual=function(e,n){var i=this._model,a=Sa(i,e,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),u=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return u!=null?cI(s,u,n):dI(s,n)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;M(KI,function(n){var i=function(a){var o=e.getModel(),s=a.target,u,l=n==="globalout";if(l?u={}:s&&ga(s,function(d){var p=it(d);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return u=g&&g.getDataParams(p.dataIndex,p.dataType,s)||{},!0}else if(p.eventData)return u=B({},p.eventData),!0},!0),u){var f=u.componentType,h=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=u.seriesIndex);var c=f&&h!=null&&o.getComponent(f,h),v=c&&e[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];u.event=a,u.type=n,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:u,model:c,view:v},e.trigger(n,u)}};i.zrEventfulCallAtLast=!0,e._zr.on(n,i,e)}),M(Ma,function(n,i){e._messageCenter.on(i,function(a){this.trigger(i,a)},e)}),M(["selectchanged"],function(n){e._messageCenter.on(n,function(i){this.trigger(n,i)},e)}),IA(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&Dm(this.getDom(),Lv,"");var n=this,i=n._api,a=n._model;M(n._componentsViews,function(o){o.dispose(a,i)}),M(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Pn[n.id]},t.prototype.resize=function(e){if(!this[zt]){if(this._disposed){this.id;return}this._zr.resize(e);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=e&&e.silent;this[ie]&&(a==null&&(a=this[ie].silent),i=!0,this[ie]=null),this[zt]=!0;try{i&&ei(this),Pr.update.call(this,{type:"resize",animation:B({duration:0},e&&e.animation)})}catch(o){throw this[zt]=!1,o}this[zt]=!1,na.call(this,a),ia.call(this,a)}}},t.prototype.showLoading=function(e,n){if(this._disposed){this.id;return}if(Y(e)&&(n=e,e=""),e=e||"default",this.hideLoading(),!!rh[e]){var i=rh[e](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var n=B({},e);return n.type=Ma[e.type],n},t.prototype.dispatchAction=function(e,n){if(this._disposed){this.id;return}if(Y(n)||(n={silent:!!n}),!!zs[e.type]&&this._model){if(this[zt]){this._pendingActions.push(e);return}var i=n.silent;zl.call(this,e,i);var a=n.flush;a?this._zr.flush():a!==!1&&Q.browser.weChat&&this._throttledZrFlush(),na.call(this,i),ia.call(this,i)}},t.prototype.updateLabelLayout=function(){De.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var n=e.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){ei=function(h){var c=h._scheduler;c.restorePipelines(h._model),c.prepareStageTasks(),Nl(h,!0),Nl(h,!1),c.plan()},Nl=function(h,c){for(var v=h._model,d=h._scheduler,p=c?h._componentsViews:h._chartsViews,g=c?h._componentsMap:h._chartsMap,y=h._zr,m=h._api,_=0;_c.get("hoverLayerThreshold")&&!Q.node&&!Q.worker&&c.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,c){var v=h.get("blendMode")||null;c.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function s(h,c){if(!h.preventAutoZ){var v=h.get("z")||0,d=h.get("zlevel")||0;c.eachRendered(function(p){return u(p,v,d,-1/0),!0})}}function u(h,c,v,d){var p=h.getTextContent(),g=h.getTextGuideLine(),y=h.isGroup;if(y)for(var m=h.childrenRef(),_=0;_0?{duration:p,delay:v.get("delay"),easing:v.get("easing")}:null;c.eachRendered(function(y){if(y.states&&y.states.emphasis){if(pi(y))return;if(y instanceof st&&Zb(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&i(y)}})}Zp=function(h){return new(function(c){k(v,c);function v(){return c!==null&&c.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return h._model.getComponent(p.mainType,p.index);d=d.parent}},v.prototype.enterEmphasis=function(d,p){xi(d,p),he(h)},v.prototype.leaveEmphasis=function(d,p){wi(d,p),he(h)},v.prototype.enterBlur=function(d){Bb(d),he(h)},v.prototype.leaveBlur=function(d){Om(d),he(h)},v.prototype.enterSelect=function(d){km(d),he(h)},v.prototype.leaveSelect=function(d){Nm(d),he(h)},v.prototype.getModel=function(){return h.getModel()},v.prototype.getViewOfComponentModel=function(d){return h.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return h.getViewOfSeriesModel(d)},v}(Y_))(h)},m1=function(h){function c(v,d){for(var p=0;p=0)){qp.push(e);var a=K_.wrapStageHandler(e,i);a.__prio=t,a.__raw=e,r.push(a)}}function Nv(r,t){rh[r]=t}function aL(r){Dy({createCanvas:r})}function C1(r,t,e){var n=u1("registerMap");n&&n(r,t,e)}function oL(r){var t=u1("getMap");return t&&t(r)}var M1=iM;Kr(Dv,KD);Kr(bu,QD);Kr(bu,JD);Kr(Dv,hI);Kr(bu,vI);Kr(h1,EI);Ev(Z_);Ov(zI,ZD);Nv("default",jD);ze({type:In,event:In,update:In},Wt);ze({type:rs,event:rs,update:rs},Wt);ze({type:xa,event:xa,update:xa},Wt);ze({type:ns,event:ns,update:ns},Wt);ze({type:wa,event:wa,update:wa},Wt);Rv("light",lI);Rv("dark",t1);var sL={},Kp=[],uL={registerPreprocessor:Ev,registerProcessor:Ov,registerPostInit:x1,registerPostUpdate:w1,registerUpdateLifecycle:Tu,registerAction:ze,registerCoordinateSystem:b1,registerLayout:T1,registerVisual:Kr,registerTransform:M1,registerLoading:Nv,registerMap:C1,registerImpl:OI,PRIORITY:v1,ComponentModel:ot,ComponentView:Ot,SeriesModel:ee,ChartView:Ut,registerComponentModel:function(r){ot.registerClass(r)},registerComponentView:function(r){Ot.registerClass(r)},registerSeriesModel:function(r){ee.registerClass(r)},registerChartView:function(r){Ut.registerClass(r)},registerSubTypeDefaulter:function(r,t){ot.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){H_(r,t)}};function Be(r){if(z(r)){M(r,function(t){Be(t)});return}rt(Kp,r)>=0||(Kp.push(r),$(r)&&(r={install:r}),r.install(uL))}var lL=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.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"},t}(ot),Bv=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}(),nh=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Qt).models[0]},t.type="cartesian2dAxis",t}(ot);fe(nh,Bv);var A1={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)"]}}},fL=j({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},A1),Fv=j({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}}},A1),hL=j({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Fv),vL=q({logBase:10},Fv);const D1={category:fL,value:Fv,time:hL,log:vL};var cL=0,ih=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++cL}return r.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&G(n,dL);return new r({categories:i,needCollect:!i,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!W(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return e=i.get(t),e==null&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=Z(this.categories))},r}();function dL(r){return Y(r)&&r.value!=null?r.value:r+""}var pL={value:1,category:1,time:1,log:1};function Qp(r,t,e,n){M(pL,function(i,a){var o=j(j({},D1[a],!0),n,!0),s=function(u){k(l,u);function l(){var f=u!==null&&u.apply(this,arguments)||this;return f.type=t+"Axis."+a,f}return l.prototype.mergeDefaultAndTheme=function(f,h){var c=Va(this),v=c?xu(f):{},d=h.getTheme();j(f,d.get(a+"Axis")),j(f,this.getDefaultOption()),f.type=Jp(f),c&&Mi(f,v,c)},l.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=ih.createByAxisModel(this))},l.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},l.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},l.type=t+"Axis."+a,l.defaultOption=o,l}(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",Jp)}function Jp(r){return r.type||(r.data?"category":"value")}var nr=function(){function r(t){this._setting=t||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r}();Ks(nr);function ah(r){return r.type==="interval"||r.type==="log"}function gL(r,t,e,n){var i={},a=r[1]-r[0],o=i.interval=Wh(a/t,!0);e!=null&&on&&(o=i.interval=n);var s=i.intervalPrecision=I1(o),u=i.niceTickExtent=[Mt(Math.ceil(r[0]/o)*o,s),Mt(Math.floor(r[1]/o)*o,s)];return yL(u,r),i}function Vl(r){var t=Math.pow(10,ru(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Mt(e*t)}function I1(r){return qe(r)+2}function jp(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function yL(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),jp(r,0,t),jp(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function Cu(r,t){return r>=t[0]&&r<=t[1]}function Mu(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function Au(r,t){return r*(t[1]-t[0])+t[0]}var zv=function(r){k(t,r);function t(e){var n=r.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new ih({})),z(i)&&(i=new ih({categories:G(i,function(a){return Y(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(e){return e==null?NaN:W(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),Cu(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),Mu(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(Au(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],n=this._extent,i=n[0];i<=n[1];)e.push({value:i}),i++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=e.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,u=Math.min(s,n.length);o=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(nr);nr.registerClass(zv);var mn=Mt,Zr=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Cu(e,this._extent)},t.prototype.normalize=function(e){return Mu(e,this._extent)},t.prototype.scale=function(e){return Au(e,this._extent)},t.prototype.setExtent=function(e,n){var i=this._extent;isNaN(e)||(i[0]=parseFloat(e)),isNaN(n)||(i[1]=parseFloat(n))},t.prototype.unionExtent=function(e){var n=this._extent;e[0]n[1]&&(n[1]=e[1]),this.setExtent(n[0],n[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=I1(e)},t.prototype.getTicks=function(e){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var u=1e4;i[0]u)return[];var f=s.length?s[s.length-1].value:a[1];return i[1]>f&&(e?s.push({value:mn(f+n,o)}):s.push({value:i[1]})),s},t.prototype.getMinorTicks=function(e){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;oa[0]&&v>>1;r[i][1]i&&(this._approxInterval=i);var s=Ho.length,u=Math.min(mL(Ho,this._approxInterval,0,s),s-1);this._interval=Ho[u][1],this._minLevelUnit=Ho[Math.max(u-1,0)][0]},t.prototype.parse=function(e){return vt(e)?e:+_e(e)},t.prototype.contain=function(e){return Cu(this.parse(e),this._extent)},t.prototype.normalize=function(e){return Mu(this.parse(e),this._extent)},t.prototype.scale=function(e){return Au(e,this._extent)},t.type="time",t}(Zr),Ho=[["second",hv],["minute",vv],["hour",Ta],["quarter-day",Ta*6],["half-day",Ta*12],["day",me*1.2],["half-week",me*3.5],["week",me*7],["month",me*31],["quarter",me*95],["half-year",xd/2],["year",xd]];function _L(r,t,e,n){var i=_e(t),a=_e(e),o=function(d){return bd(i,d,n)===bd(a,d,n)},s=function(){return o("year")},u=function(){return s()&&o("month")},l=function(){return u()&&o("day")},f=function(){return l()&&o("hour")},h=function(){return f()&&o("minute")},c=function(){return h()&&o("second")},v=function(){return c()&&o("millisecond")};switch(r){case"year":return s();case"month":return u();case"day":return l();case"hour":return f();case"minute":return h();case"second":return c();case"millisecond":return v()}}function SL(r,t){return r/=me,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function xL(r){var t=30*me;return r/=t,r>6?6:r>3?3:r>2?2:1}function wL(r){return r/=Ta,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function tg(r,t){return r/=t?vv:hv,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function bL(r){return Wh(r,!0)}function TL(r,t,e){var n=new Date(r);switch(yi(t)){case"year":case"month":n[z0(e)](0);case"day":n[G0(e)](1);case"hour":n[V0(e)](0);case"minute":n[H0(e)](0);case"second":n[W0(e)](0),n[U0(e)](0)}return n.getTime()}function CL(r,t,e,n){var i=1e4,a=B0,o=0;function s(A,D,I,L,P,R,E){for(var F=new Date(D),O=D,N=F[L]();O1&&R===0&&I.unshift({value:I[0].value-O})}}for(var R=0;R=n[0]&&m<=n[1]&&h++)}var _=(n[1]-n[0])/t;if(h>_*1.5&&c>_/1.5||(l.push(g),h>_||r===a[v]))break}f=[]}}}for(var S=_t(G(l,function(A){return _t(A,function(D){return D.value>=n[0]&&D.value<=n[1]&&!D.notAdd})}),function(A){return A.length>0}),w=[],x=S.length-1,v=0;v0;)a*=10;var s=[Mt(DL(n[0]/a)*a),Mt(AL(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){Aa.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=Ce(e)/Ce(this.base),Cu(e,this._extent)},t.prototype.normalize=function(e){return e=Ce(e)/Ce(this.base),Mu(e,this._extent)},t.prototype.scale=function(e){return e=Au(e,this._extent),Wo(this.base,e)},t.type="log",t}(nr),P1=Gv.prototype;P1.getMinorTicks=Aa.getMinorTicks;P1.getLabel=Aa.getLabel;function Uo(r,t){return ML(r,qe(t))}nr.registerClass(Gv);var IL=function(){function r(t,e,n){this._prepareParams(t,e,n)}return r.prototype._prepareParams=function(t,e,n){n[1]0&&u>0&&!l&&(s=0),s<0&&u<0&&!f&&(u=0));var c=this._determinedMin,v=this._determinedMax;return c!=null&&(s=c,l=!0),v!=null&&(u=v,f=!0),{min:s,max:u,minFixed:l,maxFixed:f,isBlank:h}},r.prototype.modifyDataMinMax=function(t,e){this[PL[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var n=LL[t];this[n]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),LL={min:"_determinedMin",max:"_determinedMax"},PL={min:"_dataMin",max:"_dataMax"};function R1(r,t,e){var n=r.rawExtentInfo;return n||(n=new IL(r,t,e),r.rawExtentInfo=n,n)}function Yo(r,t){return t==null?null:Ia(t)?NaN:r.parse(t)}function E1(r,t){var e=r.type,n=R1(r,t,r.getExtent()).calculate();r.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&e==="time"){var s=d_("bar",o),u=!1;if(M(s,function(h){u=u||h.getBaseAxis()===t.axis}),u){var l=p_(s),f=RL(i,a,t,l);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function RL(r,t,e,n){var i=e.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=lA(n,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;M(o,function(v){s=Math.min(v.offset,s)});var u=-1/0;M(o,function(v){u=Math.max(v.offset+v.width,u)}),s=Math.abs(s),u=Math.abs(u);var l=s+u,f=t-r,h=1-(s+u)/a,c=f/h-f;return t+=c*(u/l),r-=c*(s/l),{min:r,max:t}}function oh(r,t){var e=t,n=E1(r,e),i=n.extent,a=e.get("splitNumber");r instanceof Gv&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),u=o==="interval"||o==="time";r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:u?e.get("minInterval"):null,maxInterval:u?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function O1(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new zv({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new L1({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(nr.getClass(t)||Zr)}}function EL(r){var t=r.scale.getExtent(),e=t[0],n=t[1];return!(e>0&&n>0||e<0&&n<0)}function Bi(r){var t=r.getLabelModel().get("formatter"),e=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(n){return function(i,a){return r.scale.getFormattedLabel(i,a,n)}}(t):W(t)?function(n){return function(i){var a=r.scale.getLabel(i),o=n.replace("{value}",a!=null?a:"");return o}}(t):$(t)?function(n){return function(i,a){return e!=null&&(a=i.value-e),n(Vv(r,i),a,i.level!=null?{level:i.level}:null)}}(t):function(n){return r.scale.getLabel(n)}}function Vv(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function OL(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var n,i,a=e.getExtent();e instanceof zv?i=e.count():(n=e.getTicks(),i=n.length);var o=r.getLabelModel(),s=Bi(r),u,l=1;i>40&&(l=Math.ceil(i/40));for(var f=0;fr[1]&&(r[1]=i[1])})}var BL=function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return G(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),_t(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r}(),sh=["x","y"];function rg(r){return r.type==="interval"||r.type==="time"}var FL=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=sh,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!rg(e)||!rg(n))){var i=e.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),u=i[1]-i[0],l=a[1]-a[0];if(!(!u||!l)){var f=(s[0]-o[0])/u,h=(s[1]-o[1])/l,c=o[0]-i[0]*f,v=o[1]-a[0]*h,d=this._transform=[f,0,0,h,c,v];this._invTransform=Li([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(e[0]))&&i.contain(i.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,n){var i=this.dataToPoint(e),a=this.dataToPoint(n),o=this.getArea(),s=new at(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,n,i){i=i||[];var a=e[0],o=e[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Jt(i,e,this._transform);var s=this.getAxis("x"),u=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=u.toGlobalCoord(u.dataToCoord(o,n)),i},t.prototype.clampData=function(e,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),u=i.parse(e[0]),l=a.parse(e[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),u),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),l),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(e,n){var i=[];if(this._invTransform)return Jt(i,e,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(e[0]),n),i[1]=o.coordToData(o.toLocalCoord(e[1]),n),i},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-e,o=Math.min(i[0],i[1])-e,s=Math.max(n[0],n[1])-a+e,u=Math.max(i[0],i[1])-o+e;return new at(a,o,s,u)},t}(BL),Ya=St();function B1(r,t){var e=G(t,function(n){return r.scale.parse(n)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function zL(r){var t=r.getLabelModel().get("customValues");if(t){var e=Bi(r),n=r.scale.getExtent(),i=B1(r,t),a=_t(i,function(o){return o>=n[0]&&o<=n[1]});return{labels:G(a,function(o){var s={value:o};return{formattedLabel:e(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?VL(r):WL(r)}function GL(r,t){var e=r.getTickModel().get("customValues");if(e){var n=r.scale.getExtent(),i=B1(r,e);return{ticks:_t(i,function(a){return a>=n[0]&&a<=n[1]})}}return r.type==="category"?HL(r,t):{ticks:G(r.scale.getTicks(),function(a){return a.value})}}function VL(r){var t=r.getLabelModel(),e=F1(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function F1(r,t){var e=z1(r,"labels"),n=Hv(t),i=G1(e,n);if(i)return i;var a,o;return $(n)?a=W1(r,n):(o=n==="auto"?UL(r):n,a=H1(r,o)),V1(e,n,{labels:a,labelCategoryInterval:o})}function HL(r,t){var e=z1(r,"ticks"),n=Hv(t),i=G1(e,n);if(i)return i;var a,o;if((!t.get("show")||r.scale.isBlank())&&(a=[]),$(n))a=W1(r,n,!0);else if(n==="auto"){var s=F1(r,r.getLabelModel());o=s.labelCategoryInterval,a=G(s.labels,function(u){return u.tickValue})}else o=n,a=H1(r,o,!0);return V1(e,n,{ticks:a,tickCategoryInterval:o})}function WL(r){var t=r.scale.getTicks(),e=Bi(r);return{labels:G(t,function(n,i){return{level:n.level,formattedLabel:e(n,i),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function z1(r,t){return Ya(r)[t]||(Ya(r)[t]=[])}function G1(r,t){for(var e=0;e40&&(s=Math.max(1,Math.floor(o/40)));for(var u=a[0],l=r.dataToCoord(u+1)-r.dataToCoord(u),f=Math.abs(l*Math.cos(n)),h=Math.abs(l*Math.sin(n)),c=0,v=0;u<=a[1];u+=s){var d=0,p=0,g=js(e({value:u}),t.font,"center","top");d=g.width*1.3,p=g.height*1.3,c=Math.max(c,d,7),v=Math.max(v,p,7)}var y=c/f,m=v/h;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),S=Ya(r.model),w=r.getExtent(),x=S.lastAutoInterval,b=S.lastTickCount;return x!=null&&b!=null&&Math.abs(x-_)<=1&&Math.abs(b-o)<=1&&x>_&&S.axisExtent0===w[0]&&S.axisExtent1===w[1]?_=x:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=w[0],S.axisExtent1=w[1]),_}function XL(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function H1(r,t,e){var n=Bi(r),i=r.scale,a=i.getExtent(),o=r.getLabelModel(),s=[],u=Math.max((t||0)+1,1),l=a[0],f=i.count();l!==0&&u>1&&f/u>2&&(l=Math.round(Math.ceil(l/u)*u));var h=k1(r),c=o.get("showMinLabel")||h,v=o.get("showMaxLabel")||h;c&&l!==a[0]&&p(a[0]);for(var d=l;d<=a[1];d+=u)p(d);v&&d-u!==a[1]&&p(a[1]);function p(g){var y={value:g};s.push(e?g:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:g})}return s}function W1(r,t,e){var n=r.scale,i=Bi(r),a=[];return M(n.getTicks(),function(o){var s=n.getLabel(o),u=o.value;t(o.value,s)&&a.push(e?u:{formattedLabel:i(o),rawLabel:s,tickValue:u})}),a}var ng=[0,1],Wv=function(){function r(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return r.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return Vh(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},r.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&i.type==="ordinal"&&(n=n.slice(),ig(n,i.count())),fr(t,ng,n,e)},r.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),ig(n,i.count()));var a=fr(t,n,ng,e);return this.scale.scale(a)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=GL(this,e),i=n.ticks,a=G(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return ZL(this,a,o,t.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var n=this.scale.getMinorTicks(e),i=G(n,function(a){return G(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(){return zL(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 t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},r.prototype.calculateCategoryInterval=function(){return YL(this)},r}();function ig(r,t){var e=r[1]-r[0],n=t,i=e/n/2;r[0]+=i,r[1]-=i}function ZL(r,t,e,n){var i=t.length;if(!r.onBand||e||!i)return;var a=r.getExtent(),o,s;if(i===1)t[0].coord=a[0],o=t[1]={coord:a[1],tickValue:t[0].tickValue};else{var u=t[i-1].tickValue-t[0].tickValue,l=(t[i-1].coord-t[0].coord)/u;M(t,function(v){v.coord-=l/2});var f=r.scale.getExtent();s=1+f[1]-t[i-1].tickValue,o={coord:t[i-1].coord+l*s,tickValue:f[1]+1},t.push(o)}var h=a[0]>a[1];c(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&c(a[0],t[0].coord)&&t.unshift({coord:a[0]}),c(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&c(o.coord,a[1])&&t.push({coord:a[1]});function c(v,d){return v=Mt(v),d=Mt(d),h?v>d:vn[1]&&n.reverse(),n},t.prototype.pointToData=function(e,n){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Wv);function uh(r,t,e){e=e||{};var n=r.coordinateSystem,i=t.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,u=o?"onZero":s,l=i.dim,f=n.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],c={left:0,right:1,top:0,bottom:1,onZero:2},v=t.get("offset")||0,d=l==="x"?[h[2]-v,h[3]+v]:[h[0]-v,h[1]+v];if(o){var p=o.toGlobalCoord(o.dataToCoord(0));d[c.onZero]=Math.max(Math.min(p,d[1]),d[0])}a.position=[l==="y"?d[c[u]]:h[0],l==="x"?d[c[u]]:h[3]],a.rotation=Math.PI/2*(l==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=g[s],a.labelOffset=o?d[c[s]]-d[c.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Si(e.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=t.get(["axisLabel","rotate"]);return a.labelRotate=u==="top"?-y:y,a.z2=1,a}function ag(r){return r.get("coordinateSystem")==="cartesian2d"}function og(r){var t={xAxisModel:null,yAxisModel:null};return M(t,function(e,n){var i=n.replace(/Model$/,""),a=r.getReferringComponents(i,Qt).models[0];t[n]=a}),t}var Hl=Math.log;function U1(r,t,e){var n=Zr.prototype,i=n.getTicks.call(e),a=n.getTicks.call(e,!0),o=i.length-1,s=n.getInterval.call(e),u=E1(r,t),l=u.extent,f=u.fixMin,h=u.fixMax;if(r.type==="log"){var c=Hl(r.base);l=[Hl(l[0])/c,Hl(l[1])/c]}r.setExtent(l[0],l[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var v=n.getExtent.call(r);f&&(l[0]=v[0]),h&&(l[1]=v[1]);var d=n.getInterval.call(r),p=l[0],g=l[1];if(f&&h)d=(g-p)/o;else if(f)for(g=l[0]+d*o;gl[0]&&isFinite(p)&&isFinite(l[0]);)d=Vl(d),p=l[1]-d*o;else{var y=r.getTicks().length-1;y>o&&(d=Vl(d));var m=d*o;g=Math.ceil(l[1]/d)*d,p=Mt(g-m),p<0&&l[0]>=0?(p=0,g=Mt(m)):g>0&&l[1]<=0&&(g=0,p=-Mt(m))}var _=(i[0].value-a[0].value)/s,S=(i[o].value-a[o].value)/s;n.setExtent.call(r,p+d*_,g+d*S),n.setInterval.call(r,d),(_||S)&&n.setNiceExtent.call(r,p+d,g-d)}var qL=function(){function r(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=sh,this._initCartesian(t,e,n),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,u=mt(o),l=u.length;if(l){for(var f=[],h=l-1;h>=0;h--){var c=+u[h],v=o[c],d=v.model,p=v.scale;ah(p)&&d.get("alignTicks")&&d.get("interval")==null?f.push(v):(oh(p,d),ah(p)&&(s=v))}f.length&&(s||(s=f.pop(),oh(s.scale,s.model)),M(f,function(g){U1(g.scale,g.model,s.scale)}))}}i(n.x),i(n.y);var a={};M(n.x,function(o){sg(n,"y",o,a)}),M(n.y,function(o){sg(n,"x",o,a)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),a=!n&&t.get("containLabel"),o=Sr(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var s=this._axesList;u(),a&&(M(s,function(l){if(!l.model.get(["axisLabel","inside"])){var f=OL(l);if(f){var h=l.isHorizontal()?"height":"width",c=l.model.get(["axisLabel","margin"]);o[h]-=f[h]+c,l.position==="top"?o.y+=f.height+c:l.position==="left"&&(o.x+=f.width+c)}}}),u()),M(this._coordsList,function(l){l.calcAffineTransform()});function u(){M(s,function(l){var f=l.isHorizontal(),h=f?[0,o.width]:[0,o.height],c=l.inverse?1:0;l.setExtent(h[c],h[1-c]),KL(l,f?o.x:o.y)})}},r.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(n!=null)return n[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var n="x"+t+"y"+e;return this._coordsMap[n]}Y(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i0?"top":"bottom",a="center"):ka(i-zr)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r}(),lg={axisLine:function(r,t,e,n){var i=t.get(["axisLine","show"]);if(i==="auto"&&r.handleAutoShown&&(i=r.handleAutoShown("axisLine")),!!i){var a=t.axis.getExtent(),o=n.transform,s=[a[0],0],u=[a[1],0],l=s[0]>u[0];o&&(Jt(s,s,o),Jt(u,u,o));var f=B({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new mr({shape:{x1:s[0],y1:s[1],x2:u[0],y2:u[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Fa(h.shape,h.style.lineWidth),h.anid="line",e.add(h);var c=t.get(["axisLine","symbol"]);if(c!=null){var v=t.get(["axisLine","symbolSize"]);W(c)&&(c=[c,c]),(W(v)||vt(v))&&(v=[v,v]);var d=r_(t.get(["axisLine","symbolOffset"])||0,v),p=v[0],g=v[1];M([{rotate:r.rotation+Math.PI/2,offset:d[0],r:0},{rotate:r.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-u[0])*(s[0]-u[0])+(s[1]-u[1])*(s[1]-u[1]))}],function(y,m){if(c[m]!=="none"&&c[m]!=null){var _=Xr(c[m],-p/2,-g/2,p,g,f.stroke,!0),S=y.r+y.offset,w=l?u:s;_.attr({rotation:y.rotate,x:w[0]+S*Math.cos(r.rotation),y:w[1]-S*Math.sin(r.rotation),silent:!0,z2:11}),e.add(_)}})}}},axisTickLabel:function(r,t,e,n){var i=jL(e,n,t,r),a=e2(e,n,t,r);if(JL(t,a,i),t2(e,n,t,r.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=I_(G(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));R_(o)}},axisName:function(r,t,e,n){var i=Si(r.axisName,t.get("name"));if(i){var a=t.get("nameLocation"),o=r.nameDirection,s=t.getModel("nameTextStyle"),u=t.get("nameGap")||0,l=t.axis.getExtent(),f=l[0]>l[1]?-1:1,h=[a==="start"?l[0]-f*u:a==="end"?l[1]+f*u:(l[0]+l[1])/2,hg(a)?r.labelOffset+o*u:0],c,v=t.get("nameRotate");v!=null&&(v=v*zr/180);var d;hg(a)?c=dr.innerTextLayout(r.rotation,v!=null?v:r.rotation,o):(c=QL(r.rotation,a,v||0,l),d=r.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(c.rotation)),!isFinite(d)&&(d=null)));var p=s.getFont(),g=t.get("nameTruncate",!0)||{},y=g.ellipsis,m=Si(r.nameTruncateMaxWidth,g.maxWidth,d),_=new Dt({x:h[0],y:h[1],rotation:c.rotation,silent:dr.isLabelSilent(t),style:_r(s,{text:i,font:p,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(io({el:_,componentModel:t,itemName:i}),_.__fullText=i,_.anid="name",t.get("triggerEvent")){var S=dr.makeAxisEventDataBase(t);S.targetType="axisName",S.name=i,it(_).eventData=S}n.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function QL(r,t,e,n){var i=Hh(e-r),a,o,s=n[0]>n[1],u=t==="start"&&!s||t!=="start"&&s;return ka(i-zr/2)?(o=u?"bottom":"top",a="center"):ka(i-zr*1.5)?(o=u?"top":"bottom",a="center"):(o="middle",izr/2?a=u?"left":"right":a=u?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function JL(r,t,e){if(!k1(r.axis)){var n=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]);t=t||[],e=e||[];var a=t[0],o=t[1],s=t[t.length-1],u=t[t.length-2],l=e[0],f=e[1],h=e[e.length-1],c=e[e.length-2];n===!1?(ve(a),ve(l)):fg(a,o)&&(n?(ve(o),ve(f)):(ve(a),ve(l))),i===!1?(ve(s),ve(h)):fg(u,s)&&(i?(ve(u),ve(c)):(ve(s),ve(h)))}}function ve(r){r&&(r.ignore=!0)}function fg(r,t){var e=r&&r.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!e||!n)){var i=Qa([]);return Js(i,i,-r.rotation),e.applyTransform(Vr([],i,r.getLocalTransform())),n.applyTransform(Vr([],i,t.getLocalTransform())),e.intersect(n)}}function hg(r){return r==="middle"||r==="center"}function Y1(r,t,e,n,i){for(var a=[],o=[],s=[],u=0;u=0||r===t}function s2(r){var t=Uv(r);if(t){var e=t.axisPointerModel,n=t.axis.scale,i=e.option,a=e.get("status"),o=e.get("value");o!=null&&(o=n.parse(o));var s=lh(e);a==null&&(i.status=s?"show":"hide");var u=n.getExtent().slice();u[0]>u[1]&&u.reverse(),(o==null||o>u[1])&&(o=u[1]),o0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var p=u;d.color!=null&&(p=q({color:d.color},u));var g=j(J(d),{boundaryGap:e,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:d.text,showName:l,nameLocation:"end",nameGap:h,nameTextStyle:p,triggerEvent:c},!1);if(W(f)){var y=g.name;g.name=f.replace("{value}",y!=null?y:"")}else $(f)&&(g.name=f(g.name,g));var m=new yt(g,null,this.ecModel);return fe(m,Bv.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=v},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.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:j({lineStyle:{color:"#bbb"}},aa.axisLine),axisLabel:Xo(aa.axisLabel,!1),axisTick:Xo(aa.axisTick,!1),splitLine:Xo(aa.splitLine,!0),splitArea:Xo(aa.splitArea,!0),indicator:[]},t}(ot),w2=["axisLine","axisTickLabel","axisName"],b2=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){var a=this.group;a.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var n=e.coordinateSystem,i=n.getIndicatorAxes(),a=G(i,function(o){var s=o.model.get("showName")?o.name:"",u=new dr(o.model,{axisName:s,position:[n.cx,n.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});M(a,function(o){M(w2,o.add,o),this.group.add(o.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(e){var n=e.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=e.get("shape"),o=e.getModel("splitLine"),s=e.getModel("splitArea"),u=o.getModel("lineStyle"),l=s.getModel("areaStyle"),f=o.get("show"),h=s.get("show"),c=u.get("color"),v=l.get("color"),d=z(c)?c:[c],p=z(v)?v:[v],g=[],y=[];function m(R,E,F){var O=F%E.length;return R[O]=R[O]||[],O}if(a==="circle")for(var _=i[0].getTicksCoords(),S=n.cx,w=n.cy,x=0;x<_.length;x++){if(f){var b=m(g,d,x);g[b].push(new Ri({shape:{cx:S,cy:w,r:_[x].coord}}))}if(h&&x<_.length-1){var b=m(y,p,x);y[b].push(new eo({shape:{cx:S,cy:w,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,C=G(i,function(R,E){var F=R.getTicksCoords();return T=T==null?F.length-1:Math.min(F.length-1,T),G(F,function(O){return n.coordToPoint(O.coord,E)})}),A=[],x=0;x<=T;x++){for(var D=[],I=0;Ii&&(n=o,i=u)}if(n)return O2(n.exterior);var l=this.getBoundingRect();return[l.x+l.width/2,l.y+l.height/2]},t.prototype.getBoundingRect=function(e){var n=this._rect;if(n&&!e)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return M(o,function(s){s.type==="polygon"?_g(s.exterior,i,a,e):M(s.points,function(u){_g(u,i,a,e)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new at(i[0],i[1],a[0]-i[0],a[1]-i[1]),e||(this._rect=n),n},t.prototype.contain=function(e){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(e[0],e[1]))return!1;t:for(var a=0,o=i.length;a>1^-(s&1),u=u>>1^-(u&1),s+=i,u+=a,i=s,a=u,n.push([s/e,u/e])}return n}function wg(r,t){return r=N2(r),G(_t(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,i=e.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new Sg(o[0],o.slice(1)));break;case"MultiPolygon":M(i.coordinates,function(u){u[0]&&a.push(new Sg(u[0],u.slice(1)))});break;case"LineString":a.push(new xg([i.coordinates]));break;case"MultiLineString":a.push(new xg(i.coordinates))}var s=new k2(n[t||"name"],a,n.cp);return s.properties=n,s})}function J1(r,t,e,n,i,a){r=r||0;var o=e[1]-e[0];if(i!=null&&(i=ri(i,[0,o])),a!=null&&(a=Math.max(a,i!=null?i:0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=ri(s,[0,o]),i=a=ri(s,[i,a]),n=0}t[0]=ri(t[0],e),t[1]=ri(t[1],e);var u=Zl(t,n);t[n]+=r;var l=i||0,f=e.slice();u.sign<0?f[0]+=l:f[1]-=l,t[n]=ri(t[n],f);var h;return h=Zl(t,n),i!=null&&(h.sign!==u.sign||h.spana&&(t[1-n]=t[n]+h.sign*a),t}function Zl(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function ri(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var Fn=!0,Za=Math.min,Ai=Math.max,B2=Math.pow,F2=1e4,z2=6,G2=6,bg="globalPan",V2={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},H2={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Tg={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},W2=0,U2=function(r){k(t,r);function t(e){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new bt,n._uid="brushController_"+W2++,M(Q2,function(i,a){this._handlers[a]=ht(i,this)},n),n}return t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var n=this._zr;this._enableGlobalPan||D2(n,bg,this._uid),M(this._handlers,function(i,a){n.on(a,i)}),this._brushType=e.brushType,this._brushOption=j(J(Tg),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;I2(e,bg,this._uid),M(this._handlers,function(n,i){e.off(i,n)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var n=this._panels={};M(e,function(i){n[i.panelId]=J(i)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=n.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=G(e,function(c){return j(J(Tg),c,!0)});var n="\0-brush-index-",i=this._covers,a=this._covers=[],o=this,s=this._creatingCover;return new za(i,e,l,u).add(f).update(f).remove(h).execute(),this;function u(c,v){return(c.id!=null?c.id:n+v)+"-"+c.brushType}function l(c,v){return u(c.__brushOption,v)}function f(c,v){var d=e[c];if(v!=null&&i[v]===s)a[c]=i[v];else{var p=a[c]=v!=null?(i[v].__brushOption=d,i[v]):tS(o,j1(o,d));Yv(o,p)}}function h(c){i[c]!==s&&o.group.remove(i[c])}},t.prototype.unmount=function(){return this.enableBrush(!1),hh(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(Fe);function j1(r,t){var e=Du[t.brushType].createCover(r,t);return e.__brushOption=t,rS(e,t),r.group.add(e),e}function tS(r,t){var e=Xv(t);return e.endCreating&&(e.endCreating(r,t),rS(t,t.__brushOption)),t}function eS(r,t){var e=t.__brushOption;Xv(t).updateCoverShape(r,t,e.range,e)}function rS(r,t){var e=t.z;e==null&&(e=F2),r.traverse(function(n){n.z=e,n.z2=e})}function Yv(r,t){Xv(t).updateCommon(r,t),eS(r,t)}function Xv(r){return Du[r.__brushOption.brushType]}function Zv(r,t,e){var n=r._panels;if(!n)return Fn;var i,a=r._transform;return M(n,function(o){o.isTargetByCursor(t,e,a)&&(i=o)}),i}function nS(r,t){var e=r._panels;if(!e)return Fn;var n=t.__brushOption.panelId;return n!=null?e[n]:Fn}function hh(r){var t=r._covers,e=t.length;return M(t,function(n){r.group.remove(n)},r),t.length=0,!!e}function zn(r,t){var e=G(r._covers,function(n){var i=n.__brushOption,a=J(i.range);return{brushType:i.brushType,panelId:i.panelId,range:a}});r.trigger("brush",{areas:e,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function Y2(r){var t=r._track;if(!t.length)return!1;var e=t[t.length-1],n=t[0],i=e[0]-n[0],a=e[1]-n[1],o=B2(i*i+a*a,.5);return o>z2}function iS(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function aS(r,t,e,n){var i=new bt;return i.add(new wt({name:"main",style:$v(e),silent:!0,draggable:!0,cursor:"move",drift:lt(Cg,r,t,i,["n","s","w","e"]),ondragend:lt(zn,t,{isEnd:!0})})),M(n,function(a){i.add(new wt({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:lt(Cg,r,t,i,a),ondragend:lt(zn,t,{isEnd:!0})}))}),i}function oS(r,t,e,n){var i=n.brushStyle.lineWidth||0,a=Ai(i,G2),o=e[0][0],s=e[1][0],u=o-i/2,l=s-i/2,f=e[0][1],h=e[1][1],c=f-a+i/2,v=h-a+i/2,d=f-o,p=h-s,g=d+i,y=p+i;sr(r,t,"main",o,s,d,p),n.transformable&&(sr(r,t,"w",u,l,a,y),sr(r,t,"e",c,l,a,y),sr(r,t,"n",u,l,g,a),sr(r,t,"s",u,v,g,a),sr(r,t,"nw",u,l,a,a),sr(r,t,"ne",c,l,a,a),sr(r,t,"sw",u,v,a,a),sr(r,t,"se",c,v,a,a))}function vh(r,t){var e=t.__brushOption,n=e.transformable,i=t.childAt(0);i.useStyle($v(e)),i.attr({silent:!n,cursor:n?"move":"default"}),M([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?ch(r,a[0]):Z2(r,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?H2[s]+"-resize":null})})}function sr(r,t,e,n,i,a,o){var s=t.childOfName(e);s&&s.setShape(q2(qv(r,t,[[n,i],[n+a,i+o]])))}function $v(r){return q({strokeNoScale:!0},r.brushStyle)}function sS(r,t,e,n){var i=[Za(r,e),Za(t,n)],a=[Ai(r,e),Ai(t,n)];return[[i[0],a[0]],[i[1],a[1]]]}function X2(r){return fu(r.group)}function ch(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=e0(e[t],X2(r));return n[i]}function Z2(r,t){var e=[ch(r,t[0]),ch(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function Cg(r,t,e,n,i,a){var o=e.__brushOption,s=r.toRectRange(o.range),u=uS(t,i,a);M(n,function(l){var f=V2[l];s[f[0]][f[1]]+=u[f[0]]}),o.range=r.fromRectRange(sS(s[0][0],s[1][0],s[0][1],s[1][1])),Yv(t,e),zn(t,{isEnd:!1})}function $2(r,t,e,n){var i=t.__brushOption.range,a=uS(r,e,n);M(i,function(o){o[0]+=a[0],o[1]+=a[1]}),Yv(r,t),zn(r,{isEnd:!1})}function uS(r,t,e){var n=r.group,i=n.transformCoordToLocal(t,e),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function qv(r,t,e){var n=nS(r,t);return n&&n!==Fn?n.clipPath(e,r._transform):J(e)}function q2(r){var t=Za(r[0][0],r[1][0]),e=Za(r[0][1],r[1][1]),n=Ai(r[0][0],r[1][0]),i=Ai(r[0][1],r[1][1]);return{x:t,y:e,width:n-t,height:i-e}}function K2(r,t,e){if(!(!r._brushType||J2(r,t.offsetX,t.offsetY))){var n=r._zr,i=r._covers,a=Zv(r,t,e);if(!r._dragging)for(var o=0;on.getWidth()||e<0||e>n.getHeight()}var Du={lineX:Dg(0),lineY:Dg(1),rect:{createCover:function(r,t){function e(n){return n}return aS({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=iS(r);return sS(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,n){oS(r,t,e,n)},updateCommon:vh,contain:ph},polygon:{createCover:function(r,t){var e=new bt;return e.add(new wr({name:"main",style:$v(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new qr({name:"main",draggable:!0,drift:lt($2,r,t),ondragend:lt(zn,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,n){t.childAt(0).setShape({points:qv(r,t,e)})},updateCommon:vh,contain:ph}};function Dg(r){return{createCover:function(t,e){return aS({toRectRange:function(n){var i=[n,[0,100]];return r&&i.reverse(),i},fromRectRange:function(n){return n[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=iS(t),n=Za(e[0][r],e[1][r]),i=Ai(e[0][r],e[1][r]);return[n,i]},updateCoverShape:function(t,e,n,i){var a,o=nS(t,e);if(o!==Fn&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(r);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-r]]}var u=[n,a];r&&u.reverse(),oS(t,e,u,i)},updateCommon:vh,contain:ph}}function j2(r){return r=Kv(r),function(t){return rv(t,r)}}function tP(r,t){return r=Kv(r),function(e){var n=t!=null?t:e,i=n?r.width:r.height,a=n?r.x:r.y;return[a,a+(i||0)]}}function eP(r,t,e){var n=Kv(r);return function(i,a){return n.contain(a[0],a[1])&&!P2(i,t,e)}}function Kv(r){return at.create(r)}var xn=St(),Ig=J,$l=ht,rP=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,n,i){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,u=this._handle;if(!o||o==="hide"){s&&s.hide(),u&&u.hide();return}s&&s.show(),u&&u.show();var l={};this.makeElOption(l,a,t,e,n);var f=l.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new bt,this.createPointerEl(s,l,t,e),this.createLabelEl(s,l,t,e),n.getZr().add(s);else{var c=lt(Lg,e,h);this.updatePointerEl(s,l,c),this.updateLabelEl(s,l,c,e)}Rg(s,e,!0),this._renderHandle(a)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,a=i.type==="category",o=e.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var u=Uv(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/u>s}return!1}return n===!0},r.prototype.makeElOption=function(t,e,n,i,a){},r.prototype.createPointerEl=function(t,e,n,i){var a=e.pointer;if(a){var o=xn(t).pointerEl=new a0[a.type](Ig(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,n,i){if(e.label){var a=xn(t).labelEl=new Dt(Ig(e.label));t.add(a),Pg(a,i)}},r.prototype.updatePointerEl=function(t,e,n){var i=xn(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,n,i){var a=xn(t).labelEl;a&&(a.setStyle(e.label.style),n(a,{x:e.label.x,y:e.label.y}),Pg(a,i))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=no(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(l){N_(l.event)},onmousedown:$l(this._onHandleDragMove,this,0,0),drift:$l(this._onHandleDragMove,this),ondragend:$l(this._onHandleDragEnd,this)}),n.add(i)),Rg(i,e,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var u=a.get("size");z(u)||(u=[u,u]),i.scaleX=u[0]/2,i.scaleY=u[1]/2,m_(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){Lg(this._axisPointerModel,!e&&this._moveAnimation,this._handle,ql(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(ql(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(ql(i)),xn(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Hf(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}},r}();function Lg(r,t,e,n){fS(xn(e).lastProp,n)||(xn(e).lastProp=n,t?It(e,n,r):(e.stopAnimation(),e.attr(n)))}function fS(r,t){if(Y(r)&&Y(t)){var e=!0;return M(t,function(n,i){e=e&&fS(r[i],n)}),!!e}else return r===t}function Pg(r,t){r[t.get(["label","show"])?"show":"hide"]()}function ql(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function Rg(r,t,e){var n=t.get("z"),i=t.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=e)})}function nP(r){var t=r.get("type"),e=r.getModel(t+"Style"),n;return t==="line"?(n=e.getLineStyle(),n.fill=null):t==="shadow"&&(n=e.getAreaStyle(),n.stroke=null),n}function iP(r,t,e,n,i){var a=e.get("value"),o=hS(a,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),u=so(s.get("padding")||0),l=s.getFont(),f=js(o,l),h=i.position,c=f.width+u[1]+u[3],v=f.height+u[0]+u[2],d=i.align;d==="right"&&(h[0]-=c),d==="center"&&(h[0]-=c/2);var p=i.verticalAlign;p==="bottom"&&(h[1]-=v),p==="middle"&&(h[1]-=v/2),aP(h,c,v,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:_r(s,{text:o,font:l,fill:s.getTextColor(),padding:u,backgroundColor:g}),z2:10}}function aP(r,t,e,n){var i=n.getWidth(),a=n.getHeight();r[0]=Math.min(r[0]+t,i)-t,r[1]=Math.min(r[1]+e,a)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function hS(r,t,e,n,i){r=t.scale.parse(r);var a=t.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:Vv(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};M(n,function(u){var l=e.getSeriesByIndex(u.seriesIndex),f=u.dataIndexInside,h=l&&l.getDataParams(f);h&&s.seriesData.push(h)}),W(o)?a=o.replace("{value}",a):$(o)&&(a=o(s))}return a}function vS(r,t,e){var n=Gr();return Js(n,n,e.rotation),ds(n,n,e.position),ev([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],n)}function oP(r,t,e,n,i,a){var o=dr.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=i.get(["label","margin"]),iP(t,n,i,a,{position:vS(n.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function sP(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function uP(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}var lP=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,n,i,a,o){var s=i.axis,u=s.grid,l=a.get("type"),f=Eg(u,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(l&&l!=="none"){var c=nP(a),v=fP[l](s,h,f);v.style=c,e.graphicKey=v.type,e.pointer=v}var d=uh(u.model,i);oP(n,e,d,i,a,o)},t.prototype.getHandleTransform=function(e,n,i){var a=uh(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=vS(n.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,n,i,a){var o=i.axis,s=o.grid,u=o.getGlobalExtent(!0),l=Eg(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[e.x,e.y];h[f]+=n[f],h[f]=Math.min(u[1],h[f]),h[f]=Math.max(u[0],h[f]);var c=(l[1]+l[0])/2,v=[c,c];v[f]=h[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:e.rotation,cursorPoint:v,tooltipOption:d[f]}},t}(rP);function Eg(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var fP={line:function(r,t,e){var n=sP([t,e[0]],[t,e[1]],Og(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e){var n=Math.max(1,r.getBandWidth()),i=e[1]-e[0];return{type:"Rect",shape:uP([t-n/2,e[0]],[n,i],Og(r))}}};function Og(r){return r.dim==="x"?0:1}var hP=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#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}},t}(ot),cr=St(),vP=M;function cS(r,t,e){if(!Q.node){var n=t.getZr();cr(n).records||(cr(n).records={}),cP(n,t);var i=cr(n).records[r]||(cr(n).records[r]={});i.handler=e}}function cP(r,t){if(cr(r).initialized)return;cr(r).initialized=!0,e("click",lt(kg,"click")),e("mousemove",lt(kg,"mousemove")),e("globalout",pP);function e(n,i){r.on(n,function(a){var o=gP(t);vP(cr(r).records,function(s){s&&i(s,a,o.dispatchAction)}),dP(o.pendings,t)})}}function dP(r,t){var e=r.showTip.length,n=r.hideTip.length,i;e?i=r.showTip[e-1]:n&&(i=r.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function pP(r,t,e){r.handler("leave",null,e)}function kg(r,t,e,n){t.handler(r,e,n)}function gP(r){var t={showTip:[],hideTip:[]},e=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=e,r.dispatchAction(n))};return{dispatchAction:e,pendings:t}}function gh(r,t){if(!Q.node){var e=t.getZr(),n=(cr(e).records||{})[r];n&&(cr(e).records[r]=null)}}var yP=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){var a=n.getComponent("tooltip"),o=e.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";cS("axisPointer",i,function(s,u,l){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&l({type:"updateAxisPointer",currTrigger:s,x:u&&u.offsetX,y:u&&u.offsetY})})},t.prototype.remove=function(e,n){gh("axisPointer",n)},t.prototype.dispose=function(e,n){gh("axisPointer",n)},t.type="axisPointer",t}(Ot);function dS(r,t){var e=[],n=r.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=On(a,r);if(o==null||o<0||z(o))return{point:[]};var s=a.getItemGraphicEl(o),u=i.coordinateSystem;if(i.getTooltipPosition)e=i.getTooltipPosition(o)||[];else if(u&&u.dataToPoint)if(r.isStacked){var l=u.getBaseAxis(),f=u.getOtherAxis(l),h=f.dim,c=l.dim,v=h==="x"||h==="radius"?1:0,d=a.mapDimension(c),p=[];p[v]=a.get(d,o),p[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),e=u.dataToPoint(p)||[]}else e=u.dataToPoint(a.getValues(G(u.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var Ng=St();function mP(r,t,e){var n=r.currTrigger,i=[r.x,r.y],a=r,o=r.dispatchAction||ht(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){vs(i)&&(i=dS({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var u=vs(i),l=a.axesInfo,f=s.axesInfo,h=n==="leave"||vs(i),c={},v={},d={list:[],map:{}},p={showPointer:lt(SP,v),showTooltip:lt(xP,d)};M(s.coordSysMap,function(y,m){var _=u||y.containPoint(i);M(s.coordSysAxesInfo[m],function(S,w){var x=S.axis,b=CP(l,S);if(!h&&_&&(!l||b)){var T=b&&b.value;T==null&&!u&&(T=x.pointToData(i)),T!=null&&Bg(S,T,p,!1,c)}})});var g={};return M(f,function(y,m){var _=y.linkGroup;_&&!v[m]&&M(_.axesInfo,function(S,w){var x=v[w];if(S!==y&&x){var b=x.value;_.mapper&&(b=y.axis.scale.parse(_.mapper(b,Fg(S),Fg(y)))),g[y.key]=b}})}),M(g,function(y,m){Bg(f[m],y,p,!0,c)}),wP(v,f,c),bP(d,i,r,o),TP(f,o,e),c}}function Bg(r,t,e,n,i){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=_P(t,r),s=o.payloadBatch,u=o.snapToValue;s[0]&&i.seriesIndex==null&&B(i,s[0]),!n&&r.snap&&a.containData(u)&&u!=null&&(t=u),e.showPointer(r,t,s),e.showTooltip(r,o,u)}}function _P(r,t){var e=t.axis,n=e.dim,i=r,a=[],o=Number.MAX_VALUE,s=-1;return M(t.seriesModels,function(u,l){var f=u.getData().mapDimensionsAll(n),h,c;if(u.getAxisTooltipData){var v=u.getAxisTooltipData(f,r,e);c=v.dataIndices,h=v.nestestValue}else{if(c=u.getData().indicesOfNearest(f[0],r,e.type==="category"?.5:null),!c.length)return;h=u.getData().get(f[0],c[0])}if(!(h==null||!isFinite(h))){var d=r-h,p=Math.abs(d);p<=o&&((p=0&&s<0)&&(o=p,s=d,i=h,a.length=0),M(c,function(g){a.push({seriesIndex:u.seriesIndex,dataIndexInside:g,dataIndex:u.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:i}}function SP(r,t,e,n){r[t.key]={value:e,payloadBatch:n}}function xP(r,t,e,n){var i=e.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var u=t.coordSys.model,l=Xa(u),f=r.map[l];f||(f=r.map[l]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function wP(r,t,e){var n=e.axesInfo=[];M(t,function(i,a){var o=i.axisPointerModel.option,s=r[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function bP(r,t,e,n){if(vs(t)||!r.list.length){n({type:"hideTip"});return}var i=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function TP(r,t,e){var n=e.getZr(),i="axisPointerLastHighlights",a=Ng(n)[i]||{},o=Ng(n)[i]={};M(r,function(l,f){var h=l.axisPointerModel.option;h.status==="show"&&l.triggerEmphasis&&M(h.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],u=[];M(a,function(l,f){!o[f]&&u.push(l)}),M(o,function(l,f){!a[f]&&s.push(l)}),u.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:u}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function CP(r,t){for(var e=0;e<(r||[]).length;e++){var n=r[e];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function Fg(r){var t=r.axis.model,e={},n=e.axisDim=r.axis.dim;return e.axisIndex=e[n+"AxisIndex"]=t.componentIndex,e.axisName=e[n+"AxisName"]=t.name,e.axisId=e[n+"AxisId"]=t.id,e}function vs(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function pS(r){X1.registerAxisPointerClass("CartesianAxisPointer",lP),r.registerComponentModel(hP),r.registerComponentView(yP),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!z(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=r2(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},mP)}function MP(r){Be(g2),Be(pS)}var zg=["x","y","radius","angle","single"],AP=["cartesian2d","polar","singleAxis"];function DP(r){var t=r.get("coordinateSystem");return rt(AP,t)>=0}function fi(r){return r+"Axis"}function IP(r,t){var e=Z(),n=[],i=Z();r.eachComponent({mainType:"dataZoom",query:t},function(f){i.get(f.uid)||s(f)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(f){!i.get(f.uid)&&u(f)&&(s(f),a=!0)}function s(f){i.set(f.uid,!0),n.push(f),l(f)}function u(f){var h=!1;return f.eachTargetAxis(function(c,v){var d=e.get(c);d&&d[v]&&(h=!0)}),h}function l(f){f.eachTargetAxis(function(h,c){(e.get(h)||e.set(h,[]))[c]=!0})}return n}var Kl=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r}(),LP=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,n,i){var a=Gg(e);this.settledOption=a,this.mergeDefaultAndTheme(e,i),this._doInit(a)},t.prototype.mergeOption=function(e){var n=Gg(e);j(this.option,e,!0),j(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(e){var n=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var i=this.settledOption;M([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),n=this._targetAxisInfoMap=Z(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var n=!1;return M(zg,function(i){var a=this.getReferringComponents(fi(i),Tb);if(a.specified){n=!0;var o=new Kl;M(a.models,function(s){o.add(s.componentIndex)}),e.set(i,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(e,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});u(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===n}});u(s,"single")}function u(l,f){var h=l[0];if(h){var c=new Kl;if(c.add(h.componentIndex),e.set(f,c),a=!1,f==="x"||f==="y"){var v=h.getReferringComponents("grid",Qt).models[0];v&&M(l,function(d){h.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",Qt).models[0]&&c.add(d.componentIndex)})}}}a&&M(zg,function(l){if(a){var f=i.findComponents({mainType:fi(l),filter:function(c){return c.get("type",!0)==="category"}});if(f[0]){var h=new Kl;h.add(f[0].componentIndex),e.set(l,h),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(n){!e&&(e=n)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var n=this._rangePropMode,i=this.get("rangeMode");M([["start","startValue"],["end","endValue"]],function(a,o){var s=e[a[0]]!=null,u=e[a[1]]!=null;s&&!u?n[o]="percent":!s&&u?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(n,i){e==null&&(e=this.ecModel.getComponent(fi(n),i))},this),e},t.prototype.eachTargetAxis=function(e,n){this._targetAxisInfoMap.each(function(i,a){M(i.indexList,function(o){e.call(n,a,o)})})},t.prototype.getAxisProxy=function(e,n){var i=this.getAxisModel(e,n);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(e,n){var i=this._targetAxisInfoMap.get(e);if(i&&i.indexMap[n])return this.ecModel.getComponent(fi(e),n)},t.prototype.setRawRange=function(e){var n=this.option,i=this.settledOption;M([["start","startValue"],["end","endValue"]],function(a){(e[a[0]]!=null||e[a[1]]!=null)&&(n[a[0]]=i[a[0]]=e[a[0]],n[a[1]]=i[a[1]]=e[a[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var n=this.option;M(["start","startValue","end","endValue"],function(i){n[i]=e[i]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,n){if(e==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(e,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(_&&!S&&!w)return!0;_&&(g=!0),S&&(d=!0),w&&(p=!0)}return g&&d&&p})}else si(f,function(v){if(a==="empty")u.setData(l=l.map(v,function(p){return s(p)?p:NaN}));else{var d={};d[v]=o,l.selectRange(d)}});si(f,function(v){l.setApproximateExtent(o,v)})}});function s(u){return u>=o[0]&&u<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;si(["min","max"],function(i){var a=e.get(i+"Span"),o=e.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=fr(n[0]+o,n,[0,100],!0):a!=null&&(o=fr(a,[0,100],n,!0)-n[0]),t[i+"Span"]=a,t[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=Vh(n,[0,500]);i=Math.min(i,20);var a=t.axis.scale.rawExtentInfo;e[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),e[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},r}();function kP(r,t,e){var n=[1/0,-1/0];si(e,function(o){NL(n,o.getData(),t)});var i=r.getAxisModel(),a=R1(i.axis.scale,i,n).calculate();return[a.min,a.max]}var NP={getTargetSeries:function(r){function t(i){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var u=r.getComponent(fi(o),s);i(o,s,u,a)})})}t(function(i,a,o,s){o.__dzAxisProxy=null});var e=[];t(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new OP(i,a,s,r),e.push(o.__dzAxisProxy))});var n=Z();return M(e,function(i){M(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).reset(e)}),e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var n=e.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();e.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function BP(r){r.registerAction("dataZoom",function(t,e){var n=IP(e,t);M(n,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var Hg=!1;function FP(r){Hg||(Hg=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,NP),BP(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function zP(r){r.registerComponentModel(PP),r.registerComponentView(EP),FP(r)}var Le=function(){function r(){}return r}(),gS={};function oa(r,t){gS[r]=t}function yS(r){return gS[r]}var GP=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;M(this.option.feature,function(n,i){var a=yS(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(e)),j(n,a.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.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"}},t}(ot);function VP(r,t,e){var n=t.getBoxLayoutParams(),i=t.get("padding"),a={width:e.getWidth(),height:e.getHeight()},o=Sr(n,a,i);_i(t.get("orient"),r,t.get("itemGap"),o.width,o.height),HC(r,n,a,i)}function mS(r,t){var e=so(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),r=new wt({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1}),r}var HP=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,i,a){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),u=e.get("orient")==="vertical",l=e.get("feature")||{},f=this._features||(this._features={}),h=[];M(l,function(d,p){h.push(p)}),new za(this._featureNames||[],h).add(c).update(c).remove(lt(c,null)).execute(),this._featureNames=h;function c(d,p){var g=h[d],y=h[p],m=l[g],_=new yt(m,e,e.ecModel),S;if(a&&a.newTitle!=null&&a.featureName===g&&(m.title=a.newTitle),g&&!y){if(WP(g))S={onclick:_.option.onclick,featureName:g};else{var w=yS(g);if(!w)return;S=new w}f[g]=S}else if(S=f[y],!S)return;S.uid=ao("toolbox-feature"),S.model=_,S.ecModel=n,S.api=i;var x=S instanceof Le;if(!g&&y){x&&S.dispose&&S.dispose(n,i);return}if(!_.get("show")||x&&S.unusable){x&&S.remove&&S.remove(n,i);return}v(_,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"?xi:wi)(A[b])},S instanceof Le&&S.render&&S.render(_,n,i,a)}function v(d,p,g){var y=d.getModel("iconStyle"),m=d.getModel(["emphasis","iconStyle"]),_=p instanceof Le&&p.getIcons?p.getIcons():d.get("icon"),S=d.get("title")||{},w,x;W(_)?(w={},w[g]=_):w=_,W(S)?(x={},x[g]=S):x=S;var b=d.iconPaths={};M(w,function(T,C){var A=no(T,{},{x:-s/2,y:-s/2,width:s,height:s});A.setStyle(y.getItemStyle());var D=A.ensureState("emphasis");D.style=m.getItemStyle();var I=new Dt({style:{text:x[C],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null,font:s0({fontStyle:m.get("textFontStyle"),fontFamily:m.get("textFontFamily"),fontSize:m.get("textFontSize"),fontWeight:m.get("textFontWeight")},n)},ignore:!0});A.setTextContent(I),io({el:A,componentModel:e,itemName:C,formatterParamsExtra:{title:x[C]}}),A.__title=x[C],A.on("mouseover",function(){var L=m.getItemStyle(),P=u?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";I.setStyle({fill:m.get("textFill")||L.fill||L.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),A.setTextConfig({position:m.get("textPosition")||P}),I.ignore=!e.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",C])!=="emphasis"&&i.leaveEmphasis(this),I.hide()}),(d.get(["iconStatus",C])==="emphasis"?xi:wi)(A),o.add(A),A.on("click",ht(p.onclick,p,n,i,C)),b[C]=A})}VP(o,e,i),o.add(mS(o.getBoundingRect(),e)),u||o.eachChild(function(d){var p=d.__title,g=d.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),m=d.getTextContent(),_=m&&m.ensureState("emphasis");if(_&&!$(_)&&p){var S=_.style||(_.style={}),w=js(p,Dt.makeFont(S)),x=d.x+o.x,b=d.y+o.y+s,T=!1;b+w.height>i.getHeight()&&(y.position="top",T=!0);var C=T?-5-w.height:s+10;x+w.width/2>i.getWidth()?(y.position=["100%",C],S.align="right"):x-w.width/2<0&&(y.position=[0,C],S.align="left")}})},t.prototype.updateView=function(e,n,i,a){M(this._features,function(o){o instanceof Le&&o.updateView&&o.updateView(o.model,n,i,a)})},t.prototype.remove=function(e,n){M(this._features,function(i){i instanceof Le&&i.remove&&i.remove(e,n)}),this.group.removeAll()},t.prototype.dispose=function(e,n){M(this._features,function(i){i instanceof Le&&i.dispose&&i.dispose(e,n)})},t.type="toolbox",t}(Ot);function WP(r){return r.indexOf("my")===0}var UP=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){var i=this.model,a=i.get("name")||e.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",u=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),l=Q.browser;if(typeof MouseEvent=="function"&&(l.newEdge||!l.ie&&!l.edge)){var f=document.createElement("a");f.download=a+"."+s,f.target="_blank",f.href=u;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var c=u.split(","),v=c[0].indexOf("base64")>-1,d=o?decodeURIComponent(c[1]):c[1];v&&(d=window.atob(d));var p=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,y=new Uint8Array(g);g--;)y[g]=d.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,w=S.document;w.open("image/svg+xml","replace"),w.write(d),w.close(),S.focus(),w.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var x=i.get("lang"),b='',T=window.open();T.document.write(b),T.document.title=a}},t.getDefaultOption=function(e){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t}(Le),Wg="__ec_magicType_stack__",YP=[["line","bar"],["stack"]],XP=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,n=e.get("icon"),i={};return M(e.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},t.getDefaultOption=function(e){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},t.prototype.onclick=function(e,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(Ug[i]){var s={series:[]},u=function(h){var c=h.subType,v=h.id,d=Ug[i](c,v,h,a);d&&(q(d,h.option),s.series.push(d));var p=h.coordinateSystem;if(p&&p.type==="cartesian2d"&&(i==="line"||i==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=h.getReferringComponents(m,Qt).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var w=0;w<=S;w++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=i==="bar"}}};M(YP,function(h){rt(h,i)>=0&&M(h,function(c){a.setIconStatus(c,"normal")})}),a.setIconStatus(i,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},u);var l,f=i;i==="stack"&&(l=j({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(f="tiled")),n.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:l,featureName:"magicType"})}},t}(Le),Ug={line:function(r,t,e,n){if(r==="bar")return j({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,t,e,n){if(r==="line")return j({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,t,e,n){var i=e.get("stack")===Wg;if(r==="line"||r==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),j({id:t,stack:i?"":Wg},n.get(["option","stack"])||{},!0)}};ze({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var Iu=new Array(60).join("-"),Di=" ";function ZP(r){var t={},e=[],n=[];return r.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(i)}else e.push(i)}else e.push(i)}),{seriesGroupByCategoryAxis:t,other:e,meta:n}}function $P(r){var t=[];return M(r,function(e,n){var i=e.categoryAxis,a=e.valueAxis,o=a.dim,s=[" "].concat(G(e.series,function(v){return v.name})),u=[i.model.getCategories()];M(e.series,function(v){var d=v.getRawData();u.push(v.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var l=[s.join(Di)],f=0;f=0)return!0}var yh=new RegExp("["+Di+"]+","g");function JP(r){for(var t=r.split(/\n+/g),e=Hs(t.shift()).split(yh),n=[],i=G(e,function(u){return{name:u,data:[]}}),a=0;a=0;a--){var o=e[a];if(o[i])break}if(a<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var u=s.getPercentRange();e[0][i]={dataZoomId:i,start:u[0],end:u[1]}}}}),e.push(t)}function iR(r){var t=Qv(r),e=t[t.length-1];t.length>1&&t.pop();var n={};return _S(e,function(i,a){for(var o=t.length-1;o>=0;o--)if(i=t[o][a],i){n[a]=i;break}}),n}function aR(r){SS(r).snapshots=null}function oR(r){return Qv(r).length}function Qv(r){var t=SS(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var sR=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){aR(e),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])};return n},t}(Le);ze({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var uR=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],xS=function(){function r(t,e,n){var i=this;this._targetInfoList=[];var a=Yg(e,t);M(lR,function(o,s){(!n||!n.include||rt(n.include,s)>=0)&&o(a,i._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=Ql[n.brushType](0,a,i);n.__rangeOffset={offset:qg[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,n){M(t,function(i){var a=this.findTargetInfo(i,e);a&&a!==!0&&M(a.coordSyses,function(o){var s=Ql[i.brushType](1,o,i.range,!0);n(i,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){M(t,function(n){var i=this.findTargetInfo(n,e);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=Ql[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?qg[n.brushType](a.values,o.offset,fR(a.xyMinMax,o.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(t,e){return G(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:j2(i),isTargetByCursor:eP(i,t,n.coordSysModel),getLinearBrushOtherExtent:tP(i)}})},r.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return i===!0||i&&rt(i.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=Yg(e,t),a=0;ar[1]&&r.reverse(),r}function Yg(r,t){return Sa(r,t,{includeMainTypes:uR})}var lR={grid:function(r,t){var e=r.xAxisModels,n=r.yAxisModels,i=r.gridModels,a=Z(),o={},s={};!e&&!n&&!i||(M(e,function(u){var l=u.axis.grid.model;a.set(l.id,l),o[l.id]=!0}),M(n,function(u){var l=u.axis.grid.model;a.set(l.id,l),s[l.id]=!0}),M(i,function(u){a.set(u.id,u),o[u.id]=!0,s[u.id]=!0}),a.each(function(u){var l=u.coordinateSystem,f=[];M(l.getCartesians(),function(h,c){(rt(e,h.getAxis("x").model)>=0||rt(n,h.getAxis("y").model)>=0)&&f.push(h)}),t.push({panelId:"grid--"+u.id,gridModel:u,coordSysModel:u,coordSys:f[0],coordSyses:f,getPanelRect:Zg.grid,xAxisDeclared:o[u.id],yAxisDeclared:s[u.id]})}))},geo:function(r,t){M(r.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:Zg.geo})})}},Xg=[function(r,t){var e=r.xAxisModel,n=r.yAxisModel,i=r.gridModel;return!i&&e&&(i=e.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],Zg={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(fu(r)),t}},Ql={lineX:lt($g,0),lineY:lt($g,1),rect:function(r,t,e,n){var i=r?t.pointToData([e[0][0],e[1][0]],n):t.dataToPoint([e[0][0],e[1][0]],n),a=r?t.pointToData([e[0][1],e[1][1]],n):t.dataToPoint([e[0][1],e[1][1]],n),o=[mh([i[0],a[0]]),mh([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=G(e,function(o){var s=r?t.pointToData(o,n):t.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function $g(r,t,e,n){var i=e.getAxis(["x","y"][r]),a=mh(G([0,1],function(s){return t?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[r]=a,o[1-r]=[NaN,NaN],{values:a,xyMinMax:o}}var qg={lineX:lt(Kg,0),lineY:lt(Kg,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return G(r,function(n,i){return[n[0]-e[0]*t[i][0],n[1]-e[1]*t[i][1]]})}};function Kg(r,t,e,n){return[t[0]-n[r]*e[0],t[1]-n[r]*e[1]]}function fR(r,t){var e=Qg(r),n=Qg(t),i=[e[0]/n[0],e[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function Qg(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var _h=M,hR=Sb("toolbox-dataZoom_"),vR=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,i,a){this._brushController||(this._brushController=new U2(i.getZr()),this._brushController.on("brush",ht(this._onBrush,this)).mount()),pR(e,n,this,a,i),dR(e,n)},t.prototype.onclick=function(e,n,i){cR[i].call(this)},t.prototype.remove=function(e,n){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var n=e.areas;if(!e.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new xS(Jv(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(l,f,h){if(h.type==="cartesian2d"){var c=l.brushType;c==="rect"?(s("x",h,f[0]),s("y",h,f[1])):s({lineX:"x",lineY:"y"}[c],h,f)}}),nR(a,i),this._dispatchZoomAction(i);function s(l,f,h){var c=f.getAxis(l),v=c.model,d=u(l,v,a),p=d.findRepresentativeAxisProxy(v).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(h=J1(0,h.slice(),c.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(i[d.id]={dataZoomId:d.id,startValue:h[0],endValue:h[1]})}function u(l,f,h){var c;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var d=v.getAxisModel(l,f.componentIndex);d&&(c=v)}),c}},t.prototype._dispatchZoomAction=function(e){var n=[];_h(e,function(i,a){n.push(J(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(e){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return n},t}(Le),cR={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(iR(this.ecModel))}};function Jv(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function dR(r,t){r.setIconStatus("back",oR(t)>1?"emphasis":"normal")}function pR(r,t,e,n,i){var a=e._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),e._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var o=new xS(Jv(r),t,{include:["grid"]}),s=o.makePanelOpts(i,function(u){return u.xAxisDeclared&&!u.yAxisDeclared?"lineX":!u.xAxisDeclared&&u.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}DD("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var n=t.getModel(e),i=[],a=Jv(n),o=Sa(r,a);_h(o.xAxisModels,function(u){return s(u,"xAxis","xAxisIndex")}),_h(o.yAxisModels,function(u){return s(u,"yAxis","yAxisIndex")});function s(u,l,f){var h=u.componentIndex,c={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:hR+l+h};c[f]=h,i.push(c)}return i});function gR(r){r.registerComponentModel(GP),r.registerComponentView(HP),oa("saveAsImage",UP),oa("magicType",XP),oa("dataView",eR),oa("dataZoom",vR),oa("restore",sR),Be(zP)}var yR=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",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}},t}(ot);function wS(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function bS(r){if(Q.domSupported){for(var t=document.documentElement.style,e=0,n=r.length;e-1?(s+="top:50%",u+="translateY(-50%) rotate("+(l=a==="left"?-225:-45)+"deg)"):(s+="left:50%",u+="translateX(-50%) rotate("+(l=a==="top"?225:45)+"deg)");var f=l*Math.PI/180,h=o+i,c=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),v=Math.round(((c-Math.SQRT2*i)/2+Math.SQRT2*i-(c-h)/2)*100)/100;s+=";"+a+":-"+v+"px";var d=t+" solid "+i+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+u+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return'
'}function TR(r,t){var e="cubic-bezier(0.23,1,0.32,1)",n=" "+r/2+"s "+e,i="opacity"+n+",visibility"+n;return t||(n=" "+r+"s "+e,i+=Q.transformSupported?","+jv+n:",left"+n+",top"+n),SR+":"+i}function Jg(r,t,e){var n=r.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Q.transformSupported)return e?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Q.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return e?"top:0;left:0;"+jv+":"+o+";":[["top",0],["left",0],[TS,o]]}function CR(r){var t=[],e=r.get("fontSize"),n=r.getTextColor();n&&t.push("color:"+n),t.push("font:"+r.getFont());var i=tt(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+i+"px");var a=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,u=r.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+u+"px "+o+"px "+a),M(["decoration","align"],function(l){var f=r.get(l);f&&t.push("text-"+l+":"+f)}),t.join(";")}function MR(r,t,e){var n=[],i=r.get("transitionDuration"),a=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),u=r.get("shadowOffsetX"),l=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=t_(r,"html"),c=u+"px "+l+"px "+o+"px "+s;return n.push("box-shadow:"+c),t&&i&&n.push(TR(i,e)),a&&n.push("background-color:"+a),M(["width","color","radius"],function(v){var d="border-"+v,p=pv(d),g=r.get(p);g!=null&&n.push(d+":"+g+(v==="color"?"":"px"))}),n.push(CR(f)),h!=null&&n.push("padding:"+so(h).join("px ")+"px"),n.join(";")+";"}function jg(r,t,e,n,i){var a=t&&t.painter;if(e){var o=a&&a.getViewportRoot();o&&TC(r,o,e,n,i)}else{r[0]=n,r[1]=i;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var AR=function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Q.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),a=e.appendTo,o=a&&(W(a)?document.querySelector(a):En(a)?a:$(a)&&a(t.getDom()));jg(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(u){if(u=u||window.event,!s._enterable){var l=i.handler,f=i.painter.getViewportRoot();de(f,u,!0),l.dispatch("mousemove",u)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),n=_R(e,"position"),i=e.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=xR+MR(t,!this._firstShow,this._longHide)+Jg(a[0],a[1],!0)+("border-color:"+Nn(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(W(a)&&n.get("trigger")==="item"&&!wS(n)&&(s=bR(n,i,a)),W(t))o.innerHTML=t+s;else if(t){o.innerHTML="",z(t)||(t=[t]);for(var u=0;u=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,n=this._ecModel,i=this._api,a=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(e,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,n,i,a){if(!(a.from===this.uid||Q.node||!i.getDom())){var o=ry(a,i);this._ticket="";var s=a.dataByCoordSys,u=OR(a,n,i);if(u){var l=u.el.getBoundingRect().clone();l.applyTransform(u.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:u.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=IR;f.x=a.x,f.y=a.y,f.update(),it(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(e,n,i,a))return;var h=dS(a,n),c=h.point[0],v=h.point[1];c!=null&&v!=null&&this._tryShow({offsetX:c,offsetY:v,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(e,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(ry(a,i))},t.prototype._manuallyAxisShowTip=function(e,n,i,a){var o=a.seriesIndex,s=a.dataIndex,u=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||u==null)){var l=n.getSeriesByIndex(o);if(l){var f=l.getData(),h=sa([f.getItemModel(s),l,(l.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(e,n){var i=e.target,a=this._tooltipModel;if(a){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(i){var s=it(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var u,l;ga(i,function(f){if(it(f).dataIndex!=null)return u=f,!0;if(it(f).tooltipConfig!=null)return l=f,!0},!0),u?this._showSeriesItemTooltip(e,u,n):l?this._showComponentItemTooltip(e,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(e,n){var i=e.get("showDelay");n=ht(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(e,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=sa([n.tooltipOption],a),u=this._renderMode,l=[],f=Bn("section",{blocks:[],noHeader:!0}),h=[],c=new dl;M(e,function(m){M(m.dataByAxis,function(_){var S=i.getComponent(_.axisDim+"Axis",_.axisIndex),w=_.value;if(!(!S||w==null)){var x=hS(w,S.axis,i,_.seriesDataIndices,_.valueLabelOpt),b=Bn("section",{header:x,noHeader:!Pe(x),sortBlocks:!0,blocks:[]});f.blocks.push(b),M(_.seriesDataIndices,function(T){var C=i.getSeriesByIndex(T.seriesIndex),A=T.dataIndexInside,D=C.getDataParams(A);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=Vv(S.axis,{value:w}),D.axisValueLabel=x,D.marker=c.makeTooltipMarker("item",Nn(D.color),u);var I=Ad(C.formatTooltip(A,!0,null)),L=I.frag;if(L){var P=sa([C],a).get("valueFormatter");b.blocks.push(P?B({valueFormatter:P},L):L)}I.text&&h.push(I.text),l.push(D)}})}})}),f.blocks.reverse(),h.reverse();var v=n.position,d=s.get("order"),p=Pd(f,c,u,d,i.get("useUTC"),s.get("textStyle"));p&&h.unshift(p);var g=u==="richText"?` `:"
",y=h.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,l)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,l):this._showTooltipContent(s,y,l,Math.random()+"",o[0],o[1],v,null,c)})},t.prototype._showSeriesItemTooltip=function(e,n,i){var a=this._ecModel,o=it(n),s=o.seriesIndex,u=a.getSeriesByIndex(s),l=o.dataModel||u,f=o.dataIndex,h=o.dataType,c=l.getData(h),v=this._renderMode,d=e.positionDefault,p=sa([c.getItemModel(f),l,u&&(u.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var y=l.getDataParams(f,h),m=new dl;y.marker=m.makeTooltipMarker("item",Nn(y.color),v);var _=Ad(l.formatTooltip(f,!1,h)),S=p.get("order"),w=p.get("valueFormatter"),x=_.frag,b=x?Pd(w?B({valueFormatter:w},x):x,m,v,S,a.get("useUTC"),p.get("textStyle")):_.text,T="item_"+l.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,b,y,T,e.offsetX,e.offsetY,e.position,e.target,m)}),i({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,n,i){var a=this._renderMode==="html",o=it(n),s=o.tooltipConfig,u=s.option||{},l=u.encodeHTMLContent;if(W(u)){var f=u;u={content:f,formatter:f},l=!0}l&&a&&u.content&&(u=J(u),u.content=Kt(u.content));var h=[u],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&h.push(c),h.push({formatter:u.content});var v=e.positionDefault,d=sa(h,this._tooltipModel,v?{position:v}:null),p=d.get("content"),g=Math.random()+"",y=new dl;this._showOrMove(d,function(){var m=J(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,g,e.offsetX,e.offsetY,e.position,n,y)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,n,i,a,o,s,u,l,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var h=this._tooltipContent;h.setEnterable(e.get("enterable"));var c=e.get("formatter");u=u||e.get("position");var v=n,d=this._getNearestPoint([o,s],i,e.get("trigger"),e.get("borderColor")),p=d.color;if(c)if(W(c)){var g=e.ecModel.get("useUTC"),y=z(i)?i[0]:i,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=c,m&&(v=oo(y.axisValue,v,g)),v=gv(v,i,!0)}else if($(c)){var _=ht(function(S,w){S===this._ticket&&(h.setContent(w,f,e,p,u),this._updatePosition(e,u,o,s,h,i,l))},this);this._ticket=a,v=c(i,a,_)}else v=c;h.setContent(v,f,e,p,u),h.show(e,p),this._updatePosition(e,u,o,s,h,i,l)}},t.prototype._getNearestPoint=function(e,n,i,a){if(i==="axis"||z(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!z(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(e,n,i,a,o,s,u){var l=this._api.getWidth(),f=this._api.getHeight();n=n||e.get("position");var h=o.getSize(),c=e.get("align"),v=e.get("verticalAlign"),d=u&&u.getBoundingRect().clone();if(u&&d.applyTransform(u.transform),$(n)&&(n=n([i,a],s,o.el,d,{viewSize:[l,f],contentSize:h.slice()})),z(n))i=pt(n[0],l),a=pt(n[1],f);else if(Y(n)){var p=n;p.width=h[0],p.height=h[1];var g=Sr(p,{width:l,height:f});i=g.x,a=g.y,c=null,v=null}else if(W(n)&&u){var y=ER(n,d,h,e.get("borderWidth"));i=y[0],a=y[1]}else{var y=PR(i,a,o,l,f,c?null:20,v?null:20);i=y[0],a=y[1]}if(c&&(i-=ny(c)?h[0]/2:c==="right"?h[0]:0),v&&(a-=ny(v)?h[1]/2:v==="bottom"?h[1]:0),wS(e)){var y=RR(i,a,o,l,f);i=y[0],a=y[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(e,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===e.length;return o&&M(i,function(s,u){var l=s.dataByAxis||[],f=e[u]||{},h=f.dataByAxis||[];o=o&&l.length===h.length,o&&M(l,function(c,v){var d=h[v]||{},p=c.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&c.value===d.value&&c.axisType===d.axisType&&c.axisId===d.axisId&&p.length===g.length,o&&M(p,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),a&&M(c.seriesDataIndices,function(y){var m=y.seriesIndex,_=n[m],S=a[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=n,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,n){Q.node||!n.getDom()||(Hf(this,"_updatePosition"),this._tooltipContent.dispose(),gh("itemTooltip",n))},t.type="tooltip",t}(Ot);function sa(r,t,e){var n=t.ecModel,i;e?(i=new yt(e,n,n),i=new yt(t.option,i,n)):i=t;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof yt&&(o=o.get("tooltip",!0)),W(o)&&(o={formatter:o}),o&&(i=new yt(o,i,n)))}return i}function ry(r,t){return r.dispatchAction||ht(t.dispatchAction,t)}function PR(r,t,e,n,i,a,o){var s=e.getSize(),u=s[0],l=s[1];return a!=null&&(r+u+a+2>n?r-=u+a:r+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[r,t]}function RR(r,t,e,n,i){var a=e.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,n)-o,t=Math.min(t+s,i)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function ER(r,t,e,n){var i=e[0],a=e[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,u=0,l=t.width,f=t.height;switch(r){case"inside":s=t.x+l/2-i/2,u=t.y+f/2-a/2;break;case"top":s=t.x+l/2-i/2,u=t.y-a-o;break;case"bottom":s=t.x+l/2-i/2,u=t.y+f+o;break;case"left":s=t.x-i-o,u=t.y+f/2-a/2;break;case"right":s=t.x+l+o,u=t.y+f/2-a/2}return[s,u]}function ny(r){return r==="center"||r==="middle"}function OR(r,t,e){var n=Yh(r).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=to(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=e.getViewOfComponentModel(o),u;if(s.group.traverse(function(l){var f=it(l).tooltipConfig;if(f&&f.name===r.name)return u=l,!0}),u)return{componentMainType:i,componentIndex:o.componentIndex,el:u}}}}function kR(r){Be(pS),r.registerComponentModel(yR),r.registerComponentView(LR),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Wt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Wt)}var NR=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left: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"}},t}(ot),BR=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){if(this.group.removeAll(),!!e.get("show")){var a=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),u=e.get("textAlign"),l=tt(e.get("textBaseline"),e.get("textVerticalAlign")),f=new Dt({style:_r(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),c=e.get("subtext"),v=new Dt({style:_r(s,{text:c,fill:s.getTextColor(),y:h.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),g=e.get("triggerEvent",!0);f.silent=!d&&!g,v.silent=!p&&!g,d&&f.on("click",function(){Cd(d,"_"+e.get("target"))}),p&&v.on("click",function(){Cd(p,"_"+e.get("subtarget"))}),it(f).eventData=it(v).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,a.add(f),c&&a.add(v);var y=a.getBoundingRect(),m=e.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Sr(m,{width:i.getWidth(),height:i.getHeight()},e.get("padding"));u||(u=e.get("left")||e.get("right"),u==="middle"&&(u="center"),u==="right"?_.x+=_.width:u==="center"&&(_.x+=_.width/2)),l||(l=e.get("top")||e.get("bottom"),l==="center"&&(l="middle"),l==="bottom"?_.y+=_.height:l==="middle"&&(_.y+=_.height/2),l=l||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var S={align:u,verticalAlign:l};f.setStyle(S),v.setStyle(S),y=a.getBoundingRect();var w=_.margin,x=e.getItemStyle(["color","opacity"]);x.fill=e.get("backgroundColor");var b=new wt({shape:{x:y.x-w[3],y:y.y-w[0],width:y.width+w[1]+w[3],height:y.height+w[0]+w[2],r:e.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});a.add(b)}},t.type="title",t}(Ot);function FR(r){r.registerComponentModel(NR),r.registerComponentView(BR)}var zR=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},Sh=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,n,i){this.mergeDefaultAndTheme(e,i),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},t.prototype._updateSelector=function(e){var n=e.selector,i=this.ecModel;n===!0&&(n=e.selector=["all","inverse"]),z(n)&&M(n,function(a,o){W(a)&&(a={type:a}),n[o]=j(a,zR(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",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}},t}(ot),ni=lt,xh=M,Zo=bt,MS=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new Zo),this.group.add(this._selectorGroup=new Zo),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var u=e.get("selector",!0),l=e.get("selectorPosition",!0);u&&(!l||l==="auto")&&(l=s==="horizontal"?"end":"start"),this.renderInner(o,e,n,i,u,s,l);var f=e.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},c=e.get("padding"),v=Sr(f,h,c),d=this.layoutInner(e,o,v,a,u,l),p=Sr(q({width:d.width,height:d.height},f),h,c);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=mS(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,n,i,a,o,s,u){var l=this.getContentGroup(),f=Z(),h=n.get("selectedMode"),c=[];i.eachRawSeries(function(v){!v.get("legendHoverLink")&&c.push(v.id)}),xh(n.getData(),function(v,d){var p=v.get("name");if(!this.newlineDisabled&&(p===""||p===` `)){var g=new Zo;g.newline=!0,l.add(g);return}var y=i.getSeriesByName(p)[0];if(!f.get(p))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),w=m.getVisual("style"),x=this._createItem(y,p,d,v,n,e,_,w,S,h,a);x.on("click",ni(iy,p,null,a,c)).on("mouseover",ni(wh,y.name,null,a,c)).on("mouseout",ni(bh,y.name,null,a,c)),i.ssr&&x.eachChild(function(b){var T=it(b);T.seriesIndex=y.seriesIndex,T.dataIndex=d,T.ssrType="legend"}),f.set(p,!0)}else i.eachRawSeries(function(b){if(!f.get(p)&&b.legendVisualProvider){var T=b.legendVisualProvider;if(!T.containName(p))return;var C=T.indexOfName(p),A=T.getItemVisual(C,"style"),D=T.getItemVisual(C,"legendIcon"),I=le(A.fill);I&&I[3]===0&&(I[3]=.2,A=B(B({},A),{fill:$r(I,"rgba")}));var L=this._createItem(b,p,d,v,n,e,{},A,D,h,a);L.on("click",ni(iy,null,p,a,c)).on("mouseover",ni(wh,null,p,a,c)).on("mouseout",ni(bh,null,p,a,c)),i.ssr&&L.eachChild(function(P){var R=it(P);R.seriesIndex=b.seriesIndex,R.dataIndex=d,R.ssrType="legend"}),f.set(p,!0)}},this)},this),o&&this._createSelector(o,n,a,s,u)},t.prototype._createSelector=function(e,n,i,a,o){var s=this.getSelectorGroup();xh(e,function(l){var f=l.type,h=new Dt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(h);var c=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);Ei(h,{normal:c,emphasis:v},{defaultText:l.title}),bs(h)})},t.prototype._createItem=function(e,n,i,a,o,s,u,l,f,h,c){var v=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(n),y=a.get("symbolRotate"),m=a.get("symbolKeepAspect"),_=a.get("icon");f=_||f||"roundRect";var S=GR(f,a,u,l,v,g,c),w=new Zo,x=a.getModel("textStyle");if($(e.getLegendIcon)&&(!_||_==="inherit"))w.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var b=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;w.add(VR({itemWidth:d,itemHeight:p,icon:f,iconRotate:b,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,C=s,A=o.get("formatter"),D=n;W(A)&&A?D=A.replace("{name}",n!=null?n:""):$(A)&&(D=A(n));var I=g?x.getTextColor():a.get("inactiveColor");w.add(new Dt({style:_r(x,{text:D,x:T,y:p/2,fill:I,align:C,verticalAlign:"middle"},{inheritColor:I})}));var L=new wt({shape:w.getBoundingRect(),style:{fill:"transparent"}}),P=a.getModel("tooltip");return P.get("show")&&io({el:L,componentModel:o,itemName:n,itemTooltipOption:P.option}),w.add(L),w.eachChild(function(R){R.silent=!0}),L.silent=!h,this.getContentGroup().add(w),bs(w),w.__legendDataIndex=i,w},t.prototype.layoutInner=function(e,n,i,a,o,s){var u=this.getContentGroup(),l=this.getSelectorGroup();_i(e.get("orient"),u,e.get("itemGap"),i.width,i.height);var f=u.getBoundingRect(),h=[-f.x,-f.y];if(l.markRedraw(),u.markRedraw(),o){_i("horizontal",l,e.get("selectorItemGap",!0));var c=l.getBoundingRect(),v=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,g=p===0?"width":"height",y=p===0?"height":"width",m=p===0?"y":"x";s==="end"?v[p]+=f[g]+d:h[p]+=c[g]+d,v[1-p]+=f[y]/2-c[y]/2,l.x=v[0],l.y=v[1],u.x=h[0],u.y=h[1];var _={x:0,y:0};return _[g]=f[g]+d+c[g],_[y]=Math.max(f[y],c[y]),_[m]=Math.min(0,c[m]+v[1-p]),_}else return u.x=h[0],u.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Ot);function GR(r,t,e,n,i,a,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),xh(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var u=t.getModel("itemStyle"),l=u.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=u.getShallow("decal");l.decal=!h||h==="inherit"?n.decal:jf(h,o),l.fill==="inherit"&&(l.fill=n[i]),l.stroke==="inherit"&&(l.stroke=n[f]),l.opacity==="inherit"&&(l.opacity=(i==="fill"?n:e).opacity),s(l,n);var c=t.getModel("lineStyle"),v=c.getLineStyle();if(s(v,e),l.fill==="auto"&&(l.fill=n.fill),l.stroke==="auto"&&(l.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!a){var d=t.get("inactiveBorderWidth"),p=l[f];l.lineWidth=d==="auto"?n.lineWidth>0&&p?2:0:l.lineWidth,l.fill=t.get("inactiveColor"),l.stroke=t.get("inactiveBorderColor"),v.stroke=c.get("inactiveColor"),v.lineWidth=c.get("inactiveWidth")}return{itemStyle:l,lineStyle:v}}function VR(r){var t=r.icon||"roundRect",e=Xr(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill="#fff",e.style.lineWidth=2),e}function iy(r,t,e,n){bh(r,t,e,n),e.dispatchAction({type:"legendToggleSelect",name:r!=null?r:t}),wh(r,t,e,n)}function AS(r){for(var t=r.getZr().storage.getDisplayList(),e,n=0,i=t.length;ni[o],g=[-v.x,-v.y];n||(g[a]=f[l]);var y=[0,0],m=[-d.x,-d.y],_=tt(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var S=e.get("pageButtonPosition",!0);S==="end"?m[a]+=i[o]-d[o]:y[a]+=d[o]+_}m[1-a]+=v[s]/2-d[s]/2,f.setPosition(g),h.setPosition(y),c.setPosition(m);var w={x:0,y:0};if(w[o]=p?i[o]:v[o],w[s]=Math.max(v[s],d[s]),w[u]=Math.min(0,d[u]+m[1-a]),h.__rectSize=i[o],p){var x={x:0,y:0};x[o]=Math.max(i[o]-d[o]-_,0),x[s]=w[s],h.setClipPath(new wt({shape:x})),h.__rectSize=x[o]}else c.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&It(f,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),w},t.prototype._pageGo=function(e,n,i){var a=this._getPageInfo(n)[e];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(e,n){var i=this._controllerGroup;M(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",c=n[h]!=null,v=i.childOfName(f);v&&(v.setStyle("fill",c?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=c?"pointer":"default")});var a=i.childOfName("pageText"),o=e.get("pageFormatter"),s=n.pageIndex,u=s!=null?s+1:0,l=n.pageCount;a&&o&&a.setStyle("text",W(o)?o.replace("{current}",u==null?"":u+"").replace("{total}",l==null?"":l+""):o({current:u,total:l}))},t.prototype._getPageInfo=function(e){var n=e.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=e.getOrient().index,s=Jl[o],u=jl[o],l=this._findTargetItemIndex(n),f=i.children(),h=f[l],c=f.length,v=c?1:0,d={contentPosition:[i.x,i.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var p=S(h);d.contentPosition[o]=-p.s;for(var g=l+1,y=p,m=p,_=null;g<=c;++g)_=S(f[g]),(!_&&m.e>y.s+a||_&&!w(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=y.i),++d.pageCount)),m=_;for(var g=l-1,y=p,m=p,_=null;g>=-1;--g)_=S(f[g]),(!_||!w(m,_.s))&&y.i=b&&x.s<=b+a}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var u=o.__legendDataIndex;a==null&&u!=null&&(a=s),u===e&&(n=s)}),n!=null?n:a},t.type="legend.scroll",t}(MS);function XR(r){r.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;n!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function ZR(r){Be(DS),r.registerComponentModel(UR),r.registerComponentView(YR),XR(r)}function $R(r){Be(DS),Be(ZR)}var uy={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},qR=function(){function r(t){var e=this._condVal=W(t)?new RegExp(t):Ey(t)?t:null;if(e==null){var n="";ut(n)}}return r.prototype.evaluate=function(t){var e=typeof t;return W(e)?this._condVal.test(t):vt(e)?this._condVal.test(t+""):!1},r}(),KR=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),QR=function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e=0&&n.attr(a.oldLayoutSelect),rt(c,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),It(n,l,e,u)}else if(n.attr(l),!ki(n).valueAnimation){var h=tt(n.style.opacity,1);n.style.opacity=0,Rt(n,{style:{opacity:h}},e,u)}if(a.oldLayout=l,n.states.select){var v=a.oldLayoutSelect={};$o(v,l,qo),$o(v,n.states.select,qo)}if(n.states.emphasis){var d=a.oldLayoutEmphasis={};$o(d,l,qo),$o(d,n.states.emphasis,qo)}DT(n,u,f,e,e)}if(i&&!i.ignore&&!i.invisible){var a=DE(i),o=a.oldLayout,p={points:i.shape.points};o?(i.attr({shape:o}),It(i,{shape:p},e)):(i.setShape(p),i.style.strokePercent=0,Rt(i,{style:{strokePercent:1}},e)),a.oldLayout=p}},r}(),ef=St();function LE(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){var i=ef(e).labelManager;i||(i=ef(e).labelManager=new IE),i.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,n){var i=ef(e).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(e.getViewOfSeriesModel(a))}),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()})}const PE=Object.freeze(Object.defineProperty({__proto__:null,Axis:Wv,ChartView:Ut,ComponentModel:ot,ComponentView:Ot,List:ov,Model:yt,PRIORITY:v1,SeriesModel:ee,color:cw,connect:tL,dataTool:sL,dependencies:NI,disConnect:eL,disconnect:S1,dispose:rL,env:Q,extendChartView:CE,extendComponentModel:wE,extendComponentView:bE,extendSeriesModel:TE,format:SE,getCoordinateSystemDimensions:iL,getInstanceByDom:Pv,getInstanceById:nL,getMap:oL,graphic:_E,helper:gE,init:jI,innerDrawElementOnCanvas:Av,matrix:Rx,number:yE,parseGeoJSON:wg,parseGeoJson:wg,registerAction:ze,registerCoordinateSystem:b1,registerLayout:T1,registerLoading:Nv,registerLocale:fv,registerMap:C1,registerPostInit:x1,registerPostUpdate:w1,registerPreprocessor:Ev,registerProcessor:Ov,registerTheme:Rv,registerTransform:M1,registerUpdateLifecycle:Tu,registerVisual:Kr,setCanvasCreator:aL,setPlatformAPI:Dy,throttle:wu,time:mE,use:Be,util:xE,vector:Qx,version:kI,zrUtil:cx,zrender:MD},Symbol.toStringTag,{value:"Module"}));var Ye=gr.CMD;function hi(r,t){return Math.abs(r-t)<1e-5}function Th(r){var t=r.data,e=r.len(),n=[],i,a=0,o=0,s=0,u=0;function l(L,P){i&&i.length>2&&n.push(i),i=[L,P]}function f(L,P,R,E){hi(L,R)&&hi(P,E)||i.push(L,P,R,E,R,E)}function h(L,P,R,E,F,O){var N=Math.abs(P-L),V=Math.tan(N/4)*4/3,H=PT:D2&&n.push(i),n}function Ch(r,t,e,n,i,a,o,s,u,l){if(hi(r,e)&&hi(t,n)&&hi(i,o)&&hi(a,s)){u.push(o,s);return}var f=2/l,h=f*f,c=o-r,v=s-t,d=Math.sqrt(c*c+v*v);c/=d,v/=d;var p=e-r,g=n-t,y=i-o,m=a-s,_=p*p+g*g,S=y*y+m*m;if(_=0&&T=0){u.push(o,s);return}var C=[],A=[];Yr(r,e,i,o,.5,C),Yr(t,n,a,s,.5,A),Ch(C[0],A[0],C[1],A[1],C[2],A[2],C[3],A[3],u,l),Ch(C[4],A[4],C[5],A[5],C[6],A[6],C[7],A[7],u,l)}function RE(r,t){var e=Th(r),n=[];t=t||1;for(var i=0;i0)for(var l=0;lMath.abs(l),h=LS([u,l],f?0:1,t),c=(f?s:l)/h.length,v=0;vi,o=LS([n,i],a?0:1,t),s=a?"width":"height",u=a?"height":"width",l=a?"x":"y",f=a?"y":"x",h=r[s]/o.length,c=0;c1?null:new X(p*u+r,p*l+t)}function kE(r,t,e){var n=new X;X.sub(n,e,t),n.normalize();var i=new X;X.sub(i,r,t);var a=i.dot(n);return a}function ii(r,t){var e=r[r.length-1];e&&e[0]===t[0]&&e[1]===t[1]||r.push(t)}function NE(r,t,e){for(var n=r.length,i=[],a=0;ao?(l.x=f.x=s+a/2,l.y=u,f.y=u+o):(l.y=f.y=u+o/2,l.x=s,f.x=s+a),NE(t,l,f)}function Ws(r,t,e,n){if(e===1)n.push(t);else{var i=Math.floor(e/2),a=r(t);Ws(r,a[0],i,n),Ws(r,a[1],e-i,n)}return n}function BE(r,t){for(var e=[],n=0;n0;l/=2){var f=0,h=0;(r&l)>0&&(f=1),(t&l)>0&&(h=1),s+=l*l*(3*f^h),h===0&&(f===1&&(r=l-1-r,t=l-1-t),u=r,r=t,t=u)}return s}function Xs(r){var t=1/0,e=1/0,n=-1/0,i=-1/0,a=G(r,function(s){var u=s.getBoundingRect(),l=s.getComputedTransform(),f=u.x+u.width/2+(l?l[4]:0),h=u.y+u.height/2+(l?l[5]:0);return t=Math.min(f,t),e=Math.min(h,e),n=Math.max(f,n),i=Math.max(h,i),[f,h]}),o=G(a,function(s,u){return{cp:s,z:XE(s[0],s[1],t,e,n,i),path:r[u]}});return o.sort(function(s,u){return s.z-u.z}).map(function(s){return s.path})}function ES(r){return GE(r.path,r.count)}function Mh(){return{fromIndividuals:[],toIndividuals:[],count:0}}function ZE(r,t,e){var n=[];function i(w){for(var x=0;x=0;i--)if(!e[i].many.length){var u=e[s].many;if(u.length<=1)if(s)s=0;else return e;var a=u.length,l=Math.ceil(a/2);e[i].many=u.slice(l,a),e[s].many=u.slice(0,l),s++}return e}var qE={clone:function(r){for(var t=[],e=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),u=Object.assign({setToFinal:!0},o),l,f;yy(r)&&(l=r,f=t),yy(t)&&(l=t,f=r);function h(y,m,_,S,w){var x=y.many,b=y.one;if(x.length===1&&!w){var T=m?x[0]:b,C=m?b:x[0];if(Us(T))h({many:[T],one:C},!0,_,S,!0);else{var A=s?q({delay:s(_,S)},u):u;ec(T,C,A),a(T,C,T,C,A)}}else for(var D=q({dividePath:qE[e],individualDelay:s&&function(F,O,N,V){return s(F+_,S)}},u),I=m?ZE(x,b,D):$E(b,x,D),L=I.fromIndividuals,P=I.toIndividuals,R=L.length,E=0;Et.length,v=l?my(f,l):my(c?t:r,[c?r:t]),d=0,p=0;pOS))for(var a=n.getIndices(),o=0;o0&&x.group.traverse(function(T){T instanceof st&&!T.animators.length&&T.animateFrom({style:{opacity:0}},b)})})}function by(r){var t=r.getModel("universalTransition").get("seriesKey");return t||r.id}function Ty(r){return z(r)?r.sort().join(","):r}function Or(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function rO(r,t){var e=Z(),n=Z(),i=Z();return M(r.oldSeries,function(a,o){var s=r.oldDataGroupIds[o],u=r.oldData[o],l=by(a),f=Ty(l);n.set(f,{dataGroupId:s,data:u}),z(l)&&M(l,function(h){i.set(h,{key:f,dataGroupId:s,data:u})})}),M(t.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),u=by(a),l=Ty(u),f=n.get(l);if(f)e.set(l,{oldSeries:[{dataGroupId:f.dataGroupId,divide:Or(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:Or(s),data:s}]});else if(z(u)){var h=[];M(u,function(d){var p=n.get(d);p.data&&h.push({dataGroupId:p.dataGroupId,divide:Or(p.data),data:p.data})}),h.length&&e.set(l,{oldSeries:h,newSeries:[{dataGroupId:o,data:s,divide:Or(s)}]})}else{var c=i.get(u);if(c){var v=e.get(c.key);v||(v={oldSeries:[{dataGroupId:c.dataGroupId,data:c.data,divide:Or(c.data)}],newSeries:[]},e.set(c.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Or(s)})}}}}),e}function Cy(r,t){for(var e=0;e=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:Or(t.oldData[s]),groupIdDim:o.dimension})}),M(At(r.to),function(o){var s=Cy(e.updatedSeries,o);if(s>=0){var u=e.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:u,divide:Or(u),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&kS(i,a,n)}function iO(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){M(At(n.seriesTransition),function(i){M(At(i.to),function(a){for(var o=n.updatedSeries,s=0;s=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=v.dpr,D=0;D0&&t>i[0]){for(u=0;ut);u++);s=n[i[u]]}if(i.splice(u+1,0,t),n[t]=e,!e.virtual)if(s){var l=s.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},r.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?Ko:0),this._needsManuallyCompositing),f.__builtin__||$s("ZLevel "+l+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==u&&(f.__dirty=!0),f.__startIndex=u,f.incremental?f.__drawIndex=-1:f.__drawIndex=u,e(u),a=f),i.__dirty&Qe&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=u))}e(u),this.eachBuiltinLayer(function(h,c){!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(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,M(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?j(n[t],e,!0):n[t]=e;for(var i=0;i(WS(),HS("div",US(t.$attrs,{style:{height:t.height,width:t.width}}),null,16))}});function dO(r){let t=null,e={};const{isDark:n}=QS(),{height:i,width:a}=YS(),o=KS(f,200),s=XS(()=>n.value?{backgroundColor:"transparent"}:{}),u=h=>{var v;const c=(v=r==null?void 0:r.value)==null?void 0:v.$el;if(c)return t=PE.init(c,n.value?"dark":null),t},l=(h,c=!0)=>{e=h;const v=Pu(Pu({},h),s.value);return new Promise(d=>{var p;if(((p=r.value)==null?void 0:p.offsetHeight)===0){sc(()=>ac(null,null,function*(){d(yield l(v))}),30);return}qS(()=>{sc(()=>{!t&&!u()||(c&&(t==null||t.clear()),t==null||t.setOption(v),d(t))},30)})})};function f(){t==null||t.resize({animation:{duration:300,easing:"quadraticIn"}})}return oc([a,i],()=>{o==null||o()}),ZS(r,o),oc(n,()=>{t&&(t.dispose(),u(),l(e),f())}),$S(()=>{t==null||t.dispose()}),{renderEcharts:l,resize:f,getChartInstance:()=>t}}export{cO as _,dO as u};