@platox/pivot-table 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.umd.cjs CHANGED
@@ -151,28 +151,28 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
151
151
  `):[];var h=c.length*s,d=Be(e.height,h);if(h>d&&l){var p=Math.floor(d/s);c=c.slice(0,p)}if(t&&a&&f!=null)for(var g=ED(f,i,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v=0;v<c.length;v++)c[v]=AD(c[v],g);for(var m=d,y=0,v=0;v<c.length;v++)y=Math.max(Pr(c[v],i),y);f==null&&(f=y);var b=y;return n&&(m+=n[0]+n[2],b+=n[1]+n[3],f+=n[1]+n[3]),u&&(b=f),{lines:c,height:d,outerWidth:b,outerHeight:m,lineHeight:s,calculatedLineHeight:o,contentWidth:y,contentHeight:h,width:f}}var O6=function(){function t(){}return t}(),TD=function(){function t(e){this.tokens=[],e&&(this.tokens=e)}return t}(),P6=function(){function t(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]}return t}();function B6(t,e){var r=new P6;if(t!=null&&(t+=""),!t)return r;for(var n=e.width,i=e.height,a=e.overflow,o=(a==="break"||a==="breakAll")&&n!=null?{width:n,accumWidth:0,breakAll:a==="breakAll"}:null,s=ug.lastIndex=0,u;(u=ug.exec(t))!=null;){var l=u.index;l>s&&lg(r,t.substring(s,l),e,o),lg(r,u[2],e,o,u[1]),s=ug.lastIndex}s<t.length&&lg(r,t.substring(s,t.length),e,o);var f=[],c=0,h=0,d=e.padding,p=a==="truncate",g=e.lineOverflow==="truncate";function v(z,W,R){z.width=W,z.lineHeight=R,c+=R,h=Math.max(h,W)}e:for(var m=0;m<r.lines.length;m++){for(var y=r.lines[m],b=0,w=0,C=0;C<y.tokens.length;C++){var _=y.tokens[C],D=_.styleName&&e.rich[_.styleName]||{},x=_.textPadding=D.padding,S=x?x[1]+x[3]:0,O=_.font=D.font||e.font;_.contentHeight=Xp(O);var E=Be(D.height,_.contentHeight);if(_.innerHeight=E,x&&(E+=x[0]+x[2]),_.height=E,_.lineHeight=Da(D.lineHeight,e.lineHeight,E),_.align=D&&D.align||e.align,_.verticalAlign=D&&D.verticalAlign||"middle",g&&i!=null&&c+_.lineHeight>i){C>0?(y.tokens=y.tokens.slice(0,C),v(y,w,b),r.lines=r.lines.slice(0,m+1)):r.lines=r.lines.slice(0,m);break e}var P=D.width,F=P==null||P==="auto";if(typeof P=="string"&&P.charAt(P.length-1)==="%")_.percentWidth=P,f.push(_),_.contentWidth=Pr(_.text,O);else{if(F){var B=D.backgroundColor,M=B&&B.image;M&&(M=S6(M),tc(M)&&(_.width=Math.max(_.width,M.width*E/M.height)))}var I=p&&n!=null?n-w:null;I!=null&&I<_.width?!F||I<S?(_.text="",_.width=_.contentWidth=0):(_.text=E6(_.text,I-S,O,e.ellipsis,{minChar:e.truncateMinChar}),_.width=_.contentWidth=Pr(_.text,O)):_.contentWidth=Pr(_.text,O)}_.width+=S,w+=_.width,D&&(b=Math.max(b,_.lineHeight))}v(y,w,b)}r.outerWidth=r.width=Be(n,h),r.outerHeight=r.height=Be(i,c),r.contentHeight=c,r.contentWidth=h,d&&(r.outerWidth+=d[1]+d[3],r.outerHeight+=d[0]+d[2]);for(var m=0;m<f.length;m++){var _=f[m],j=_.percentWidth;_.width=parseInt(j,10)/100*r.width}return r}function lg(t,e,r,n,i){var a=e==="",o=i&&r.rich[i]||{},s=t.lines,u=o.font||r.font,l=!1,f,c;if(n){var h=o.padding,d=h?h[1]+h[3]:0;if(o.width!=null&&o.width!=="auto"){var p=Bi(o.width,n.width)+d;s.length>0&&p+n.accumWidth>n.width&&(f=e.split(`
152
152
  `),l=!0),n.accumWidth=p}else{var g=OD(e,u,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+d,c=g.linesWidths,f=g.lines}}else f=e.split(`
153
153
  `);for(var v=0;v<f.length;v++){var m=f[v],y=new O6;if(y.styleName=i,y.text=m,y.isLineHolder=!m&&!a,typeof o.width=="number"?y.width=o.width:y.width=c?c[v]:Pr(m,u),!v&&!l){var b=(s[s.length-1]||(s[0]=new TD)).tokens,w=b.length;w===1&&b[0].isLineHolder?b[0]=y:(m||!w||a)&&b.push(y)}else s.push(new TD([y]))}}function M6(t){var e=t.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var F6=ri(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function L6(t){return M6(t)?!!F6[t]:!0}function OD(t,e,r,n,i){for(var a=[],o=[],s="",u="",l=0,f=0,c=0;c<t.length;c++){var h=t.charAt(c);if(h===`
154
- `){u&&(s+=u,f+=l),a.push(s),o.push(f),s="",u="",l=0,f=0;continue}var d=Pr(h,e),p=n?!1:!L6(h);if(a.length?f+d>r:i+f+d>r){f?(s||u)&&(p?(s||(s=u,u="",l=0,f=l),a.push(s),o.push(f-l),u+=h,l+=d,s="",f=l):(u&&(s+=u,u="",l=0),a.push(s),o.push(f),s=h,f=d)):p?(a.push(u),o.push(l),u=h,l=d):(a.push(h),o.push(d));continue}f+=d,p?(u+=h,l+=d):(u&&(s+=u,u="",l=0),s+=h)}return!a.length&&!s&&(s=t,u="",l=0),u&&(s+=u),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}var fg="__zr_style_"+Math.round(Math.random()*10),Ma={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},rc={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ma[fg]=!0;var PD=["z","z2","invisible"],I6=["invisible"],Fi=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=Ke(r),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(r[a]):t.prototype.attrKV.call(this,a,r[a])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(r,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&R6(this,r,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var u=this.parent;u;){if(u.ignore)return!1;u=u.parent}return!0},e.prototype.contain=function(r,n){return this.rectContain(r,n)},e.prototype.traverse=function(r,n){r.call(n,this)},e.prototype.rectContain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},e.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,u=a.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new Ue(0,0,0,0)),n?Ue.applyTransform(r,i,n):r.copy(i),(o||s||u)&&(r.width+=o*2+Math.abs(s),r.height+=o*2+Math.abs(u),r.x=Math.min(r.x,r.x+s-o),r.y=Math.min(r.y,r.y+u-o));var l=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-l),r.y=Math.floor(r.y-l),r.width=Math.ceil(r.width+1+l*2),r.height=Math.ceil(r.height+1+l*2))}return r},e.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new Ue(0,0,0,0),this._prevPaintRect.copy(r)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(r){return this.animate("style",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(r,n){r!=="style"?t.prototype.attrKV.call(this,r,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(r,n){return typeof r=="string"?this.style[r]=n:oe(this.style,r),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=uu,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&uu)},e.prototype.styleUpdated=function(){this.__dirty&=~uu},e.prototype.createStyle=function(r){return Ef(Ma,r)},e.prototype.useStyle=function(r){r[fg]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},e.prototype.isStyleObject=function(r){return r[fg]},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(r,n,PD)},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var u=!(n&&a),l;if(n&&n.style?o?a?l=n.style:(l=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(l,n.style)):u&&(l=i.style),l)if(o){var f=this.style;if(this.style=this.createStyle(u?{}:f),u)for(var c=Ke(f),h=0;h<c.length;h++){var d=c[h];d in l&&(l[d]=l[d],this.style[d]=f[d])}for(var p=Ke(l),h=0;h<p.length;h++){var d=p[h];this.style[d]=this.style[d]}this._transitionState(r,{style:l},s,this.getAnimationStyleProps())}else this.useStyle(l);for(var g=this.__inHover?I6:PD,h=0;h<g.length;h++){var d=g[h];n&&n[d]!=null?this[d]=n[d]:u&&i[d]!=null&&(this[d]=i[d])}},e.prototype._mergeStates=function(r){for(var n=t.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},e.prototype._mergeStyle=function(r,n){return oe(r,n),r},e.prototype.getAnimationStyleProps=function(){return rc},e.initDefaultProps=function(){var r=e.prototype;r.type="displayable",r.invisible=!1,r.z=0,r.z2=0,r.zlevel=0,r.culling=!1,r.cursor="pointer",r.rectHover=!1,r.incremental=!1,r._rect=null,r.dirtyRectTolerance=0,r.__dirty=Or|uu}(),e}(Kf),cg=new Ue(0,0,0,0),hg=new Ue(0,0,0,0);function R6(t,e,r){return cg.copy(t.getBoundingRect()),t.transform&&cg.applyTransform(t.transform),hg.width=e,hg.height=r,!cg.intersect(hg)}var gr=Math.min,mr=Math.max,dg=Math.sin,vg=Math.cos,Fa=Math.PI*2,nc=Lo(),ic=Lo(),ac=Lo();function BD(t,e,r){if(t.length!==0){for(var n=t[0],i=n[0],a=n[0],o=n[1],s=n[1],u=1;u<t.length;u++)n=t[u],i=gr(i,n[0]),a=mr(a,n[0]),o=gr(o,n[1]),s=mr(s,n[1]);e[0]=i,e[1]=o,r[0]=a,r[1]=s}}function MD(t,e,r,n,i,a){i[0]=gr(t,r),i[1]=gr(e,n),a[0]=mr(t,r),a[1]=mr(e,n)}var FD=[],LD=[];function N6(t,e,r,n,i,a,o,s,u,l){var f=O_,c=Bt,h=f(t,r,i,o,FD);u[0]=1/0,u[1]=1/0,l[0]=-1/0,l[1]=-1/0;for(var d=0;d<h;d++){var p=c(t,r,i,o,FD[d]);u[0]=gr(p,u[0]),l[0]=mr(p,l[0])}h=f(e,n,a,s,LD);for(var d=0;d<h;d++){var g=c(e,n,a,s,LD[d]);u[1]=gr(g,u[1]),l[1]=mr(g,l[1])}u[0]=gr(t,u[0]),l[0]=mr(t,l[0]),u[0]=gr(o,u[0]),l[0]=mr(o,l[0]),u[1]=gr(e,u[1]),l[1]=mr(e,l[1]),u[1]=gr(s,u[1]),l[1]=mr(s,l[1])}function k6(t,e,r,n,i,a,o,s){var u=M_,l=$t,f=mr(gr(u(t,r,i),1),0),c=mr(gr(u(e,n,a),1),0),h=l(t,r,i,f),d=l(e,n,a,c);o[0]=gr(t,i,h),o[1]=gr(e,a,d),s[0]=mr(t,i,h),s[1]=mr(e,a,d)}function z6(t,e,r,n,i,a,o,s,u){var l=Ro,f=No,c=Math.abs(i-a);if(c%Fa<1e-4&&c>1e-4){s[0]=t-r,s[1]=e-n,u[0]=t+r,u[1]=e+n;return}if(nc[0]=vg(i)*r+t,nc[1]=dg(i)*n+e,ic[0]=vg(a)*r+t,ic[1]=dg(a)*n+e,l(s,nc,ic),f(u,nc,ic),i=i%Fa,i<0&&(i=i+Fa),a=a%Fa,a<0&&(a=a+Fa),i>a&&!o?a+=Fa:i<a&&o&&(i+=Fa),o){var h=a;a=i,i=h}for(var d=0;d<a;d+=Math.PI/2)d>i&&(ac[0]=vg(d)*r+t,ac[1]=dg(d)*n+e,l(s,ac,s),f(u,ac,u))}var it={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},La=[],Ia=[],Bn=[],Li=[],Mn=[],Fn=[],pg=Math.min,gg=Math.max,Ra=Math.cos,Na=Math.sin,si=Math.abs,mg=Math.PI,Ii=mg*2,yg=typeof Float32Array<"u",_u=[];function bg(t){var e=Math.round(t/mg*1e8)/1e8;return e%2*mg}function ID(t,e){var r=bg(t[0]);r<0&&(r+=Ii);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=Ii?i=r+Ii:e&&r-i>=Ii?i=r-Ii:!e&&r>i?i=r+(Ii-bg(r-i)):e&&r<i&&(i=r-(Ii-bg(i-r))),t[0]=r,t[1]=i}var ui=function(){function t(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(e,r,n){n=n||0,n>0&&(this._ux=si(n/Yf/e)||0,this._uy=si(n/Yf/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(it.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=si(e-this._xi),i=si(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(it.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){return this._drawPendingPt(),this.addData(it.C,e,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,i,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,i){return this._drawPendingPt(),this.addData(it.Q,e,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,r,n,i,a,o){this._drawPendingPt(),_u[0]=i,_u[1]=a,ID(_u,o),i=_u[0],a=_u[1];var s=a-i;return this.addData(it.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=Ra(a)*n+e,this._yi=Na(a)*n+r,this},t.prototype.arcTo=function(e,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,i,a),this},t.prototype.rect=function(e,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,i),this.addData(it.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(it.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){var r=e.length;!(this.data&&this.data.length===r)&&yg&&(this.data=new Float32Array(r));for(var n=0;n<r;n++)this.data[n]=e[n];this._len=r},t.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var r=e.length,n=0,i=this._len,a=0;a<r;a++)n+=e[a].len();yg&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var a=0;a<r;a++)for(var o=e[a].data,s=0;s<o.length;s++)this.data[i++]=o[s];this._len=i},t.prototype.addData=function(e,r,n,i,a,o,s,u,l){if(this._saveData){var f=this.data;this._len+arguments.length>f.length&&(this._expandData(),f=this.data);for(var c=0;c<arguments.length;c++)f[this._len++]=arguments[c]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r<this._len;r++)e[r]=this.data[r];this.data=e}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,yg&&this._len>11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){Bn[0]=Bn[1]=Mn[0]=Mn[1]=Number.MAX_VALUE,Li[0]=Li[1]=Fn[0]=Fn[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=e[o++],u=o===1;switch(u&&(r=e[o],n=e[o+1],i=r,a=n),s){case it.M:r=i=e[o++],n=a=e[o++],Mn[0]=i,Mn[1]=a,Fn[0]=i,Fn[1]=a;break;case it.L:MD(r,n,e[o],e[o+1],Mn,Fn),r=e[o++],n=e[o++];break;case it.C:N6(r,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],Mn,Fn),r=e[o++],n=e[o++];break;case it.Q:k6(r,n,e[o++],e[o++],e[o],e[o+1],Mn,Fn),r=e[o++],n=e[o++];break;case it.A:var l=e[o++],f=e[o++],c=e[o++],h=e[o++],d=e[o++],p=e[o++]+d;o+=1;var g=!e[o++];u&&(i=Ra(d)*c+l,a=Na(d)*h+f),z6(l,f,c,h,d,p,g,Mn,Fn),r=Ra(p)*c+l,n=Na(p)*h+f;break;case it.R:i=r=e[o++],a=n=e[o++];var v=e[o++],m=e[o++];MD(i,a,i+v,a+m,Mn,Fn);break;case it.Z:r=i,n=a;break}Ro(Bn,Bn,Mn),No(Li,Li,Fn)}return o===0&&(Bn[0]=Bn[1]=Li[0]=Li[1]=0),new Ue(Bn[0],Bn[1],Li[0]-Bn[0],Li[1]-Bn[1])},t.prototype._calculateLength=function(){var e=this.data,r=this._len,n=this._ux,i=this._uy,a=0,o=0,s=0,u=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,f=0,c=0,h=0;h<r;){var d=e[h++],p=h===1;p&&(a=e[h],o=e[h+1],s=a,u=o);var g=-1;switch(d){case it.M:a=s=e[h++],o=u=e[h++];break;case it.L:{var v=e[h++],m=e[h++],y=v-a,b=m-o;(si(y)>n||si(b)>i||h===r-1)&&(g=Math.sqrt(y*y+b*b),a=v,o=m);break}case it.C:{var w=e[h++],C=e[h++],v=e[h++],m=e[h++],_=e[h++],D=e[h++];g=hk(a,o,w,C,v,m,_,D,10),a=_,o=D;break}case it.Q:{var w=e[h++],C=e[h++],v=e[h++],m=e[h++];g=vk(a,o,w,C,v,m,10),a=v,o=m;break}case it.A:var x=e[h++],S=e[h++],O=e[h++],E=e[h++],P=e[h++],F=e[h++],B=F+P;h+=1,p&&(s=Ra(P)*O+x,u=Na(P)*E+S),g=gg(O,E)*pg(Ii,Math.abs(F)),a=Ra(B)*O+x,o=Na(B)*E+S;break;case it.R:{s=a=e[h++],u=o=e[h++];var M=e[h++],I=e[h++];g=M*2+I*2;break}case it.Z:{var y=s-a,b=u-o;g=Math.sqrt(y*y+b*b),a=s,o=u;break}}g>=0&&(l[c++]=g,f+=g)}return this._pathLen=f,f},t.prototype.rebuildPath=function(e,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,u,l,f,c,h,d=r<1,p,g,v=0,m=0,y,b=0,w,C;if(!(d&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,y=r*g,!y)))e:for(var _=0;_<o;){var D=n[_++],x=_===1;switch(x&&(l=n[_],f=n[_+1],s=l,u=f),D!==it.L&&b>0&&(e.lineTo(w,C),b=0),D){case it.M:s=l=n[_++],u=f=n[_++],e.moveTo(l,f);break;case it.L:{c=n[_++],h=n[_++];var S=si(c-l),O=si(h-f);if(S>i||O>a){if(d){var E=p[m++];if(v+E>y){var P=(y-v)/E;e.lineTo(l*(1-P)+c*P,f*(1-P)+h*P);break e}v+=E}e.lineTo(c,h),l=c,f=h,b=0}else{var F=S*S+O*O;F>b&&(w=c,C=h,b=F)}break}case it.C:{var B=n[_++],M=n[_++],I=n[_++],j=n[_++],z=n[_++],W=n[_++];if(d){var E=p[m++];if(v+E>y){var P=(y-v)/E;Oi(l,B,I,z,P,La),Oi(f,M,j,W,P,Ia),e.bezierCurveTo(La[1],Ia[1],La[2],Ia[2],La[3],Ia[3]);break e}v+=E}e.bezierCurveTo(B,M,I,j,z,W),l=z,f=W;break}case it.Q:{var B=n[_++],M=n[_++],I=n[_++],j=n[_++];if(d){var E=p[m++];if(v+E>y){var P=(y-v)/E;Nf(l,B,I,P,La),Nf(f,M,j,P,Ia),e.quadraticCurveTo(La[1],Ia[1],La[2],Ia[2]);break e}v+=E}e.quadraticCurveTo(B,M,I,j),l=I,f=j;break}case it.A:var R=n[_++],U=n[_++],Z=n[_++],ee=n[_++],ne=n[_++],q=n[_++],L=n[_++],X=!n[_++],V=Z>ee?Z:ee,G=si(Z-ee)>.001,J=ne+q,K=!1;if(d){var E=p[m++];v+E>y&&(J=ne+q*(y-v)/E,K=!0),v+=E}if(G&&e.ellipse?e.ellipse(R,U,Z,ee,L,ne,J,X):e.arc(R,U,V,ne,J,X),K)break e;x&&(s=Ra(ne)*Z+R,u=Na(ne)*ee+U),l=Ra(J)*Z+R,f=Na(J)*ee+U;break;case it.R:s=l=n[_],u=f=n[_+1],c=n[_++],h=n[_++];var Y=n[_++],fe=n[_++];if(d){var E=p[m++];if(v+E>y){var ue=y-v;e.moveTo(c,h),e.lineTo(c+pg(ue,Y),h),ue-=Y,ue>0&&e.lineTo(c+Y,h+pg(ue,fe)),ue-=fe,ue>0&&e.lineTo(c+gg(Y-ue,0),h+fe),ue-=Y,ue>0&&e.lineTo(c,h+gg(fe-ue,0));break e}v+=E}e.rect(c,h,Y,fe);break;case it.Z:if(d){var E=p[m++];if(v+E>y){var P=(y-v)/E;e.lineTo(l*(1-P)+s*P,f*(1-P)+u*P);break e}v+=E}e.closePath(),l=s,f=u}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.CMD=it,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function Xo(t,e,r,n,i,a,o){if(i===0)return!1;var s=i,u=0,l=t;if(o>e+s&&o>n+s||o<e-s&&o<n-s||a>t+s&&a>r+s||a<t-s&&a<r-s)return!1;if(t!==r)u=(e-n)/(t-r),l=(t*n-r*e)/(t-r);else return Math.abs(a-t)<=s/2;var f=u*a-o+l,c=f*f/(u*u+1);return c<=s/2*s/2}function j6(t,e,r,n,i,a,o,s,u,l,f){if(u===0)return!1;var c=u;if(f>e+c&&f>n+c&&f>a+c&&f>s+c||f<e-c&&f<n-c&&f<a-c&&f<s-c||l>t+c&&l>r+c&&l>i+c&&l>o+c||l<t-c&&l<r-c&&l<i-c&&l<o-c)return!1;var h=P_(t,e,r,n,i,a,o,s,l,f,null);return h<=c/2}function V6(t,e,r,n,i,a,o,s,u){if(o===0)return!1;var l=o;if(u>e+l&&u>n+l&&u>a+l||u<e-l&&u<n-l&&u<a-l||s>t+l&&s>r+l&&s>i+l||s<t-l&&s<r-l&&s<i-l)return!1;var f=F_(t,e,r,n,i,a,s,u,null);return f<=l/2}var RD=Math.PI*2;function li(t){return t%=RD,t<0&&(t+=RD),t}var Du=Math.PI*2;function H6(t,e,r,n,i,a,o,s,u){if(o===0)return!1;var l=o;s-=t,u-=e;var f=Math.sqrt(s*s+u*u);if(f-l>r||f+l<r)return!1;if(Math.abs(n-i)%Du<1e-4)return!0;if(a){var c=n;n=li(i),i=li(c)}else n=li(n),i=li(i);n>i&&(i+=Du);var h=Math.atan2(u,s);return h<0&&(h+=Du),h>=n&&h<=i||h+Du>=n&&h+Du<=i}function ka(t,e,r,n,i,a){if(a>e&&a>n||a<e&&a<n||n===e)return 0;var o=(a-e)/(n-e),s=n<e?1:-1;(o===1||o===0)&&(s=n<e?.5:-.5);var u=o*(r-t)+t;return u===i?1/0:u>i?s:0}var Ri=ui.CMD,za=Math.PI*2,W6=1e-4;function $6(t,e){return Math.abs(t-e)<W6}var nr=[-1,-1,-1],$r=[-1,-1];function G6(){var t=$r[0];$r[0]=$r[1],$r[1]=t}function U6(t,e,r,n,i,a,o,s,u,l){if(l>e&&l>n&&l>a&&l>s||l<e&&l<n&&l<a&&l<s)return 0;var f=Rf(e,n,a,s,l,nr);if(f===0)return 0;for(var c=0,h=-1,d=void 0,p=void 0,g=0;g<f;g++){var v=nr[g],m=v===0||v===1?.5:1,y=Bt(t,r,i,o,v);y<u||(h<0&&(h=O_(e,n,a,s,$r),$r[1]<$r[0]&&h>1&&G6(),d=Bt(e,n,a,s,$r[0]),h>1&&(p=Bt(e,n,a,s,$r[1]))),h===2?v<$r[0]?c+=d<e?m:-m:v<$r[1]?c+=p<d?m:-m:c+=s<p?m:-m:v<$r[0]?c+=d<e?m:-m:c+=s<d?m:-m)}return c}function q6(t,e,r,n,i,a,o,s){if(s>e&&s>n&&s>a||s<e&&s<n&&s<a)return 0;var u=dk(e,n,a,s,nr);if(u===0)return 0;var l=M_(e,n,a);if(l>=0&&l<=1){for(var f=0,c=$t(e,n,a,l),h=0;h<u;h++){var d=nr[h]===0||nr[h]===1?.5:1,p=$t(t,r,i,nr[h]);p<o||(nr[h]<l?f+=c<e?d:-d:f+=a<c?d:-d)}return f}else{var d=nr[0]===0||nr[0]===1?.5:1,p=$t(t,r,i,nr[0]);return p<o?0:a<e?d:-d}}function Y6(t,e,r,n,i,a,o,s){if(s-=e,s>r||s<-r)return 0;var u=Math.sqrt(r*r-s*s);nr[0]=-u,nr[1]=u;var l=Math.abs(n-i);if(l<1e-4)return 0;if(l>=za-1e-4){n=0,i=za;var f=a?1:-1;return o>=nr[0]+t&&o<=nr[1]+t?f:0}if(n>i){var c=n;n=i,i=c}n<0&&(n+=za,i+=za);for(var h=0,d=0;d<2;d++){var p=nr[d];if(p+t>o){var g=Math.atan2(s,p),f=a?1:-1;g<0&&(g=za+g),(g>=n&&g<=i||g+za>=n&&g+za<=i)&&(g>Math.PI/2&&g<Math.PI*1.5&&(f=-f),h+=f)}}return h}function ND(t,e,r,n,i){for(var a=t.data,o=t.len(),s=0,u=0,l=0,f=0,c=0,h,d,p=0;p<o;){var g=a[p++],v=p===1;switch(g===Ri.M&&p>1&&(r||(s+=ka(u,l,f,c,n,i))),v&&(u=a[p],l=a[p+1],f=u,c=l),g){case Ri.M:f=a[p++],c=a[p++],u=f,l=c;break;case Ri.L:if(r){if(Xo(u,l,a[p],a[p+1],e,n,i))return!0}else s+=ka(u,l,a[p],a[p+1],n,i)||0;u=a[p++],l=a[p++];break;case Ri.C:if(r){if(j6(u,l,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=U6(u,l,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],n,i)||0;u=a[p++],l=a[p++];break;case Ri.Q:if(r){if(V6(u,l,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=q6(u,l,a[p++],a[p++],a[p],a[p+1],n,i)||0;u=a[p++],l=a[p++];break;case Ri.A:var m=a[p++],y=a[p++],b=a[p++],w=a[p++],C=a[p++],_=a[p++];p+=1;var D=!!(1-a[p++]);h=Math.cos(C)*b+m,d=Math.sin(C)*w+y,v?(f=h,c=d):s+=ka(u,l,h,d,n,i);var x=(n-m)*w/b+m;if(r){if(H6(m,y,w,C,C+_,D,e,x,i))return!0}else s+=Y6(m,y,w,C,C+_,D,x,i);u=Math.cos(C+_)*b+m,l=Math.sin(C+_)*w+y;break;case Ri.R:f=u=a[p++],c=l=a[p++];var S=a[p++],O=a[p++];if(h=f+S,d=c+O,r){if(Xo(f,c,h,c,e,n,i)||Xo(h,c,h,d,e,n,i)||Xo(h,d,f,d,e,n,i)||Xo(f,d,f,c,e,n,i))return!0}else s+=ka(h,c,h,d,n,i),s+=ka(f,d,f,c,n,i);break;case Ri.Z:if(r){if(Xo(u,l,f,c,e,n,i))return!0}else s+=ka(u,l,f,c,n,i);u=f,l=c;break}}return!r&&!$6(l,c)&&(s+=ka(u,l,f,c,n,i)||0),s!==0}function X6(t,e,r){return ND(t,0,!1,e,r)}function K6(t,e,r,n){return ND(t,e,!0,r,n)}var kD=je({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ma),Z6={style:je({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},rc.style)},Cg=Tn.concat(["invisible","culling","z","z2","zlevel","parent"]),Ve=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(u){r.buildPath(u,r.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<Cg.length;++s)i[Cg[s]]=this[Cg[s]];i.__dirty|=Or}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(r){var n=Ke(r);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a<n.length;a++){var o=n[a],s=r[o];o==="style"?this.style?oe(this.style,s):this.useStyle(s):o==="shape"?oe(this.shape,s):t.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var r=this.style.fill;if(r!=="none"){if(be(r)){var n=Vf(r,0);return n>.5?$p:n>.2?Lk:Gp}else if(r)return Gp}return $p},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(be(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Vf(r,0)<Wp;if(a===o)return n}},e.prototype.buildPath=function(r,n,i){},e.prototype.pathUpdated=function(){this.__dirty&=~Vo},e.prototype.getUpdatedPathProxy=function(r){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,r),this.path},e.prototype.createPathProxy=function(){this.path=new ui(!1)},e.prototype.hasStroke=function(){var r=this.style,n=r.stroke;return!(n==null||n==="none"||!(r.lineWidth>0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Vo)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var u=n.strokeNoScale?this.getLineScale():1,l=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;l=Math.max(l,f??4)}u>1e-10&&(s.width+=l/u,s.height+=l/u,s.x-=l/u/2,s.y-=l/u/2)}return s}return r},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,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)),K6(s,u/l,r,n)))return!0}if(this.hasFill())return X6(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Vo,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:oe(i,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Vo)},e.prototype.createStyle=function(r){return Ef(kD,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=oe({},this.shape))},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var u=!(n&&a),l;if(n&&n.shape?o?a?l=n.shape:(l=oe({},i.shape),oe(l,n.shape)):(l=oe({},a?this.shape:i.shape),oe(l,n.shape)):u&&(l=i.shape),l)if(o){this.shape=oe({},this.shape);for(var f={},c=Ke(l),h=0;h<c.length;h++){var d=c[h];typeof l[d]=="object"?this.shape[d]=l[d]:f[d]=l[d]}this._transitionState(r,{shape:f},s)}else this.shape=l,this.dirtyShape()},e.prototype._mergeStates=function(r){for(var n=t.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},e.prototype.getAnimationStyleProps=function(){return Z6},e.prototype.isZeroArea=function(){return!1},e.extend=function(r){var n=function(a){ce(o,a);function o(s){var u=a.call(this,s)||this;return r.init&&r.init.call(u,s),u}return o.prototype.getDefaultStyle=function(){return $e(r.style)},o.prototype.getDefaultShape=function(){return $e(r.shape)},o}(e);for(var i in r)typeof r[i]=="function"&&(n.prototype[i]=r[i]);return n},e.initDefaultProps=function(){var r=e.prototype;r.type="path",r.strokeContainThreshold=5,r.segmentIgnoreThreshold=0,r.subPixelOptimize=!1,r.autoBatch=!1,r.__dirty=Or|uu|Vo}(),e}(Fi),J6=je({strokeFirst:!0,font:Ca,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},kD),oc=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.hasStroke=function(){var r=this.style,n=r.stroke;return n!=null&&n!=="none"&&r.lineWidth>0},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(r){return Ef(J6,r)},e.prototype.setBoundingRect=function(r){this._rect=r},e.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var n=r.text;n!=null?n+="":n="";var i=Yp(n,r.font,r.textAlign,r.textBaseline);if(i.x+=r.x||0,i.y+=r.y||0,this.hasStroke()){var a=r.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},e.initDefaultProps=function(){var r=e.prototype;r.dirtyRectTolerance=10}(),e}(Fi);oc.prototype.type="tspan";var Q6=je({x:0,y:0},Ma),e9={style:je({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},rc.style)};function t9(t){return!!(t&&typeof t!="string"&&t.width&&t.height)}var fi=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createStyle=function(r){return Ef(Q6,r)},e.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=t9(n.image)?n.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?a[r]:a[r]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return e9},e.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new Ue(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Fi);fi.prototype.type="image";function r9(t,e){var r=e.x,n=e.y,i=e.width,a=e.height,o=e.r,s,u,l,f;i<0&&(r=r+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 c;s+u>i&&(c=s+u,s*=i/c,u*=i/c),l+f>i&&(c=l+f,l*=i/c,f*=i/c),u+l>a&&(c=u+l,u*=a/c,l*=a/c),s+f>a&&(c=s+f,s*=a/c,f*=a/c),t.moveTo(r+s,n),t.lineTo(r+i-u,n),u!==0&&t.arc(r+i-u,n+u,u,-Math.PI/2,0),t.lineTo(r+i,n+a-l),l!==0&&t.arc(r+i-l,n+a-l,l,0,Math.PI/2),t.lineTo(r+f,n+a),f!==0&&t.arc(r+f,n+a-f,f,Math.PI/2,Math.PI),t.lineTo(r,n+s),s!==0&&t.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var Ko=Math.round;function zD(t,e,r){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=i,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(Ko(n*2)===Ko(i*2)&&(t.x1=t.x2=ja(n,s,!0)),Ko(a*2)===Ko(o*2)&&(t.y1=t.y2=ja(a,s,!0))),t}}function jD(t,e,r){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;t.x=n,t.y=i,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=ja(n,s,!0),t.y=ja(i,s,!0),t.width=Math.max(ja(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(ja(i+o,s,!1)-t.y,o===0?0:1)),t}}function ja(t,e,r){if(!e)return t;var n=Ko(t*2);return(n+Ko(e))%2===0?n/2:(n+(r?1:-1))/2}var n9=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),i9={},St=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new n9},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var u=jD(i9,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?r9(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Ve);St.prototype.type="rect";var VD={fill:"#000"},HD=2,a9={style:je({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},rc.style)},Ot=function(t){ce(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=VD,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r<this._children.length;r++){var n=this._children[r];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},e.prototype.updateTransform=function(){var r=this.innerTransformable;r?(r.updateTransform(),r.transform&&(this.transform=r.transform)):t.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(r){var n=this.innerTransformable;return n?n.getLocalTransform(r):t.prototype.getLocalTransform.call(this,r)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,f9(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(r){t.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=r},e.prototype.removeSelfFromZr=function(r){t.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var r=new Ue(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],u=s.getBoundingRect(),l=s.getLocalTransform(i);l?(r.copy(u),r.applyTransform(l),a=a||r.clone(),a.union(r)):(a=a||u.clone(),a.union(u))}this._rect=a||r}return this._rect},e.prototype.setDefaultTextStyle=function(r){this._defaultStyle=r||VD},e.prototype.setTextContent=function(r){if(process.env.NODE_ENV!=="production")throw new Error("Can't attach text on another text")},e.prototype._mergeStyle=function(r,n){if(!n)return r;var i=n.rich,a=r.rich||i&&{};return oe(r,n),i&&a?(this._mergeRich(a,i),r.rich=a):a&&(r.rich=a),r},e.prototype._mergeRich=function(r,n){for(var i=Ke(n),a=0;a<i.length;a++){var o=i[a];r[o]=r[o]||{},oe(r[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return a9},e.prototype._getOrCreateChild=function(r){var n=this._children[this._childCursor];return(!n||!(n instanceof r))&&(n=new r),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},e.prototype._updatePlainTexts=function(){var r=this.style,n=r.font||Ca,i=r.padding,a=XD(r),o=T6(a,r),s=wg(r),u=!!r.backgroundColor,l=o.outerHeight,f=o.outerWidth,c=o.contentWidth,h=o.lines,d=o.lineHeight,p=this._defaultStyle,g=r.x||0,v=r.y||0,m=r.align||p.align||"left",y=r.verticalAlign||p.verticalAlign||"top",b=g,w=Uo(v,o.contentHeight,y);if(s||i){var C=gu(g,f,m),_=Uo(v,l,y);s&&this._renderBackground(r,r,C,_,f,l)}w+=d/2,i&&(b=YD(g,m,i),y==="top"?w+=i[0]:y==="bottom"&&(w-=i[2]));for(var D=0,x=!1,S=qD("fill"in r?r.fill:(x=!0,p.fill)),O=UD("stroke"in r?r.stroke:!u&&(!p.autoStroke||x)?(D=HD,p.stroke):null),E=r.textShadowBlur>0,P=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),F=o.calculatedLineHeight,B=0;B<h.length;B++){var M=this._getOrCreateChild(oc),I=M.createStyle();M.useStyle(I),I.text=h[B],I.x=b,I.y=w,m&&(I.textAlign=m),I.textBaseline="middle",I.opacity=r.opacity,I.strokeFirst=!0,E&&(I.shadowBlur=r.textShadowBlur||0,I.shadowColor=r.textShadowColor||"transparent",I.shadowOffsetX=r.textShadowOffsetX||0,I.shadowOffsetY=r.textShadowOffsetY||0),I.stroke=O,I.fill=S,O&&(I.lineWidth=r.lineWidth||D,I.lineDash=r.lineDash,I.lineDashOffset=r.lineDashOffset||0),I.font=n,$D(I,r),w+=d,P&&M.setBoundingRect(new Ue(gu(I.x,r.width,I.textAlign),Uo(I.y,F,I.textBaseline),c,F))}},e.prototype._updateRichTexts=function(){var r=this.style,n=XD(r),i=B6(n,r),a=i.width,o=i.outerWidth,s=i.outerHeight,u=r.padding,l=r.x||0,f=r.y||0,c=this._defaultStyle,h=r.align||c.align,d=r.verticalAlign||c.verticalAlign,p=gu(l,o,h),g=Uo(f,s,d),v=p,m=g;u&&(v+=u[3],m+=u[0]);var y=v+a;wg(r)&&this._renderBackground(r,r,p,g,o,s);for(var b=!!r.backgroundColor,w=0;w<i.lines.length;w++){for(var C=i.lines[w],_=C.tokens,D=_.length,x=C.lineHeight,S=C.width,O=0,E=v,P=y,F=D-1,B=void 0;O<D&&(B=_[O],!B.align||B.align==="left");)this._placeToken(B,r,x,m,E,"left",b),S-=B.width,E+=B.width,O++;for(;F>=0&&(B=_[F],B.align==="right");)this._placeToken(B,r,x,m,P,"right",b),S-=B.width,P-=B.width,F--;for(E+=(a-(E-v)-(y-P)-S)/2;O<=F;)B=_[O],this._placeToken(B,r,x,m,E+B.width/2,"center",b),E+=B.width,O++;m+=x}},e.prototype._placeToken=function(r,n,i,a,o,s,u){var l=n.rich[r.styleName]||{};l.text=r.text;var f=r.verticalAlign,c=a+i/2;f==="top"?c=a+r.height/2:f==="bottom"&&(c=a+i-r.height/2);var h=!r.isLineHolder&&wg(l);h&&this._renderBackground(l,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,c-r.height/2,r.width,r.height);var d=!!l.backgroundColor,p=r.textPadding;p&&(o=YD(o,s,p),c-=r.height/2-p[0]-r.innerHeight/2);var g=this._getOrCreateChild(oc),v=g.createStyle();g.useStyle(v);var m=this._defaultStyle,y=!1,b=0,w=qD("fill"in l?l.fill:"fill"in n?n.fill:(y=!0,m.fill)),C=UD("stroke"in l?l.stroke:"stroke"in n?n.stroke:!d&&!u&&(!m.autoStroke||y)?(b=HD,m.stroke):null),_=l.textShadowBlur>0||n.textShadowBlur>0;v.text=r.text,v.x=o,v.y=c,_&&(v.shadowBlur=l.textShadowBlur||n.textShadowBlur||0,v.shadowColor=l.textShadowColor||n.textShadowColor||"transparent",v.shadowOffsetX=l.textShadowOffsetX||n.textShadowOffsetX||0,v.shadowOffsetY=l.textShadowOffsetY||n.textShadowOffsetY||0),v.textAlign=s,v.textBaseline="middle",v.font=r.font||Ca,v.opacity=Da(l.opacity,n.opacity,1),$D(v,l),C&&(v.lineWidth=Da(l.lineWidth,n.lineWidth,b),v.lineDash=Be(l.lineDash,n.lineDash),v.lineDashOffset=n.lineDashOffset||0,v.stroke=C),w&&(v.fill=w);var D=r.contentWidth,x=r.contentHeight;g.setBoundingRect(new Ue(gu(v.x,D,v.textAlign),Uo(v.y,x,v.textBaseline),D,x))},e.prototype._renderBackground=function(r,n,i,a,o,s){var u=r.backgroundColor,l=r.borderWidth,f=r.borderColor,c=u&&u.image,h=u&&!c,d=r.borderRadius,p=this,g,v;if(h||r.lineHeight||l&&f){g=this._getOrCreateChild(St),g.useStyle(g.createStyle()),g.style.fill=null;var m=g.shape;m.x=i,m.y=a,m.width=o,m.height=s,m.r=d,g.dirtyShape()}if(h){var y=g.style;y.fill=u||null,y.fillOpacity=Be(r.fillOpacity,1)}else if(c){v=this._getOrCreateChild(fi),v.onload=function(){p.dirtyStyle()};var b=v.style;b.image=u.image,b.x=i,b.y=a,b.width=o,b.height=s}if(l&&f){var y=g.style;y.lineWidth=l,y.stroke=f,y.strokeOpacity=Be(r.strokeOpacity,1),y.lineDash=r.borderDash,y.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var w=(g||v).style;w.shadowBlur=r.shadowBlur||0,w.shadowColor=r.shadowColor||"transparent",w.shadowOffsetX=r.shadowOffsetX||0,w.shadowOffsetY=r.shadowOffsetY||0,w.opacity=Da(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return l9(r)&&(n=[r.fontStyle,r.fontWeight,u9(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Sn(n)||r.textFont||r.font},e}(Fi),o9={left:!0,right:1,center:1},s9={top:1,bottom:1,middle:1},WD=["fontStyle","fontWeight","fontSize","fontFamily"];function u9(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?sp+"px":t+"px"}function $D(t,e){for(var r=0;r<WD.length;r++){var n=WD[r],i=e[n];i!=null&&(t[n]=i)}}function l9(t){return t.fontSize!=null||t.fontFamily||t.fontWeight}function f9(t){return GD(t),N(t.rich,GD),t}function GD(t){if(t){t.font=Ot.makeFont(t);var e=t.align;e==="middle"&&(e="center"),t.align=e==null||o9[e]?e:"left";var r=t.verticalAlign;r==="center"&&(r="middle"),t.verticalAlign=r==null||s9[r]?r:"top";var n=t.padding;n&&(t.padding=a_(t.padding))}}function UD(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function qD(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function YD(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function XD(t){var e=t.text;return e!=null&&(e+=""),e}function wg(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var He=lt(),c9=function(t,e,r,n){if(n){var i=He(n);i.dataIndex=r,i.dataType=e,i.seriesIndex=t,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=He(a);o.seriesIndex=t,o.dataIndex=r,o.dataType=e,o.ssrType="chart"})}},KD=1,ZD={},JD=lt(),_g=lt(),Dg=0,sc=1,uc=2,Gr=["emphasis","blur","select"],lc=["normal","emphasis","blur","select"],h9=10,d9=9,Va="highlight",fc="downplay",xu="select",cc="unselect",Su="toggleSelect";function Zo(t){return t!=null&&t!=="none"}function hc(t,e,r){t.onHoverStateChange&&(t.hoverState||0)!==r&&t.onHoverStateChange(e),t.hoverState=r}function QD(t){hc(t,"emphasis",uc)}function ex(t){t.hoverState===uc&&hc(t,"normal",Dg)}function xg(t){hc(t,"blur",sc)}function tx(t){t.hoverState===sc&&hc(t,"normal",Dg)}function v9(t){t.selected=!0}function p9(t){t.selected=!1}function rx(t,e,r){e(t,r)}function ci(t,e,r){rx(t,e,r),t.isGroup&&t.traverse(function(n){rx(n,e,r)})}function nx(t,e){switch(e){case"emphasis":t.hoverState=uc;break;case"normal":t.hoverState=Dg;break;case"blur":t.hoverState=sc;break;case"select":t.selected=!0}}function g9(t,e,r,n){for(var i=t.style,a={},o=0;o<e.length;o++){var s=e[o],u=i[s];a[s]=u??(n&&n[s])}for(var o=0;o<t.animators.length;o++){var l=t.animators[o];l.__fromStateTransition&&l.__fromStateTransition.indexOf(r)<0&&l.targetName==="style"&&l.saveTo(a,e)}return a}function m9(t,e,r,n){var i=r&&Ge(r,"select")>=0,a=!1;if(t instanceof Ve){var o=JD(t),s=i&&o.selectFill||o.normalFill,u=i&&o.selectStroke||o.normalStroke;if(Zo(s)||Zo(u)){n=n||{};var l=n.style||{};l.fill==="inherit"?(a=!0,n=oe({},n),l=oe({},l),l.fill=s):!Zo(l.fill)&&Zo(s)?(a=!0,n=oe({},n),l=oe({},l),l.fill=V_(s)):!Zo(l.stroke)&&Zo(u)&&(a||(n=oe({},n),l=oe({},l)),l.stroke=V_(u)),n.style=l}}if(n&&n.z2==null){a||(n=oe({},n));var f=t.z2EmphasisLift;n.z2=t.z2+(f??h9)}return n}function y9(t,e,r){if(r&&r.z2==null){r=oe({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??d9)}return r}function b9(t,e,r){var n=Ge(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:g9(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=oe({},r),o=oe({opacity:n?i:a.opacity*.1},o),r.style=o),r}function Sg(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return m9(this,t,e,r);if(t==="blur")return b9(this,t,r);if(t==="select")return y9(this,t,r)}return r}function C9(t){t.stateProxy=Sg;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=Sg),r&&(r.stateProxy=Sg)}function ix(t,e){!lx(t,e)&&!t.__highByOuter&&ci(t,QD)}function ax(t,e){!lx(t,e)&&!t.__highByOuter&&ci(t,ex)}function dc(t,e){t.__highByOuter|=1<<(e||0),ci(t,QD)}function vc(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&ci(t,ex)}function w9(t){ci(t,xg)}function ox(t){ci(t,tx)}function sx(t){ci(t,v9)}function ux(t){ci(t,p9)}function lx(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function fx(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=_g(a),s=i==="series",u=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(u),o.isBlured&&(u.group.traverse(function(l){tx(l)}),s&&r.push(a)),o.isBlured=!1}),N(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function Eg(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(l,f){for(var c=0;c<f.length;c++){var h=l.getItemGraphicEl(f[c]);h&&ox(h)}}if(t!=null&&!(!e||e==="none")){var o=i.getSeriesByIndex(t),s=o.coordinateSystem;s&&s.master&&(s=s.master);var u=[];i.eachSeries(function(l){var f=o===l,c=l.coordinateSystem;c&&c.master&&(c=c.master);var h=c&&s?c===s:f;if(!(r==="series"&&!f||r==="coordinateSystem"&&!h||e==="series"&&f)){var d=n.getViewOfSeriesModel(l);if(d.group.traverse(function(v){v.__highByOuter&&f&&e==="self"||xg(v)}),Wt(e))a(l.getData(),e);else if(we(e))for(var p=Ke(e),g=0;g<p.length;g++)a(l.getData(p[g]),e[p[g]]);u.push(l),_g(l).isBlured=!0}}),i.eachComponent(function(l,f){if(l!=="series"){var c=n.getViewOfComponentModel(f);c&&c.toggleBlurSeries&&c.toggleBlurSeries(u,!0,i)}})}}function Ag(t,e,r){if(!(t==null||e==null)){var n=r.getModel().getComponent(t,e);if(n){_g(n).isBlured=!0;var i=r.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){xg(a)})}}}function _9(t,e,r){var n=t.seriesIndex,i=t.getData(e.dataType);if(!i){process.env.NODE_ENV!=="production"&&Gt("Unknown dataType "+e.dataType);return}var a=Pa(i,e);a=(he(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),u=0;!o&&u<s;)o=i.getItemGraphicEl(u++);if(o){var l=He(o);Eg(n,l.focus,l.blurScope,r)}else{var f=t.get(["emphasis","focus"]),c=t.get(["emphasis","blurScope"]);f!=null&&Eg(n,f,c,r)}}function Tg(t,e,r,n){var i={focusSelf:!1,dispatchers:null};if(t==null||t==="series"||e==null||r==null)return i;var a=n.getModel().getComponent(t,e);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(r),u,l=0;l<s.length;l++)if(process.env.NODE_ENV!=="production"&&!Jo(s[l])&&Gt("param should be highDownDispatcher"),He(s[l]).focus==="self"){u=!0;break}return{focusSelf:u,dispatchers:s}}function D9(t,e,r){process.env.NODE_ENV!=="production"&&!Jo(t)&&Gt("param should be highDownDispatcher");var n=He(t),i=Tg(n.componentMainType,n.componentIndex,n.componentHighDownName,r),a=i.dispatchers,o=i.focusSelf;a?(o&&Ag(n.componentMainType,n.componentIndex,r),N(a,function(s){return ix(s,e)})):(Eg(n.seriesIndex,n.focus,n.blurScope,r),n.focus==="self"&&Ag(n.componentMainType,n.componentIndex,r),ix(t,e))}function x9(t,e,r){process.env.NODE_ENV!=="production"&&!Jo(t)&&Gt("param should be highDownDispatcher"),fx(r);var n=He(t),i=Tg(n.componentMainType,n.componentIndex,n.componentHighDownName,r).dispatchers;i?N(i,function(a){return ax(a,e)}):ax(t,e)}function S9(t,e,r){if(Pg(e)){var n=e.dataType,i=t.getData(n),a=Pa(i,e);he(a)||(a=[a]),t[e.type===Su?"toggleSelect":e.type===xu?"select":"unselect"](a,n)}}function cx(t){var e=t.getAllData();N(e,function(r){var n=r.data,i=r.type;n.eachItemGraphicEl(function(a,o){t.isSelected(o,i)?sx(a):ux(a)})})}function E9(t){var e=[];return t.eachSeries(function(r){var n=r.getAllData();N(n,function(i){i.data;var a=i.type,o=r.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function Og(t,e,r){dx(t,!0),ci(t,C9),T9(t,e,r)}function A9(t){dx(t,!1)}function Eu(t,e,r,n){n?A9(t):Og(t,e,r)}function T9(t,e,r){var n=He(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var hx=["emphasis","blur","select"],O9={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function pc(t,e,r,n){r=r||"itemStyle";for(var i=0;i<hx.length;i++){var a=hx[i],o=e.getModel([a,r]),s=t.ensureState(a);s.style=o[O9[r]]()}}function dx(t,e){var r=e===!1,n=t;t.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=t.highDownSilentOnTouch),(!r||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!r)}function Jo(t){return!!(t&&t.__highDownDispatcher)}function P9(t){var e=ZD[t];return e==null&&KD<=32&&(e=ZD[t]=KD++),e}function Pg(t){var e=t.type;return e===xu||e===cc||e===Su}function vx(t){var e=t.type;return e===Va||e===fc}function B9(t){var e=JD(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var r=t.states.select||{};e.selectFill=r.style&&r.style.fill||null,e.selectStroke=r.style&&r.style.stroke||null}var Qo=ui.CMD,M9=[[],[],[]],px=Math.sqrt,F9=Math.atan2;function gx(t,e){if(e){var r=t.data,n=t.len(),i,a,o,s,u,l,f=Qo.M,c=Qo.C,h=Qo.L,d=Qo.R,p=Qo.A,g=Qo.Q;for(o=0,s=0;o<n;){switch(i=r[o++],s=o,a=0,i){case f:a=1;break;case h:a=1;break;case c:a=3;break;case g:a=2;break;case p:var v=e[4],m=e[5],y=px(e[0]*e[0]+e[1]*e[1]),b=px(e[2]*e[2]+e[3]*e[3]),w=F9(-e[1]/b,e[0]/y);r[o]*=y,r[o++]+=v,r[o]*=b,r[o++]+=m,r[o++]*=y,r[o++]*=b,r[o++]+=w,r[o++]+=w,o+=2,s=o;break;case d:l[0]=r[o++],l[1]=r[o++],jr(l,l,e),r[s++]=l[0],r[s++]=l[1],l[0]+=r[o++],l[1]+=r[o++],jr(l,l,e),r[s++]=l[0],r[s++]=l[1]}for(u=0;u<a;u++){var C=M9[u];C[0]=r[o++],C[1]=r[o++],jr(C,C,e),r[s++]=C[0],r[s++]=C[1]}}t.increaseVersion()}}var Bg=Math.sqrt,gc=Math.sin,mc=Math.cos,Au=Math.PI;function mx(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Mg(t,e){return(t[0]*e[0]+t[1]*e[1])/(mx(t)*mx(e))}function yx(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Mg(t,e))}function bx(t,e,r,n,i,a,o,s,u,l,f){var c=u*(Au/180),h=mc(c)*(t-r)/2+gc(c)*(e-n)/2,d=-1*gc(c)*(t-r)/2+mc(c)*(e-n)/2,p=h*h/(o*o)+d*d/(s*s);p>1&&(o*=Bg(p),s*=Bg(p));var g=(i===a?-1:1)*Bg((o*o*(s*s)-o*o*(d*d)-s*s*(h*h))/(o*o*(d*d)+s*s*(h*h)))||0,v=g*o*d/s,m=g*-s*h/o,y=(t+r)/2+mc(c)*v-gc(c)*m,b=(e+n)/2+gc(c)*v+mc(c)*m,w=yx([1,0],[(h-v)/o,(d-m)/s]),C=[(h-v)/o,(d-m)/s],_=[(-1*h-v)/o,(-1*d-m)/s],D=yx(C,_);if(Mg(C,_)<=-1&&(D=Au),Mg(C,_)>=1&&(D=0),D<0){var x=Math.round(D/Au*1e6)/1e6;D=Au*2+x%2*Au}f.addData(l,y,b,o,s,w,D,c,a)}var L9=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,I9=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function R9(t){var e=new ui;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=ui.CMD,u=t.match(L9);if(!u)return e;for(var l=0;l<u.length;l++){for(var f=u[l],c=f.charAt(0),h=void 0,d=f.match(I9)||[],p=d.length,g=0;g<p;g++)d[g]=parseFloat(d[g]);for(var v=0;v<p;){var m=void 0,y=void 0,b=void 0,w=void 0,C=void 0,_=void 0,D=void 0,x=r,S=n,O=void 0,E=void 0;switch(c){case"l":r+=d[v++],n+=d[v++],h=s.L,e.addData(h,r,n);break;case"L":r=d[v++],n=d[v++],h=s.L,e.addData(h,r,n);break;case"m":r+=d[v++],n+=d[v++],h=s.M,e.addData(h,r,n),i=r,a=n,c="l";break;case"M":r=d[v++],n=d[v++],h=s.M,e.addData(h,r,n),i=r,a=n,c="L";break;case"h":r+=d[v++],h=s.L,e.addData(h,r,n);break;case"H":r=d[v++],h=s.L,e.addData(h,r,n);break;case"v":n+=d[v++],h=s.L,e.addData(h,r,n);break;case"V":n=d[v++],h=s.L,e.addData(h,r,n);break;case"C":h=s.C,e.addData(h,d[v++],d[v++],d[v++],d[v++],d[v++],d[v++]),r=d[v-2],n=d[v-1];break;case"c":h=s.C,e.addData(h,d[v++]+r,d[v++]+n,d[v++]+r,d[v++]+n,d[v++]+r,d[v++]+n),r+=d[v-2],n+=d[v-1];break;case"S":m=r,y=n,O=e.len(),E=e.data,o===s.C&&(m+=r-E[O-4],y+=n-E[O-3]),h=s.C,x=d[v++],S=d[v++],r=d[v++],n=d[v++],e.addData(h,m,y,x,S,r,n);break;case"s":m=r,y=n,O=e.len(),E=e.data,o===s.C&&(m+=r-E[O-4],y+=n-E[O-3]),h=s.C,x=r+d[v++],S=n+d[v++],r+=d[v++],n+=d[v++],e.addData(h,m,y,x,S,r,n);break;case"Q":x=d[v++],S=d[v++],r=d[v++],n=d[v++],h=s.Q,e.addData(h,x,S,r,n);break;case"q":x=d[v++]+r,S=d[v++]+n,r+=d[v++],n+=d[v++],h=s.Q,e.addData(h,x,S,r,n);break;case"T":m=r,y=n,O=e.len(),E=e.data,o===s.Q&&(m+=r-E[O-4],y+=n-E[O-3]),r=d[v++],n=d[v++],h=s.Q,e.addData(h,m,y,r,n);break;case"t":m=r,y=n,O=e.len(),E=e.data,o===s.Q&&(m+=r-E[O-4],y+=n-E[O-3]),r+=d[v++],n+=d[v++],h=s.Q,e.addData(h,m,y,r,n);break;case"A":b=d[v++],w=d[v++],C=d[v++],_=d[v++],D=d[v++],x=r,S=n,r=d[v++],n=d[v++],h=s.A,bx(x,S,r,n,_,D,b,w,C,h,e);break;case"a":b=d[v++],w=d[v++],C=d[v++],_=d[v++],D=d[v++],x=r,S=n,r+=d[v++],n+=d[v++],h=s.A,bx(x,S,r,n,_,D,b,w,C,h,e);break}}(c==="z"||c==="Z")&&(h=s.Z,e.addData(h),r=i,n=a),o=h}return e.toStatic(),e}var Cx=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.applyTransform=function(r){},e}(Ve);function _x(t){return t.setData!=null}function Dx(t,e){var r=R9(t),n=oe({},e);return n.buildPath=function(i){if(_x(i)){i.setData(r.data);var a=i.getContext();a&&i.rebuildPath(a,1)}else{var a=i;r.rebuildPath(a,1)}},n.applyTransform=function(i){gx(r,i),this.dirtyShape()},n}function N9(t,e){return new Cx(Dx(t,e))}function k9(t,e){var r=Dx(t,e),n=function(i){ce(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=r.applyTransform,s.buildPath=r.buildPath,s}return a}(Cx);return n}function z9(t,e){for(var r=[],n=t.length,i=0;i<n;i++){var a=t[i];r.push(a.getUpdatedPathProxy(!0))}var o=new Ve(e);return o.createPathProxy(),o.buildPath=function(s){if(_x(s)){s.appendPath(r);var u=s.getContext();u&&s.rebuildPath(u,1)}},o}function Fg(t,e){e=e||{};var r=new Ve;return t.shape&&r.setShape(t.shape),r.setStyle(t.style),e.bakeTransform?gx(r.path,t.getComputedTransform()):e.toLocal?r.setLocalTransform(t.getComputedTransform()):r.copyTransform(t),r.buildPath=t.buildPath,r.applyTransform=r.applyTransform,r.z=t.z,r.z2=t.z2,r.zlevel=t.zlevel,r}var j9=function(){function t(){this.cx=0,this.cy=0,this.r=0}return t}(),yc=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new j9},e.prototype.buildPath=function(r,n){r.moveTo(n.cx+n.r,n.cy),r.arc(n.cx,n.cy,n.r,0,Math.PI*2)},e}(Ve);yc.prototype.type="circle";var V9=function(){function t(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return t}(),Lg=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new V9},e.prototype.buildPath=function(r,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,u=n.ry,l=s*i,f=u*i;r.moveTo(a-s,o),r.bezierCurveTo(a-s,o-f,a-l,o-u,a,o-u),r.bezierCurveTo(a+l,o-u,a+s,o-f,a+s,o),r.bezierCurveTo(a+s,o+f,a+l,o+u,a,o+u),r.bezierCurveTo(a-l,o+u,a-s,o+f,a-s,o),r.closePath()},e}(Ve);Lg.prototype.type="ellipse";var xx=Math.PI,Ig=xx*2,Ha=Math.sin,es=Math.cos,H9=Math.acos,Ut=Math.atan2,Sx=Math.abs,Tu=Math.sqrt,Ou=Math.max,Ln=Math.min,un=1e-4;function W9(t,e,r,n,i,a,o,s){var u=r-t,l=n-e,f=o-i,c=s-a,h=c*u-f*l;if(!(h*h<un))return h=(f*(e-a)-c*(t-i))/h,[t+h*u,e+h*l]}function bc(t,e,r,n,i,a,o){var s=t-r,u=e-n,l=(o?a:-a)/Tu(s*s+u*u),f=l*u,c=-l*s,h=t+f,d=e+c,p=r+f,g=n+c,v=(h+p)/2,m=(d+g)/2,y=p-h,b=g-d,w=y*y+b*b,C=i-a,_=h*g-p*d,D=(b<0?-1:1)*Tu(Ou(0,C*C*w-_*_)),x=(_*b-y*D)/w,S=(-_*y-b*D)/w,O=(_*b+y*D)/w,E=(-_*y+b*D)/w,P=x-v,F=S-m,B=O-v,M=E-m;return P*P+F*F>B*B+M*M&&(x=O,S=E),{cx:x,cy:S,x0:-f,y0:-c,x1:x*(i/C-1),y1:S*(i/C-1)}}function $9(t){var e;if(he(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function G9(t,e){var r,n=Ou(e.r,0),i=Ou(e.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=e.startAngle,l=e.endAngle;if(!(isNaN(u)||isNaN(l))){var f=e.cx,c=e.cy,h=!!e.clockwise,d=Sx(l-u),p=d>Ig&&d%Ig;if(p>un&&(d=p),!(n>un))t.moveTo(f,c);else if(d>Ig-un)t.moveTo(f+n*es(u),c+n*Ha(u)),t.arc(f,c,n,u,l,!h),i>un&&(t.moveTo(f+i*es(l),c+i*Ha(l)),t.arc(f,c,i,l,u,h));else{var g=void 0,v=void 0,m=void 0,y=void 0,b=void 0,w=void 0,C=void 0,_=void 0,D=void 0,x=void 0,S=void 0,O=void 0,E=void 0,P=void 0,F=void 0,B=void 0,M=n*es(u),I=n*Ha(u),j=i*es(l),z=i*Ha(l),W=d>un;if(W){var R=e.cornerRadius;R&&(r=$9(R),g=r[0],v=r[1],m=r[2],y=r[3]);var U=Sx(n-i)/2;if(b=Ln(U,m),w=Ln(U,y),C=Ln(U,g),_=Ln(U,v),S=D=Ou(b,w),O=x=Ou(C,_),(D>un||x>un)&&(E=n*es(l),P=n*Ha(l),F=i*es(u),B=i*Ha(u),d<xx)){var Z=W9(M,I,F,B,E,P,j,z);if(Z){var ee=M-Z[0],ne=I-Z[1],q=E-Z[0],L=P-Z[1],X=1/Ha(H9((ee*q+ne*L)/(Tu(ee*ee+ne*ne)*Tu(q*q+L*L)))/2),V=Tu(Z[0]*Z[0]+Z[1]*Z[1]);S=Ln(D,(n-V)/(X+1)),O=Ln(x,(i-V)/(X-1))}}}if(!W)t.moveTo(f+M,c+I);else if(S>un){var G=Ln(m,S),J=Ln(y,S),K=bc(F,B,M,I,n,G,h),Y=bc(E,P,j,z,n,J,h);t.moveTo(f+K.cx+K.x0,c+K.cy+K.y0),S<D&&G===J?t.arc(f+K.cx,c+K.cy,S,Ut(K.y0,K.x0),Ut(Y.y0,Y.x0),!h):(G>0&&t.arc(f+K.cx,c+K.cy,G,Ut(K.y0,K.x0),Ut(K.y1,K.x1),!h),t.arc(f,c,n,Ut(K.cy+K.y1,K.cx+K.x1),Ut(Y.cy+Y.y1,Y.cx+Y.x1),!h),J>0&&t.arc(f+Y.cx,c+Y.cy,J,Ut(Y.y1,Y.x1),Ut(Y.y0,Y.x0),!h))}else t.moveTo(f+M,c+I),t.arc(f,c,n,u,l,!h);if(!(i>un)||!W)t.lineTo(f+j,c+z);else if(O>un){var G=Ln(g,O),J=Ln(v,O),K=bc(j,z,E,P,i,-J,h),Y=bc(M,I,F,B,i,-G,h);t.lineTo(f+K.cx+K.x0,c+K.cy+K.y0),O<x&&G===J?t.arc(f+K.cx,c+K.cy,O,Ut(K.y0,K.x0),Ut(Y.y0,Y.x0),!h):(J>0&&t.arc(f+K.cx,c+K.cy,J,Ut(K.y0,K.x0),Ut(K.y1,K.x1),!h),t.arc(f,c,i,Ut(K.cy+K.y1,K.cx+K.x1),Ut(Y.cy+Y.y1,Y.cx+Y.x1),h),G>0&&t.arc(f+Y.cx,c+Y.cy,G,Ut(Y.y1,Y.x1),Ut(Y.y0,Y.x0),!h))}else t.lineTo(f+j,c+z),t.arc(f,c,i,l,u,h)}t.closePath()}}}var U9=function(){function t(){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 t}(),In=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new U9},e.prototype.buildPath=function(r,n){G9(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Ve);In.prototype.type="sector";var q9=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),Rg=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new q9},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},e}(Ve);Rg.prototype.type="ring";function Y9(t,e,r,n){var i=[],a=[],o=[],s=[],u,l,f,c;if(n){f=[1/0,1/0],c=[-1/0,-1/0];for(var h=0,d=t.length;h<d;h++)Ro(f,f,t[h]),No(c,c,t[h]);Ro(f,f,n[0]),No(c,c,n[1])}for(var h=0,d=t.length;h<d;h++){var p=t[h];if(r)u=t[h?h-1:d-1],l=t[(h+1)%d];else if(h===0||h===d-1){i.push(IN(t[h]));continue}else u=t[h-1],l=t[h+1];RN(a,l,u),cp(a,a,e);var g=hp(p,u),v=hp(p,l),m=g+v;m!==0&&(g/=m,v/=m),cp(o,a,-g),cp(s,a,v);var y=l_([],p,o),b=l_([],p,s);n&&(No(y,y,f),Ro(y,y,c),No(b,b,f),Ro(b,b,c)),i.push(y),i.push(b)}return r&&i.push(i.shift()),i}function Ex(t,e,r){var n=e.smooth,i=e.points;if(i&&i.length>=2){if(n){var a=Y9(i,n,r,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var u=a[s*2],l=a[s*2+1],f=i[(s+1)%o];t.bezierCurveTo(u[0],u[1],l[0],l[1],f[0],f[1])}}else{t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;s<c;s++)t.lineTo(i[s][0],i[s][1])}r&&t.closePath()}}var X9=function(){function t(){this.points=null,this.smooth=0,this.smoothConstraint=null}return t}(),Cc=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new X9},e.prototype.buildPath=function(r,n){Ex(r,n,!0)},e}(Ve);Cc.prototype.type="polygon";var K9=function(){function t(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return t}(),Pu=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new K9},e.prototype.buildPath=function(r,n){Ex(r,n,!1)},e}(Ve);Pu.prototype.type="polyline";var Z9={},J9=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return t}(),Ni=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new J9},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var u=zD(Z9,n,this.style);i=u.x1,a=u.y1,o=u.x2,s=u.y2}else i=n.x1,a=n.y1,o=n.x2,s=n.y2;var l=n.percent;l!==0&&(r.moveTo(i,a),l<1&&(o=i*(1-l)+o*l,s=a*(1-l)+s*l),r.lineTo(o,s))},e.prototype.pointAt=function(r){var n=this.shape;return[n.x1*(1-r)+n.x2*r,n.y1*(1-r)+n.y2*r]},e}(Ve);Ni.prototype.type="line";var yr=[],Q9=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return t}();function Ax(t,e,r){var n=t.cpx2,i=t.cpy2;return n!=null||i!=null?[(r?T_:Bt)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?T_:Bt)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?B_:$t)(t.x1,t.cpx1,t.x2,e),(r?B_:$t)(t.y1,t.cpy1,t.y2,e)]}var Ng=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Q9},e.prototype.buildPath=function(r,n){var i=n.x1,a=n.y1,o=n.x2,s=n.y2,u=n.cpx1,l=n.cpy1,f=n.cpx2,c=n.cpy2,h=n.percent;h!==0&&(r.moveTo(i,a),f==null||c==null?(h<1&&(Nf(i,u,o,h,yr),u=yr[1],o=yr[2],Nf(a,l,s,h,yr),l=yr[1],s=yr[2]),r.quadraticCurveTo(u,l,o,s)):(h<1&&(Oi(i,u,f,o,h,yr),u=yr[1],f=yr[2],o=yr[3],Oi(a,l,c,s,h,yr),l=yr[1],c=yr[2],s=yr[3]),r.bezierCurveTo(u,l,f,c,o,s)))},e.prototype.pointAt=function(r){return Ax(this.shape,r,!1)},e.prototype.tangentAt=function(r){var n=Ax(this.shape,r,!0);return zN(n,n)},e}(Ve);Ng.prototype.type="bezier-curve";var e7=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),wc=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new e7},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r,0),s=n.startAngle,u=n.endAngle,l=n.clockwise,f=Math.cos(s),c=Math.sin(s);r.moveTo(f*o+i,c*o+a),r.arc(i,a,o,s,u,!l)},e}(Ve);wc.prototype.type="arc";var t7=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="compound",r}return e.prototype._updatePathDirty=function(){for(var r=this.shape.paths,n=this.shapeChanged(),i=0;i<r.length;i++)n=n||r[i].shapeChanged();n&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var r=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<r.length;i++)r[i].path||r[i].createPathProxy(),r[i].path.setScale(n[0],n[1],r[i].segmentIgnoreThreshold)},e.prototype.buildPath=function(r,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(r,i[a].shape,!0)},e.prototype.afterBrush=function(){for(var r=this.shape.paths||[],n=0;n<r.length;n++)r[n].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Ve.prototype.getBoundingRect.call(this)},e}(Ve),Tx=function(){function t(e){this.colorStops=e||[]}return t.prototype.addColorStop=function(e,r){this.colorStops.push({offset:e,color:r})},t}(),Ox=function(t){ce(e,t);function e(r,n,i,a,o,s){var u=t.call(this,o)||this;return u.x=r??0,u.y=n??0,u.x2=i??1,u.y2=a??0,u.type="linear",u.global=s||!1,u}return e}(Tx),r7=function(t){ce(e,t);function e(r,n,i,a,o){var s=t.call(this,a)||this;return s.x=r??.5,s.y=n??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return e}(Tx),Wa=[0,0],$a=[0,0],_c=new _e,Dc=new _e,xc=function(){function t(e,r){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new _e;for(var n=0;n<2;n++)this._axes[n]=new _e;e&&this.fromBoundingRect(e,r)}return t.prototype.fromBoundingRect=function(e,r){var n=this._corners,i=this._axes,a=e.x,o=e.y,s=a+e.width,u=o+e.height;if(n[0].set(a,o),n[1].set(s,o),n[2].set(s,u),n[3].set(a,u),r)for(var l=0;l<4;l++)n[l].transform(r);_e.sub(i[0],n[1],n[0]),_e.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var l=0;l<2;l++)this._origin[l]=i[l].dot(n[0])},t.prototype.intersect=function(e,r){var n=!0,i=!r;return _c.set(1/0,1/0),Dc.set(0,0),!this._intersectCheckOneSide(this,e,_c,Dc,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(e,this,_c,Dc,i,-1)&&(n=!1,i)||i||_e.copy(r,n?_c:Dc),n},t.prototype._intersectCheckOneSide=function(e,r,n,i,a,o){for(var s=!0,u=0;u<2;u++){var l=this._axes[u];if(this._getProjMinMaxOnAxis(u,e._corners,Wa),this._getProjMinMaxOnAxis(u,r._corners,$a),Wa[1]<$a[0]||Wa[0]>$a[1]){if(s=!1,a)return s;var f=Math.abs($a[0]-Wa[1]),c=Math.abs(Wa[0]-$a[1]);Math.min(f,c)>i.len()&&(f<c?_e.scale(i,l,-f*o):_e.scale(i,l,c*o))}else if(n){var f=Math.abs($a[0]-Wa[1]),c=Math.abs(Wa[0]-$a[1]);Math.min(f,c)<n.len()&&(f<c?_e.scale(n,l,f*o):_e.scale(n,l,-c*o))}}return s},t.prototype._getProjMinMaxOnAxis=function(e,r,n){for(var i=this._axes[e],a=this._origin,o=r[0].dot(i)+a[e],s=o,u=o,l=1;l<r.length;l++){var f=r[l].dot(i)+a[e];s=Math.min(f,s),u=Math.max(f,u)}n[0]=s,n[1]=u},t}(),n7=[],i7=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.notClear=!0,r.incremental=!0,r._displayables=[],r._temporaryDisplayables=[],r._cursor=0,r}return e.prototype.traverse=function(r,n){r.call(n,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(r,n){n?this._temporaryDisplayables.push(r):this._displayables.push(r),this.markRedraw()},e.prototype.addDisplayables=function(r,n){n=n||!1;for(var i=0;i<r.length;i++)this.addDisplayable(r[i],n)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(r){for(var n=this._cursor;n<this._displayables.length;n++)r&&r(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)r&&r(this._temporaryDisplayables[n])},e.prototype.update=function(){this.updateTransform();for(var r=this._cursor;r<this._displayables.length;r++){var n=this._displayables[r];n.parent=this,n.update(),n.parent=null}for(var r=0;r<this._temporaryDisplayables.length;r++){var n=this._temporaryDisplayables[r];n.parent=this,n.update(),n.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var r=new Ue(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],a=i.getBoundingRect().clone();i.needLocalTransform()&&a.applyTransform(i.getLocalTransform(n7)),r.union(a)}this._rect=r}return this._rect},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(a.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(r,n))return!0}return!1},e}(Fi),Px=lt();function ts(t,e,r,n,i){var a;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();a=o&&o.animation}var s=e&&e.isAnimationEnabled(),u=t==="update";if(s){var l=void 0,f=void 0,c=void 0;n?(l=Be(n.duration,200),f=Be(n.easing,"cubicOut"),c=0):(l=e.getShallow(u?"animationDurationUpdate":"animationDuration"),f=e.getShallow(u?"animationEasingUpdate":"animationEasing"),c=e.getShallow(u?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(l=a.duration),a.easing!=null&&(f=a.easing),a.delay!=null&&(c=a.delay)),De(c)&&(c=c(r,i)),De(l)&&(l=l(r));var h={duration:l||0,delay:c,easing:f};return h}else return null}function kg(t,e,r,n,i,a,o){var s=!1,u;De(i)?(o=a,a=i,i=null):we(i)&&(a=i.cb,o=i.during,s=i.isFrom,u=i.removeOpt,i=i.dataIndex);var l=t==="leave";l||e.stopAnimation("leave");var f=ts(t,n,i,l?u||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,i):null);if(f&&f.duration>0){var c=f.duration,h=f.delay,d=f.easing,p={duration:c,delay:h||0,easing:d,done:a,force:!!a||!!o,setToFinal:!l,scope:t,during:o};s?e.animateFrom(r,p):e.animateTo(r,p)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function Ft(t,e,r,n,i,a){kg("update",t,e,r,n,i,a)}function qt(t,e,r,n,i,a){kg("enter",t,e,r,n,i,a)}function rs(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++){var r=t.animators[e];if(r.scope==="leave")return!0}return!1}function Sc(t,e,r,n,i,a){rs(t)||kg("leave",t,e,r,n,i,a)}function Bx(t,e,r,n){t.removeTextContent(),t.removeTextGuideLine(),Sc(t,{style:{opacity:0}},e,r,n)}function Ec(t,e,r){function n(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(i){i.isGroup||Bx(i,e,r,n)}):Bx(t,e,r,n)}function zg(t){Px(t).oldStyle=t.style}function a7(t){return Px(t).oldStyle}var Ac=Math.max,Tc=Math.min,jg={};function o7(t){return Ve.extend(t)}var s7=k9;function u7(t,e){return s7(t,e)}function ln(t,e){jg[t]=e}function Mx(t){if(jg.hasOwnProperty(t))return jg[t]}function Vg(t,e,r,n){var i=N9(t,e);return r&&(n==="center"&&(r=Lx(r,i.getBoundingRect())),Ix(i,r)),i}function Fx(t,e,r){var n=new fi({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(i){if(r==="center"){var a={width:i.width,height:i.height};n.setStyle(Lx(e,a))}}});return n}function Lx(t,e){var r=e.width/e.height,n=t.height*r,i;n<=t.width?i=t.height:(n=t.width,i=n/r);var a=t.x+t.width/2,o=t.y+t.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var l7=z9;function Ix(t,e){if(t.applyTransform){var r=t.getBoundingRect(),n=r.calculateTransform(e);t.applyTransform(n)}}function Bu(t,e){return zD(t,t,{lineWidth:e}),t}function f7(t){return jD(t.shape,t.shape,t.style),t}var c7=ja;function h7(t,e){for(var r=wp([]);t&&t!==e;)jo(r,t.getLocalTransform(),r),t=t.parent;return r}function Hg(t,e,r){return e&&!Wt(e)&&(e=pu.getLocalTransform(e)),r&&(e=Tf([],e)),jr([],t,e)}function d7(t,e,r){var n=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),i=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),a=[t==="left"?-n:t==="right"?n:0,t==="top"?-i:t==="bottom"?i:0];return a=Hg(a,e,r),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Rx(t){return!t.isGroup}function v7(t){return t.shape!=null}function Nx(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(u){Rx(u)&&u.anid&&(s[u.anid]=u)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return v7(o)&&(s.shape=oe({},o.shape)),s}var a=n(t);e.traverse(function(o){if(Rx(o)&&o.anid){var s=a[o.anid];if(s){var u=i(o);o.attr(i(s)),Ft(o,u,r,He(o).dataIndex)}}})}function p7(t,e){return ye(t,function(r){var n=r[0];n=Ac(n,e.x),n=Tc(n,e.x+e.width);var i=r[1];return i=Ac(i,e.y),i=Tc(i,e.y+e.height),[n,i]})}function g7(t,e){var r=Ac(t.x,e.x),n=Tc(t.x+t.width,e.x+e.width),i=Ac(t.y,e.y),a=Tc(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function Wg(t,e,r){var n=oe({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(i.image=t.slice(8),je(i,r),new fi(n)):Vg(t.replace("path://",""),n,r,"center")}function m7(t,e,r,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(kx(t,e,r,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function kx(t,e,r,n,i,a,o,s){var u=r-t,l=n-e,f=o-i,c=s-a,h=$g(f,c,u,l);if(y7(h))return!1;var d=t-i,p=e-a,g=$g(d,p,u,l)/h;if(g<0||g>1)return!1;var v=$g(d,p,f,c)/h;return!(v<0||v>1)}function $g(t,e,r,n){return t*n-r*e}function y7(t){return t<=1e-6&&t>=-1e-6}function Oc(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,i=be(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var u=t.formatterParamsExtra;u&&N(Ke(u),function(f){xe(s,f)||(s[f]=u[f],s.$vars.push(f))});var l=He(t.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:n,option:je({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function zx(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function Pc(t,e){if(t)if(he(t))for(var r=0;r<t.length;r++)zx(t[r],e);else zx(t,e)}ln("circle",yc),ln("ellipse",Lg),ln("sector",In),ln("ring",Rg),ln("polygon",Cc),ln("polyline",Pu),ln("rect",St),ln("line",Ni),ln("bezierCurve",Ng),ln("arc",wc);const b7=Object.freeze(Object.defineProperty({__proto__:null,Arc:wc,BezierCurve:Ng,BoundingRect:Ue,Circle:yc,CompoundPath:t7,Ellipse:Lg,Group:It,Image:fi,IncrementalDisplayable:i7,Line:Ni,LinearGradient:Ox,OrientedBoundingRect:xc,Path:Ve,Point:_e,Polygon:Cc,Polyline:Pu,RadialGradient:r7,Rect:St,Ring:Rg,Sector:In,Text:Ot,applyTransform:Hg,clipPointsByRect:p7,clipRectByRect:g7,createIcon:Wg,extendPath:u7,extendShape:o7,getShapeClass:Mx,getTransform:h7,groupTransition:Nx,initProps:qt,isElementRemoved:rs,lineLineIntersect:kx,linePolygonIntersect:m7,makeImage:Fx,makePath:Vg,mergePath:l7,registerShape:ln,removeElement:Sc,removeElementWithFadeOut:Ec,resizePath:Ix,setTooltipConfig:Oc,subPixelOptimize:c7,subPixelOptimizeLine:Bu,subPixelOptimizeRect:f7,transformDirection:d7,traverseElements:Pc,updateProps:Ft},Symbol.toStringTag,{value:"Module"}));var Bc={};function jx(t,e){for(var r=0;r<Gr.length;r++){var n=Gr[r],i=e[n],a=t.ensureState(n);a.style=a.style||{},a.style.text=i}var o=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(o,!0)}function Gg(t,e,r){var n=t.labelFetcher,i=t.labelDataIndex,a=t.labelDimIndex,o=e.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),r!=null?{interpolatedValue:r}:null)),s==null&&(s=De(t.defaultText)?t.defaultText(i,t,r):t.defaultText);for(var u={normal:s},l=0;l<Gr.length;l++){var f=Gr[l],c=e[f];u[f]=Be(n?n.getFormattedLabel(i,f,null,a,c&&c.get("formatter")):null,s)}return u}function Mu(t,e,r,n){r=r||Bc;for(var i=t instanceof Ot,a=!1,o=0;o<lc.length;o++){var s=e[lc[o]];if(s&&s.getShallow("show")){a=!0;break}}var u=i?t:t.getTextContent();if(a){i||(u||(u=new Ot,t.setTextContent(u)),t.stateProxy&&(u.stateProxy=t.stateProxy));var l=Gg(r,e),f=e.normal,c=!!f.getShallow("show"),h=ki(f,n&&n.normal,r,!1,!i);h.text=l.normal,i||t.setTextConfig(Vx(f,r,!1));for(var o=0;o<Gr.length;o++){var d=Gr[o],s=e[d];if(s){var p=u.ensureState(d),g=!!Be(s.getShallow("show"),c);if(g!==c&&(p.ignore=!g),p.style=ki(s,n&&n[d],r,!0,!i),p.style.text=l[d],!i){var v=t.ensureState(d);v.textConfig=Vx(s,r,!0)}}}u.silent=!!f.getShallow("silent"),u.style.x!=null&&(h.x=u.style.x),u.style.y!=null&&(h.y=u.style.y),u.ignore=!c,u.useStyle(h),u.dirty(),r.enableTextSetter&&(ns(u).setLabelText=function(m){var y=Gg(r,e,m);jx(u,y)})}else u&&(u.ignore=!0);t.dirty()}function Fu(t,e){e=e||"label";for(var r={normal:t.getModel(e)},n=0;n<Gr.length;n++){var i=Gr[n];r[i]=t.getModel([i,e])}return r}function ki(t,e,r,n,i){var a={};return C7(a,t,r,n,i),e&&oe(a,e),a}function Vx(t,e,r){e=e||{};var n={},i,a=t.getShallow("rotate"),o=Be(t.getShallow("distance"),r?null:5),s=t.getShallow("offset");return i=t.getShallow("position")||(r?null:"inside"),i==="outside"&&(i=e.defaultOutsidePosition||"top"),i!=null&&(n.position=i),s!=null&&(n.offset=s),a!=null&&(a*=Math.PI/180,n.rotation=a),o!=null&&(n.distance=o),n.outsideFill=t.get("color")==="inherit"?e.inheritColor||null:"auto",n}function C7(t,e,r,n,i){r=r||Bc;var a=e.ecModel,o=a&&a.option.textStyle,s=w7(e),u;if(s){u={};for(var l in s)if(s.hasOwnProperty(l)){var f=e.getModel(["rich",l]);Gx(u[l]={},f,o,r,n,i,!1,!0)}}u&&(t.rich=u);var c=e.get("overflow");c&&(t.overflow=c);var h=e.get("minMargin");h!=null&&(t.margin=h),Gx(t,e,o,r,n,i,!0,!1)}function w7(t){for(var e;t&&t!==t.ecModel;){var r=(t.option||Bc).rich;if(r){e=e||{};for(var n=Ke(r),i=0;i<n.length;i++){var a=n[i];e[a]=1}}t=t.parentModel}return e}var Hx=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Wx=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],$x=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Gx(t,e,r,n,i,a,o,s){r=!i&&r||Bc;var u=n&&n.inheritColor,l=e.getShallow("color"),f=e.getShallow("textBorderColor"),c=Be(e.getShallow("opacity"),r.opacity);(l==="inherit"||l==="auto")&&(process.env.NODE_ENV!=="production"&&l==="auto"&&Mt("color: 'auto'","color: 'inherit'"),u?l=u:l=null),(f==="inherit"||f==="auto")&&(process.env.NODE_ENV!=="production"&&f==="auto"&&Mt("color: 'auto'","color: 'inherit'"),u?f=u:f=null),a||(l=l||r.color,f=f||r.textBorderColor),l!=null&&(t.fill=l),f!=null&&(t.stroke=f);var h=Be(e.getShallow("textBorderWidth"),r.textBorderWidth);h!=null&&(t.lineWidth=h);var d=Be(e.getShallow("textBorderType"),r.textBorderType);d!=null&&(t.lineDash=d);var p=Be(e.getShallow("textBorderDashOffset"),r.textBorderDashOffset);p!=null&&(t.lineDashOffset=p),!i&&c==null&&!s&&(c=n&&n.defaultOpacity),c!=null&&(t.opacity=c),!i&&!a&&t.fill==null&&n.inheritColor&&(t.fill=n.inheritColor);for(var g=0;g<Hx.length;g++){var v=Hx[g],m=Be(e.getShallow(v),r[v]);m!=null&&(t[v]=m)}for(var g=0;g<Wx.length;g++){var v=Wx[g],m=e.getShallow(v);m!=null&&(t[v]=m)}if(t.verticalAlign==null){var y=e.getShallow("baseline");y!=null&&(t.verticalAlign=y)}if(!o||!n.disableBox){for(var g=0;g<$x.length;g++){var v=$x[g],m=e.getShallow(v);m!=null&&(t[v]=m)}var b=e.getShallow("borderType");b!=null&&(t.borderDash=b),(t.backgroundColor==="auto"||t.backgroundColor==="inherit")&&u&&(process.env.NODE_ENV!=="production"&&t.backgroundColor==="auto"&&Mt("backgroundColor: 'auto'","backgroundColor: 'inherit'"),t.backgroundColor=u),(t.borderColor==="auto"||t.borderColor==="inherit")&&u&&(process.env.NODE_ENV!=="production"&&t.borderColor==="auto"&&Mt("borderColor: 'auto'","borderColor: 'inherit'"),t.borderColor=u)}}function _7(t,e){var r=e&&e.getModel("textStyle");return Sn([t.fontStyle||r&&r.getShallow("fontStyle")||"",t.fontWeight||r&&r.getShallow("fontWeight")||"",(t.fontSize||r&&r.getShallow("fontSize")||12)+"px",t.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}var ns=lt();function D7(t,e,r,n){if(t){var i=ns(t);i.prevValue=i.value,i.value=r;var a=e.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=e)}}function x7(t,e,r,n,i){var a=ns(t);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=Be(a.interpolatedValue,a.prevValue),u=a.value;function l(f){var c=wD(r,a.precision,s,u,f);a.interpolatedValue=f===1?null:c;var h=Gg({labelDataIndex:e,labelFetcher:i,defaultText:o?o(c):c+""},a.statesModels,c);jx(t,h)}t.percent=0,(a.prevValue==null?qt:Ft)(t,{percent:1},n,e,null,l)}var S7=["textStyle","color"],Ug=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],qg=new Ot,E7=function(){function t(){}return t.prototype.getTextColor=function(e){var r=this.ecModel;return this.getShallow("color")||(!e&&r?r.get(S7):null)},t.prototype.getFont=function(){return _7({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(e){for(var r={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<Ug.length;n++)r[Ug[n]]=this.getShallow(Ug[n]);return qg.useStyle(r),qg.update(),qg.getBoundingRect()},t}(),Ux=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],A7=wu(Ux),T7=function(){function t(){}return t.prototype.getLineStyle=function(e){return A7(this,e)},t}(),qx=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],O7=wu(qx),P7=function(){function t(){}return t.prototype.getItemStyle=function(e,r){return O7(this,e,r)},t}(),Ct=function(){function t(e,r,n){this.parentModel=r,this.ecModel=n,this.option=e}return t.prototype.init=function(e,r,n){},t.prototype.mergeOption=function(e,r){Qe(this.option,e,!0)},t.prototype.get=function(e,r){return e==null?this.option:this._doGet(this.parsePath(e),!r&&this.parentModel)},t.prototype.getShallow=function(e,r){var n=this.option,i=n==null?n:n[e];if(i==null&&!r){var a=this.parentModel;a&&(i=a.getShallow(e))}return i},t.prototype.getModel=function(e,r){var n=e!=null,i=n?this.parsePath(e):null,a=n?this._doGet(i):this.option;return r=r||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new t(a,r,this.ecModel)},t.prototype.isEmpty=function(){return this.option==null},t.prototype.restoreData=function(){},t.prototype.clone=function(){var e=this.constructor;return new e($e(this.option))},t.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},t.prototype.resolveParentPath=function(e){return e},t.prototype.isAnimationEnabled=function(){if(!Pe.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(e,r){var n=this.option;if(!e)return n;for(var i=0;i<e.length&&!(e[i]&&(n=n&&typeof n=="object"?n[e[i]]:null,n==null));i++);return n==null&&r&&(n=r._doGet(this.resolveParentPath(e),r.parentModel)),n},t}();og(Ct),b6(Ct),xn(Ct,T7),xn(Ct,P7),xn(Ct,x6),xn(Ct,E7);var B7=Math.round(Math.random()*10);function Mc(t){return[t||"",B7++].join("_")}function M7(t){var e={};t.registerSubTypeDefaulter=function(r,n){var i=Pn(r);e[i.main]=n},t.determineSubType=function(r,n){var i=n.type;if(!i){var a=Pn(r).main;t.hasSubTypes(r)&&e[a]&&(i=e[a](n))}return i}}function F7(t,e){t.topologicalTravel=function(a,o,s,u){if(!a.length)return;var l=r(o),f=l.graph,c=l.noEntryList,h={};for(N(a,function(y){h[y]=!0});c.length;){var d=c.pop(),p=f[d],g=!!h[d];g&&(s.call(u,d,p.originalDeps.slice()),delete h[d]),N(p.successor,g?m:v)}N(h,function(){var y="";throw process.env.NODE_ENV!=="production"&&(y=vr("Circular dependency may exists: ",h,a,o)),new Error(y)});function v(y){f[y].entryCount--,f[y].entryCount===0&&c.push(y)}function m(y){h[y]=!0,v(y)}};function r(a){var o={},s=[];return N(a,function(u){var l=n(o,u),f=l.originalDeps=e(u),c=i(f,a);l.entryCount=c.length,l.entryCount===0&&s.push(u),N(c,function(h){Ge(l.predecessor,h)<0&&l.predecessor.push(h);var d=n(o,h);Ge(d.successor,h)<0&&d.successor.push(u)})}),{graph:o,noEntryList:s}}function n(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function i(a,o){var s=[];return N(a,function(u){Ge(o,u)>=0&&s.push(u)}),s}}function Yx(t,e){return Qe(Qe({},t,!0),e,!0)}const L7={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:". "}}}},I7={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 Fc="ZH",Yg="EN",is=Yg,Lc={},Xg={},Xx=Pe.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||is).toUpperCase();return t.indexOf(Fc)>-1?Fc:is}():is;function Kx(t,e){t=t.toUpperCase(),Xg[t]=new Ct(e),Lc[t]=e}function R7(t){if(be(t)){var e=Lc[t.toUpperCase()]||{};return t===Fc||t===Yg?$e(e):Qe($e(e),$e(Lc[is]),!1)}else return Qe($e(t),$e(Lc[is]),!1)}function N7(t){return Xg[t]}function k7(){return Xg[is]}Kx(Yg,L7),Kx(Fc,I7);var Kg=1e3,Zg=Kg*60,Lu=Zg*60,Ur=Lu*24,Zx=Ur*365,Iu={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}"},Ic="{yyyy}-{MM}-{dd}",Jx={year:"{yyyy}",month:"{yyyy}-{MM}",day:Ic,hour:Ic+" "+Iu.hour,minute:Ic+" "+Iu.minute,second:Ic+" "+Iu.second,millisecond:Iu.none},Jg=["year","month","day","hour","minute","second","millisecond"],Qx=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function zi(t,e){return t+="","0000".substr(0,e-t.length)+t}function as(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function z7(t){return t===as(t)}function j7(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Rc(t,e,r,n){var i=oi(t),a=i[Qg(r)](),o=i[os(r)]()+1,s=Math.floor((o-1)/3)+1,u=i[Nc(r)](),l=i["get"+(r?"UTC":"")+"Day"](),f=i[Ru(r)](),c=(f-1)%12+1,h=i[kc(r)](),d=i[zc(r)](),p=i[jc(r)](),g=f>=12?"pm":"am",v=g.toUpperCase(),m=n instanceof Ct?n:N7(n||Xx)||k7(),y=m.getModel("time"),b=y.get("month"),w=y.get("monthAbbr"),C=y.get("dayOfWeek"),_=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,v+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,zi(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,b[o-1]).replace(/{MMM}/g,w[o-1]).replace(/{MM}/g,zi(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,zi(u,2)).replace(/{d}/g,u+"").replace(/{eeee}/g,C[l]).replace(/{ee}/g,_[l]).replace(/{e}/g,l+"").replace(/{HH}/g,zi(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,zi(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,zi(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,zi(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,zi(p,3)).replace(/{S}/g,p+"")}function V7(t,e,r,n,i){var a=null;if(be(r))a=r;else if(De(r))a=r(t.value,e,{level:t.level});else{var o=oe({},Iu);if(t.level>0)for(var s=0;s<Jg.length;++s)o[Jg[s]]="{primary|"+o[Jg[s]]+"}";var u=r?r.inherit===!1?r:je(r,o):o,l=eS(t.value,i);if(u[l])a=u[l];else if(u.inherit){for(var f=Qx.indexOf(l),s=f-1;s>=0;--s)if(u[l]){a=u[l];break}a=a||o.none}if(he(a)){var c=t.level==null?0:t.level>=0?t.level:a.length+t.level;c=Math.min(c,a.length-1),a=a[c]}}return Rc(new Date(t.value),a,i,n)}function eS(t,e){var r=oi(t),n=r[os(e)]()+1,i=r[Nc(e)](),a=r[Ru(e)](),o=r[kc(e)](),s=r[zc(e)](),u=r[jc(e)](),l=u===0,f=l&&s===0,c=f&&o===0,h=c&&a===0,d=h&&i===1,p=d&&n===1;return p?"year":d?"month":h?"day":c?"hour":f?"minute":l?"second":"millisecond"}function tS(t,e,r){var n=nt(t)?oi(t):t;switch(e=e||eS(t,r),e){case"year":return n[Qg(r)]();case"half-year":return n[os(r)]()>=6?1:0;case"quarter":return Math.floor((n[os(r)]()+1)/4);case"month":return n[os(r)]();case"day":return n[Nc(r)]();case"half-day":return n[Ru(r)]()/24;case"hour":return n[Ru(r)]();case"minute":return n[kc(r)]();case"second":return n[zc(r)]();case"millisecond":return n[jc(r)]()}}function Qg(t){return t?"getUTCFullYear":"getFullYear"}function os(t){return t?"getUTCMonth":"getMonth"}function Nc(t){return t?"getUTCDate":"getDate"}function Ru(t){return t?"getUTCHours":"getHours"}function kc(t){return t?"getUTCMinutes":"getMinutes"}function zc(t){return t?"getUTCSeconds":"getSeconds"}function jc(t){return t?"getUTCMilliseconds":"getMilliseconds"}function H7(t){return t?"setUTCFullYear":"setFullYear"}function rS(t){return t?"setUTCMonth":"setMonth"}function nS(t){return t?"setUTCDate":"setDate"}function iS(t){return t?"setUTCHours":"setHours"}function aS(t){return t?"setUTCMinutes":"setMinutes"}function oS(t){return t?"setUTCSeconds":"setSeconds"}function sS(t){return t?"setUTCMilliseconds":"setMilliseconds"}function uS(t){if(!uD(t))return be(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function lS(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Vc=a_;function em(t,e,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(f){return f&&Sn(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=e==="time",s=t instanceof Date;if(o||s){var u=o?oi(t):t;if(isNaN(+u)){if(s)return"-"}else return Rc(u,n,r)}if(e==="ordinal")return Df(t)?i(t):nt(t)&&a(t)?t+"":"-";var l=Mi(t);return a(l)?uS(l):Df(t)?i(t):typeof t=="boolean"?t+"":"-"}var fS=["a","b","c","d","e","f","g"],tm=function(t,e){return"{"+t+(e??"")+"}"};function cS(t,e,r){he(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a<i.length;a++){var o=fS[a];t=t.replace(tm(o),tm(o,0))}for(var s=0;s<n;s++)for(var u=0;u<i.length;u++){var l=e[s][i[u]];t=t.replace(tm(fS[u],s),r?Tr(l):l)}return t}function W7(t,e){var r=be(t)?{color:t,extraCssText:e}:t||{},n=r.color,i=r.type;e=r.extraCssText;var a=r.renderMode||"html";if(!n)return"";if(a==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Tr(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Tr(n)+";"+(e||"")+'"></span>';var o=r.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 Ga(t,e){return e=e||"transparent",be(t)?t:we(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function hS(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var Hc=N,dS=["left","right","top","bottom","width","height"],Wc=[["width","left","right"],["height","top","bottom"]];function rm(t,e,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(u,l){var f=u.getBoundingRect(),c=e.childAt(l+1),h=c&&c.getBoundingRect(),d,p;if(t==="horizontal"){var g=f.width+(h?-h.x+f.x:0);d=a+g,d>n||u.newline?(a=0,d=g,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(h?-h.y+f.y:0);p=o+v,p>i||u.newline?(a+=s+r,o=0,p=v,s=f.width):s=Math.max(s,f.width)}u.newline||(u.x=a,u.y=o,u.markRedraw(),t==="horizontal"?a=d+r:o=p+r)})}var Nu=rm;Dt(rm,"vertical"),Dt(rm,"horizontal");function Ua(t,e,r){r=Vc(r||0);var n=e.width,i=e.height,a=ut(t.left,n),o=ut(t.top,i),s=ut(t.right,n),u=ut(t.bottom,i),l=ut(t.width,n),f=ut(t.height,i),c=r[2]+r[0],h=r[1]+r[3],d=t.aspect;switch(isNaN(l)&&(l=n-s-h-a),isNaN(f)&&(f=i-u-c-o),d!=null&&(isNaN(l)&&isNaN(f)&&(d>n/i?l=n*.8:f=i*.8),isNaN(l)&&(l=d*f),isNaN(f)&&(f=l/d)),isNaN(a)&&(a=n-s-l-h),isNaN(o)&&(o=i-u-f-c),t.left||t.right){case"center":a=n/2-l/2-r[3];break;case"right":a=n-l-h;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-f/2-r[0];break;case"bottom":o=i-f-c;break}a=a||0,o=o||0,isNaN(l)&&(l=n-h-a-(s||0)),isNaN(f)&&(f=i-c-o-(u||0));var p=new Ue(a+r[3],o+r[0],l,f);return p.margin=r,p}function $7(t,e,r,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],u=i&&i.boundingMode||"all";if(a=a||t,a.x=t.x,a.y=t.y,!o&&!s)return!1;var l;if(u==="raw")l=t.type==="group"?new Ue(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var f=t.getLocalTransform();l=l.clone(),l.applyTransform(f)}var c=Ua(je({width:l.width,height:l.height},e),r,n),h=o?c.x-l.x:0,d=s?c.y-l.y:0;return u==="raw"?(a.x=h,a.y=d):(a.x+=h,a.y+=d),a===t&&t.markRedraw(),!0}function ku(t){var e=t.layoutMode||t.constructor.layoutMode;return we(e)?e:e?{type:e}:null}function qa(t,e,r){var n=r&&r.ignoreSize;!he(n)&&(n=[n,n]);var i=o(Wc[0],0),a=o(Wc[1],1);l(Wc[0],t,i),l(Wc[1],t,a);function o(f,c){var h={},d=0,p={},g=0,v=2;if(Hc(f,function(b){p[b]=t[b]}),Hc(f,function(b){s(e,b)&&(h[b]=p[b]=e[b]),u(h,b)&&d++,u(p,b)&&g++}),n[c])return u(e,f[1])?p[f[2]]=null:u(e,f[2])&&(p[f[1]]=null),p;if(g===v||!d)return p;if(d>=v)return h;for(var m=0;m<f.length;m++){var y=f[m];if(!s(h,y)&&s(t,y)){h[y]=t[y];break}}return h}function s(f,c){return f.hasOwnProperty(c)}function u(f,c){return f[c]!=null&&f[c]!=="auto"}function l(f,c,h){Hc(f,function(d){c[d]=h[d]})}}function $c(t){return vS({},t)}function vS(t,e){return e&&t&&Hc(dS,function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var G7=lt(),Ze=function(t){ce(e,t);function e(r,n,i){var a=t.call(this,r,n,i)||this;return a.uid=Mc("ec_cpt_model"),a}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=ku(this),a=i?$c(r):{},o=n.getTheme();Qe(r,o.get(this.mainType)),Qe(r,this.getDefaultOption()),i&&qa(r,a,i)},e.prototype.mergeOption=function(r,n){Qe(this.option,r,!0);var i=ku(this);i&&qa(this.option,r,i)},e.prototype.optionUpdated=function(r,n){},e.prototype.getDefaultOption=function(){var r=this.constructor;if(!g6(r))return r.defaultOption;var n=G7(this);if(!n.defaultOption){for(var i=[],a=r;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},u=i.length-1;u>=0;u--)s=Qe(s,i[u],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return Cu(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){var r=this;return{left:r.get("left"),top:r.get("top"),right:r.get("right"),bottom:r.get("bottom"),width:r.get("width"),height:r.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(Ct);DD(Ze,Ct),ec(Ze),M7(Ze),F7(Ze,U7);function U7(t){var e=[];return N(Ze.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=ye(e,function(r){return Pn(r).main}),t!=="dataset"&&Ge(e,"dataset")<=0&&e.unshift("dataset"),e}var pS="";typeof navigator<"u"&&(pS=navigator.platform||"");var ss="rgba(0, 0, 0, 0.2)";const q7={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:ss,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ss,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ss,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ss,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ss,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ss,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:pS.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var nm=Ae(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),qr="original",ir="arrayRows",Yr="objectRows",Rn="keyedColumns",hi="typedArray",gS="unknown",Nn="column",us="row",jt={Must:1,Might:2,Not:3},mS=lt();function Y7(t){mS(t).datasetMap=Ae()}function X7(t,e,r){var n={},i=im(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,u=mS(s).datasetMap,l=i.uid+"_"+r.seriesLayoutBy,f,c;t=t.slice(),N(t,function(g,v){var m=we(g)?g:t[v]={name:g};m.type==="ordinal"&&f==null&&(f=v,c=p(m)),n[m.name]=[]});var h=u.get(l)||u.set(l,{categoryWayDim:c,valueWayDim:0});N(t,function(g,v){var m=g.name,y=p(g);if(f==null){var b=h.valueWayDim;d(n[m],b,y),d(o,b,y),h.valueWayDim+=y}else if(f===v)d(n[m],0,y),d(a,0,y);else{var b=h.categoryWayDim;d(n[m],b,y),d(o,b,y),h.categoryWayDim+=y}});function d(g,v,m){for(var y=0;y<m;y++)g.push(v+y)}function p(g){var v=g.dimsDef;return v?v.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function K7(t,e,r){var n={},i=im(t);if(!i)return n;var a=e.sourceFormat,o=e.dimensionsDefine,s;(a===Yr||a===Rn)&&N(o,function(f,c){(we(f)?f.name:f)==="name"&&(s=c)});var u=function(){for(var f={},c={},h=[],d=0,p=Math.min(5,r);d<p;d++){var g=bS(e.data,a,e.seriesLayoutBy,o,e.startIndex,d);h.push(g);var v=g===jt.Not;if(v&&f.v==null&&d!==s&&(f.v=d),(f.n==null||f.n===f.v||!v&&h[f.n]===jt.Not)&&(f.n=d),m(f)&&h[f.n]!==jt.Not)return f;v||(g===jt.Might&&c.v==null&&d!==s&&(c.v=d),(c.n==null||c.n===c.v)&&(c.n=d))}function m(y){return y.v!=null&&y.n!=null}return m(f)?f:m(c)?c:null}();if(u){n.value=[u.v];var l=s??u.n;n.itemName=[l],n.seriesName=[l]}return n}function im(t){var e=t.get("data",!0);if(!e)return Cu(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},sn).models[0]}function Z7(t){return!t.get("transform",!0)&&!t.get("fromTransformResult",!0)?[]:Cu(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},sn).models}function yS(t,e){return bS(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function bS(t,e,r,n,i,a){var o,s=5;if(rr(t))return jt.Not;var u,l;if(n){var f=n[a];we(f)?(u=f.name,l=f.type):be(f)&&(u=f)}if(l!=null)return l==="ordinal"?jt.Must:jt.Not;if(e===ir){var c=t;if(r===us){for(var h=c[a],d=0;d<(h||[]).length&&d<s;d++)if((o=w(h[i+d]))!=null)return o}else for(var d=0;d<c.length&&d<s;d++){var p=c[i+d];if(p&&(o=w(p[a]))!=null)return o}}else if(e===Yr){var g=t;if(!u)return jt.Not;for(var d=0;d<g.length&&d<s;d++){var v=g[d];if(v&&(o=w(v[u]))!=null)return o}}else if(e===Rn){var m=t;if(!u)return jt.Not;var h=m[u];if(!h||rr(h))return jt.Not;for(var d=0;d<h.length&&d<s;d++)if((o=w(h[d]))!=null)return o}else if(e===qr)for(var y=t,d=0;d<y.length&&d<s;d++){var v=y[d],b=yu(v);if(!he(b))return jt.Not;if((o=w(b[a]))!=null)return o}function w(C){var _=be(C);if(C!=null&&Number.isFinite(Number(C))&&C!=="")return _?jt.Might:jt.Not;if(_&&C!=="-")return jt.Must}return jt.Not}var J7=Ae();function Q7(t,e,r){var n=J7.get(e);if(!n)return r;var i=n(t);if(!i)return r;if(process.env.NODE_ENV!=="production")for(var a=0;a<i.length;a++)Ee(Yo(i[a]));return r.concat(i)}var CS=lt();lt();var am=function(){function t(){}return t.prototype.getColorFromPalette=function(e,r,n){var i=gt(this.get("color",!0)),a=this.get("colorLayer",!0);return tz(this,CS,i,a,e,r,n)},t.prototype.clearColorPalette=function(){rz(this,CS)},t}();function ez(t,e){for(var r=t.length,n=0;n<r;n++)if(t[n].length>e)return t[n];return t[r-1]}function tz(t,e,r,n,i,a,o){a=a||t;var s=e(a),u=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var f=o==null||!n?r:ez(n,o);if(f=f||r,!(!f||!f.length)){var c=f[u];return i&&(l[i]=c),s.paletteIdx=(u+1)%f.length,c}}function rz(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var Gc,zu,wS,om="\0_ec_inner",_S=1,nz={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},iz={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},Uc={};function az(t){N(t,function(e,r){if(!Ze.hasClass(r)){var n=nz[r];n&&!Uc[n]&&(Gt("Component "+r+` is used but not imported.
154
+ `){u&&(s+=u,f+=l),a.push(s),o.push(f),s="",u="",l=0,f=0;continue}var d=Pr(h,e),p=n?!1:!L6(h);if(a.length?f+d>r:i+f+d>r){f?(s||u)&&(p?(s||(s=u,u="",l=0,f=l),a.push(s),o.push(f-l),u+=h,l+=d,s="",f=l):(u&&(s+=u,u="",l=0),a.push(s),o.push(f),s=h,f=d)):p?(a.push(u),o.push(l),u=h,l=d):(a.push(h),o.push(d));continue}f+=d,p?(u+=h,l+=d):(u&&(s+=u,u="",l=0),s+=h)}return!a.length&&!s&&(s=t,u="",l=0),u&&(s+=u),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}var fg="__zr_style_"+Math.round(Math.random()*10),Ma={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},rc={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ma[fg]=!0;var PD=["z","z2","invisible"],I6=["invisible"],Fi=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=Ke(r),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(r[a]):t.prototype.attrKV.call(this,a,r[a])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(r,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&R6(this,r,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var u=this.parent;u;){if(u.ignore)return!1;u=u.parent}return!0},e.prototype.contain=function(r,n){return this.rectContain(r,n)},e.prototype.traverse=function(r,n){r.call(n,this)},e.prototype.rectContain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},e.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,u=a.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new Ue(0,0,0,0)),n?Ue.applyTransform(r,i,n):r.copy(i),(o||s||u)&&(r.width+=o*2+Math.abs(s),r.height+=o*2+Math.abs(u),r.x=Math.min(r.x,r.x+s-o),r.y=Math.min(r.y,r.y+u-o));var l=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-l),r.y=Math.floor(r.y-l),r.width=Math.ceil(r.width+1+l*2),r.height=Math.ceil(r.height+1+l*2))}return r},e.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new Ue(0,0,0,0),this._prevPaintRect.copy(r)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(r){return this.animate("style",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(r,n){r!=="style"?t.prototype.attrKV.call(this,r,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(r,n){return typeof r=="string"?this.style[r]=n:oe(this.style,r),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=uu,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&uu)},e.prototype.styleUpdated=function(){this.__dirty&=~uu},e.prototype.createStyle=function(r){return Ef(Ma,r)},e.prototype.useStyle=function(r){r[fg]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},e.prototype.isStyleObject=function(r){return r[fg]},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(r,n,PD)},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var u=!(n&&a),l;if(n&&n.style?o?a?l=n.style:(l=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(l,n.style)):u&&(l=i.style),l)if(o){var f=this.style;if(this.style=this.createStyle(u?{}:f),u)for(var c=Ke(f),h=0;h<c.length;h++){var d=c[h];d in l&&(l[d]=l[d],this.style[d]=f[d])}for(var p=Ke(l),h=0;h<p.length;h++){var d=p[h];this.style[d]=this.style[d]}this._transitionState(r,{style:l},s,this.getAnimationStyleProps())}else this.useStyle(l);for(var g=this.__inHover?I6:PD,h=0;h<g.length;h++){var d=g[h];n&&n[d]!=null?this[d]=n[d]:u&&i[d]!=null&&(this[d]=i[d])}},e.prototype._mergeStates=function(r){for(var n=t.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},e.prototype._mergeStyle=function(r,n){return oe(r,n),r},e.prototype.getAnimationStyleProps=function(){return rc},e.initDefaultProps=function(){var r=e.prototype;r.type="displayable",r.invisible=!1,r.z=0,r.z2=0,r.zlevel=0,r.culling=!1,r.cursor="pointer",r.rectHover=!1,r.incremental=!1,r._rect=null,r.dirtyRectTolerance=0,r.__dirty=Or|uu}(),e}(Kf),cg=new Ue(0,0,0,0),hg=new Ue(0,0,0,0);function R6(t,e,r){return cg.copy(t.getBoundingRect()),t.transform&&cg.applyTransform(t.transform),hg.width=e,hg.height=r,!cg.intersect(hg)}var gr=Math.min,mr=Math.max,dg=Math.sin,vg=Math.cos,Fa=Math.PI*2,nc=Lo(),ic=Lo(),ac=Lo();function BD(t,e,r){if(t.length!==0){for(var n=t[0],i=n[0],a=n[0],o=n[1],s=n[1],u=1;u<t.length;u++)n=t[u],i=gr(i,n[0]),a=mr(a,n[0]),o=gr(o,n[1]),s=mr(s,n[1]);e[0]=i,e[1]=o,r[0]=a,r[1]=s}}function MD(t,e,r,n,i,a){i[0]=gr(t,r),i[1]=gr(e,n),a[0]=mr(t,r),a[1]=mr(e,n)}var FD=[],LD=[];function N6(t,e,r,n,i,a,o,s,u,l){var f=O_,c=Bt,h=f(t,r,i,o,FD);u[0]=1/0,u[1]=1/0,l[0]=-1/0,l[1]=-1/0;for(var d=0;d<h;d++){var p=c(t,r,i,o,FD[d]);u[0]=gr(p,u[0]),l[0]=mr(p,l[0])}h=f(e,n,a,s,LD);for(var d=0;d<h;d++){var g=c(e,n,a,s,LD[d]);u[1]=gr(g,u[1]),l[1]=mr(g,l[1])}u[0]=gr(t,u[0]),l[0]=mr(t,l[0]),u[0]=gr(o,u[0]),l[0]=mr(o,l[0]),u[1]=gr(e,u[1]),l[1]=mr(e,l[1]),u[1]=gr(s,u[1]),l[1]=mr(s,l[1])}function k6(t,e,r,n,i,a,o,s){var u=M_,l=$t,f=mr(gr(u(t,r,i),1),0),c=mr(gr(u(e,n,a),1),0),h=l(t,r,i,f),d=l(e,n,a,c);o[0]=gr(t,i,h),o[1]=gr(e,a,d),s[0]=mr(t,i,h),s[1]=mr(e,a,d)}function z6(t,e,r,n,i,a,o,s,u){var l=Ro,f=No,c=Math.abs(i-a);if(c%Fa<1e-4&&c>1e-4){s[0]=t-r,s[1]=e-n,u[0]=t+r,u[1]=e+n;return}if(nc[0]=vg(i)*r+t,nc[1]=dg(i)*n+e,ic[0]=vg(a)*r+t,ic[1]=dg(a)*n+e,l(s,nc,ic),f(u,nc,ic),i=i%Fa,i<0&&(i=i+Fa),a=a%Fa,a<0&&(a=a+Fa),i>a&&!o?a+=Fa:i<a&&o&&(i+=Fa),o){var h=a;a=i,i=h}for(var d=0;d<a;d+=Math.PI/2)d>i&&(ac[0]=vg(d)*r+t,ac[1]=dg(d)*n+e,l(s,ac,s),f(u,ac,u))}var it={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},La=[],Ia=[],Bn=[],Li=[],Mn=[],Fn=[],pg=Math.min,gg=Math.max,Ra=Math.cos,Na=Math.sin,si=Math.abs,mg=Math.PI,Ii=mg*2,yg=typeof Float32Array<"u",_u=[];function bg(t){var e=Math.round(t/mg*1e8)/1e8;return e%2*mg}function ID(t,e){var r=bg(t[0]);r<0&&(r+=Ii);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=Ii?i=r+Ii:e&&r-i>=Ii?i=r-Ii:!e&&r>i?i=r+(Ii-bg(r-i)):e&&r<i&&(i=r-(Ii-bg(i-r))),t[0]=r,t[1]=i}var ui=function(){function t(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(e,r,n){n=n||0,n>0&&(this._ux=si(n/Yf/e)||0,this._uy=si(n/Yf/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(it.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=si(e-this._xi),i=si(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(it.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){return this._drawPendingPt(),this.addData(it.C,e,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,i,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,i){return this._drawPendingPt(),this.addData(it.Q,e,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,r,n,i,a,o){this._drawPendingPt(),_u[0]=i,_u[1]=a,ID(_u,o),i=_u[0],a=_u[1];var s=a-i;return this.addData(it.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=Ra(a)*n+e,this._yi=Na(a)*n+r,this},t.prototype.arcTo=function(e,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,i,a),this},t.prototype.rect=function(e,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,i),this.addData(it.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(it.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){var r=e.length;!(this.data&&this.data.length===r)&&yg&&(this.data=new Float32Array(r));for(var n=0;n<r;n++)this.data[n]=e[n];this._len=r},t.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var r=e.length,n=0,i=this._len,a=0;a<r;a++)n+=e[a].len();yg&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var a=0;a<r;a++)for(var o=e[a].data,s=0;s<o.length;s++)this.data[i++]=o[s];this._len=i},t.prototype.addData=function(e,r,n,i,a,o,s,u,l){if(this._saveData){var f=this.data;this._len+arguments.length>f.length&&(this._expandData(),f=this.data);for(var c=0;c<arguments.length;c++)f[this._len++]=arguments[c]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r<this._len;r++)e[r]=this.data[r];this.data=e}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,yg&&this._len>11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){Bn[0]=Bn[1]=Mn[0]=Mn[1]=Number.MAX_VALUE,Li[0]=Li[1]=Fn[0]=Fn[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=e[o++],u=o===1;switch(u&&(r=e[o],n=e[o+1],i=r,a=n),s){case it.M:r=i=e[o++],n=a=e[o++],Mn[0]=i,Mn[1]=a,Fn[0]=i,Fn[1]=a;break;case it.L:MD(r,n,e[o],e[o+1],Mn,Fn),r=e[o++],n=e[o++];break;case it.C:N6(r,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],Mn,Fn),r=e[o++],n=e[o++];break;case it.Q:k6(r,n,e[o++],e[o++],e[o],e[o+1],Mn,Fn),r=e[o++],n=e[o++];break;case it.A:var l=e[o++],f=e[o++],c=e[o++],h=e[o++],d=e[o++],p=e[o++]+d;o+=1;var g=!e[o++];u&&(i=Ra(d)*c+l,a=Na(d)*h+f),z6(l,f,c,h,d,p,g,Mn,Fn),r=Ra(p)*c+l,n=Na(p)*h+f;break;case it.R:i=r=e[o++],a=n=e[o++];var v=e[o++],m=e[o++];MD(i,a,i+v,a+m,Mn,Fn);break;case it.Z:r=i,n=a;break}Ro(Bn,Bn,Mn),No(Li,Li,Fn)}return o===0&&(Bn[0]=Bn[1]=Li[0]=Li[1]=0),new Ue(Bn[0],Bn[1],Li[0]-Bn[0],Li[1]-Bn[1])},t.prototype._calculateLength=function(){var e=this.data,r=this._len,n=this._ux,i=this._uy,a=0,o=0,s=0,u=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,f=0,c=0,h=0;h<r;){var d=e[h++],p=h===1;p&&(a=e[h],o=e[h+1],s=a,u=o);var g=-1;switch(d){case it.M:a=s=e[h++],o=u=e[h++];break;case it.L:{var v=e[h++],m=e[h++],y=v-a,b=m-o;(si(y)>n||si(b)>i||h===r-1)&&(g=Math.sqrt(y*y+b*b),a=v,o=m);break}case it.C:{var w=e[h++],C=e[h++],v=e[h++],m=e[h++],_=e[h++],D=e[h++];g=hk(a,o,w,C,v,m,_,D,10),a=_,o=D;break}case it.Q:{var w=e[h++],C=e[h++],v=e[h++],m=e[h++];g=vk(a,o,w,C,v,m,10),a=v,o=m;break}case it.A:var x=e[h++],S=e[h++],O=e[h++],E=e[h++],P=e[h++],F=e[h++],B=F+P;h+=1,p&&(s=Ra(P)*O+x,u=Na(P)*E+S),g=gg(O,E)*pg(Ii,Math.abs(F)),a=Ra(B)*O+x,o=Na(B)*E+S;break;case it.R:{s=a=e[h++],u=o=e[h++];var M=e[h++],I=e[h++];g=M*2+I*2;break}case it.Z:{var y=s-a,b=u-o;g=Math.sqrt(y*y+b*b),a=s,o=u;break}}g>=0&&(l[c++]=g,f+=g)}return this._pathLen=f,f},t.prototype.rebuildPath=function(e,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,u,l,f,c,h,d=r<1,p,g,v=0,m=0,y,b=0,w,C;if(!(d&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,y=r*g,!y)))e:for(var _=0;_<o;){var D=n[_++],x=_===1;switch(x&&(l=n[_],f=n[_+1],s=l,u=f),D!==it.L&&b>0&&(e.lineTo(w,C),b=0),D){case it.M:s=l=n[_++],u=f=n[_++],e.moveTo(l,f);break;case it.L:{c=n[_++],h=n[_++];var S=si(c-l),O=si(h-f);if(S>i||O>a){if(d){var E=p[m++];if(v+E>y){var P=(y-v)/E;e.lineTo(l*(1-P)+c*P,f*(1-P)+h*P);break e}v+=E}e.lineTo(c,h),l=c,f=h,b=0}else{var F=S*S+O*O;F>b&&(w=c,C=h,b=F)}break}case it.C:{var B=n[_++],M=n[_++],I=n[_++],j=n[_++],z=n[_++],W=n[_++];if(d){var E=p[m++];if(v+E>y){var P=(y-v)/E;Oi(l,B,I,z,P,La),Oi(f,M,j,W,P,Ia),e.bezierCurveTo(La[1],Ia[1],La[2],Ia[2],La[3],Ia[3]);break e}v+=E}e.bezierCurveTo(B,M,I,j,z,W),l=z,f=W;break}case it.Q:{var B=n[_++],M=n[_++],I=n[_++],j=n[_++];if(d){var E=p[m++];if(v+E>y){var P=(y-v)/E;Nf(l,B,I,P,La),Nf(f,M,j,P,Ia),e.quadraticCurveTo(La[1],Ia[1],La[2],Ia[2]);break e}v+=E}e.quadraticCurveTo(B,M,I,j),l=I,f=j;break}case it.A:var R=n[_++],U=n[_++],Z=n[_++],ee=n[_++],ne=n[_++],q=n[_++],L=n[_++],X=!n[_++],V=Z>ee?Z:ee,G=si(Z-ee)>.001,J=ne+q,K=!1;if(d){var E=p[m++];v+E>y&&(J=ne+q*(y-v)/E,K=!0),v+=E}if(G&&e.ellipse?e.ellipse(R,U,Z,ee,L,ne,J,X):e.arc(R,U,V,ne,J,X),K)break e;x&&(s=Ra(ne)*Z+R,u=Na(ne)*ee+U),l=Ra(J)*Z+R,f=Na(J)*ee+U;break;case it.R:s=l=n[_],u=f=n[_+1],c=n[_++],h=n[_++];var Y=n[_++],fe=n[_++];if(d){var E=p[m++];if(v+E>y){var ue=y-v;e.moveTo(c,h),e.lineTo(c+pg(ue,Y),h),ue-=Y,ue>0&&e.lineTo(c+Y,h+pg(ue,fe)),ue-=fe,ue>0&&e.lineTo(c+gg(Y-ue,0),h+fe),ue-=Y,ue>0&&e.lineTo(c,h+gg(fe-ue,0));break e}v+=E}e.rect(c,h,Y,fe);break;case it.Z:if(d){var E=p[m++];if(v+E>y){var P=(y-v)/E;e.lineTo(l*(1-P)+s*P,f*(1-P)+u*P);break e}v+=E}e.closePath(),l=s,f=u}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.CMD=it,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function Xo(t,e,r,n,i,a,o){if(i===0)return!1;var s=i,u=0,l=t;if(o>e+s&&o>n+s||o<e-s&&o<n-s||a>t+s&&a>r+s||a<t-s&&a<r-s)return!1;if(t!==r)u=(e-n)/(t-r),l=(t*n-r*e)/(t-r);else return Math.abs(a-t)<=s/2;var f=u*a-o+l,c=f*f/(u*u+1);return c<=s/2*s/2}function j6(t,e,r,n,i,a,o,s,u,l,f){if(u===0)return!1;var c=u;if(f>e+c&&f>n+c&&f>a+c&&f>s+c||f<e-c&&f<n-c&&f<a-c&&f<s-c||l>t+c&&l>r+c&&l>i+c&&l>o+c||l<t-c&&l<r-c&&l<i-c&&l<o-c)return!1;var h=P_(t,e,r,n,i,a,o,s,l,f,null);return h<=c/2}function V6(t,e,r,n,i,a,o,s,u){if(o===0)return!1;var l=o;if(u>e+l&&u>n+l&&u>a+l||u<e-l&&u<n-l&&u<a-l||s>t+l&&s>r+l&&s>i+l||s<t-l&&s<r-l&&s<i-l)return!1;var f=F_(t,e,r,n,i,a,s,u,null);return f<=l/2}var RD=Math.PI*2;function li(t){return t%=RD,t<0&&(t+=RD),t}var Du=Math.PI*2;function H6(t,e,r,n,i,a,o,s,u){if(o===0)return!1;var l=o;s-=t,u-=e;var f=Math.sqrt(s*s+u*u);if(f-l>r||f+l<r)return!1;if(Math.abs(n-i)%Du<1e-4)return!0;if(a){var c=n;n=li(i),i=li(c)}else n=li(n),i=li(i);n>i&&(i+=Du);var h=Math.atan2(u,s);return h<0&&(h+=Du),h>=n&&h<=i||h+Du>=n&&h+Du<=i}function ka(t,e,r,n,i,a){if(a>e&&a>n||a<e&&a<n||n===e)return 0;var o=(a-e)/(n-e),s=n<e?1:-1;(o===1||o===0)&&(s=n<e?.5:-.5);var u=o*(r-t)+t;return u===i?1/0:u>i?s:0}var Ri=ui.CMD,za=Math.PI*2,W6=1e-4;function $6(t,e){return Math.abs(t-e)<W6}var nr=[-1,-1,-1],$r=[-1,-1];function G6(){var t=$r[0];$r[0]=$r[1],$r[1]=t}function U6(t,e,r,n,i,a,o,s,u,l){if(l>e&&l>n&&l>a&&l>s||l<e&&l<n&&l<a&&l<s)return 0;var f=Rf(e,n,a,s,l,nr);if(f===0)return 0;for(var c=0,h=-1,d=void 0,p=void 0,g=0;g<f;g++){var v=nr[g],m=v===0||v===1?.5:1,y=Bt(t,r,i,o,v);y<u||(h<0&&(h=O_(e,n,a,s,$r),$r[1]<$r[0]&&h>1&&G6(),d=Bt(e,n,a,s,$r[0]),h>1&&(p=Bt(e,n,a,s,$r[1]))),h===2?v<$r[0]?c+=d<e?m:-m:v<$r[1]?c+=p<d?m:-m:c+=s<p?m:-m:v<$r[0]?c+=d<e?m:-m:c+=s<d?m:-m)}return c}function q6(t,e,r,n,i,a,o,s){if(s>e&&s>n&&s>a||s<e&&s<n&&s<a)return 0;var u=dk(e,n,a,s,nr);if(u===0)return 0;var l=M_(e,n,a);if(l>=0&&l<=1){for(var f=0,c=$t(e,n,a,l),h=0;h<u;h++){var d=nr[h]===0||nr[h]===1?.5:1,p=$t(t,r,i,nr[h]);p<o||(nr[h]<l?f+=c<e?d:-d:f+=a<c?d:-d)}return f}else{var d=nr[0]===0||nr[0]===1?.5:1,p=$t(t,r,i,nr[0]);return p<o?0:a<e?d:-d}}function Y6(t,e,r,n,i,a,o,s){if(s-=e,s>r||s<-r)return 0;var u=Math.sqrt(r*r-s*s);nr[0]=-u,nr[1]=u;var l=Math.abs(n-i);if(l<1e-4)return 0;if(l>=za-1e-4){n=0,i=za;var f=a?1:-1;return o>=nr[0]+t&&o<=nr[1]+t?f:0}if(n>i){var c=n;n=i,i=c}n<0&&(n+=za,i+=za);for(var h=0,d=0;d<2;d++){var p=nr[d];if(p+t>o){var g=Math.atan2(s,p),f=a?1:-1;g<0&&(g=za+g),(g>=n&&g<=i||g+za>=n&&g+za<=i)&&(g>Math.PI/2&&g<Math.PI*1.5&&(f=-f),h+=f)}}return h}function ND(t,e,r,n,i){for(var a=t.data,o=t.len(),s=0,u=0,l=0,f=0,c=0,h,d,p=0;p<o;){var g=a[p++],v=p===1;switch(g===Ri.M&&p>1&&(r||(s+=ka(u,l,f,c,n,i))),v&&(u=a[p],l=a[p+1],f=u,c=l),g){case Ri.M:f=a[p++],c=a[p++],u=f,l=c;break;case Ri.L:if(r){if(Xo(u,l,a[p],a[p+1],e,n,i))return!0}else s+=ka(u,l,a[p],a[p+1],n,i)||0;u=a[p++],l=a[p++];break;case Ri.C:if(r){if(j6(u,l,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=U6(u,l,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],n,i)||0;u=a[p++],l=a[p++];break;case Ri.Q:if(r){if(V6(u,l,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=q6(u,l,a[p++],a[p++],a[p],a[p+1],n,i)||0;u=a[p++],l=a[p++];break;case Ri.A:var m=a[p++],y=a[p++],b=a[p++],w=a[p++],C=a[p++],_=a[p++];p+=1;var D=!!(1-a[p++]);h=Math.cos(C)*b+m,d=Math.sin(C)*w+y,v?(f=h,c=d):s+=ka(u,l,h,d,n,i);var x=(n-m)*w/b+m;if(r){if(H6(m,y,w,C,C+_,D,e,x,i))return!0}else s+=Y6(m,y,w,C,C+_,D,x,i);u=Math.cos(C+_)*b+m,l=Math.sin(C+_)*w+y;break;case Ri.R:f=u=a[p++],c=l=a[p++];var S=a[p++],O=a[p++];if(h=f+S,d=c+O,r){if(Xo(f,c,h,c,e,n,i)||Xo(h,c,h,d,e,n,i)||Xo(h,d,f,d,e,n,i)||Xo(f,d,f,c,e,n,i))return!0}else s+=ka(h,c,h,d,n,i),s+=ka(f,d,f,c,n,i);break;case Ri.Z:if(r){if(Xo(u,l,f,c,e,n,i))return!0}else s+=ka(u,l,f,c,n,i);u=f,l=c;break}}return!r&&!$6(l,c)&&(s+=ka(u,l,f,c,n,i)||0),s!==0}function X6(t,e,r){return ND(t,0,!1,e,r)}function K6(t,e,r,n){return ND(t,e,!0,r,n)}var kD=je({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ma),Z6={style:je({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},rc.style)},Cg=Tn.concat(["invisible","culling","z","z2","zlevel","parent"]),Ve=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(u){r.buildPath(u,r.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<Cg.length;++s)i[Cg[s]]=this[Cg[s]];i.__dirty|=Or}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(r){var n=Ke(r);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a<n.length;a++){var o=n[a],s=r[o];o==="style"?this.style?oe(this.style,s):this.useStyle(s):o==="shape"?oe(this.shape,s):t.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var r=this.style.fill;if(r!=="none"){if(be(r)){var n=Vf(r,0);return n>.5?$p:n>.2?Lk:Gp}else if(r)return Gp}return $p},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(be(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Vf(r,0)<Wp;if(a===o)return n}},e.prototype.buildPath=function(r,n,i){},e.prototype.pathUpdated=function(){this.__dirty&=~Vo},e.prototype.getUpdatedPathProxy=function(r){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,r),this.path},e.prototype.createPathProxy=function(){this.path=new ui(!1)},e.prototype.hasStroke=function(){var r=this.style,n=r.stroke;return!(n==null||n==="none"||!(r.lineWidth>0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Vo)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var u=n.strokeNoScale?this.getLineScale():1,l=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;l=Math.max(l,f??4)}u>1e-10&&(s.width+=l/u,s.height+=l/u,s.x-=l/u/2,s.y-=l/u/2)}return s}return r},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,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)),K6(s,u/l,r,n)))return!0}if(this.hasFill())return X6(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Vo,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:oe(i,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Vo)},e.prototype.createStyle=function(r){return Ef(kD,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=oe({},this.shape))},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var u=!(n&&a),l;if(n&&n.shape?o?a?l=n.shape:(l=oe({},i.shape),oe(l,n.shape)):(l=oe({},a?this.shape:i.shape),oe(l,n.shape)):u&&(l=i.shape),l)if(o){this.shape=oe({},this.shape);for(var f={},c=Ke(l),h=0;h<c.length;h++){var d=c[h];typeof l[d]=="object"?this.shape[d]=l[d]:f[d]=l[d]}this._transitionState(r,{shape:f},s)}else this.shape=l,this.dirtyShape()},e.prototype._mergeStates=function(r){for(var n=t.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},e.prototype.getAnimationStyleProps=function(){return Z6},e.prototype.isZeroArea=function(){return!1},e.extend=function(r){var n=function(a){ce(o,a);function o(s){var u=a.call(this,s)||this;return r.init&&r.init.call(u,s),u}return o.prototype.getDefaultStyle=function(){return $e(r.style)},o.prototype.getDefaultShape=function(){return $e(r.shape)},o}(e);for(var i in r)typeof r[i]=="function"&&(n.prototype[i]=r[i]);return n},e.initDefaultProps=function(){var r=e.prototype;r.type="path",r.strokeContainThreshold=5,r.segmentIgnoreThreshold=0,r.subPixelOptimize=!1,r.autoBatch=!1,r.__dirty=Or|uu|Vo}(),e}(Fi),J6=je({strokeFirst:!0,font:Ca,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},kD),oc=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.hasStroke=function(){var r=this.style,n=r.stroke;return n!=null&&n!=="none"&&r.lineWidth>0},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(r){return Ef(J6,r)},e.prototype.setBoundingRect=function(r){this._rect=r},e.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var n=r.text;n!=null?n+="":n="";var i=Yp(n,r.font,r.textAlign,r.textBaseline);if(i.x+=r.x||0,i.y+=r.y||0,this.hasStroke()){var a=r.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},e.initDefaultProps=function(){var r=e.prototype;r.dirtyRectTolerance=10}(),e}(Fi);oc.prototype.type="tspan";var Q6=je({x:0,y:0},Ma),e9={style:je({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},rc.style)};function t9(t){return!!(t&&typeof t!="string"&&t.width&&t.height)}var fi=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createStyle=function(r){return Ef(Q6,r)},e.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=t9(n.image)?n.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?a[r]:a[r]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return e9},e.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new Ue(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Fi);fi.prototype.type="image";function r9(t,e){var r=e.x,n=e.y,i=e.width,a=e.height,o=e.r,s,u,l,f;i<0&&(r=r+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 c;s+u>i&&(c=s+u,s*=i/c,u*=i/c),l+f>i&&(c=l+f,l*=i/c,f*=i/c),u+l>a&&(c=u+l,u*=a/c,l*=a/c),s+f>a&&(c=s+f,s*=a/c,f*=a/c),t.moveTo(r+s,n),t.lineTo(r+i-u,n),u!==0&&t.arc(r+i-u,n+u,u,-Math.PI/2,0),t.lineTo(r+i,n+a-l),l!==0&&t.arc(r+i-l,n+a-l,l,0,Math.PI/2),t.lineTo(r+f,n+a),f!==0&&t.arc(r+f,n+a-f,f,Math.PI/2,Math.PI),t.lineTo(r,n+s),s!==0&&t.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var Ko=Math.round;function zD(t,e,r){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=i,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(Ko(n*2)===Ko(i*2)&&(t.x1=t.x2=ja(n,s,!0)),Ko(a*2)===Ko(o*2)&&(t.y1=t.y2=ja(a,s,!0))),t}}function jD(t,e,r){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;t.x=n,t.y=i,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=ja(n,s,!0),t.y=ja(i,s,!0),t.width=Math.max(ja(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(ja(i+o,s,!1)-t.y,o===0?0:1)),t}}function ja(t,e,r){if(!e)return t;var n=Ko(t*2);return(n+Ko(e))%2===0?n/2:(n+(r?1:-1))/2}var n9=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),i9={},St=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new n9},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var u=jD(i9,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?r9(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Ve);St.prototype.type="rect";var VD={fill:"#000"},HD=2,a9={style:je({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},rc.style)},Ot=function(t){ce(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=VD,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r<this._children.length;r++){var n=this._children[r];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},e.prototype.updateTransform=function(){var r=this.innerTransformable;r?(r.updateTransform(),r.transform&&(this.transform=r.transform)):t.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(r){var n=this.innerTransformable;return n?n.getLocalTransform(r):t.prototype.getLocalTransform.call(this,r)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,f9(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(r){t.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=r},e.prototype.removeSelfFromZr=function(r){t.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var r=new Ue(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],u=s.getBoundingRect(),l=s.getLocalTransform(i);l?(r.copy(u),r.applyTransform(l),a=a||r.clone(),a.union(r)):(a=a||u.clone(),a.union(u))}this._rect=a||r}return this._rect},e.prototype.setDefaultTextStyle=function(r){this._defaultStyle=r||VD},e.prototype.setTextContent=function(r){if(process.env.NODE_ENV!=="production")throw new Error("Can't attach text on another text")},e.prototype._mergeStyle=function(r,n){if(!n)return r;var i=n.rich,a=r.rich||i&&{};return oe(r,n),i&&a?(this._mergeRich(a,i),r.rich=a):a&&(r.rich=a),r},e.prototype._mergeRich=function(r,n){for(var i=Ke(n),a=0;a<i.length;a++){var o=i[a];r[o]=r[o]||{},oe(r[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return a9},e.prototype._getOrCreateChild=function(r){var n=this._children[this._childCursor];return(!n||!(n instanceof r))&&(n=new r),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},e.prototype._updatePlainTexts=function(){var r=this.style,n=r.font||Ca,i=r.padding,a=XD(r),o=T6(a,r),s=wg(r),u=!!r.backgroundColor,l=o.outerHeight,f=o.outerWidth,c=o.contentWidth,h=o.lines,d=o.lineHeight,p=this._defaultStyle,g=r.x||0,v=r.y||0,m=r.align||p.align||"left",y=r.verticalAlign||p.verticalAlign||"top",b=g,w=Uo(v,o.contentHeight,y);if(s||i){var C=gu(g,f,m),_=Uo(v,l,y);s&&this._renderBackground(r,r,C,_,f,l)}w+=d/2,i&&(b=YD(g,m,i),y==="top"?w+=i[0]:y==="bottom"&&(w-=i[2]));for(var D=0,x=!1,S=qD("fill"in r?r.fill:(x=!0,p.fill)),O=UD("stroke"in r?r.stroke:!u&&(!p.autoStroke||x)?(D=HD,p.stroke):null),E=r.textShadowBlur>0,P=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),F=o.calculatedLineHeight,B=0;B<h.length;B++){var M=this._getOrCreateChild(oc),I=M.createStyle();M.useStyle(I),I.text=h[B],I.x=b,I.y=w,m&&(I.textAlign=m),I.textBaseline="middle",I.opacity=r.opacity,I.strokeFirst=!0,E&&(I.shadowBlur=r.textShadowBlur||0,I.shadowColor=r.textShadowColor||"transparent",I.shadowOffsetX=r.textShadowOffsetX||0,I.shadowOffsetY=r.textShadowOffsetY||0),I.stroke=O,I.fill=S,O&&(I.lineWidth=r.lineWidth||D,I.lineDash=r.lineDash,I.lineDashOffset=r.lineDashOffset||0),I.font=n,$D(I,r),w+=d,P&&M.setBoundingRect(new Ue(gu(I.x,r.width,I.textAlign),Uo(I.y,F,I.textBaseline),c,F))}},e.prototype._updateRichTexts=function(){var r=this.style,n=XD(r),i=B6(n,r),a=i.width,o=i.outerWidth,s=i.outerHeight,u=r.padding,l=r.x||0,f=r.y||0,c=this._defaultStyle,h=r.align||c.align,d=r.verticalAlign||c.verticalAlign,p=gu(l,o,h),g=Uo(f,s,d),v=p,m=g;u&&(v+=u[3],m+=u[0]);var y=v+a;wg(r)&&this._renderBackground(r,r,p,g,o,s);for(var b=!!r.backgroundColor,w=0;w<i.lines.length;w++){for(var C=i.lines[w],_=C.tokens,D=_.length,x=C.lineHeight,S=C.width,O=0,E=v,P=y,F=D-1,B=void 0;O<D&&(B=_[O],!B.align||B.align==="left");)this._placeToken(B,r,x,m,E,"left",b),S-=B.width,E+=B.width,O++;for(;F>=0&&(B=_[F],B.align==="right");)this._placeToken(B,r,x,m,P,"right",b),S-=B.width,P-=B.width,F--;for(E+=(a-(E-v)-(y-P)-S)/2;O<=F;)B=_[O],this._placeToken(B,r,x,m,E+B.width/2,"center",b),E+=B.width,O++;m+=x}},e.prototype._placeToken=function(r,n,i,a,o,s,u){var l=n.rich[r.styleName]||{};l.text=r.text;var f=r.verticalAlign,c=a+i/2;f==="top"?c=a+r.height/2:f==="bottom"&&(c=a+i-r.height/2);var h=!r.isLineHolder&&wg(l);h&&this._renderBackground(l,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,c-r.height/2,r.width,r.height);var d=!!l.backgroundColor,p=r.textPadding;p&&(o=YD(o,s,p),c-=r.height/2-p[0]-r.innerHeight/2);var g=this._getOrCreateChild(oc),v=g.createStyle();g.useStyle(v);var m=this._defaultStyle,y=!1,b=0,w=qD("fill"in l?l.fill:"fill"in n?n.fill:(y=!0,m.fill)),C=UD("stroke"in l?l.stroke:"stroke"in n?n.stroke:!d&&!u&&(!m.autoStroke||y)?(b=HD,m.stroke):null),_=l.textShadowBlur>0||n.textShadowBlur>0;v.text=r.text,v.x=o,v.y=c,_&&(v.shadowBlur=l.textShadowBlur||n.textShadowBlur||0,v.shadowColor=l.textShadowColor||n.textShadowColor||"transparent",v.shadowOffsetX=l.textShadowOffsetX||n.textShadowOffsetX||0,v.shadowOffsetY=l.textShadowOffsetY||n.textShadowOffsetY||0),v.textAlign=s,v.textBaseline="middle",v.font=r.font||Ca,v.opacity=Da(l.opacity,n.opacity,1),$D(v,l),C&&(v.lineWidth=Da(l.lineWidth,n.lineWidth,b),v.lineDash=Be(l.lineDash,n.lineDash),v.lineDashOffset=n.lineDashOffset||0,v.stroke=C),w&&(v.fill=w);var D=r.contentWidth,x=r.contentHeight;g.setBoundingRect(new Ue(gu(v.x,D,v.textAlign),Uo(v.y,x,v.textBaseline),D,x))},e.prototype._renderBackground=function(r,n,i,a,o,s){var u=r.backgroundColor,l=r.borderWidth,f=r.borderColor,c=u&&u.image,h=u&&!c,d=r.borderRadius,p=this,g,v;if(h||r.lineHeight||l&&f){g=this._getOrCreateChild(St),g.useStyle(g.createStyle()),g.style.fill=null;var m=g.shape;m.x=i,m.y=a,m.width=o,m.height=s,m.r=d,g.dirtyShape()}if(h){var y=g.style;y.fill=u||null,y.fillOpacity=Be(r.fillOpacity,1)}else if(c){v=this._getOrCreateChild(fi),v.onload=function(){p.dirtyStyle()};var b=v.style;b.image=u.image,b.x=i,b.y=a,b.width=o,b.height=s}if(l&&f){var y=g.style;y.lineWidth=l,y.stroke=f,y.strokeOpacity=Be(r.strokeOpacity,1),y.lineDash=r.borderDash,y.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var w=(g||v).style;w.shadowBlur=r.shadowBlur||0,w.shadowColor=r.shadowColor||"transparent",w.shadowOffsetX=r.shadowOffsetX||0,w.shadowOffsetY=r.shadowOffsetY||0,w.opacity=Da(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return l9(r)&&(n=[r.fontStyle,r.fontWeight,u9(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Sn(n)||r.textFont||r.font},e}(Fi),o9={left:!0,right:1,center:1},s9={top:1,bottom:1,middle:1},WD=["fontStyle","fontWeight","fontSize","fontFamily"];function u9(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?sp+"px":t+"px"}function $D(t,e){for(var r=0;r<WD.length;r++){var n=WD[r],i=e[n];i!=null&&(t[n]=i)}}function l9(t){return t.fontSize!=null||t.fontFamily||t.fontWeight}function f9(t){return GD(t),N(t.rich,GD),t}function GD(t){if(t){t.font=Ot.makeFont(t);var e=t.align;e==="middle"&&(e="center"),t.align=e==null||o9[e]?e:"left";var r=t.verticalAlign;r==="center"&&(r="middle"),t.verticalAlign=r==null||s9[r]?r:"top";var n=t.padding;n&&(t.padding=a_(t.padding))}}function UD(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function qD(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function YD(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function XD(t){var e=t.text;return e!=null&&(e+=""),e}function wg(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var He=lt(),c9=function(t,e,r,n){if(n){var i=He(n);i.dataIndex=r,i.dataType=e,i.seriesIndex=t,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=He(a);o.seriesIndex=t,o.dataIndex=r,o.dataType=e,o.ssrType="chart"})}},KD=1,ZD={},JD=lt(),_g=lt(),Dg=0,sc=1,uc=2,Gr=["emphasis","blur","select"],lc=["normal","emphasis","blur","select"],h9=10,d9=9,Va="highlight",fc="downplay",xu="select",cc="unselect",Su="toggleSelect";function Zo(t){return t!=null&&t!=="none"}function hc(t,e,r){t.onHoverStateChange&&(t.hoverState||0)!==r&&t.onHoverStateChange(e),t.hoverState=r}function QD(t){hc(t,"emphasis",uc)}function ex(t){t.hoverState===uc&&hc(t,"normal",Dg)}function xg(t){hc(t,"blur",sc)}function tx(t){t.hoverState===sc&&hc(t,"normal",Dg)}function v9(t){t.selected=!0}function p9(t){t.selected=!1}function rx(t,e,r){e(t,r)}function ci(t,e,r){rx(t,e,r),t.isGroup&&t.traverse(function(n){rx(n,e,r)})}function nx(t,e){switch(e){case"emphasis":t.hoverState=uc;break;case"normal":t.hoverState=Dg;break;case"blur":t.hoverState=sc;break;case"select":t.selected=!0}}function g9(t,e,r,n){for(var i=t.style,a={},o=0;o<e.length;o++){var s=e[o],u=i[s];a[s]=u??(n&&n[s])}for(var o=0;o<t.animators.length;o++){var l=t.animators[o];l.__fromStateTransition&&l.__fromStateTransition.indexOf(r)<0&&l.targetName==="style"&&l.saveTo(a,e)}return a}function m9(t,e,r,n){var i=r&&Ge(r,"select")>=0,a=!1;if(t instanceof Ve){var o=JD(t),s=i&&o.selectFill||o.normalFill,u=i&&o.selectStroke||o.normalStroke;if(Zo(s)||Zo(u)){n=n||{};var l=n.style||{};l.fill==="inherit"?(a=!0,n=oe({},n),l=oe({},l),l.fill=s):!Zo(l.fill)&&Zo(s)?(a=!0,n=oe({},n),l=oe({},l),l.fill=V_(s)):!Zo(l.stroke)&&Zo(u)&&(a||(n=oe({},n),l=oe({},l)),l.stroke=V_(u)),n.style=l}}if(n&&n.z2==null){a||(n=oe({},n));var f=t.z2EmphasisLift;n.z2=t.z2+(f??h9)}return n}function y9(t,e,r){if(r&&r.z2==null){r=oe({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??d9)}return r}function b9(t,e,r){var n=Ge(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:g9(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=oe({},r),o=oe({opacity:n?i:a.opacity*.1},o),r.style=o),r}function Sg(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return m9(this,t,e,r);if(t==="blur")return b9(this,t,r);if(t==="select")return y9(this,t,r)}return r}function C9(t){t.stateProxy=Sg;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=Sg),r&&(r.stateProxy=Sg)}function ix(t,e){!lx(t,e)&&!t.__highByOuter&&ci(t,QD)}function ax(t,e){!lx(t,e)&&!t.__highByOuter&&ci(t,ex)}function dc(t,e){t.__highByOuter|=1<<(e||0),ci(t,QD)}function vc(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&ci(t,ex)}function w9(t){ci(t,xg)}function ox(t){ci(t,tx)}function sx(t){ci(t,v9)}function ux(t){ci(t,p9)}function lx(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function fx(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=_g(a),s=i==="series",u=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(u),o.isBlured&&(u.group.traverse(function(l){tx(l)}),s&&r.push(a)),o.isBlured=!1}),N(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function Eg(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(l,f){for(var c=0;c<f.length;c++){var h=l.getItemGraphicEl(f[c]);h&&ox(h)}}if(t!=null&&!(!e||e==="none")){var o=i.getSeriesByIndex(t),s=o.coordinateSystem;s&&s.master&&(s=s.master);var u=[];i.eachSeries(function(l){var f=o===l,c=l.coordinateSystem;c&&c.master&&(c=c.master);var h=c&&s?c===s:f;if(!(r==="series"&&!f||r==="coordinateSystem"&&!h||e==="series"&&f)){var d=n.getViewOfSeriesModel(l);if(d.group.traverse(function(v){v.__highByOuter&&f&&e==="self"||xg(v)}),Wt(e))a(l.getData(),e);else if(we(e))for(var p=Ke(e),g=0;g<p.length;g++)a(l.getData(p[g]),e[p[g]]);u.push(l),_g(l).isBlured=!0}}),i.eachComponent(function(l,f){if(l!=="series"){var c=n.getViewOfComponentModel(f);c&&c.toggleBlurSeries&&c.toggleBlurSeries(u,!0,i)}})}}function Ag(t,e,r){if(!(t==null||e==null)){var n=r.getModel().getComponent(t,e);if(n){_g(n).isBlured=!0;var i=r.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){xg(a)})}}}function _9(t,e,r){var n=t.seriesIndex,i=t.getData(e.dataType);if(!i){process.env.NODE_ENV!=="production"&&Gt("Unknown dataType "+e.dataType);return}var a=Pa(i,e);a=(he(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),u=0;!o&&u<s;)o=i.getItemGraphicEl(u++);if(o){var l=He(o);Eg(n,l.focus,l.blurScope,r)}else{var f=t.get(["emphasis","focus"]),c=t.get(["emphasis","blurScope"]);f!=null&&Eg(n,f,c,r)}}function Tg(t,e,r,n){var i={focusSelf:!1,dispatchers:null};if(t==null||t==="series"||e==null||r==null)return i;var a=n.getModel().getComponent(t,e);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(r),u,l=0;l<s.length;l++)if(process.env.NODE_ENV!=="production"&&!Jo(s[l])&&Gt("param should be highDownDispatcher"),He(s[l]).focus==="self"){u=!0;break}return{focusSelf:u,dispatchers:s}}function D9(t,e,r){process.env.NODE_ENV!=="production"&&!Jo(t)&&Gt("param should be highDownDispatcher");var n=He(t),i=Tg(n.componentMainType,n.componentIndex,n.componentHighDownName,r),a=i.dispatchers,o=i.focusSelf;a?(o&&Ag(n.componentMainType,n.componentIndex,r),N(a,function(s){return ix(s,e)})):(Eg(n.seriesIndex,n.focus,n.blurScope,r),n.focus==="self"&&Ag(n.componentMainType,n.componentIndex,r),ix(t,e))}function x9(t,e,r){process.env.NODE_ENV!=="production"&&!Jo(t)&&Gt("param should be highDownDispatcher"),fx(r);var n=He(t),i=Tg(n.componentMainType,n.componentIndex,n.componentHighDownName,r).dispatchers;i?N(i,function(a){return ax(a,e)}):ax(t,e)}function S9(t,e,r){if(Pg(e)){var n=e.dataType,i=t.getData(n),a=Pa(i,e);he(a)||(a=[a]),t[e.type===Su?"toggleSelect":e.type===xu?"select":"unselect"](a,n)}}function cx(t){var e=t.getAllData();N(e,function(r){var n=r.data,i=r.type;n.eachItemGraphicEl(function(a,o){t.isSelected(o,i)?sx(a):ux(a)})})}function E9(t){var e=[];return t.eachSeries(function(r){var n=r.getAllData();N(n,function(i){i.data;var a=i.type,o=r.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function Og(t,e,r){dx(t,!0),ci(t,C9),T9(t,e,r)}function A9(t){dx(t,!1)}function Eu(t,e,r,n){n?A9(t):Og(t,e,r)}function T9(t,e,r){var n=He(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var hx=["emphasis","blur","select"],O9={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function pc(t,e,r,n){r=r||"itemStyle";for(var i=0;i<hx.length;i++){var a=hx[i],o=e.getModel([a,r]),s=t.ensureState(a);s.style=o[O9[r]]()}}function dx(t,e){var r=e===!1,n=t;t.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=t.highDownSilentOnTouch),(!r||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!r)}function Jo(t){return!!(t&&t.__highDownDispatcher)}function P9(t){var e=ZD[t];return e==null&&KD<=32&&(e=ZD[t]=KD++),e}function Pg(t){var e=t.type;return e===xu||e===cc||e===Su}function vx(t){var e=t.type;return e===Va||e===fc}function B9(t){var e=JD(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var r=t.states.select||{};e.selectFill=r.style&&r.style.fill||null,e.selectStroke=r.style&&r.style.stroke||null}var Qo=ui.CMD,M9=[[],[],[]],px=Math.sqrt,F9=Math.atan2;function gx(t,e){if(e){var r=t.data,n=t.len(),i,a,o,s,u,l,f=Qo.M,c=Qo.C,h=Qo.L,d=Qo.R,p=Qo.A,g=Qo.Q;for(o=0,s=0;o<n;){switch(i=r[o++],s=o,a=0,i){case f:a=1;break;case h:a=1;break;case c:a=3;break;case g:a=2;break;case p:var v=e[4],m=e[5],y=px(e[0]*e[0]+e[1]*e[1]),b=px(e[2]*e[2]+e[3]*e[3]),w=F9(-e[1]/b,e[0]/y);r[o]*=y,r[o++]+=v,r[o]*=b,r[o++]+=m,r[o++]*=y,r[o++]*=b,r[o++]+=w,r[o++]+=w,o+=2,s=o;break;case d:l[0]=r[o++],l[1]=r[o++],jr(l,l,e),r[s++]=l[0],r[s++]=l[1],l[0]+=r[o++],l[1]+=r[o++],jr(l,l,e),r[s++]=l[0],r[s++]=l[1]}for(u=0;u<a;u++){var C=M9[u];C[0]=r[o++],C[1]=r[o++],jr(C,C,e),r[s++]=C[0],r[s++]=C[1]}}t.increaseVersion()}}var Bg=Math.sqrt,gc=Math.sin,mc=Math.cos,Au=Math.PI;function mx(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Mg(t,e){return(t[0]*e[0]+t[1]*e[1])/(mx(t)*mx(e))}function yx(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Mg(t,e))}function bx(t,e,r,n,i,a,o,s,u,l,f){var c=u*(Au/180),h=mc(c)*(t-r)/2+gc(c)*(e-n)/2,d=-1*gc(c)*(t-r)/2+mc(c)*(e-n)/2,p=h*h/(o*o)+d*d/(s*s);p>1&&(o*=Bg(p),s*=Bg(p));var g=(i===a?-1:1)*Bg((o*o*(s*s)-o*o*(d*d)-s*s*(h*h))/(o*o*(d*d)+s*s*(h*h)))||0,v=g*o*d/s,m=g*-s*h/o,y=(t+r)/2+mc(c)*v-gc(c)*m,b=(e+n)/2+gc(c)*v+mc(c)*m,w=yx([1,0],[(h-v)/o,(d-m)/s]),C=[(h-v)/o,(d-m)/s],_=[(-1*h-v)/o,(-1*d-m)/s],D=yx(C,_);if(Mg(C,_)<=-1&&(D=Au),Mg(C,_)>=1&&(D=0),D<0){var x=Math.round(D/Au*1e6)/1e6;D=Au*2+x%2*Au}f.addData(l,y,b,o,s,w,D,c,a)}var L9=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,I9=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function R9(t){var e=new ui;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=ui.CMD,u=t.match(L9);if(!u)return e;for(var l=0;l<u.length;l++){for(var f=u[l],c=f.charAt(0),h=void 0,d=f.match(I9)||[],p=d.length,g=0;g<p;g++)d[g]=parseFloat(d[g]);for(var v=0;v<p;){var m=void 0,y=void 0,b=void 0,w=void 0,C=void 0,_=void 0,D=void 0,x=r,S=n,O=void 0,E=void 0;switch(c){case"l":r+=d[v++],n+=d[v++],h=s.L,e.addData(h,r,n);break;case"L":r=d[v++],n=d[v++],h=s.L,e.addData(h,r,n);break;case"m":r+=d[v++],n+=d[v++],h=s.M,e.addData(h,r,n),i=r,a=n,c="l";break;case"M":r=d[v++],n=d[v++],h=s.M,e.addData(h,r,n),i=r,a=n,c="L";break;case"h":r+=d[v++],h=s.L,e.addData(h,r,n);break;case"H":r=d[v++],h=s.L,e.addData(h,r,n);break;case"v":n+=d[v++],h=s.L,e.addData(h,r,n);break;case"V":n=d[v++],h=s.L,e.addData(h,r,n);break;case"C":h=s.C,e.addData(h,d[v++],d[v++],d[v++],d[v++],d[v++],d[v++]),r=d[v-2],n=d[v-1];break;case"c":h=s.C,e.addData(h,d[v++]+r,d[v++]+n,d[v++]+r,d[v++]+n,d[v++]+r,d[v++]+n),r+=d[v-2],n+=d[v-1];break;case"S":m=r,y=n,O=e.len(),E=e.data,o===s.C&&(m+=r-E[O-4],y+=n-E[O-3]),h=s.C,x=d[v++],S=d[v++],r=d[v++],n=d[v++],e.addData(h,m,y,x,S,r,n);break;case"s":m=r,y=n,O=e.len(),E=e.data,o===s.C&&(m+=r-E[O-4],y+=n-E[O-3]),h=s.C,x=r+d[v++],S=n+d[v++],r+=d[v++],n+=d[v++],e.addData(h,m,y,x,S,r,n);break;case"Q":x=d[v++],S=d[v++],r=d[v++],n=d[v++],h=s.Q,e.addData(h,x,S,r,n);break;case"q":x=d[v++]+r,S=d[v++]+n,r+=d[v++],n+=d[v++],h=s.Q,e.addData(h,x,S,r,n);break;case"T":m=r,y=n,O=e.len(),E=e.data,o===s.Q&&(m+=r-E[O-4],y+=n-E[O-3]),r=d[v++],n=d[v++],h=s.Q,e.addData(h,m,y,r,n);break;case"t":m=r,y=n,O=e.len(),E=e.data,o===s.Q&&(m+=r-E[O-4],y+=n-E[O-3]),r+=d[v++],n+=d[v++],h=s.Q,e.addData(h,m,y,r,n);break;case"A":b=d[v++],w=d[v++],C=d[v++],_=d[v++],D=d[v++],x=r,S=n,r=d[v++],n=d[v++],h=s.A,bx(x,S,r,n,_,D,b,w,C,h,e);break;case"a":b=d[v++],w=d[v++],C=d[v++],_=d[v++],D=d[v++],x=r,S=n,r+=d[v++],n+=d[v++],h=s.A,bx(x,S,r,n,_,D,b,w,C,h,e);break}}(c==="z"||c==="Z")&&(h=s.Z,e.addData(h),r=i,n=a),o=h}return e.toStatic(),e}var Cx=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.applyTransform=function(r){},e}(Ve);function _x(t){return t.setData!=null}function Dx(t,e){var r=R9(t),n=oe({},e);return n.buildPath=function(i){if(_x(i)){i.setData(r.data);var a=i.getContext();a&&i.rebuildPath(a,1)}else{var a=i;r.rebuildPath(a,1)}},n.applyTransform=function(i){gx(r,i),this.dirtyShape()},n}function N9(t,e){return new Cx(Dx(t,e))}function k9(t,e){var r=Dx(t,e),n=function(i){ce(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=r.applyTransform,s.buildPath=r.buildPath,s}return a}(Cx);return n}function z9(t,e){for(var r=[],n=t.length,i=0;i<n;i++){var a=t[i];r.push(a.getUpdatedPathProxy(!0))}var o=new Ve(e);return o.createPathProxy(),o.buildPath=function(s){if(_x(s)){s.appendPath(r);var u=s.getContext();u&&s.rebuildPath(u,1)}},o}function Fg(t,e){e=e||{};var r=new Ve;return t.shape&&r.setShape(t.shape),r.setStyle(t.style),e.bakeTransform?gx(r.path,t.getComputedTransform()):e.toLocal?r.setLocalTransform(t.getComputedTransform()):r.copyTransform(t),r.buildPath=t.buildPath,r.applyTransform=r.applyTransform,r.z=t.z,r.z2=t.z2,r.zlevel=t.zlevel,r}var j9=function(){function t(){this.cx=0,this.cy=0,this.r=0}return t}(),yc=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new j9},e.prototype.buildPath=function(r,n){r.moveTo(n.cx+n.r,n.cy),r.arc(n.cx,n.cy,n.r,0,Math.PI*2)},e}(Ve);yc.prototype.type="circle";var V9=function(){function t(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return t}(),Lg=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new V9},e.prototype.buildPath=function(r,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,u=n.ry,l=s*i,f=u*i;r.moveTo(a-s,o),r.bezierCurveTo(a-s,o-f,a-l,o-u,a,o-u),r.bezierCurveTo(a+l,o-u,a+s,o-f,a+s,o),r.bezierCurveTo(a+s,o+f,a+l,o+u,a,o+u),r.bezierCurveTo(a-l,o+u,a-s,o+f,a-s,o),r.closePath()},e}(Ve);Lg.prototype.type="ellipse";var xx=Math.PI,Ig=xx*2,Ha=Math.sin,es=Math.cos,H9=Math.acos,Ut=Math.atan2,Sx=Math.abs,Tu=Math.sqrt,Ou=Math.max,Ln=Math.min,un=1e-4;function W9(t,e,r,n,i,a,o,s){var u=r-t,l=n-e,f=o-i,c=s-a,h=c*u-f*l;if(!(h*h<un))return h=(f*(e-a)-c*(t-i))/h,[t+h*u,e+h*l]}function bc(t,e,r,n,i,a,o){var s=t-r,u=e-n,l=(o?a:-a)/Tu(s*s+u*u),f=l*u,c=-l*s,h=t+f,d=e+c,p=r+f,g=n+c,v=(h+p)/2,m=(d+g)/2,y=p-h,b=g-d,w=y*y+b*b,C=i-a,_=h*g-p*d,D=(b<0?-1:1)*Tu(Ou(0,C*C*w-_*_)),x=(_*b-y*D)/w,S=(-_*y-b*D)/w,O=(_*b+y*D)/w,E=(-_*y+b*D)/w,P=x-v,F=S-m,B=O-v,M=E-m;return P*P+F*F>B*B+M*M&&(x=O,S=E),{cx:x,cy:S,x0:-f,y0:-c,x1:x*(i/C-1),y1:S*(i/C-1)}}function $9(t){var e;if(he(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function G9(t,e){var r,n=Ou(e.r,0),i=Ou(e.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=e.startAngle,l=e.endAngle;if(!(isNaN(u)||isNaN(l))){var f=e.cx,c=e.cy,h=!!e.clockwise,d=Sx(l-u),p=d>Ig&&d%Ig;if(p>un&&(d=p),!(n>un))t.moveTo(f,c);else if(d>Ig-un)t.moveTo(f+n*es(u),c+n*Ha(u)),t.arc(f,c,n,u,l,!h),i>un&&(t.moveTo(f+i*es(l),c+i*Ha(l)),t.arc(f,c,i,l,u,h));else{var g=void 0,v=void 0,m=void 0,y=void 0,b=void 0,w=void 0,C=void 0,_=void 0,D=void 0,x=void 0,S=void 0,O=void 0,E=void 0,P=void 0,F=void 0,B=void 0,M=n*es(u),I=n*Ha(u),j=i*es(l),z=i*Ha(l),W=d>un;if(W){var R=e.cornerRadius;R&&(r=$9(R),g=r[0],v=r[1],m=r[2],y=r[3]);var U=Sx(n-i)/2;if(b=Ln(U,m),w=Ln(U,y),C=Ln(U,g),_=Ln(U,v),S=D=Ou(b,w),O=x=Ou(C,_),(D>un||x>un)&&(E=n*es(l),P=n*Ha(l),F=i*es(u),B=i*Ha(u),d<xx)){var Z=W9(M,I,F,B,E,P,j,z);if(Z){var ee=M-Z[0],ne=I-Z[1],q=E-Z[0],L=P-Z[1],X=1/Ha(H9((ee*q+ne*L)/(Tu(ee*ee+ne*ne)*Tu(q*q+L*L)))/2),V=Tu(Z[0]*Z[0]+Z[1]*Z[1]);S=Ln(D,(n-V)/(X+1)),O=Ln(x,(i-V)/(X-1))}}}if(!W)t.moveTo(f+M,c+I);else if(S>un){var G=Ln(m,S),J=Ln(y,S),K=bc(F,B,M,I,n,G,h),Y=bc(E,P,j,z,n,J,h);t.moveTo(f+K.cx+K.x0,c+K.cy+K.y0),S<D&&G===J?t.arc(f+K.cx,c+K.cy,S,Ut(K.y0,K.x0),Ut(Y.y0,Y.x0),!h):(G>0&&t.arc(f+K.cx,c+K.cy,G,Ut(K.y0,K.x0),Ut(K.y1,K.x1),!h),t.arc(f,c,n,Ut(K.cy+K.y1,K.cx+K.x1),Ut(Y.cy+Y.y1,Y.cx+Y.x1),!h),J>0&&t.arc(f+Y.cx,c+Y.cy,J,Ut(Y.y1,Y.x1),Ut(Y.y0,Y.x0),!h))}else t.moveTo(f+M,c+I),t.arc(f,c,n,u,l,!h);if(!(i>un)||!W)t.lineTo(f+j,c+z);else if(O>un){var G=Ln(g,O),J=Ln(v,O),K=bc(j,z,E,P,i,-J,h),Y=bc(M,I,F,B,i,-G,h);t.lineTo(f+K.cx+K.x0,c+K.cy+K.y0),O<x&&G===J?t.arc(f+K.cx,c+K.cy,O,Ut(K.y0,K.x0),Ut(Y.y0,Y.x0),!h):(J>0&&t.arc(f+K.cx,c+K.cy,J,Ut(K.y0,K.x0),Ut(K.y1,K.x1),!h),t.arc(f,c,i,Ut(K.cy+K.y1,K.cx+K.x1),Ut(Y.cy+Y.y1,Y.cx+Y.x1),h),G>0&&t.arc(f+Y.cx,c+Y.cy,G,Ut(Y.y1,Y.x1),Ut(Y.y0,Y.x0),!h))}else t.lineTo(f+j,c+z),t.arc(f,c,i,l,u,h)}t.closePath()}}}var U9=function(){function t(){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 t}(),In=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new U9},e.prototype.buildPath=function(r,n){G9(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Ve);In.prototype.type="sector";var q9=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),Rg=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new q9},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},e}(Ve);Rg.prototype.type="ring";function Y9(t,e,r,n){var i=[],a=[],o=[],s=[],u,l,f,c;if(n){f=[1/0,1/0],c=[-1/0,-1/0];for(var h=0,d=t.length;h<d;h++)Ro(f,f,t[h]),No(c,c,t[h]);Ro(f,f,n[0]),No(c,c,n[1])}for(var h=0,d=t.length;h<d;h++){var p=t[h];if(r)u=t[h?h-1:d-1],l=t[(h+1)%d];else if(h===0||h===d-1){i.push(IN(t[h]));continue}else u=t[h-1],l=t[h+1];RN(a,l,u),cp(a,a,e);var g=hp(p,u),v=hp(p,l),m=g+v;m!==0&&(g/=m,v/=m),cp(o,a,-g),cp(s,a,v);var y=l_([],p,o),b=l_([],p,s);n&&(No(y,y,f),Ro(y,y,c),No(b,b,f),Ro(b,b,c)),i.push(y),i.push(b)}return r&&i.push(i.shift()),i}function Ex(t,e,r){var n=e.smooth,i=e.points;if(i&&i.length>=2){if(n){var a=Y9(i,n,r,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var u=a[s*2],l=a[s*2+1],f=i[(s+1)%o];t.bezierCurveTo(u[0],u[1],l[0],l[1],f[0],f[1])}}else{t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;s<c;s++)t.lineTo(i[s][0],i[s][1])}r&&t.closePath()}}var X9=function(){function t(){this.points=null,this.smooth=0,this.smoothConstraint=null}return t}(),Cc=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new X9},e.prototype.buildPath=function(r,n){Ex(r,n,!0)},e}(Ve);Cc.prototype.type="polygon";var K9=function(){function t(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return t}(),Pu=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new K9},e.prototype.buildPath=function(r,n){Ex(r,n,!1)},e}(Ve);Pu.prototype.type="polyline";var Z9={},J9=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return t}(),Ni=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new J9},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var u=zD(Z9,n,this.style);i=u.x1,a=u.y1,o=u.x2,s=u.y2}else i=n.x1,a=n.y1,o=n.x2,s=n.y2;var l=n.percent;l!==0&&(r.moveTo(i,a),l<1&&(o=i*(1-l)+o*l,s=a*(1-l)+s*l),r.lineTo(o,s))},e.prototype.pointAt=function(r){var n=this.shape;return[n.x1*(1-r)+n.x2*r,n.y1*(1-r)+n.y2*r]},e}(Ve);Ni.prototype.type="line";var yr=[],Q9=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return t}();function Ax(t,e,r){var n=t.cpx2,i=t.cpy2;return n!=null||i!=null?[(r?T_:Bt)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?T_:Bt)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?B_:$t)(t.x1,t.cpx1,t.x2,e),(r?B_:$t)(t.y1,t.cpy1,t.y2,e)]}var Ng=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Q9},e.prototype.buildPath=function(r,n){var i=n.x1,a=n.y1,o=n.x2,s=n.y2,u=n.cpx1,l=n.cpy1,f=n.cpx2,c=n.cpy2,h=n.percent;h!==0&&(r.moveTo(i,a),f==null||c==null?(h<1&&(Nf(i,u,o,h,yr),u=yr[1],o=yr[2],Nf(a,l,s,h,yr),l=yr[1],s=yr[2]),r.quadraticCurveTo(u,l,o,s)):(h<1&&(Oi(i,u,f,o,h,yr),u=yr[1],f=yr[2],o=yr[3],Oi(a,l,c,s,h,yr),l=yr[1],c=yr[2],s=yr[3]),r.bezierCurveTo(u,l,f,c,o,s)))},e.prototype.pointAt=function(r){return Ax(this.shape,r,!1)},e.prototype.tangentAt=function(r){var n=Ax(this.shape,r,!0);return zN(n,n)},e}(Ve);Ng.prototype.type="bezier-curve";var e7=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),wc=function(t){ce(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new e7},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r,0),s=n.startAngle,u=n.endAngle,l=n.clockwise,f=Math.cos(s),c=Math.sin(s);r.moveTo(f*o+i,c*o+a),r.arc(i,a,o,s,u,!l)},e}(Ve);wc.prototype.type="arc";var t7=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="compound",r}return e.prototype._updatePathDirty=function(){for(var r=this.shape.paths,n=this.shapeChanged(),i=0;i<r.length;i++)n=n||r[i].shapeChanged();n&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var r=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<r.length;i++)r[i].path||r[i].createPathProxy(),r[i].path.setScale(n[0],n[1],r[i].segmentIgnoreThreshold)},e.prototype.buildPath=function(r,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(r,i[a].shape,!0)},e.prototype.afterBrush=function(){for(var r=this.shape.paths||[],n=0;n<r.length;n++)r[n].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Ve.prototype.getBoundingRect.call(this)},e}(Ve),Tx=function(){function t(e){this.colorStops=e||[]}return t.prototype.addColorStop=function(e,r){this.colorStops.push({offset:e,color:r})},t}(),Ox=function(t){ce(e,t);function e(r,n,i,a,o,s){var u=t.call(this,o)||this;return u.x=r??0,u.y=n??0,u.x2=i??1,u.y2=a??0,u.type="linear",u.global=s||!1,u}return e}(Tx),r7=function(t){ce(e,t);function e(r,n,i,a,o){var s=t.call(this,a)||this;return s.x=r??.5,s.y=n??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return e}(Tx),Wa=[0,0],$a=[0,0],_c=new _e,Dc=new _e,xc=function(){function t(e,r){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new _e;for(var n=0;n<2;n++)this._axes[n]=new _e;e&&this.fromBoundingRect(e,r)}return t.prototype.fromBoundingRect=function(e,r){var n=this._corners,i=this._axes,a=e.x,o=e.y,s=a+e.width,u=o+e.height;if(n[0].set(a,o),n[1].set(s,o),n[2].set(s,u),n[3].set(a,u),r)for(var l=0;l<4;l++)n[l].transform(r);_e.sub(i[0],n[1],n[0]),_e.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var l=0;l<2;l++)this._origin[l]=i[l].dot(n[0])},t.prototype.intersect=function(e,r){var n=!0,i=!r;return _c.set(1/0,1/0),Dc.set(0,0),!this._intersectCheckOneSide(this,e,_c,Dc,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(e,this,_c,Dc,i,-1)&&(n=!1,i)||i||_e.copy(r,n?_c:Dc),n},t.prototype._intersectCheckOneSide=function(e,r,n,i,a,o){for(var s=!0,u=0;u<2;u++){var l=this._axes[u];if(this._getProjMinMaxOnAxis(u,e._corners,Wa),this._getProjMinMaxOnAxis(u,r._corners,$a),Wa[1]<$a[0]||Wa[0]>$a[1]){if(s=!1,a)return s;var f=Math.abs($a[0]-Wa[1]),c=Math.abs(Wa[0]-$a[1]);Math.min(f,c)>i.len()&&(f<c?_e.scale(i,l,-f*o):_e.scale(i,l,c*o))}else if(n){var f=Math.abs($a[0]-Wa[1]),c=Math.abs(Wa[0]-$a[1]);Math.min(f,c)<n.len()&&(f<c?_e.scale(n,l,f*o):_e.scale(n,l,-c*o))}}return s},t.prototype._getProjMinMaxOnAxis=function(e,r,n){for(var i=this._axes[e],a=this._origin,o=r[0].dot(i)+a[e],s=o,u=o,l=1;l<r.length;l++){var f=r[l].dot(i)+a[e];s=Math.min(f,s),u=Math.max(f,u)}n[0]=s,n[1]=u},t}(),n7=[],i7=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.notClear=!0,r.incremental=!0,r._displayables=[],r._temporaryDisplayables=[],r._cursor=0,r}return e.prototype.traverse=function(r,n){r.call(n,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(r,n){n?this._temporaryDisplayables.push(r):this._displayables.push(r),this.markRedraw()},e.prototype.addDisplayables=function(r,n){n=n||!1;for(var i=0;i<r.length;i++)this.addDisplayable(r[i],n)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(r){for(var n=this._cursor;n<this._displayables.length;n++)r&&r(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)r&&r(this._temporaryDisplayables[n])},e.prototype.update=function(){this.updateTransform();for(var r=this._cursor;r<this._displayables.length;r++){var n=this._displayables[r];n.parent=this,n.update(),n.parent=null}for(var r=0;r<this._temporaryDisplayables.length;r++){var n=this._temporaryDisplayables[r];n.parent=this,n.update(),n.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var r=new Ue(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],a=i.getBoundingRect().clone();i.needLocalTransform()&&a.applyTransform(i.getLocalTransform(n7)),r.union(a)}this._rect=r}return this._rect},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(a.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(r,n))return!0}return!1},e}(Fi),Px=lt();function ts(t,e,r,n,i){var a;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();a=o&&o.animation}var s=e&&e.isAnimationEnabled(),u=t==="update";if(s){var l=void 0,f=void 0,c=void 0;n?(l=Be(n.duration,200),f=Be(n.easing,"cubicOut"),c=0):(l=e.getShallow(u?"animationDurationUpdate":"animationDuration"),f=e.getShallow(u?"animationEasingUpdate":"animationEasing"),c=e.getShallow(u?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(l=a.duration),a.easing!=null&&(f=a.easing),a.delay!=null&&(c=a.delay)),De(c)&&(c=c(r,i)),De(l)&&(l=l(r));var h={duration:l||0,delay:c,easing:f};return h}else return null}function kg(t,e,r,n,i,a,o){var s=!1,u;De(i)?(o=a,a=i,i=null):we(i)&&(a=i.cb,o=i.during,s=i.isFrom,u=i.removeOpt,i=i.dataIndex);var l=t==="leave";l||e.stopAnimation("leave");var f=ts(t,n,i,l?u||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,i):null);if(f&&f.duration>0){var c=f.duration,h=f.delay,d=f.easing,p={duration:c,delay:h||0,easing:d,done:a,force:!!a||!!o,setToFinal:!l,scope:t,during:o};s?e.animateFrom(r,p):e.animateTo(r,p)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function Ft(t,e,r,n,i,a){kg("update",t,e,r,n,i,a)}function qt(t,e,r,n,i,a){kg("enter",t,e,r,n,i,a)}function rs(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++){var r=t.animators[e];if(r.scope==="leave")return!0}return!1}function Sc(t,e,r,n,i,a){rs(t)||kg("leave",t,e,r,n,i,a)}function Bx(t,e,r,n){t.removeTextContent(),t.removeTextGuideLine(),Sc(t,{style:{opacity:0}},e,r,n)}function Ec(t,e,r){function n(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(i){i.isGroup||Bx(i,e,r,n)}):Bx(t,e,r,n)}function zg(t){Px(t).oldStyle=t.style}function a7(t){return Px(t).oldStyle}var Ac=Math.max,Tc=Math.min,jg={};function o7(t){return Ve.extend(t)}var s7=k9;function u7(t,e){return s7(t,e)}function ln(t,e){jg[t]=e}function Mx(t){if(jg.hasOwnProperty(t))return jg[t]}function Vg(t,e,r,n){var i=N9(t,e);return r&&(n==="center"&&(r=Lx(r,i.getBoundingRect())),Ix(i,r)),i}function Fx(t,e,r){var n=new fi({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(i){if(r==="center"){var a={width:i.width,height:i.height};n.setStyle(Lx(e,a))}}});return n}function Lx(t,e){var r=e.width/e.height,n=t.height*r,i;n<=t.width?i=t.height:(n=t.width,i=n/r);var a=t.x+t.width/2,o=t.y+t.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var l7=z9;function Ix(t,e){if(t.applyTransform){var r=t.getBoundingRect(),n=r.calculateTransform(e);t.applyTransform(n)}}function Bu(t,e){return zD(t,t,{lineWidth:e}),t}function f7(t){return jD(t.shape,t.shape,t.style),t}var c7=ja;function h7(t,e){for(var r=wp([]);t&&t!==e;)jo(r,t.getLocalTransform(),r),t=t.parent;return r}function Hg(t,e,r){return e&&!Wt(e)&&(e=pu.getLocalTransform(e)),r&&(e=Tf([],e)),jr([],t,e)}function d7(t,e,r){var n=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),i=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),a=[t==="left"?-n:t==="right"?n:0,t==="top"?-i:t==="bottom"?i:0];return a=Hg(a,e,r),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Rx(t){return!t.isGroup}function v7(t){return t.shape!=null}function Nx(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(u){Rx(u)&&u.anid&&(s[u.anid]=u)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return v7(o)&&(s.shape=oe({},o.shape)),s}var a=n(t);e.traverse(function(o){if(Rx(o)&&o.anid){var s=a[o.anid];if(s){var u=i(o);o.attr(i(s)),Ft(o,u,r,He(o).dataIndex)}}})}function p7(t,e){return ye(t,function(r){var n=r[0];n=Ac(n,e.x),n=Tc(n,e.x+e.width);var i=r[1];return i=Ac(i,e.y),i=Tc(i,e.y+e.height),[n,i]})}function g7(t,e){var r=Ac(t.x,e.x),n=Tc(t.x+t.width,e.x+e.width),i=Ac(t.y,e.y),a=Tc(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function Wg(t,e,r){var n=oe({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(i.image=t.slice(8),je(i,r),new fi(n)):Vg(t.replace("path://",""),n,r,"center")}function m7(t,e,r,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(kx(t,e,r,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function kx(t,e,r,n,i,a,o,s){var u=r-t,l=n-e,f=o-i,c=s-a,h=$g(f,c,u,l);if(y7(h))return!1;var d=t-i,p=e-a,g=$g(d,p,u,l)/h;if(g<0||g>1)return!1;var v=$g(d,p,f,c)/h;return!(v<0||v>1)}function $g(t,e,r,n){return t*n-r*e}function y7(t){return t<=1e-6&&t>=-1e-6}function Oc(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,i=be(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var u=t.formatterParamsExtra;u&&N(Ke(u),function(f){xe(s,f)||(s[f]=u[f],s.$vars.push(f))});var l=He(t.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:n,option:je({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function zx(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function Pc(t,e){if(t)if(he(t))for(var r=0;r<t.length;r++)zx(t[r],e);else zx(t,e)}ln("circle",yc),ln("ellipse",Lg),ln("sector",In),ln("ring",Rg),ln("polygon",Cc),ln("polyline",Pu),ln("rect",St),ln("line",Ni),ln("bezierCurve",Ng),ln("arc",wc);const b7=Object.freeze(Object.defineProperty({__proto__:null,Arc:wc,BezierCurve:Ng,BoundingRect:Ue,Circle:yc,CompoundPath:t7,Ellipse:Lg,Group:It,Image:fi,IncrementalDisplayable:i7,Line:Ni,LinearGradient:Ox,OrientedBoundingRect:xc,Path:Ve,Point:_e,Polygon:Cc,Polyline:Pu,RadialGradient:r7,Rect:St,Ring:Rg,Sector:In,Text:Ot,applyTransform:Hg,clipPointsByRect:p7,clipRectByRect:g7,createIcon:Wg,extendPath:u7,extendShape:o7,getShapeClass:Mx,getTransform:h7,groupTransition:Nx,initProps:qt,isElementRemoved:rs,lineLineIntersect:kx,linePolygonIntersect:m7,makeImage:Fx,makePath:Vg,mergePath:l7,registerShape:ln,removeElement:Sc,removeElementWithFadeOut:Ec,resizePath:Ix,setTooltipConfig:Oc,subPixelOptimize:c7,subPixelOptimizeLine:Bu,subPixelOptimizeRect:f7,transformDirection:d7,traverseElements:Pc,updateProps:Ft},Symbol.toStringTag,{value:"Module"}));var Bc={};function jx(t,e){for(var r=0;r<Gr.length;r++){var n=Gr[r],i=e[n],a=t.ensureState(n);a.style=a.style||{},a.style.text=i}var o=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(o,!0)}function Gg(t,e,r){var n=t.labelFetcher,i=t.labelDataIndex,a=t.labelDimIndex,o=e.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),r!=null?{interpolatedValue:r}:null)),s==null&&(s=De(t.defaultText)?t.defaultText(i,t,r):t.defaultText);for(var u={normal:s},l=0;l<Gr.length;l++){var f=Gr[l],c=e[f];u[f]=Be(n?n.getFormattedLabel(i,f,null,a,c&&c.get("formatter")):null,s)}return u}function Mu(t,e,r,n){r=r||Bc;for(var i=t instanceof Ot,a=!1,o=0;o<lc.length;o++){var s=e[lc[o]];if(s&&s.getShallow("show")){a=!0;break}}var u=i?t:t.getTextContent();if(a){i||(u||(u=new Ot,t.setTextContent(u)),t.stateProxy&&(u.stateProxy=t.stateProxy));var l=Gg(r,e),f=e.normal,c=!!f.getShallow("show"),h=ki(f,n&&n.normal,r,!1,!i);h.text=l.normal,i||t.setTextConfig(Vx(f,r,!1));for(var o=0;o<Gr.length;o++){var d=Gr[o],s=e[d];if(s){var p=u.ensureState(d),g=!!Be(s.getShallow("show"),c);if(g!==c&&(p.ignore=!g),p.style=ki(s,n&&n[d],r,!0,!i),p.style.text=l[d],!i){var v=t.ensureState(d);v.textConfig=Vx(s,r,!0)}}}u.silent=!!f.getShallow("silent"),u.style.x!=null&&(h.x=u.style.x),u.style.y!=null&&(h.y=u.style.y),u.ignore=!c,u.useStyle(h),u.dirty(),r.enableTextSetter&&(ns(u).setLabelText=function(m){var y=Gg(r,e,m);jx(u,y)})}else u&&(u.ignore=!0);t.dirty()}function Fu(t,e){e=e||"label";for(var r={normal:t.getModel(e)},n=0;n<Gr.length;n++){var i=Gr[n];r[i]=t.getModel([i,e])}return r}function ki(t,e,r,n,i){var a={};return C7(a,t,r,n,i),e&&oe(a,e),a}function Vx(t,e,r){e=e||{};var n={},i,a=t.getShallow("rotate"),o=Be(t.getShallow("distance"),r?null:5),s=t.getShallow("offset");return i=t.getShallow("position")||(r?null:"inside"),i==="outside"&&(i=e.defaultOutsidePosition||"top"),i!=null&&(n.position=i),s!=null&&(n.offset=s),a!=null&&(a*=Math.PI/180,n.rotation=a),o!=null&&(n.distance=o),n.outsideFill=t.get("color")==="inherit"?e.inheritColor||null:"auto",n}function C7(t,e,r,n,i){r=r||Bc;var a=e.ecModel,o=a&&a.option.textStyle,s=w7(e),u;if(s){u={};for(var l in s)if(s.hasOwnProperty(l)){var f=e.getModel(["rich",l]);Gx(u[l]={},f,o,r,n,i,!1,!0)}}u&&(t.rich=u);var c=e.get("overflow");c&&(t.overflow=c);var h=e.get("minMargin");h!=null&&(t.margin=h),Gx(t,e,o,r,n,i,!0,!1)}function w7(t){for(var e;t&&t!==t.ecModel;){var r=(t.option||Bc).rich;if(r){e=e||{};for(var n=Ke(r),i=0;i<n.length;i++){var a=n[i];e[a]=1}}t=t.parentModel}return e}var Hx=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Wx=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],$x=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Gx(t,e,r,n,i,a,o,s){r=!i&&r||Bc;var u=n&&n.inheritColor,l=e.getShallow("color"),f=e.getShallow("textBorderColor"),c=Be(e.getShallow("opacity"),r.opacity);(l==="inherit"||l==="auto")&&(process.env.NODE_ENV!=="production"&&l==="auto"&&Mt("color: 'auto'","color: 'inherit'"),u?l=u:l=null),(f==="inherit"||f==="auto")&&(process.env.NODE_ENV!=="production"&&f==="auto"&&Mt("color: 'auto'","color: 'inherit'"),u?f=u:f=null),a||(l=l||r.color,f=f||r.textBorderColor),l!=null&&(t.fill=l),f!=null&&(t.stroke=f);var h=Be(e.getShallow("textBorderWidth"),r.textBorderWidth);h!=null&&(t.lineWidth=h);var d=Be(e.getShallow("textBorderType"),r.textBorderType);d!=null&&(t.lineDash=d);var p=Be(e.getShallow("textBorderDashOffset"),r.textBorderDashOffset);p!=null&&(t.lineDashOffset=p),!i&&c==null&&!s&&(c=n&&n.defaultOpacity),c!=null&&(t.opacity=c),!i&&!a&&t.fill==null&&n.inheritColor&&(t.fill=n.inheritColor);for(var g=0;g<Hx.length;g++){var v=Hx[g],m=Be(e.getShallow(v),r[v]);m!=null&&(t[v]=m)}for(var g=0;g<Wx.length;g++){var v=Wx[g],m=e.getShallow(v);m!=null&&(t[v]=m)}if(t.verticalAlign==null){var y=e.getShallow("baseline");y!=null&&(t.verticalAlign=y)}if(!o||!n.disableBox){for(var g=0;g<$x.length;g++){var v=$x[g],m=e.getShallow(v);m!=null&&(t[v]=m)}var b=e.getShallow("borderType");b!=null&&(t.borderDash=b),(t.backgroundColor==="auto"||t.backgroundColor==="inherit")&&u&&(process.env.NODE_ENV!=="production"&&t.backgroundColor==="auto"&&Mt("backgroundColor: 'auto'","backgroundColor: 'inherit'"),t.backgroundColor=u),(t.borderColor==="auto"||t.borderColor==="inherit")&&u&&(process.env.NODE_ENV!=="production"&&t.borderColor==="auto"&&Mt("borderColor: 'auto'","borderColor: 'inherit'"),t.borderColor=u)}}function _7(t,e){var r=e&&e.getModel("textStyle");return Sn([t.fontStyle||r&&r.getShallow("fontStyle")||"",t.fontWeight||r&&r.getShallow("fontWeight")||"",(t.fontSize||r&&r.getShallow("fontSize")||12)+"px",t.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}var ns=lt();function D7(t,e,r,n){if(t){var i=ns(t);i.prevValue=i.value,i.value=r;var a=e.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=e)}}function x7(t,e,r,n,i){var a=ns(t);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=Be(a.interpolatedValue,a.prevValue),u=a.value;function l(f){var c=wD(r,a.precision,s,u,f);a.interpolatedValue=f===1?null:c;var h=Gg({labelDataIndex:e,labelFetcher:i,defaultText:o?o(c):c+""},a.statesModels,c);jx(t,h)}t.percent=0,(a.prevValue==null?qt:Ft)(t,{percent:1},n,e,null,l)}var S7=["textStyle","color"],Ug=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],qg=new Ot,E7=function(){function t(){}return t.prototype.getTextColor=function(e){var r=this.ecModel;return this.getShallow("color")||(!e&&r?r.get(S7):null)},t.prototype.getFont=function(){return _7({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(e){for(var r={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<Ug.length;n++)r[Ug[n]]=this.getShallow(Ug[n]);return qg.useStyle(r),qg.update(),qg.getBoundingRect()},t}(),Ux=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],A7=wu(Ux),T7=function(){function t(){}return t.prototype.getLineStyle=function(e){return A7(this,e)},t}(),qx=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],O7=wu(qx),P7=function(){function t(){}return t.prototype.getItemStyle=function(e,r){return O7(this,e,r)},t}(),Ct=function(){function t(e,r,n){this.parentModel=r,this.ecModel=n,this.option=e}return t.prototype.init=function(e,r,n){},t.prototype.mergeOption=function(e,r){Qe(this.option,e,!0)},t.prototype.get=function(e,r){return e==null?this.option:this._doGet(this.parsePath(e),!r&&this.parentModel)},t.prototype.getShallow=function(e,r){var n=this.option,i=n==null?n:n[e];if(i==null&&!r){var a=this.parentModel;a&&(i=a.getShallow(e))}return i},t.prototype.getModel=function(e,r){var n=e!=null,i=n?this.parsePath(e):null,a=n?this._doGet(i):this.option;return r=r||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new t(a,r,this.ecModel)},t.prototype.isEmpty=function(){return this.option==null},t.prototype.restoreData=function(){},t.prototype.clone=function(){var e=this.constructor;return new e($e(this.option))},t.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},t.prototype.resolveParentPath=function(e){return e},t.prototype.isAnimationEnabled=function(){if(!Pe.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(e,r){var n=this.option;if(!e)return n;for(var i=0;i<e.length&&!(e[i]&&(n=n&&typeof n=="object"?n[e[i]]:null,n==null));i++);return n==null&&r&&(n=r._doGet(this.resolveParentPath(e),r.parentModel)),n},t}();og(Ct),b6(Ct),xn(Ct,T7),xn(Ct,P7),xn(Ct,x6),xn(Ct,E7);var B7=Math.round(Math.random()*10);function Mc(t){return[t||"",B7++].join("_")}function M7(t){var e={};t.registerSubTypeDefaulter=function(r,n){var i=Pn(r);e[i.main]=n},t.determineSubType=function(r,n){var i=n.type;if(!i){var a=Pn(r).main;t.hasSubTypes(r)&&e[a]&&(i=e[a](n))}return i}}function F7(t,e){t.topologicalTravel=function(a,o,s,u){if(!a.length)return;var l=r(o),f=l.graph,c=l.noEntryList,h={};for(N(a,function(y){h[y]=!0});c.length;){var d=c.pop(),p=f[d],g=!!h[d];g&&(s.call(u,d,p.originalDeps.slice()),delete h[d]),N(p.successor,g?m:v)}N(h,function(){var y="";throw process.env.NODE_ENV!=="production"&&(y=vr("Circular dependency may exists: ",h,a,o)),new Error(y)});function v(y){f[y].entryCount--,f[y].entryCount===0&&c.push(y)}function m(y){h[y]=!0,v(y)}};function r(a){var o={},s=[];return N(a,function(u){var l=n(o,u),f=l.originalDeps=e(u),c=i(f,a);l.entryCount=c.length,l.entryCount===0&&s.push(u),N(c,function(h){Ge(l.predecessor,h)<0&&l.predecessor.push(h);var d=n(o,h);Ge(d.successor,h)<0&&d.successor.push(u)})}),{graph:o,noEntryList:s}}function n(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function i(a,o){var s=[];return N(a,function(u){Ge(o,u)>=0&&s.push(u)}),s}}function Yx(t,e){return Qe(Qe({},t,!0),e,!0)}const L7={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:". "}}}},I7={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 Fc="ZH",Yg="EN",is=Yg,Lc={},Xg={},Xx=Pe.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||is).toUpperCase();return t.indexOf(Fc)>-1?Fc:is}():is;function Kx(t,e){t=t.toUpperCase(),Xg[t]=new Ct(e),Lc[t]=e}function R7(t){if(be(t)){var e=Lc[t.toUpperCase()]||{};return t===Fc||t===Yg?$e(e):Qe($e(e),$e(Lc[is]),!1)}else return Qe($e(t),$e(Lc[is]),!1)}function N7(t){return Xg[t]}function k7(){return Xg[is]}Kx(Yg,L7),Kx(Fc,I7);var Kg=1e3,Zg=Kg*60,Lu=Zg*60,Ur=Lu*24,Zx=Ur*365,Iu={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}"},Ic="{yyyy}-{MM}-{dd}",Jx={year:"{yyyy}",month:"{yyyy}-{MM}",day:Ic,hour:Ic+" "+Iu.hour,minute:Ic+" "+Iu.minute,second:Ic+" "+Iu.second,millisecond:Iu.none},Jg=["year","month","day","hour","minute","second","millisecond"],Qx=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function zi(t,e){return t+="","0000".substr(0,e-t.length)+t}function as(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function z7(t){return t===as(t)}function j7(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Rc(t,e,r,n){var i=oi(t),a=i[Qg(r)](),o=i[os(r)]()+1,s=Math.floor((o-1)/3)+1,u=i[Nc(r)](),l=i["get"+(r?"UTC":"")+"Day"](),f=i[Ru(r)](),c=(f-1)%12+1,h=i[kc(r)](),d=i[zc(r)](),p=i[jc(r)](),g=f>=12?"pm":"am",v=g.toUpperCase(),m=n instanceof Ct?n:N7(n||Xx)||k7(),y=m.getModel("time"),b=y.get("month"),w=y.get("monthAbbr"),C=y.get("dayOfWeek"),_=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,v+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,zi(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,b[o-1]).replace(/{MMM}/g,w[o-1]).replace(/{MM}/g,zi(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,zi(u,2)).replace(/{d}/g,u+"").replace(/{eeee}/g,C[l]).replace(/{ee}/g,_[l]).replace(/{e}/g,l+"").replace(/{HH}/g,zi(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,zi(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,zi(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,zi(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,zi(p,3)).replace(/{S}/g,p+"")}function V7(t,e,r,n,i){var a=null;if(be(r))a=r;else if(De(r))a=r(t.value,e,{level:t.level});else{var o=oe({},Iu);if(t.level>0)for(var s=0;s<Jg.length;++s)o[Jg[s]]="{primary|"+o[Jg[s]]+"}";var u=r?r.inherit===!1?r:je(r,o):o,l=eS(t.value,i);if(u[l])a=u[l];else if(u.inherit){for(var f=Qx.indexOf(l),s=f-1;s>=0;--s)if(u[l]){a=u[l];break}a=a||o.none}if(he(a)){var c=t.level==null?0:t.level>=0?t.level:a.length+t.level;c=Math.min(c,a.length-1),a=a[c]}}return Rc(new Date(t.value),a,i,n)}function eS(t,e){var r=oi(t),n=r[os(e)]()+1,i=r[Nc(e)](),a=r[Ru(e)](),o=r[kc(e)](),s=r[zc(e)](),u=r[jc(e)](),l=u===0,f=l&&s===0,c=f&&o===0,h=c&&a===0,d=h&&i===1,p=d&&n===1;return p?"year":d?"month":h?"day":c?"hour":f?"minute":l?"second":"millisecond"}function tS(t,e,r){var n=nt(t)?oi(t):t;switch(e=e||eS(t,r),e){case"year":return n[Qg(r)]();case"half-year":return n[os(r)]()>=6?1:0;case"quarter":return Math.floor((n[os(r)]()+1)/4);case"month":return n[os(r)]();case"day":return n[Nc(r)]();case"half-day":return n[Ru(r)]()/24;case"hour":return n[Ru(r)]();case"minute":return n[kc(r)]();case"second":return n[zc(r)]();case"millisecond":return n[jc(r)]()}}function Qg(t){return t?"getUTCFullYear":"getFullYear"}function os(t){return t?"getUTCMonth":"getMonth"}function Nc(t){return t?"getUTCDate":"getDate"}function Ru(t){return t?"getUTCHours":"getHours"}function kc(t){return t?"getUTCMinutes":"getMinutes"}function zc(t){return t?"getUTCSeconds":"getSeconds"}function jc(t){return t?"getUTCMilliseconds":"getMilliseconds"}function H7(t){return t?"setUTCFullYear":"setFullYear"}function rS(t){return t?"setUTCMonth":"setMonth"}function nS(t){return t?"setUTCDate":"setDate"}function iS(t){return t?"setUTCHours":"setHours"}function aS(t){return t?"setUTCMinutes":"setMinutes"}function oS(t){return t?"setUTCSeconds":"setSeconds"}function sS(t){return t?"setUTCMilliseconds":"setMilliseconds"}function uS(t){if(!uD(t))return be(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function lS(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Vc=a_;function e0(t,e,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(f){return f&&Sn(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=e==="time",s=t instanceof Date;if(o||s){var u=o?oi(t):t;if(isNaN(+u)){if(s)return"-"}else return Rc(u,n,r)}if(e==="ordinal")return Df(t)?i(t):nt(t)&&a(t)?t+"":"-";var l=Mi(t);return a(l)?uS(l):Df(t)?i(t):typeof t=="boolean"?t+"":"-"}var fS=["a","b","c","d","e","f","g"],t0=function(t,e){return"{"+t+(e??"")+"}"};function cS(t,e,r){he(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a<i.length;a++){var o=fS[a];t=t.replace(t0(o),t0(o,0))}for(var s=0;s<n;s++)for(var u=0;u<i.length;u++){var l=e[s][i[u]];t=t.replace(t0(fS[u],s),r?Tr(l):l)}return t}function W7(t,e){var r=be(t)?{color:t,extraCssText:e}:t||{},n=r.color,i=r.type;e=r.extraCssText;var a=r.renderMode||"html";if(!n)return"";if(a==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Tr(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Tr(n)+";"+(e||"")+'"></span>';var o=r.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 Ga(t,e){return e=e||"transparent",be(t)?t:we(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function hS(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var Hc=N,dS=["left","right","top","bottom","width","height"],Wc=[["width","left","right"],["height","top","bottom"]];function r0(t,e,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(u,l){var f=u.getBoundingRect(),c=e.childAt(l+1),h=c&&c.getBoundingRect(),d,p;if(t==="horizontal"){var g=f.width+(h?-h.x+f.x:0);d=a+g,d>n||u.newline?(a=0,d=g,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(h?-h.y+f.y:0);p=o+v,p>i||u.newline?(a+=s+r,o=0,p=v,s=f.width):s=Math.max(s,f.width)}u.newline||(u.x=a,u.y=o,u.markRedraw(),t==="horizontal"?a=d+r:o=p+r)})}var Nu=r0;Dt(r0,"vertical"),Dt(r0,"horizontal");function Ua(t,e,r){r=Vc(r||0);var n=e.width,i=e.height,a=ut(t.left,n),o=ut(t.top,i),s=ut(t.right,n),u=ut(t.bottom,i),l=ut(t.width,n),f=ut(t.height,i),c=r[2]+r[0],h=r[1]+r[3],d=t.aspect;switch(isNaN(l)&&(l=n-s-h-a),isNaN(f)&&(f=i-u-c-o),d!=null&&(isNaN(l)&&isNaN(f)&&(d>n/i?l=n*.8:f=i*.8),isNaN(l)&&(l=d*f),isNaN(f)&&(f=l/d)),isNaN(a)&&(a=n-s-l-h),isNaN(o)&&(o=i-u-f-c),t.left||t.right){case"center":a=n/2-l/2-r[3];break;case"right":a=n-l-h;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-f/2-r[0];break;case"bottom":o=i-f-c;break}a=a||0,o=o||0,isNaN(l)&&(l=n-h-a-(s||0)),isNaN(f)&&(f=i-c-o-(u||0));var p=new Ue(a+r[3],o+r[0],l,f);return p.margin=r,p}function $7(t,e,r,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],u=i&&i.boundingMode||"all";if(a=a||t,a.x=t.x,a.y=t.y,!o&&!s)return!1;var l;if(u==="raw")l=t.type==="group"?new Ue(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var f=t.getLocalTransform();l=l.clone(),l.applyTransform(f)}var c=Ua(je({width:l.width,height:l.height},e),r,n),h=o?c.x-l.x:0,d=s?c.y-l.y:0;return u==="raw"?(a.x=h,a.y=d):(a.x+=h,a.y+=d),a===t&&t.markRedraw(),!0}function ku(t){var e=t.layoutMode||t.constructor.layoutMode;return we(e)?e:e?{type:e}:null}function qa(t,e,r){var n=r&&r.ignoreSize;!he(n)&&(n=[n,n]);var i=o(Wc[0],0),a=o(Wc[1],1);l(Wc[0],t,i),l(Wc[1],t,a);function o(f,c){var h={},d=0,p={},g=0,v=2;if(Hc(f,function(b){p[b]=t[b]}),Hc(f,function(b){s(e,b)&&(h[b]=p[b]=e[b]),u(h,b)&&d++,u(p,b)&&g++}),n[c])return u(e,f[1])?p[f[2]]=null:u(e,f[2])&&(p[f[1]]=null),p;if(g===v||!d)return p;if(d>=v)return h;for(var m=0;m<f.length;m++){var y=f[m];if(!s(h,y)&&s(t,y)){h[y]=t[y];break}}return h}function s(f,c){return f.hasOwnProperty(c)}function u(f,c){return f[c]!=null&&f[c]!=="auto"}function l(f,c,h){Hc(f,function(d){c[d]=h[d]})}}function $c(t){return vS({},t)}function vS(t,e){return e&&t&&Hc(dS,function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var G7=lt(),Ze=function(t){ce(e,t);function e(r,n,i){var a=t.call(this,r,n,i)||this;return a.uid=Mc("ec_cpt_model"),a}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=ku(this),a=i?$c(r):{},o=n.getTheme();Qe(r,o.get(this.mainType)),Qe(r,this.getDefaultOption()),i&&qa(r,a,i)},e.prototype.mergeOption=function(r,n){Qe(this.option,r,!0);var i=ku(this);i&&qa(this.option,r,i)},e.prototype.optionUpdated=function(r,n){},e.prototype.getDefaultOption=function(){var r=this.constructor;if(!g6(r))return r.defaultOption;var n=G7(this);if(!n.defaultOption){for(var i=[],a=r;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},u=i.length-1;u>=0;u--)s=Qe(s,i[u],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return Cu(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){var r=this;return{left:r.get("left"),top:r.get("top"),right:r.get("right"),bottom:r.get("bottom"),width:r.get("width"),height:r.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(Ct);DD(Ze,Ct),ec(Ze),M7(Ze),F7(Ze,U7);function U7(t){var e=[];return N(Ze.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=ye(e,function(r){return Pn(r).main}),t!=="dataset"&&Ge(e,"dataset")<=0&&e.unshift("dataset"),e}var pS="";typeof navigator<"u"&&(pS=navigator.platform||"");var ss="rgba(0, 0, 0, 0.2)";const q7={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:ss,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ss,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ss,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ss,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ss,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ss,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:pS.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var n0=Ae(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),qr="original",ir="arrayRows",Yr="objectRows",Rn="keyedColumns",hi="typedArray",gS="unknown",Nn="column",us="row",jt={Must:1,Might:2,Not:3},mS=lt();function Y7(t){mS(t).datasetMap=Ae()}function X7(t,e,r){var n={},i=i0(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,u=mS(s).datasetMap,l=i.uid+"_"+r.seriesLayoutBy,f,c;t=t.slice(),N(t,function(g,v){var m=we(g)?g:t[v]={name:g};m.type==="ordinal"&&f==null&&(f=v,c=p(m)),n[m.name]=[]});var h=u.get(l)||u.set(l,{categoryWayDim:c,valueWayDim:0});N(t,function(g,v){var m=g.name,y=p(g);if(f==null){var b=h.valueWayDim;d(n[m],b,y),d(o,b,y),h.valueWayDim+=y}else if(f===v)d(n[m],0,y),d(a,0,y);else{var b=h.categoryWayDim;d(n[m],b,y),d(o,b,y),h.categoryWayDim+=y}});function d(g,v,m){for(var y=0;y<m;y++)g.push(v+y)}function p(g){var v=g.dimsDef;return v?v.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function K7(t,e,r){var n={},i=i0(t);if(!i)return n;var a=e.sourceFormat,o=e.dimensionsDefine,s;(a===Yr||a===Rn)&&N(o,function(f,c){(we(f)?f.name:f)==="name"&&(s=c)});var u=function(){for(var f={},c={},h=[],d=0,p=Math.min(5,r);d<p;d++){var g=bS(e.data,a,e.seriesLayoutBy,o,e.startIndex,d);h.push(g);var v=g===jt.Not;if(v&&f.v==null&&d!==s&&(f.v=d),(f.n==null||f.n===f.v||!v&&h[f.n]===jt.Not)&&(f.n=d),m(f)&&h[f.n]!==jt.Not)return f;v||(g===jt.Might&&c.v==null&&d!==s&&(c.v=d),(c.n==null||c.n===c.v)&&(c.n=d))}function m(y){return y.v!=null&&y.n!=null}return m(f)?f:m(c)?c:null}();if(u){n.value=[u.v];var l=s??u.n;n.itemName=[l],n.seriesName=[l]}return n}function i0(t){var e=t.get("data",!0);if(!e)return Cu(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},sn).models[0]}function Z7(t){return!t.get("transform",!0)&&!t.get("fromTransformResult",!0)?[]:Cu(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},sn).models}function yS(t,e){return bS(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function bS(t,e,r,n,i,a){var o,s=5;if(rr(t))return jt.Not;var u,l;if(n){var f=n[a];we(f)?(u=f.name,l=f.type):be(f)&&(u=f)}if(l!=null)return l==="ordinal"?jt.Must:jt.Not;if(e===ir){var c=t;if(r===us){for(var h=c[a],d=0;d<(h||[]).length&&d<s;d++)if((o=w(h[i+d]))!=null)return o}else for(var d=0;d<c.length&&d<s;d++){var p=c[i+d];if(p&&(o=w(p[a]))!=null)return o}}else if(e===Yr){var g=t;if(!u)return jt.Not;for(var d=0;d<g.length&&d<s;d++){var v=g[d];if(v&&(o=w(v[u]))!=null)return o}}else if(e===Rn){var m=t;if(!u)return jt.Not;var h=m[u];if(!h||rr(h))return jt.Not;for(var d=0;d<h.length&&d<s;d++)if((o=w(h[d]))!=null)return o}else if(e===qr)for(var y=t,d=0;d<y.length&&d<s;d++){var v=y[d],b=yu(v);if(!he(b))return jt.Not;if((o=w(b[a]))!=null)return o}function w(C){var _=be(C);if(C!=null&&Number.isFinite(Number(C))&&C!=="")return _?jt.Might:jt.Not;if(_&&C!=="-")return jt.Must}return jt.Not}var J7=Ae();function Q7(t,e,r){var n=J7.get(e);if(!n)return r;var i=n(t);if(!i)return r;if(process.env.NODE_ENV!=="production")for(var a=0;a<i.length;a++)Ee(Yo(i[a]));return r.concat(i)}var CS=lt();lt();var a0=function(){function t(){}return t.prototype.getColorFromPalette=function(e,r,n){var i=gt(this.get("color",!0)),a=this.get("colorLayer",!0);return tz(this,CS,i,a,e,r,n)},t.prototype.clearColorPalette=function(){rz(this,CS)},t}();function ez(t,e){for(var r=t.length,n=0;n<r;n++)if(t[n].length>e)return t[n];return t[r-1]}function tz(t,e,r,n,i,a,o){a=a||t;var s=e(a),u=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var f=o==null||!n?r:ez(n,o);if(f=f||r,!(!f||!f.length)){var c=f[u];return i&&(l[i]=c),s.paletteIdx=(u+1)%f.length,c}}function rz(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var Gc,zu,wS,o0="\0_ec_inner",_S=1,nz={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},iz={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},Uc={};function az(t){N(t,function(e,r){if(!Ze.hasClass(r)){var n=nz[r];n&&!Uc[n]&&(Gt("Component "+r+` is used but not imported.
155
155
  import { `+n+` } from 'echarts/components';
156
- echarts.use([`+n+"]);"),Uc[n]=!0)}})}var sm=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new Ct(a),this._locale=new Ct(o),this._optionManager=s},e.prototype.setOption=function(r,n,i){process.env.NODE_ENV!=="production"&&(Ee(r!=null,"option is null/undefined"),Ee(r[om]!==_S,"please use chart.getOption()"));var a=SS(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,SS(n))},e.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");process.env.NODE_ENV!=="production"&&az(o),!this.option||r==="recreate"?wS(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var u=a.getMediaOption(this);u.length&&N(u,function(l){i=!0,this._mergeOption(l,n)},this)}return i},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],u=Ae(),l=n&&n.replaceMergeMainTypeMap;Y7(this),N(r,function(c,h){c!=null&&(Ze.hasClass(h)?h&&(s.push(h),u.set(h,!0)):i[h]=i[h]==null?$e(c):Qe(i[h],c,!0))}),l&&l.each(function(c,h){Ze.hasClass(h)&&!u.get(h)&&(s.push(h),u.set(h,!0))}),Ze.topologicalTravel(s,Ze.getAllClassMainTypes(),f,this);function f(c){var h=Q7(this,c,gt(r[c])),d=a.get(c),p=d?l&&l.get(c)?"replaceMerge":"normalMerge":"replaceAll",g=gD(d,h,p);l6(g,c,Ze),i[c]=null,a.set(c,null),o.set(c,0);var v=[],m=[],y=0,b,w;N(g,function(C,_){var D=C.existing,x=C.newOption;if(!x)D&&(D.mergeOption({},this),D.optionUpdated({},!1));else{var S=c==="series",O=Ze.getClass(c,C.keyInfo.subType,!S);if(!O){if(process.env.NODE_ENV!=="production"){var E=C.keyInfo.subType,P=iz[E];Uc[E]||(Uc[E]=!0,Gt(P?"Series "+E+` is used but not imported.
156
+ echarts.use([`+n+"]);"),Uc[n]=!0)}})}var s0=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new Ct(a),this._locale=new Ct(o),this._optionManager=s},e.prototype.setOption=function(r,n,i){process.env.NODE_ENV!=="production"&&(Ee(r!=null,"option is null/undefined"),Ee(r[o0]!==_S,"please use chart.getOption()"));var a=SS(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,SS(n))},e.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");process.env.NODE_ENV!=="production"&&az(o),!this.option||r==="recreate"?wS(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var u=a.getMediaOption(this);u.length&&N(u,function(l){i=!0,this._mergeOption(l,n)},this)}return i},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],u=Ae(),l=n&&n.replaceMergeMainTypeMap;Y7(this),N(r,function(c,h){c!=null&&(Ze.hasClass(h)?h&&(s.push(h),u.set(h,!0)):i[h]=i[h]==null?$e(c):Qe(i[h],c,!0))}),l&&l.each(function(c,h){Ze.hasClass(h)&&!u.get(h)&&(s.push(h),u.set(h,!0))}),Ze.topologicalTravel(s,Ze.getAllClassMainTypes(),f,this);function f(c){var h=Q7(this,c,gt(r[c])),d=a.get(c),p=d?l&&l.get(c)?"replaceMerge":"normalMerge":"replaceAll",g=gD(d,h,p);l6(g,c,Ze),i[c]=null,a.set(c,null),o.set(c,0);var v=[],m=[],y=0,b,w;N(g,function(C,_){var D=C.existing,x=C.newOption;if(!x)D&&(D.mergeOption({},this),D.optionUpdated({},!1));else{var S=c==="series",O=Ze.getClass(c,C.keyInfo.subType,!S);if(!O){if(process.env.NODE_ENV!=="production"){var E=C.keyInfo.subType,P=iz[E];Uc[E]||(Uc[E]=!0,Gt(P?"Series "+E+` is used but not imported.
157
157
  import { `+P+` } from 'echarts/charts';
158
- echarts.use([`+P+"]);":"Unknown series "+E))}return}if(c==="tooltip"){if(b){process.env.NODE_ENV!=="production"&&(w||(xt("Currently only one tooltip component is allowed."),w=!0));return}b=!0}if(D&&D.constructor===O)D.name=C.keyInfo.name,D.mergeOption(x,this),D.optionUpdated(x,!1);else{var F=oe({componentIndex:_},C.keyInfo);D=new O(x,this,this,F),oe(D,F),C.brandNew&&(D.__requireNewView=!0),D.init(x,this,this),D.optionUpdated(null,!0)}}D?(v.push(D.option),m.push(D),y++):(v.push(void 0),m.push(void 0))},this),i[c]=v,a.set(c,m),o.set(c,y),c==="series"&&Gc(this)}this._seriesIndices||Gc(this)},e.prototype.getOption=function(){var r=$e(this.option);return N(r,function(n,i){if(Ze.hasClass(i)){for(var a=gt(n),o=a.length,s=!1,u=o-1;u>=0;u--)a[u]&&!Yo(a[u])?s=!0:(a[u]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[om],r},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},e.prototype.queryComponents=function(r){var n=r.mainType;if(!n)return[];var i=r.index,a=r.id,o=r.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var u;return i!=null?(u=[],N(gt(i),function(l){s[l]&&u.push(s[l])})):a!=null?u=DS("id",a,s):o!=null?u=DS("name",o,s):u=bt(s,function(l){return!!l}),xS(u,r)},e.prototype.findComponents=function(r){var n=r.query,i=r.mainType,a=s(n),o=a?this.queryComponents(a):bt(this._componentsMap.get(i),function(l){return!!l});return u(xS(o,r));function s(l){var f=i+"Index",c=i+"Id",h=i+"Name";return l&&(l[f]!=null||l[c]!=null||l[h]!=null)?{mainType:i,index:l[f],id:l[c],name:l[h]}:null}function u(l){return r.filter?bt(l,r.filter):l}},e.prototype.eachComponent=function(r,n,i){var a=this._componentsMap;if(De(r)){var o=n,s=r;a.each(function(c,h){for(var d=0;c&&d<c.length;d++){var p=c[d];p&&s.call(o,h,p,p.componentIndex)}})}else for(var u=be(r)?a.get(r):we(r)?this.findComponents(r):null,l=0;u&&l<u.length;l++){var f=u[l];f&&n.call(i,f,f.componentIndex)}},e.prototype.getSeriesByName=function(r){var n=pr(r,null);return bt(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},e.prototype.getSeriesByIndex=function(r){return this._componentsMap.get("series")[r]},e.prototype.getSeriesByType=function(r){return bt(this._componentsMap.get("series"),function(n){return!!n&&n.subType===r})},e.prototype.getSeries=function(){return bt(this._componentsMap.get("series"),function(r){return!!r})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(r,n){zu(this),N(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];r.call(n,a,i)},this)},e.prototype.eachRawSeries=function(r,n){N(this._componentsMap.get("series"),function(i){i&&r.call(n,i,i.componentIndex)})},e.prototype.eachSeriesByType=function(r,n,i){zu(this),N(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===r&&n.call(i,o,a)},this)},e.prototype.eachRawSeriesByType=function(r,n,i){return N(this.getSeriesByType(r),n,i)},e.prototype.isSeriesFiltered=function(r){return zu(this),this._seriesIndicesMap.get(r.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(r,n){zu(this);var i=[];N(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];r.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=Ae(i)},e.prototype.restoreData=function(r){Gc(this);var n=this._componentsMap,i=[];n.each(function(a,o){Ze.hasClass(o)&&i.push(o)}),Ze.topologicalTravel(i,Ze.getAllClassMainTypes(),function(a){N(n.get(a),function(o){o&&(a!=="series"||!oz(o,r))&&o.restoreData()})})},e.internalField=function(){Gc=function(r){var n=r._seriesIndices=[];N(r._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),r._seriesIndicesMap=Ae(n)},zu=function(r){if(process.env.NODE_ENV!=="production"&&!r._seriesIndices)throw new Error("Option should contains series.")},wS=function(r,n){r.option={},r.option[om]=_S,r._componentsMap=Ae({series:[]}),r._componentsCount=Ae();var i=n.aria;we(i)&&i.enabled==null&&(i.enabled=!0),sz(n,r._theme.option),Qe(n,q7,!1),r._mergeOption(n,null)}}(),e}(Ct);function oz(t,e){if(e){var r=e.seriesIndex,n=e.seriesId,i=e.seriesName;return r!=null&&t.componentIndex!==r||n!=null&&t.id!==n||i!=null&&t.name!==i}}function sz(t,e){var r=t.color&&!t.colorLayer;N(e,function(n,i){i==="colorLayer"&&r||Ze.hasClass(i)||(typeof n=="object"?t[i]=t[i]?Qe(t[i],n,!1):$e(n):t[i]==null&&(t[i]=n))})}function DS(t,e,r){if(he(e)){var n=Ae();return N(e,function(a){if(a!=null){var o=pr(a,null);o!=null&&n.set(a,!0)}}),bt(r,function(a){return a&&n.get(a[t])})}else{var i=pr(e,null);return bt(r,function(a){return a&&i!=null&&a[t]===i})}}function xS(t,e){return e.hasOwnProperty("subType")?bt(t,function(r){return r&&r.subType===e.subType}):t}function SS(t){var e=Ae();return t&&N(gt(t.replaceMerge),function(r){process.env.NODE_ENV!=="production"&&Ee(Ze.hasClass(r),'"'+r+'" is not valid component main type in "replaceMerge"'),e.set(r,!0)}),{replaceMergeMainTypeMap:e}}xn(sm,am);var uz=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],ES=function(){function t(e){N(uz,function(r){this[r]=dt(e[r],e)},this)}return t}(),um={},lm=function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(e,r){var n=[];N(um,function(i,a){var o=i.create(e,r);n=n.concat(o||[])}),this._coordinateSystems=n},t.prototype.update=function(e,r){N(this._coordinateSystems,function(n){n.update&&n.update(e,r)})},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(e,r){um[e]=r},t.get=function(e){return um[e]},t}(),lz=/^(min|max)?(.+)$/,fz=function(){function t(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return t.prototype.setOption=function(e,r,n){e&&(N(gt(e.series),function(o){o&&o.data&&rr(o.data)&&Sf(o.data)}),N(gt(e.dataset),function(o){o&&o.source&&rr(o.source)&&Sf(o.source)})),e=$e(e);var i=this._optionBackup,a=cz(e,r,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},t.prototype.mountOption=function(e){var r=this._optionBackup;return this._timelineOptions=r.timelineOptions,this._mediaList=r.mediaList,this._mediaDefault=r.mediaDefault,this._currentMediaIndices=[],$e(e?r.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(e){var r,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(r=$e(n[i.getCurrentIndex()]))}return r},t.prototype.getMediaOption=function(e){var r=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var u=0,l=i.length;u<l;u++)hz(i[u].query,r,n)&&o.push(u);return!o.length&&a&&(o=[-1]),o.length&&!vz(o,this._currentMediaIndices)&&(s=ye(o,function(f){return $e(f===-1?a.option:i[f].option)})),this._currentMediaIndices=o,s},t}();function cz(t,e,r){var n=[],i,a,o=t.baseOption,s=t.timeline,u=t.options,l=t.media,f=!!t.media,c=!!(u||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((c||f)&&(t.options=t.media=null),a=t),f&&(he(l)?N(l,function(d){process.env.NODE_ENV!=="production"&&d&&!d.option&&we(d.query)&&we(d.query.option)&&Gt("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),d&&d.option&&(d.query?n.push(d):i||(i=d))}):process.env.NODE_ENV!=="production"&&Gt("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")),h(a),N(u,function(d){return h(d)}),N(n,function(d){return h(d.option)});function h(d){N(e,function(p){p(d,r)})}return{baseOption:a,timelineOptions:u||[],mediaDefault:i,mediaList:n}}function hz(t,e,r){var n={width:e,height:r,aspectratio:e/r},i=!0;return N(t,function(a,o){var s=o.match(lz);if(!(!s||!s[1]||!s[2])){var u=s[1],l=s[2].toLowerCase();dz(n[l],a,u)||(i=!1)}}),i}function dz(t,e,r){return r==="min"?t>=e:r==="max"?t<=e:t===e}function vz(t,e){return t.join(",")===e.join(",")}var Xr=N,ju=we,AS=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function fm(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=AS.length;r<n;r++){var i=AS[r],a=e.normal,o=e.emphasis;a&&a[i]&&(process.env.NODE_ENV!=="production"&&Mt("itemStyle.normal."+i,i),t[i]=t[i]||{},t[i].normal?Qe(t[i].normal,a[i]):t[i].normal=a[i],a[i]=null),o&&o[i]&&(process.env.NODE_ENV!=="production"&&Mt("itemStyle.emphasis."+i,"emphasis."+i),t[i]=t[i]||{},t[i].emphasis?Qe(t[i].emphasis,o[i]):t[i].emphasis=o[i],o[i]=null)}}function Yt(t,e,r){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,i=t[e].emphasis;n&&(process.env.NODE_ENV!=="production"&&On("'normal' hierarchy in "+e+" has been removed since 4.0. All style properties are configured in "+e+" directly now."),r?(t[e].normal=t[e].emphasis=null,je(t[e],n)):t[e]=n),i&&(process.env.NODE_ENV!=="production"&&On(e+".emphasis has been changed to emphasis."+e+" since 4.0"),t.emphasis=t.emphasis||{},t.emphasis[e]=i,i.focus&&(t.emphasis.focus=i.focus),i.blurScope&&(t.emphasis.blurScope=i.blurScope))}}function Vu(t){Yt(t,"itemStyle"),Yt(t,"lineStyle"),Yt(t,"areaStyle"),Yt(t,"label"),Yt(t,"labelLine"),Yt(t,"upperLabel"),Yt(t,"edgeLabel")}function Et(t,e){var r=ju(t)&&t[e],n=ju(r)&&r.textStyle;if(n){process.env.NODE_ENV!=="production"&&On("textStyle hierarchy in "+e+" has been removed since 4.0. All textStyle properties are configured in "+e+" directly now.");for(var i=0,a=pD.length;i<a;i++){var o=pD[i];n.hasOwnProperty(o)&&(r[o]=n[o])}}}function Kr(t){t&&(Vu(t),Et(t,"label"),t.emphasis&&Et(t.emphasis,"label"))}function pz(t){if(ju(t)){fm(t),Vu(t),Et(t,"label"),Et(t,"upperLabel"),Et(t,"edgeLabel"),t.emphasis&&(Et(t.emphasis,"label"),Et(t.emphasis,"upperLabel"),Et(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(fm(e),Kr(e));var r=t.markLine;r&&(fm(r),Kr(r));var n=t.markArea;n&&Kr(n);var i=t.data;if(t.type==="graph"){i=i||t.nodes;var a=t.links||t.edges;if(a&&!rr(a))for(var o=0;o<a.length;o++)Kr(a[o]);N(t.categories,function(l){Vu(l)})}if(i&&!rr(i))for(var o=0;o<i.length;o++)Kr(i[o]);if(e=t.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)Kr(s[o]);if(r=t.markLine,r&&r.data)for(var u=r.data,o=0;o<u.length;o++)he(u[o])?(Kr(u[o][0]),Kr(u[o][1])):Kr(u[o]);t.type==="gauge"?(Et(t,"axisLabel"),Et(t,"title"),Et(t,"detail")):t.type==="treemap"?(Yt(t.breadcrumb,"itemStyle"),N(t.levels,function(l){Vu(l)})):t.type==="tree"&&Vu(t.leaves)}}function di(t){return he(t)?t:t?[t]:[]}function TS(t){return(he(t)?t[0]:t)||{}}function gz(t,e){Xr(di(t.series),function(n){ju(n)&&pz(n)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),Xr(r,function(n){Xr(di(t[n]),function(i){i&&(Et(i,"axisLabel"),Et(i.axisPointer,"label"))})}),Xr(di(t.parallel),function(n){var i=n&&n.parallelAxisDefault;Et(i,"axisLabel"),Et(i&&i.axisPointer,"label")}),Xr(di(t.calendar),function(n){Yt(n,"itemStyle"),Et(n,"dayLabel"),Et(n,"monthLabel"),Et(n,"yearLabel")}),Xr(di(t.radar),function(n){Et(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name,process.env.NODE_ENV!=="production"&&On("name property in radar component has been changed to axisName")),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap,process.env.NODE_ENV!=="production"&&On("nameGap property in radar component has been changed to axisNameGap")),process.env.NODE_ENV!=="production"&&Xr(n.indicator,function(i){i.text&&Mt("text","name","radar.indicator")})}),Xr(di(t.geo),function(n){ju(n)&&(Kr(n),Xr(di(n.regions),function(i){Kr(i)}))}),Xr(di(t.timeline),function(n){Kr(n),Yt(n,"label"),Yt(n,"itemStyle"),Yt(n,"controlStyle",!0);var i=n.data;he(i)&&N(i,function(a){we(a)&&(Yt(a,"label"),Yt(a,"itemStyle"))})}),Xr(di(t.toolbox),function(n){Yt(n,"iconStyle"),Xr(n.feature,function(i){Yt(i,"iconStyle")})}),Et(TS(t.axisPointer),"label"),Et(TS(t.tooltip).axisPointer,"label")}function mz(t,e){for(var r=e.split(","),n=t,i=0;i<r.length&&(n=n&&n[r[i]],n!=null);i++);return n}function yz(t,e,r,n){for(var i=e.split(","),a=t,o,s=0;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];a[i[s]]==null&&(a[i[s]]=r)}function OS(t){t&&N(bz,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var bz=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Cz=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],cm=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Hu(t){var e=t&&t.itemStyle;if(e)for(var r=0;r<cm.length;r++){var n=cm[r][1],i=cm[r][0];e[n]!=null&&(e[i]=e[n],process.env.NODE_ENV!=="production"&&Mt(n,i))}}function PS(t){t&&t.alignTo==="edge"&&t.margin!=null&&t.edgeDistance==null&&(process.env.NODE_ENV!=="production"&&Mt("label.margin","label.edgeDistance","pie"),t.edgeDistance=t.margin)}function BS(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay,process.env.NODE_ENV!=="production"&&Mt("downplay","blur","sunburst"))}function wz(t){t&&t.focusNodeAdjacency!=null&&(t.emphasis=t.emphasis||{},t.emphasis.focus==null&&(process.env.NODE_ENV!=="production"&&Mt("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),t.emphasis.focus="adjacency"))}function MS(t,e){if(t)for(var r=0;r<t.length;r++)e(t[r]),t[r]&&MS(t[r].children,e)}function FS(t,e){gz(t,e),t.series=gt(t.series),N(t.series,function(r){if(we(r)){var n=r.type;if(n==="line")r.clipOverflow!=null&&(r.clip=r.clipOverflow,process.env.NODE_ENV!=="production"&&Mt("clipOverflow","clip","line"));else if(n==="pie"||n==="gauge"){r.clockWise!=null&&(r.clockwise=r.clockWise,process.env.NODE_ENV!=="production"&&Mt("clockWise","clockwise")),PS(r.label);var i=r.data;if(i&&!rr(i))for(var a=0;a<i.length;a++)PS(i[a]);r.hoverOffset!=null&&(r.emphasis=r.emphasis||{},(r.emphasis.scaleSize=null)&&(process.env.NODE_ENV!=="production"&&Mt("hoverOffset","emphasis.scaleSize"),r.emphasis.scaleSize=r.hoverOffset))}else if(n==="gauge"){var o=mz(r,"pointer.color");o!=null&&yz(r,"itemStyle.color",o)}else if(n==="bar"){Hu(r),Hu(r.backgroundStyle),Hu(r.emphasis);var i=r.data;if(i&&!rr(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(Hu(i[a]),Hu(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=r.highlightPolicy;s&&(r.emphasis=r.emphasis||{},r.emphasis.focus||(r.emphasis.focus=s,process.env.NODE_ENV!=="production"&&Mt("highlightPolicy","emphasis.focus","sunburst"))),BS(r),MS(r.data,BS)}else n==="graph"||n==="sankey"?wz(r):n==="map"&&(r.mapType&&!r.map&&(process.env.NODE_ENV!=="production"&&Mt("mapType","map","map"),r.map=r.mapType),r.mapLocation&&(process.env.NODE_ENV!=="production"&&On("`mapLocation` is not used anymore."),je(r,r.mapLocation)));r.hoverAnimation!=null&&(r.emphasis=r.emphasis||{},r.emphasis&&r.emphasis.scale==null&&(process.env.NODE_ENV!=="production"&&Mt("hoverAnimation","emphasis.scale"),r.emphasis.scale=r.hoverAnimation)),OS(r)}}),t.dataRange&&(t.visualMap=t.dataRange),N(Cz,function(r){var n=t[r];n&&(he(n)||(n=[n]),N(n,function(i){OS(i)}))})}function _z(t){var e=Ae();t.eachSeries(function(r){var n=r.get("stack");if(n){var i=e.get(n)||e.set(n,[]),a=r.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.length&&a.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),e.each(Dz)}function Dz(t){N(t,function(e,r){var n=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,u=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(l,f,c){var h=o.get(e.stackedDimension,c);if(isNaN(h))return i;var d,p;s?p=o.getRawIndex(c):d=o.get(e.stackedByDimension,c);for(var g=NaN,v=r-1;v>=0;v--){var m=t[v];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,d)),p>=0){var y=m.data.getByRawIndex(m.stackResultDimension,p);if(u==="all"||u==="positive"&&y>0||u==="negative"&&y<0||u==="samesign"&&h>=0&&y>0||u==="samesign"&&h<=0&&y<0){h=Xk(h,y),g=y;break}}}return n[0]=h,n[1]=g,n})})}var qc=function(){function t(e){this.data=e.data||(e.sourceFormat===Rn?{}:[]),this.sourceFormat=e.sourceFormat||gS,this.seriesLayoutBy=e.seriesLayoutBy||Nn,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;n<r.length;n++){var i=r[n];i.type==null&&yS(this,n)===jt.Must&&(i.type="ordinal")}}return t}();function hm(t){return t instanceof qc}function dm(t,e,r){r=r||IS(t);var n=e.seriesLayoutBy,i=Sz(t,r,n,e.sourceHeader,e.dimensions),a=new qc({data:t,sourceFormat:r,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:$e(e)});return a}function LS(t){return new qc({data:t,sourceFormat:rr(t)?hi:qr})}function xz(t){return new qc({data:t.data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:$e(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})}function IS(t){var e=gS;if(rr(t))e=hi;else if(he(t)){t.length===0&&(e=ir);for(var r=0,n=t.length;r<n;r++){var i=t[r];if(i!=null){if(he(i)||rr(i)){e=ir;break}else if(we(i)){e=Yr;break}}}}else if(we(t)){for(var a in t)if(xe(t,a)&&Wt(t[a])){e=Rn;break}}return e}function Sz(t,e,r,n,i){var a,o;if(!t)return{dimensionsDefine:RS(i),startIndex:o,dimensionsDetectedCount:a};if(e===ir){var s=t;n==="auto"||n==null?NS(function(l){l!=null&&l!=="-"&&(be(l)?o==null&&(o=1):o=0)},r,s,10):o=nt(n)?n:n?1:0,!i&&o===1&&(i=[],NS(function(l,f){i[f]=l!=null?l+"":""},r,s,1/0)),a=i?i.length:r===us?s.length:s[0]?s[0].length:null}else if(e===Yr)i||(i=Ez(t));else if(e===Rn)i||(i=[],N(t,function(l,f){i.push(f)}));else if(e===qr){var u=yu(t[0]);a=he(u)&&u.length||1}else e===hi&&process.env.NODE_ENV!=="production"&&Ee(!!i,"dimensions must be given if data is TypedArray.");return{startIndex:o,dimensionsDefine:RS(i),dimensionsDetectedCount:a}}function Ez(t){for(var e=0,r;e<t.length&&!(r=t[e++]););if(r)return Ke(r)}function RS(t){if(t){var e=Ae();return ye(t,function(r,n){r=we(r)?r:{name:r};var i={name:r.name,displayName:r.displayName,type:r.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=e.get(i.name);return a?i.name+="-"+a.count++:e.set(i.name,{count:1}),i})}}function NS(t,e,r,n){if(e===us)for(var i=0;i<r.length&&i<n;i++)t(r[i]?r[i][0]:null,i);else for(var a=r[0]||[],i=0;i<a.length&&i<n;i++)t(a[i],i)}function kS(t){var e=t.sourceFormat;return e===Yr||e===Rn}var Ya,Xa,Ka,zS,jS,VS=function(){function t(e,r){var n=hm(e)?e:LS(e);this._source=n;var i=this._data=n.data;if(n.sourceFormat===hi){if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=r,this._data=i}jS(this,i,n)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(e,r){},t.prototype.appendData=function(e){},t.prototype.clean=function(){},t.protoInitialize=function(){var e=t.prototype;e.pure=!1,e.persistent=!0}(),t.internalField=function(){var e;jS=function(o,s,u){var l=u.sourceFormat,f=u.seriesLayoutBy,c=u.startIndex,h=u.dimensionsDefine,d=zS[pm(l,f)];if(process.env.NODE_ENV!=="production"&&Ee(d,"Invalide sourceFormat: "+l),oe(o,d),l===hi)o.getItem=r,o.count=i,o.fillStorage=n;else{var p=WS(l,f);o.getItem=dt(p,null,s,c,h);var g=GS(l,f);o.count=dt(g,null,s,c,h)}};var r=function(o,s){o=o-this._offset,s=s||[];for(var u=this._data,l=this._dimSize,f=l*o,c=0;c<l;c++)s[c]=u[f+c];return s},n=function(o,s,u,l){for(var f=this._data,c=this._dimSize,h=0;h<c;h++){for(var d=l[h],p=d[0]==null?1/0:d[0],g=d[1]==null?-1/0:d[1],v=s-o,m=u[h],y=0;y<v;y++){var b=f[y*c+h];m[o+y]=b,b<p&&(p=b),b>g&&(g=b)}d[0]=p,d[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};zS=(e={},e[ir+"_"+Nn]={pure:!0,appendData:a},e[ir+"_"+us]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Yr]={pure:!0,appendData:a},e[Rn]={pure:!0,appendData:function(o){var s=this._data;N(o,function(u,l){for(var f=s[l]||(s[l]=[]),c=0;c<(u||[]).length;c++)f.push(u[c])})}},e[qr]={appendData:a},e[hi]={persistent:!1,pure:!0,appendData:function(o){process.env.NODE_ENV!=="production"&&Ee(rr(o),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),t}(),HS=function(t,e,r,n){return t[n]},Az=(Ya={},Ya[ir+"_"+Nn]=function(t,e,r,n){return t[n+e]},Ya[ir+"_"+us]=function(t,e,r,n,i){n+=e;for(var a=i||[],o=t,s=0;s<o.length;s++){var u=o[s];a[s]=u?u[n]:null}return a},Ya[Yr]=HS,Ya[Rn]=function(t,e,r,n,i){for(var a=i||[],o=0;o<r.length;o++){var s=r[o].name;if(process.env.NODE_ENV!=="production"&&s==null)throw new Error;var u=t[s];a[o]=u?u[n]:null}return a},Ya[qr]=HS,Ya);function WS(t,e){var r=Az[pm(t,e)];return process.env.NODE_ENV!=="production"&&Ee(r,'Do not support get item on "'+t+'", "'+e+'".'),r}var $S=function(t,e,r){return t.length},Tz=(Xa={},Xa[ir+"_"+Nn]=function(t,e,r){return Math.max(0,t.length-e)},Xa[ir+"_"+us]=function(t,e,r){var n=t[0];return n?Math.max(0,n.length-e):0},Xa[Yr]=$S,Xa[Rn]=function(t,e,r){var n=r[0].name;if(process.env.NODE_ENV!=="production"&&n==null)throw new Error;var i=t[n];return i?i.length:0},Xa[qr]=$S,Xa);function GS(t,e){var r=Tz[pm(t,e)];return process.env.NODE_ENV!=="production"&&Ee(r,'Do not support count on "'+t+'", "'+e+'".'),r}var vm=function(t,e,r){return t[e]},Oz=(Ka={},Ka[ir]=vm,Ka[Yr]=function(t,e,r){return t[r]},Ka[Rn]=vm,Ka[qr]=function(t,e,r){var n=yu(t);return n instanceof Array?n[e]:n},Ka[hi]=vm,Ka);function US(t){var e=Oz[t];return process.env.NODE_ENV!=="production"&&Ee(e,'Do not support get value on "'+t+'".'),e}function pm(t,e){return t===ir?t+"_"+e:t}function ls(t,e,r){if(t){var n=t.getRawDataItem(e);if(n!=null){var i=t.getStore(),a=i.getSource().sourceFormat;if(r!=null){var o=t.getDimensionIndex(r),s=i.getDimensionProperty(o);return US(a)(n,o,s)}else{var u=n;return a===qr&&(u=yu(n)),u}}}}var Pz=/\{@(.+?)\}/g,Bz=function(){function t(){}return t.prototype.getDataParams=function(e,r){var n=this.getData(r),i=this.getRawValue(e,r),a=n.getRawIndex(e),o=n.getName(e),s=n.getRawDataItem(e),u=n.getItemVisual(e,"style"),l=u&&u[n.getItemVisual(e,"drawType")||"fill"],f=u&&u.stroke,c=this.mainType,h=c==="series",d=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:a,data:s,dataType:r,value:i,color:l,borderColor:f,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(e,r,n,i,a,o){r=r||"normal";var s=this.getData(n),u=this.getDataParams(e,n);if(o&&(u.value=o.interpolatedValue),i!=null&&he(u.value)&&(u.value=u.value[i]),!a){var l=s.getItemModel(e);a=l.get(r==="normal"?["label","formatter"]:[r,"label","formatter"])}if(De(a))return u.status=r,u.dimensionIndex=i,a(u);if(be(a)){var f=cS(a,u);return f.replace(Pz,function(c,h){var d=h.length,p=h;p.charAt(0)==="["&&p.charAt(d-1)==="]"&&(p=+p.slice(1,d-1),process.env.NODE_ENV!=="production"&&isNaN(p)&&Gt("Invalide label formatter: @"+h+", only support @[0], @[1], @[2], ..."));var g=ls(s,e,p);if(o&&he(o.interpolatedValue)){var v=s.getDimensionIndex(p);v>=0&&(g=o.interpolatedValue[v])}return g!=null?g+"":""})}},t.prototype.getRawValue=function(e,r){return ls(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function qS(t){var e,r;return we(t)?t.type?r=t:process.env.NODE_ENV!=="production"&&console.warn("The return type of `formatTooltip` is not supported: "+vr(t)):e=t,{text:e,frag:r}}function Wu(t){return new Mz(t)}var Mz=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.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(e&&e.modBy),l=e&&e.modDataCount||0;(o!==u||s!==l)&&(a="reset");function f(y){return!(y>=1)&&(y=1),y}var c;(this._dirty||a==="reset")&&(this._dirty=!1,c=this._doReset(n)),this._modBy=u,this._modDataCount=l;var h=e&&e.step;if(r?(process.env.NODE_ENV!=="production"&&Ee(r._outputDueEnd!=null),this._dueEnd=r._outputDueEnd):(process.env.NODE_ENV!=="production"&&Ee(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var d=this._dueIndex,p=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(c||d<p)){var g=this._progress;if(he(g))for(var v=0;v<g.length;v++)this._doProgress(g[v],d,p,u,l);else this._doProgress(g,d,p,u,l)}this._dueIndex=p;var m=this._settedOutputEnd!=null?this._settedOutputEnd:p;process.env.NODE_ENV!=="production"&&Ee(m>=this._outputDueEnd),this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(e,r,n,i,a){YS.reset(r,n,i,a),this._callingProgress=e,this._callingProgress({start:r,end:n,count:n-r,next:YS.next},this.context)},t.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var r,n;!e&&this._reset&&(r=this._reset(this.context),r&&r.progress&&(n=r.forceFirstProgress,r=r.progress),he(r)&&!r.length&&(r=null)),this._progress=r,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(e){process.env.NODE_ENV!=="production"&&Ee(e&&!e._disposed&&e!==this),(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},t}(),YS=function(){var t,e,r,n,i,a={reset:function(u,l,f,c){e=u,t=l,r=f,n=c,i=Math.ceil(n/r),a.next=r>1&&n>0?s:o}};return a;function o(){return e<t?e++:null}function s(){var u=e%i*r+Math.ceil(e/i),l=e>=t?null:u<n?u:e;return e++,l}}();function Yc(t,e){var r=e&&e.type;return r==="ordinal"?t:(r==="time"&&!nt(t)&&t!=null&&t!=="-"&&(t=+oi(t)),t==null||t===""?NaN:Number(t))}var Fz=Ae({number:function(t){return parseFloat(t)},time:function(t){return+oi(t)},trim:function(t){return be(t)?Sn(t):t}});function XS(t){return Fz.get(t)}var KS={lt:function(t,e){return t<e},lte:function(t,e){return t<=e},gt:function(t,e){return t>e},gte:function(t,e){return t>=e}},Lz=function(){function t(e,r){if(!nt(r)){var n="";process.env.NODE_ENV!=="production"&&(n='rvalue of "<", ">", "<=", ">=" can only be number in filter.'),qe(n)}this._opFn=KS[e],this._rvalFloat=Mi(r)}return t.prototype.evaluate=function(e){return nt(e)?this._opFn(e,this._rvalFloat):this._opFn(Mi(e),this._rvalFloat)},t}(),ZS=function(){function t(e,r){var n=e==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,r){var n=nt(e)?e:Mi(e),i=nt(r)?r:Mi(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=be(e),u=be(r);s&&(n=u?e:0),u&&(i=s?r:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},t}(),Iz=function(){function t(e,r){this._rval=r,this._isEQ=e,this._rvalTypeof=typeof r,this._rvalFloat=Mi(r)}return t.prototype.evaluate=function(e){var r=e===this._rval;if(!r){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=Mi(e)===this._rvalFloat)}return this._isEQ?r:!r},t}();function Rz(t,e){return t==="eq"||t==="ne"?new Iz(t==="eq",e):xe(KS,t)?new Lz(t,e):null}var Nz=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return Yc(e,r)},t}();function kz(t,e){var r=new Nz,n=t.data,i=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==Nn&&(process.env.NODE_ENV!=="production"&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),qe(o));var s=[],u={},l=t.dimensionsDefine;if(l)N(l,function(g,v){var m=g.name,y={index:v,name:m,displayName:g.displayName};if(s.push(y),m!=null){var b="";xe(u,m)&&(process.env.NODE_ENV!=="production"&&(b='dimension name "'+m+'" duplicated.'),qe(b)),u[m]=y}});else for(var f=0;f<t.dimensionsDetectedCount;f++)s.push({index:f});var c=WS(i,Nn);e.__isBuiltIn&&(r.getRawDataItem=function(g){return c(n,a,s,g)},r.getRawData=dt(zz,null,t)),r.cloneRawData=dt(jz,null,t);var h=GS(i,Nn);r.count=dt(h,null,n,a,s);var d=US(i);r.retrieveValue=function(g,v){var m=c(n,a,s,g);return p(m,v)};var p=r.retrieveValueFromItem=function(g,v){if(g!=null){var m=s[v];if(m)return d(g,v,m.name)}};return r.getDimensionInfo=dt(Vz,null,s,u),r.cloneAllDimensionInfo=dt(Hz,null,s),r}function zz(t){var e=t.sourceFormat;if(!gm(e)){var r="";process.env.NODE_ENV!=="production"&&(r="`getRawData` is not supported in source format "+e),qe(r)}return t.data}function jz(t){var e=t.sourceFormat,r=t.data;if(!gm(e)){var n="";process.env.NODE_ENV!=="production"&&(n="`cloneRawData` is not supported in source format "+e),qe(n)}if(e===ir){for(var i=[],a=0,o=r.length;a<o;a++)i.push(r[a].slice());return i}else if(e===Yr){for(var i=[],a=0,o=r.length;a<o;a++)i.push(oe({},r[a]));return i}}function Vz(t,e,r){if(r!=null){if(nt(r)||!isNaN(r)&&!xe(e,r))return t[r];if(xe(e,r))return e[r]}}function Hz(t){return $e(t)}var JS=Ae();function Wz(t){t=$e(t);var e=t.type,r="";e||(process.env.NODE_ENV!=="production"&&(r="Must have a `type` when `registerTransform`."),qe(r));var n=e.split(":");n.length!==2&&(process.env.NODE_ENV!=="production"&&(r='Name must include namespace like "ns:regression".'),qe(r));var i=!1;n[0]==="echarts"&&(e=n[1],i=!0),t.__isBuiltIn=i,JS.set(e,t)}function $z(t,e,r){var n=gt(t),i=n.length,a="";i||(process.env.NODE_ENV!=="production"&&(a="If `transform` declared, it should at least contain one transform."),qe(a));for(var o=0,s=i;o<s;o++){var u=n[o];e=Gz(u,e,r,i===1?null:o),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function Gz(t,e,r,n){var i="";e.length||(process.env.NODE_ENV!=="production"&&(i="Must have at least one upstream dataset."),qe(i)),we(t)||(process.env.NODE_ENV!=="production"&&(i="transform declaration must be an object rather than "+typeof t+"."),qe(i));var a=t.type,o=JS.get(a);o||(process.env.NODE_ENV!=="production"&&(i='Can not find transform on type "'+a+'".'),qe(i));var s=ye(e,function(f){return kz(f,o)}),u=gt(o.transform({upstream:s[0],upstreamList:s,config:$e(t.config)}));if(process.env.NODE_ENV!=="production"&&t.print){var l=ye(u,function(f){var c=n!=null?" === pipe index: "+n:"";return["=== dataset index: "+r.datasetIndex+c+" ===","- transform result data:",vr(f.data),"- transform result dimensions:",vr(f.dimensions)].join(`
158
+ echarts.use([`+P+"]);":"Unknown series "+E))}return}if(c==="tooltip"){if(b){process.env.NODE_ENV!=="production"&&(w||(xt("Currently only one tooltip component is allowed."),w=!0));return}b=!0}if(D&&D.constructor===O)D.name=C.keyInfo.name,D.mergeOption(x,this),D.optionUpdated(x,!1);else{var F=oe({componentIndex:_},C.keyInfo);D=new O(x,this,this,F),oe(D,F),C.brandNew&&(D.__requireNewView=!0),D.init(x,this,this),D.optionUpdated(null,!0)}}D?(v.push(D.option),m.push(D),y++):(v.push(void 0),m.push(void 0))},this),i[c]=v,a.set(c,m),o.set(c,y),c==="series"&&Gc(this)}this._seriesIndices||Gc(this)},e.prototype.getOption=function(){var r=$e(this.option);return N(r,function(n,i){if(Ze.hasClass(i)){for(var a=gt(n),o=a.length,s=!1,u=o-1;u>=0;u--)a[u]&&!Yo(a[u])?s=!0:(a[u]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[o0],r},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},e.prototype.queryComponents=function(r){var n=r.mainType;if(!n)return[];var i=r.index,a=r.id,o=r.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var u;return i!=null?(u=[],N(gt(i),function(l){s[l]&&u.push(s[l])})):a!=null?u=DS("id",a,s):o!=null?u=DS("name",o,s):u=bt(s,function(l){return!!l}),xS(u,r)},e.prototype.findComponents=function(r){var n=r.query,i=r.mainType,a=s(n),o=a?this.queryComponents(a):bt(this._componentsMap.get(i),function(l){return!!l});return u(xS(o,r));function s(l){var f=i+"Index",c=i+"Id",h=i+"Name";return l&&(l[f]!=null||l[c]!=null||l[h]!=null)?{mainType:i,index:l[f],id:l[c],name:l[h]}:null}function u(l){return r.filter?bt(l,r.filter):l}},e.prototype.eachComponent=function(r,n,i){var a=this._componentsMap;if(De(r)){var o=n,s=r;a.each(function(c,h){for(var d=0;c&&d<c.length;d++){var p=c[d];p&&s.call(o,h,p,p.componentIndex)}})}else for(var u=be(r)?a.get(r):we(r)?this.findComponents(r):null,l=0;u&&l<u.length;l++){var f=u[l];f&&n.call(i,f,f.componentIndex)}},e.prototype.getSeriesByName=function(r){var n=pr(r,null);return bt(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},e.prototype.getSeriesByIndex=function(r){return this._componentsMap.get("series")[r]},e.prototype.getSeriesByType=function(r){return bt(this._componentsMap.get("series"),function(n){return!!n&&n.subType===r})},e.prototype.getSeries=function(){return bt(this._componentsMap.get("series"),function(r){return!!r})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(r,n){zu(this),N(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];r.call(n,a,i)},this)},e.prototype.eachRawSeries=function(r,n){N(this._componentsMap.get("series"),function(i){i&&r.call(n,i,i.componentIndex)})},e.prototype.eachSeriesByType=function(r,n,i){zu(this),N(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===r&&n.call(i,o,a)},this)},e.prototype.eachRawSeriesByType=function(r,n,i){return N(this.getSeriesByType(r),n,i)},e.prototype.isSeriesFiltered=function(r){return zu(this),this._seriesIndicesMap.get(r.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(r,n){zu(this);var i=[];N(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];r.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=Ae(i)},e.prototype.restoreData=function(r){Gc(this);var n=this._componentsMap,i=[];n.each(function(a,o){Ze.hasClass(o)&&i.push(o)}),Ze.topologicalTravel(i,Ze.getAllClassMainTypes(),function(a){N(n.get(a),function(o){o&&(a!=="series"||!oz(o,r))&&o.restoreData()})})},e.internalField=function(){Gc=function(r){var n=r._seriesIndices=[];N(r._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),r._seriesIndicesMap=Ae(n)},zu=function(r){if(process.env.NODE_ENV!=="production"&&!r._seriesIndices)throw new Error("Option should contains series.")},wS=function(r,n){r.option={},r.option[o0]=_S,r._componentsMap=Ae({series:[]}),r._componentsCount=Ae();var i=n.aria;we(i)&&i.enabled==null&&(i.enabled=!0),sz(n,r._theme.option),Qe(n,q7,!1),r._mergeOption(n,null)}}(),e}(Ct);function oz(t,e){if(e){var r=e.seriesIndex,n=e.seriesId,i=e.seriesName;return r!=null&&t.componentIndex!==r||n!=null&&t.id!==n||i!=null&&t.name!==i}}function sz(t,e){var r=t.color&&!t.colorLayer;N(e,function(n,i){i==="colorLayer"&&r||Ze.hasClass(i)||(typeof n=="object"?t[i]=t[i]?Qe(t[i],n,!1):$e(n):t[i]==null&&(t[i]=n))})}function DS(t,e,r){if(he(e)){var n=Ae();return N(e,function(a){if(a!=null){var o=pr(a,null);o!=null&&n.set(a,!0)}}),bt(r,function(a){return a&&n.get(a[t])})}else{var i=pr(e,null);return bt(r,function(a){return a&&i!=null&&a[t]===i})}}function xS(t,e){return e.hasOwnProperty("subType")?bt(t,function(r){return r&&r.subType===e.subType}):t}function SS(t){var e=Ae();return t&&N(gt(t.replaceMerge),function(r){process.env.NODE_ENV!=="production"&&Ee(Ze.hasClass(r),'"'+r+'" is not valid component main type in "replaceMerge"'),e.set(r,!0)}),{replaceMergeMainTypeMap:e}}xn(s0,a0);var uz=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],ES=function(){function t(e){N(uz,function(r){this[r]=dt(e[r],e)},this)}return t}(),u0={},l0=function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(e,r){var n=[];N(u0,function(i,a){var o=i.create(e,r);n=n.concat(o||[])}),this._coordinateSystems=n},t.prototype.update=function(e,r){N(this._coordinateSystems,function(n){n.update&&n.update(e,r)})},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(e,r){u0[e]=r},t.get=function(e){return u0[e]},t}(),lz=/^(min|max)?(.+)$/,fz=function(){function t(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return t.prototype.setOption=function(e,r,n){e&&(N(gt(e.series),function(o){o&&o.data&&rr(o.data)&&Sf(o.data)}),N(gt(e.dataset),function(o){o&&o.source&&rr(o.source)&&Sf(o.source)})),e=$e(e);var i=this._optionBackup,a=cz(e,r,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},t.prototype.mountOption=function(e){var r=this._optionBackup;return this._timelineOptions=r.timelineOptions,this._mediaList=r.mediaList,this._mediaDefault=r.mediaDefault,this._currentMediaIndices=[],$e(e?r.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(e){var r,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(r=$e(n[i.getCurrentIndex()]))}return r},t.prototype.getMediaOption=function(e){var r=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var u=0,l=i.length;u<l;u++)hz(i[u].query,r,n)&&o.push(u);return!o.length&&a&&(o=[-1]),o.length&&!vz(o,this._currentMediaIndices)&&(s=ye(o,function(f){return $e(f===-1?a.option:i[f].option)})),this._currentMediaIndices=o,s},t}();function cz(t,e,r){var n=[],i,a,o=t.baseOption,s=t.timeline,u=t.options,l=t.media,f=!!t.media,c=!!(u||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((c||f)&&(t.options=t.media=null),a=t),f&&(he(l)?N(l,function(d){process.env.NODE_ENV!=="production"&&d&&!d.option&&we(d.query)&&we(d.query.option)&&Gt("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),d&&d.option&&(d.query?n.push(d):i||(i=d))}):process.env.NODE_ENV!=="production"&&Gt("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")),h(a),N(u,function(d){return h(d)}),N(n,function(d){return h(d.option)});function h(d){N(e,function(p){p(d,r)})}return{baseOption:a,timelineOptions:u||[],mediaDefault:i,mediaList:n}}function hz(t,e,r){var n={width:e,height:r,aspectratio:e/r},i=!0;return N(t,function(a,o){var s=o.match(lz);if(!(!s||!s[1]||!s[2])){var u=s[1],l=s[2].toLowerCase();dz(n[l],a,u)||(i=!1)}}),i}function dz(t,e,r){return r==="min"?t>=e:r==="max"?t<=e:t===e}function vz(t,e){return t.join(",")===e.join(",")}var Xr=N,ju=we,AS=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function f0(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=AS.length;r<n;r++){var i=AS[r],a=e.normal,o=e.emphasis;a&&a[i]&&(process.env.NODE_ENV!=="production"&&Mt("itemStyle.normal."+i,i),t[i]=t[i]||{},t[i].normal?Qe(t[i].normal,a[i]):t[i].normal=a[i],a[i]=null),o&&o[i]&&(process.env.NODE_ENV!=="production"&&Mt("itemStyle.emphasis."+i,"emphasis."+i),t[i]=t[i]||{},t[i].emphasis?Qe(t[i].emphasis,o[i]):t[i].emphasis=o[i],o[i]=null)}}function Yt(t,e,r){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,i=t[e].emphasis;n&&(process.env.NODE_ENV!=="production"&&On("'normal' hierarchy in "+e+" has been removed since 4.0. All style properties are configured in "+e+" directly now."),r?(t[e].normal=t[e].emphasis=null,je(t[e],n)):t[e]=n),i&&(process.env.NODE_ENV!=="production"&&On(e+".emphasis has been changed to emphasis."+e+" since 4.0"),t.emphasis=t.emphasis||{},t.emphasis[e]=i,i.focus&&(t.emphasis.focus=i.focus),i.blurScope&&(t.emphasis.blurScope=i.blurScope))}}function Vu(t){Yt(t,"itemStyle"),Yt(t,"lineStyle"),Yt(t,"areaStyle"),Yt(t,"label"),Yt(t,"labelLine"),Yt(t,"upperLabel"),Yt(t,"edgeLabel")}function Et(t,e){var r=ju(t)&&t[e],n=ju(r)&&r.textStyle;if(n){process.env.NODE_ENV!=="production"&&On("textStyle hierarchy in "+e+" has been removed since 4.0. All textStyle properties are configured in "+e+" directly now.");for(var i=0,a=pD.length;i<a;i++){var o=pD[i];n.hasOwnProperty(o)&&(r[o]=n[o])}}}function Kr(t){t&&(Vu(t),Et(t,"label"),t.emphasis&&Et(t.emphasis,"label"))}function pz(t){if(ju(t)){f0(t),Vu(t),Et(t,"label"),Et(t,"upperLabel"),Et(t,"edgeLabel"),t.emphasis&&(Et(t.emphasis,"label"),Et(t.emphasis,"upperLabel"),Et(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(f0(e),Kr(e));var r=t.markLine;r&&(f0(r),Kr(r));var n=t.markArea;n&&Kr(n);var i=t.data;if(t.type==="graph"){i=i||t.nodes;var a=t.links||t.edges;if(a&&!rr(a))for(var o=0;o<a.length;o++)Kr(a[o]);N(t.categories,function(l){Vu(l)})}if(i&&!rr(i))for(var o=0;o<i.length;o++)Kr(i[o]);if(e=t.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)Kr(s[o]);if(r=t.markLine,r&&r.data)for(var u=r.data,o=0;o<u.length;o++)he(u[o])?(Kr(u[o][0]),Kr(u[o][1])):Kr(u[o]);t.type==="gauge"?(Et(t,"axisLabel"),Et(t,"title"),Et(t,"detail")):t.type==="treemap"?(Yt(t.breadcrumb,"itemStyle"),N(t.levels,function(l){Vu(l)})):t.type==="tree"&&Vu(t.leaves)}}function di(t){return he(t)?t:t?[t]:[]}function TS(t){return(he(t)?t[0]:t)||{}}function gz(t,e){Xr(di(t.series),function(n){ju(n)&&pz(n)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),Xr(r,function(n){Xr(di(t[n]),function(i){i&&(Et(i,"axisLabel"),Et(i.axisPointer,"label"))})}),Xr(di(t.parallel),function(n){var i=n&&n.parallelAxisDefault;Et(i,"axisLabel"),Et(i&&i.axisPointer,"label")}),Xr(di(t.calendar),function(n){Yt(n,"itemStyle"),Et(n,"dayLabel"),Et(n,"monthLabel"),Et(n,"yearLabel")}),Xr(di(t.radar),function(n){Et(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name,process.env.NODE_ENV!=="production"&&On("name property in radar component has been changed to axisName")),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap,process.env.NODE_ENV!=="production"&&On("nameGap property in radar component has been changed to axisNameGap")),process.env.NODE_ENV!=="production"&&Xr(n.indicator,function(i){i.text&&Mt("text","name","radar.indicator")})}),Xr(di(t.geo),function(n){ju(n)&&(Kr(n),Xr(di(n.regions),function(i){Kr(i)}))}),Xr(di(t.timeline),function(n){Kr(n),Yt(n,"label"),Yt(n,"itemStyle"),Yt(n,"controlStyle",!0);var i=n.data;he(i)&&N(i,function(a){we(a)&&(Yt(a,"label"),Yt(a,"itemStyle"))})}),Xr(di(t.toolbox),function(n){Yt(n,"iconStyle"),Xr(n.feature,function(i){Yt(i,"iconStyle")})}),Et(TS(t.axisPointer),"label"),Et(TS(t.tooltip).axisPointer,"label")}function mz(t,e){for(var r=e.split(","),n=t,i=0;i<r.length&&(n=n&&n[r[i]],n!=null);i++);return n}function yz(t,e,r,n){for(var i=e.split(","),a=t,o,s=0;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];a[i[s]]==null&&(a[i[s]]=r)}function OS(t){t&&N(bz,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var bz=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Cz=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],c0=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Hu(t){var e=t&&t.itemStyle;if(e)for(var r=0;r<c0.length;r++){var n=c0[r][1],i=c0[r][0];e[n]!=null&&(e[i]=e[n],process.env.NODE_ENV!=="production"&&Mt(n,i))}}function PS(t){t&&t.alignTo==="edge"&&t.margin!=null&&t.edgeDistance==null&&(process.env.NODE_ENV!=="production"&&Mt("label.margin","label.edgeDistance","pie"),t.edgeDistance=t.margin)}function BS(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay,process.env.NODE_ENV!=="production"&&Mt("downplay","blur","sunburst"))}function wz(t){t&&t.focusNodeAdjacency!=null&&(t.emphasis=t.emphasis||{},t.emphasis.focus==null&&(process.env.NODE_ENV!=="production"&&Mt("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),t.emphasis.focus="adjacency"))}function MS(t,e){if(t)for(var r=0;r<t.length;r++)e(t[r]),t[r]&&MS(t[r].children,e)}function FS(t,e){gz(t,e),t.series=gt(t.series),N(t.series,function(r){if(we(r)){var n=r.type;if(n==="line")r.clipOverflow!=null&&(r.clip=r.clipOverflow,process.env.NODE_ENV!=="production"&&Mt("clipOverflow","clip","line"));else if(n==="pie"||n==="gauge"){r.clockWise!=null&&(r.clockwise=r.clockWise,process.env.NODE_ENV!=="production"&&Mt("clockWise","clockwise")),PS(r.label);var i=r.data;if(i&&!rr(i))for(var a=0;a<i.length;a++)PS(i[a]);r.hoverOffset!=null&&(r.emphasis=r.emphasis||{},(r.emphasis.scaleSize=null)&&(process.env.NODE_ENV!=="production"&&Mt("hoverOffset","emphasis.scaleSize"),r.emphasis.scaleSize=r.hoverOffset))}else if(n==="gauge"){var o=mz(r,"pointer.color");o!=null&&yz(r,"itemStyle.color",o)}else if(n==="bar"){Hu(r),Hu(r.backgroundStyle),Hu(r.emphasis);var i=r.data;if(i&&!rr(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(Hu(i[a]),Hu(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=r.highlightPolicy;s&&(r.emphasis=r.emphasis||{},r.emphasis.focus||(r.emphasis.focus=s,process.env.NODE_ENV!=="production"&&Mt("highlightPolicy","emphasis.focus","sunburst"))),BS(r),MS(r.data,BS)}else n==="graph"||n==="sankey"?wz(r):n==="map"&&(r.mapType&&!r.map&&(process.env.NODE_ENV!=="production"&&Mt("mapType","map","map"),r.map=r.mapType),r.mapLocation&&(process.env.NODE_ENV!=="production"&&On("`mapLocation` is not used anymore."),je(r,r.mapLocation)));r.hoverAnimation!=null&&(r.emphasis=r.emphasis||{},r.emphasis&&r.emphasis.scale==null&&(process.env.NODE_ENV!=="production"&&Mt("hoverAnimation","emphasis.scale"),r.emphasis.scale=r.hoverAnimation)),OS(r)}}),t.dataRange&&(t.visualMap=t.dataRange),N(Cz,function(r){var n=t[r];n&&(he(n)||(n=[n]),N(n,function(i){OS(i)}))})}function _z(t){var e=Ae();t.eachSeries(function(r){var n=r.get("stack");if(n){var i=e.get(n)||e.set(n,[]),a=r.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.length&&a.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),e.each(Dz)}function Dz(t){N(t,function(e,r){var n=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,u=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(l,f,c){var h=o.get(e.stackedDimension,c);if(isNaN(h))return i;var d,p;s?p=o.getRawIndex(c):d=o.get(e.stackedByDimension,c);for(var g=NaN,v=r-1;v>=0;v--){var m=t[v];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,d)),p>=0){var y=m.data.getByRawIndex(m.stackResultDimension,p);if(u==="all"||u==="positive"&&y>0||u==="negative"&&y<0||u==="samesign"&&h>=0&&y>0||u==="samesign"&&h<=0&&y<0){h=Xk(h,y),g=y;break}}}return n[0]=h,n[1]=g,n})})}var qc=function(){function t(e){this.data=e.data||(e.sourceFormat===Rn?{}:[]),this.sourceFormat=e.sourceFormat||gS,this.seriesLayoutBy=e.seriesLayoutBy||Nn,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;n<r.length;n++){var i=r[n];i.type==null&&yS(this,n)===jt.Must&&(i.type="ordinal")}}return t}();function h0(t){return t instanceof qc}function d0(t,e,r){r=r||IS(t);var n=e.seriesLayoutBy,i=Sz(t,r,n,e.sourceHeader,e.dimensions),a=new qc({data:t,sourceFormat:r,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:$e(e)});return a}function LS(t){return new qc({data:t,sourceFormat:rr(t)?hi:qr})}function xz(t){return new qc({data:t.data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:$e(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})}function IS(t){var e=gS;if(rr(t))e=hi;else if(he(t)){t.length===0&&(e=ir);for(var r=0,n=t.length;r<n;r++){var i=t[r];if(i!=null){if(he(i)||rr(i)){e=ir;break}else if(we(i)){e=Yr;break}}}}else if(we(t)){for(var a in t)if(xe(t,a)&&Wt(t[a])){e=Rn;break}}return e}function Sz(t,e,r,n,i){var a,o;if(!t)return{dimensionsDefine:RS(i),startIndex:o,dimensionsDetectedCount:a};if(e===ir){var s=t;n==="auto"||n==null?NS(function(l){l!=null&&l!=="-"&&(be(l)?o==null&&(o=1):o=0)},r,s,10):o=nt(n)?n:n?1:0,!i&&o===1&&(i=[],NS(function(l,f){i[f]=l!=null?l+"":""},r,s,1/0)),a=i?i.length:r===us?s.length:s[0]?s[0].length:null}else if(e===Yr)i||(i=Ez(t));else if(e===Rn)i||(i=[],N(t,function(l,f){i.push(f)}));else if(e===qr){var u=yu(t[0]);a=he(u)&&u.length||1}else e===hi&&process.env.NODE_ENV!=="production"&&Ee(!!i,"dimensions must be given if data is TypedArray.");return{startIndex:o,dimensionsDefine:RS(i),dimensionsDetectedCount:a}}function Ez(t){for(var e=0,r;e<t.length&&!(r=t[e++]););if(r)return Ke(r)}function RS(t){if(t){var e=Ae();return ye(t,function(r,n){r=we(r)?r:{name:r};var i={name:r.name,displayName:r.displayName,type:r.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=e.get(i.name);return a?i.name+="-"+a.count++:e.set(i.name,{count:1}),i})}}function NS(t,e,r,n){if(e===us)for(var i=0;i<r.length&&i<n;i++)t(r[i]?r[i][0]:null,i);else for(var a=r[0]||[],i=0;i<a.length&&i<n;i++)t(a[i],i)}function kS(t){var e=t.sourceFormat;return e===Yr||e===Rn}var Ya,Xa,Ka,zS,jS,VS=function(){function t(e,r){var n=h0(e)?e:LS(e);this._source=n;var i=this._data=n.data;if(n.sourceFormat===hi){if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=r,this._data=i}jS(this,i,n)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(e,r){},t.prototype.appendData=function(e){},t.prototype.clean=function(){},t.protoInitialize=function(){var e=t.prototype;e.pure=!1,e.persistent=!0}(),t.internalField=function(){var e;jS=function(o,s,u){var l=u.sourceFormat,f=u.seriesLayoutBy,c=u.startIndex,h=u.dimensionsDefine,d=zS[p0(l,f)];if(process.env.NODE_ENV!=="production"&&Ee(d,"Invalide sourceFormat: "+l),oe(o,d),l===hi)o.getItem=r,o.count=i,o.fillStorage=n;else{var p=WS(l,f);o.getItem=dt(p,null,s,c,h);var g=GS(l,f);o.count=dt(g,null,s,c,h)}};var r=function(o,s){o=o-this._offset,s=s||[];for(var u=this._data,l=this._dimSize,f=l*o,c=0;c<l;c++)s[c]=u[f+c];return s},n=function(o,s,u,l){for(var f=this._data,c=this._dimSize,h=0;h<c;h++){for(var d=l[h],p=d[0]==null?1/0:d[0],g=d[1]==null?-1/0:d[1],v=s-o,m=u[h],y=0;y<v;y++){var b=f[y*c+h];m[o+y]=b,b<p&&(p=b),b>g&&(g=b)}d[0]=p,d[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};zS=(e={},e[ir+"_"+Nn]={pure:!0,appendData:a},e[ir+"_"+us]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Yr]={pure:!0,appendData:a},e[Rn]={pure:!0,appendData:function(o){var s=this._data;N(o,function(u,l){for(var f=s[l]||(s[l]=[]),c=0;c<(u||[]).length;c++)f.push(u[c])})}},e[qr]={appendData:a},e[hi]={persistent:!1,pure:!0,appendData:function(o){process.env.NODE_ENV!=="production"&&Ee(rr(o),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),t}(),HS=function(t,e,r,n){return t[n]},Az=(Ya={},Ya[ir+"_"+Nn]=function(t,e,r,n){return t[n+e]},Ya[ir+"_"+us]=function(t,e,r,n,i){n+=e;for(var a=i||[],o=t,s=0;s<o.length;s++){var u=o[s];a[s]=u?u[n]:null}return a},Ya[Yr]=HS,Ya[Rn]=function(t,e,r,n,i){for(var a=i||[],o=0;o<r.length;o++){var s=r[o].name;if(process.env.NODE_ENV!=="production"&&s==null)throw new Error;var u=t[s];a[o]=u?u[n]:null}return a},Ya[qr]=HS,Ya);function WS(t,e){var r=Az[p0(t,e)];return process.env.NODE_ENV!=="production"&&Ee(r,'Do not support get item on "'+t+'", "'+e+'".'),r}var $S=function(t,e,r){return t.length},Tz=(Xa={},Xa[ir+"_"+Nn]=function(t,e,r){return Math.max(0,t.length-e)},Xa[ir+"_"+us]=function(t,e,r){var n=t[0];return n?Math.max(0,n.length-e):0},Xa[Yr]=$S,Xa[Rn]=function(t,e,r){var n=r[0].name;if(process.env.NODE_ENV!=="production"&&n==null)throw new Error;var i=t[n];return i?i.length:0},Xa[qr]=$S,Xa);function GS(t,e){var r=Tz[p0(t,e)];return process.env.NODE_ENV!=="production"&&Ee(r,'Do not support count on "'+t+'", "'+e+'".'),r}var v0=function(t,e,r){return t[e]},Oz=(Ka={},Ka[ir]=v0,Ka[Yr]=function(t,e,r){return t[r]},Ka[Rn]=v0,Ka[qr]=function(t,e,r){var n=yu(t);return n instanceof Array?n[e]:n},Ka[hi]=v0,Ka);function US(t){var e=Oz[t];return process.env.NODE_ENV!=="production"&&Ee(e,'Do not support get value on "'+t+'".'),e}function p0(t,e){return t===ir?t+"_"+e:t}function ls(t,e,r){if(t){var n=t.getRawDataItem(e);if(n!=null){var i=t.getStore(),a=i.getSource().sourceFormat;if(r!=null){var o=t.getDimensionIndex(r),s=i.getDimensionProperty(o);return US(a)(n,o,s)}else{var u=n;return a===qr&&(u=yu(n)),u}}}}var Pz=/\{@(.+?)\}/g,Bz=function(){function t(){}return t.prototype.getDataParams=function(e,r){var n=this.getData(r),i=this.getRawValue(e,r),a=n.getRawIndex(e),o=n.getName(e),s=n.getRawDataItem(e),u=n.getItemVisual(e,"style"),l=u&&u[n.getItemVisual(e,"drawType")||"fill"],f=u&&u.stroke,c=this.mainType,h=c==="series",d=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:a,data:s,dataType:r,value:i,color:l,borderColor:f,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(e,r,n,i,a,o){r=r||"normal";var s=this.getData(n),u=this.getDataParams(e,n);if(o&&(u.value=o.interpolatedValue),i!=null&&he(u.value)&&(u.value=u.value[i]),!a){var l=s.getItemModel(e);a=l.get(r==="normal"?["label","formatter"]:[r,"label","formatter"])}if(De(a))return u.status=r,u.dimensionIndex=i,a(u);if(be(a)){var f=cS(a,u);return f.replace(Pz,function(c,h){var d=h.length,p=h;p.charAt(0)==="["&&p.charAt(d-1)==="]"&&(p=+p.slice(1,d-1),process.env.NODE_ENV!=="production"&&isNaN(p)&&Gt("Invalide label formatter: @"+h+", only support @[0], @[1], @[2], ..."));var g=ls(s,e,p);if(o&&he(o.interpolatedValue)){var v=s.getDimensionIndex(p);v>=0&&(g=o.interpolatedValue[v])}return g!=null?g+"":""})}},t.prototype.getRawValue=function(e,r){return ls(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function qS(t){var e,r;return we(t)?t.type?r=t:process.env.NODE_ENV!=="production"&&console.warn("The return type of `formatTooltip` is not supported: "+vr(t)):e=t,{text:e,frag:r}}function Wu(t){return new Mz(t)}var Mz=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.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(e&&e.modBy),l=e&&e.modDataCount||0;(o!==u||s!==l)&&(a="reset");function f(y){return!(y>=1)&&(y=1),y}var c;(this._dirty||a==="reset")&&(this._dirty=!1,c=this._doReset(n)),this._modBy=u,this._modDataCount=l;var h=e&&e.step;if(r?(process.env.NODE_ENV!=="production"&&Ee(r._outputDueEnd!=null),this._dueEnd=r._outputDueEnd):(process.env.NODE_ENV!=="production"&&Ee(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var d=this._dueIndex,p=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(c||d<p)){var g=this._progress;if(he(g))for(var v=0;v<g.length;v++)this._doProgress(g[v],d,p,u,l);else this._doProgress(g,d,p,u,l)}this._dueIndex=p;var m=this._settedOutputEnd!=null?this._settedOutputEnd:p;process.env.NODE_ENV!=="production"&&Ee(m>=this._outputDueEnd),this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(e,r,n,i,a){YS.reset(r,n,i,a),this._callingProgress=e,this._callingProgress({start:r,end:n,count:n-r,next:YS.next},this.context)},t.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var r,n;!e&&this._reset&&(r=this._reset(this.context),r&&r.progress&&(n=r.forceFirstProgress,r=r.progress),he(r)&&!r.length&&(r=null)),this._progress=r,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(e){process.env.NODE_ENV!=="production"&&Ee(e&&!e._disposed&&e!==this),(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},t}(),YS=function(){var t,e,r,n,i,a={reset:function(u,l,f,c){e=u,t=l,r=f,n=c,i=Math.ceil(n/r),a.next=r>1&&n>0?s:o}};return a;function o(){return e<t?e++:null}function s(){var u=e%i*r+Math.ceil(e/i),l=e>=t?null:u<n?u:e;return e++,l}}();function Yc(t,e){var r=e&&e.type;return r==="ordinal"?t:(r==="time"&&!nt(t)&&t!=null&&t!=="-"&&(t=+oi(t)),t==null||t===""?NaN:Number(t))}var Fz=Ae({number:function(t){return parseFloat(t)},time:function(t){return+oi(t)},trim:function(t){return be(t)?Sn(t):t}});function XS(t){return Fz.get(t)}var KS={lt:function(t,e){return t<e},lte:function(t,e){return t<=e},gt:function(t,e){return t>e},gte:function(t,e){return t>=e}},Lz=function(){function t(e,r){if(!nt(r)){var n="";process.env.NODE_ENV!=="production"&&(n='rvalue of "<", ">", "<=", ">=" can only be number in filter.'),qe(n)}this._opFn=KS[e],this._rvalFloat=Mi(r)}return t.prototype.evaluate=function(e){return nt(e)?this._opFn(e,this._rvalFloat):this._opFn(Mi(e),this._rvalFloat)},t}(),ZS=function(){function t(e,r){var n=e==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,r){var n=nt(e)?e:Mi(e),i=nt(r)?r:Mi(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=be(e),u=be(r);s&&(n=u?e:0),u&&(i=s?r:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},t}(),Iz=function(){function t(e,r){this._rval=r,this._isEQ=e,this._rvalTypeof=typeof r,this._rvalFloat=Mi(r)}return t.prototype.evaluate=function(e){var r=e===this._rval;if(!r){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=Mi(e)===this._rvalFloat)}return this._isEQ?r:!r},t}();function Rz(t,e){return t==="eq"||t==="ne"?new Iz(t==="eq",e):xe(KS,t)?new Lz(t,e):null}var Nz=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return Yc(e,r)},t}();function kz(t,e){var r=new Nz,n=t.data,i=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==Nn&&(process.env.NODE_ENV!=="production"&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),qe(o));var s=[],u={},l=t.dimensionsDefine;if(l)N(l,function(g,v){var m=g.name,y={index:v,name:m,displayName:g.displayName};if(s.push(y),m!=null){var b="";xe(u,m)&&(process.env.NODE_ENV!=="production"&&(b='dimension name "'+m+'" duplicated.'),qe(b)),u[m]=y}});else for(var f=0;f<t.dimensionsDetectedCount;f++)s.push({index:f});var c=WS(i,Nn);e.__isBuiltIn&&(r.getRawDataItem=function(g){return c(n,a,s,g)},r.getRawData=dt(zz,null,t)),r.cloneRawData=dt(jz,null,t);var h=GS(i,Nn);r.count=dt(h,null,n,a,s);var d=US(i);r.retrieveValue=function(g,v){var m=c(n,a,s,g);return p(m,v)};var p=r.retrieveValueFromItem=function(g,v){if(g!=null){var m=s[v];if(m)return d(g,v,m.name)}};return r.getDimensionInfo=dt(Vz,null,s,u),r.cloneAllDimensionInfo=dt(Hz,null,s),r}function zz(t){var e=t.sourceFormat;if(!g0(e)){var r="";process.env.NODE_ENV!=="production"&&(r="`getRawData` is not supported in source format "+e),qe(r)}return t.data}function jz(t){var e=t.sourceFormat,r=t.data;if(!g0(e)){var n="";process.env.NODE_ENV!=="production"&&(n="`cloneRawData` is not supported in source format "+e),qe(n)}if(e===ir){for(var i=[],a=0,o=r.length;a<o;a++)i.push(r[a].slice());return i}else if(e===Yr){for(var i=[],a=0,o=r.length;a<o;a++)i.push(oe({},r[a]));return i}}function Vz(t,e,r){if(r!=null){if(nt(r)||!isNaN(r)&&!xe(e,r))return t[r];if(xe(e,r))return e[r]}}function Hz(t){return $e(t)}var JS=Ae();function Wz(t){t=$e(t);var e=t.type,r="";e||(process.env.NODE_ENV!=="production"&&(r="Must have a `type` when `registerTransform`."),qe(r));var n=e.split(":");n.length!==2&&(process.env.NODE_ENV!=="production"&&(r='Name must include namespace like "ns:regression".'),qe(r));var i=!1;n[0]==="echarts"&&(e=n[1],i=!0),t.__isBuiltIn=i,JS.set(e,t)}function $z(t,e,r){var n=gt(t),i=n.length,a="";i||(process.env.NODE_ENV!=="production"&&(a="If `transform` declared, it should at least contain one transform."),qe(a));for(var o=0,s=i;o<s;o++){var u=n[o];e=Gz(u,e,r,i===1?null:o),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function Gz(t,e,r,n){var i="";e.length||(process.env.NODE_ENV!=="production"&&(i="Must have at least one upstream dataset."),qe(i)),we(t)||(process.env.NODE_ENV!=="production"&&(i="transform declaration must be an object rather than "+typeof t+"."),qe(i));var a=t.type,o=JS.get(a);o||(process.env.NODE_ENV!=="production"&&(i='Can not find transform on type "'+a+'".'),qe(i));var s=ye(e,function(f){return kz(f,o)}),u=gt(o.transform({upstream:s[0],upstreamList:s,config:$e(t.config)}));if(process.env.NODE_ENV!=="production"&&t.print){var l=ye(u,function(f){var c=n!=null?" === pipe index: "+n:"";return["=== dataset index: "+r.datasetIndex+c+" ===","- transform result data:",vr(f.data),"- transform result dimensions:",vr(f.dimensions)].join(`
159
159
  `)}).join(`
160
- `);e6(l)}return ye(u,function(f,c){var h="";we(f)||(process.env.NODE_ENV!=="production"&&(h="A transform should not return some empty results."),qe(h)),f.data||(process.env.NODE_ENV!=="production"&&(h="Transform result data should be not be null or undefined"),qe(h));var d=IS(f.data);gm(d)||(process.env.NODE_ENV!=="production"&&(h="Transform result data should be array rows or object rows."),qe(h));var p,g=e[0];if(g&&c===0&&!f.dimensions){var v=g.startIndex;v&&(f.data=g.data.slice(0,v).concat(f.data)),p={seriesLayoutBy:Nn,sourceHeader:v,dimensions:g.metaRawOption.dimensions}}else p={seriesLayoutBy:Nn,sourceHeader:0,dimensions:f.dimensions};return dm(f.data,p,null)})}function gm(t){return t===ir||t===Yr}var Xc="undefined",Uz=typeof Uint32Array===Xc?Array:Uint32Array,qz=typeof Uint16Array===Xc?Array:Uint16Array,QS=typeof Int32Array===Xc?Array:Int32Array,eE=typeof Float64Array===Xc?Array:Float64Array,tE={float:eE,int:QS,ordinal:Array,number:Array,time:eE},mm;function $u(t){return t>65535?Uz:qz}function fs(){return[1/0,-1/0]}function Yz(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function rE(t,e,r,n,i){var a=tE[r||"float"];if(i){var o=t[e],s=o&&o.length;if(s!==n){for(var u=new a(n),l=0;l<s;l++)u[l]=o[l];t[e]=u}}else t[e]=new a(n)}var ym=function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Ae()}return t.prototype.initData=function(e,r,n){process.env.NODE_ENV!=="production"&&Ee(De(e.getItem)&&De(e.count),"Invalid data provider."),this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),a=this.defaultDimValueGetter=mm[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[];var o=kS(i);this._dimensions=ye(r,function(s){return process.env.NODE_ENV!=="production"&&o&&Ee(s.property!=null),{type:s.type,property:s.property}}),this._initDataFromProvider(0,e.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(e,r){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(e);if(a!=null){if(i[a].type===r)return a}else a=i.length;return i[a]={type:r},n.set(e,a),this._chunks[a]=new tE[r||"float"](this._rawCount),this._rawExtent[a]=fs(),a},t.prototype.collectOrdinalMeta=function(e,r){var n=this._chunks[e],i=this._dimensions[e],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[e]=fs());for(var u=a[e],l=o;l<s;l++){var f=n[l]=r.parseAndCollect(n[l]);isNaN(f)||(u[0]=Math.min(f,u[0]),u[1]=Math.max(f,u[1]))}i.ordinalMeta=r,i.ordinalOffset=s,i.type="ordinal"},t.prototype.getOrdinalMeta=function(e){var r=this._dimensions[e],n=r.ordinalMeta;return n},t.prototype.getDimensionProperty=function(e){var r=this._dimensions[e];return r&&r.property},t.prototype.appendData=function(e){process.env.NODE_ENV!=="production"&&Ee(!this._indices,"appendData can only be called on raw data.");var r=this._provider,n=this.count();r.appendData(e);var i=r.count();return r.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},t.prototype.appendValues=function(e,r){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),u=s+Math.max(e.length,r||0),l=0;l<a;l++){var f=i[l];rE(n,l,f.type,u,!0)}for(var c=[],h=s;h<u;h++)for(var d=h-s,p=0;p<a;p++){var f=i[p],g=mm.arrayRows.call(this,e[d]||c,f.property,d,p);n[p][h]=g;var v=o[p];g<v[0]&&(v[0]=g),g>v[1]&&(v[1]=g)}return this._rawCount=this._count=u,{start:s,end:u}},t.prototype._initDataFromProvider=function(e,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,u=this._rawExtent,l=ye(o,function(y){return y.property}),f=0;f<s;f++){var c=o[f];u[f]||(u[f]=fs()),rE(a,f,c.type,r,n)}if(i.fillStorage)i.fillStorage(e,r,a,u);else for(var h=[],d=e;d<r;d++){h=i.getItem(d,h);for(var p=0;p<s;p++){var g=a[p],v=this._dimValueGetter(h,l[p],d,p);g[d]=v;var m=u[p];v<m[0]&&(m[0]=v),v>m[1]&&(m[1]=v)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(r)]:NaN},t.prototype.getValues=function(e,r){var n=[],i=[];if(r==null){r=e,e=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=e;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],r));return n},t.prototype.getByRawIndex=function(e,r){if(!(r>=0&&r<this._rawCount))return NaN;var n=this._chunks[e];return n?n[r]:NaN},t.prototype.getSum=function(e){var r=this._chunks[e],n=0;if(r)for(var i=0,a=this.count();i<a;i++){var o=this.get(e,i);isNaN(o)||(n+=o)}return n},t.prototype.getMedian=function(e){var r=[];this.each([e],function(a){isNaN(a)||r.push(a)});var n=r.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},t.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&n<this._count&&n===e)return e;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(r[o]<e)i=o+1;else if(r[o]>e)a=o-1;else return o}return-1},t.prototype.indicesOfNearest=function(e,r,n){var i=this._chunks,a=i[e],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,u=-1,l=0,f=0,c=this.count();f<c;f++){var h=this.getRawIndex(f),d=r-a[h],p=Math.abs(d);p<=n&&((p<s||p===s&&d>=0&&u<0)&&(s=p,u=d,l=0),d===u&&(o[l++]=f))}return o.length=l,o},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a<i;a++)e[a]=r[a]}else e=new n(r.buffer,0,i)}else{var n=$u(this._rawCount);e=new n(this.count());for(var a=0;a<e.length;a++)e[a]=a}return e},t.prototype.filter=function(e,r){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=$u(n._rawCount),o=new a(i),s=[],u=e.length,l=0,f=e[0],c=n._chunks,h=0;h<i;h++){var d=void 0,p=n.getRawIndex(h);if(u===0)d=r(h);else if(u===1){var g=c[f][p];d=r(g,h)}else{for(var v=0;v<u;v++)s[v]=c[e[v]][p];s[v]=h,d=r.apply(null,s)}d&&(o[l++]=p)}return l<i&&(n._indices=o),n._count=l,n._extent=[],n._updateGetRawIdx(),n},t.prototype.selectRange=function(e){var r=this.clone(),n=r._count;if(!n)return this;var i=Ke(e),a=i.length;if(!a)return this;var o=r.count(),s=$u(r._rawCount),u=new s(o),l=0,f=i[0],c=e[f][0],h=e[f][1],d=r._chunks,p=!1;if(!r._indices){var g=0;if(a===1){for(var v=d[i[0]],m=0;m<n;m++){var y=v[m];(y>=c&&y<=h||isNaN(y))&&(u[l++]=g),g++}p=!0}else if(a===2){for(var v=d[i[0]],b=d[i[1]],w=e[i[1]][0],C=e[i[1]][1],m=0;m<n;m++){var y=v[m],_=b[m];(y>=c&&y<=h||isNaN(y))&&(_>=w&&_<=C||isNaN(_))&&(u[l++]=g),g++}p=!0}}if(!p)if(a===1)for(var m=0;m<o;m++){var D=r.getRawIndex(m),y=d[i[0]][D];(y>=c&&y<=h||isNaN(y))&&(u[l++]=D)}else for(var m=0;m<o;m++){for(var x=!0,D=r.getRawIndex(m),S=0;S<a;S++){var O=i[S],y=d[O][D];(y<e[O][0]||y>e[O][1])&&(x=!1)}x&&(u[l++]=r.getRawIndex(m))}return l<o&&(r._indices=u),r._count=l,r._extent=[],r._updateGetRawIdx(),r},t.prototype.map=function(e,r){var n=this.clone(e);return this._updateDims(n,e,r),n},t.prototype.modify=function(e,r){this._updateDims(this,e,r)},t.prototype._updateDims=function(e,r,n){for(var i=e._chunks,a=[],o=r.length,s=e.count(),u=[],l=e._rawExtent,f=0;f<r.length;f++)l[r[f]]=fs();for(var c=0;c<s;c++){for(var h=e.getRawIndex(c),d=0;d<o;d++)u[d]=i[r[d]][h];u[o]=c;var p=n&&n.apply(null,u);if(p!=null){typeof p!="object"&&(a[0]=p,p=a);for(var f=0;f<p.length;f++){var g=r[f],v=p[f],m=l[g],y=i[g];y&&(y[h]=v),v<m[0]&&(m[0]=v),v>m[1]&&(m[1]=v)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,u=Math.floor(1/r),l=this.getRawIndex(0),f,c,h,d=new($u(this._rawCount))(Math.min((Math.ceil(o/u)+2)*2,o));d[s++]=l;for(var p=1;p<o-1;p+=u){for(var g=Math.min(p+u,o-1),v=Math.min(p+u*2,o),m=(v+g)/2,y=0,b=g;b<v;b++){var w=this.getRawIndex(b),C=a[w];isNaN(C)||(y+=C)}y/=v-g;var _=p,D=Math.min(p+u,o),x=p-1,S=a[l];f=-1,h=_;for(var O=-1,E=0,b=_;b<D;b++){var w=this.getRawIndex(b),C=a[w];if(isNaN(C)){E++,O<0&&(O=w);continue}c=Math.abs((x-m)*(C-S)-(x-b)*(y-S)),c>f&&(f=c,h=w)}E>0&&E<D-_&&(d[s++]=Math.min(O,h),h=Math.max(O,h)),d[s++]=h,l=h}return d[s++]=this.getRawIndex(o-1),n._count=s,n._indices=d,n.getRawIndex=this._getRawIdx,n},t.prototype.downSample=function(e,r,n,i){for(var a=this.clone([e],!0),o=a._chunks,s=[],u=Math.floor(1/r),l=o[e],f=this.count(),c=a._rawExtent[e]=fs(),h=new($u(this._rawCount))(Math.ceil(f/u)),d=0,p=0;p<f;p+=u){u>f-p&&(u=f-p,s.length=u);for(var g=0;g<u;g++){var v=this.getRawIndex(p+g);s[g]=l[v]}var m=n(s),y=this.getRawIndex(Math.min(p+i(s,m)||0,f-1));l[y]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),h[d++]=y}return a._count=d,a._indices=h,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:r(a);break;case 1:r(i[e[0]][s],a);break;case 2:r(i[e[0]][s],i[e[1]][s],a);break;default:for(var u=0,l=[];u<n;u++)l[u]=i[e[u]][s];l[u]=a,r.apply(null,l)}}},t.prototype.getDataExtent=function(e){var r=this._chunks[e],n=fs();if(!r)return n;var i=this.count(),a=!this._indices,o;if(a)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=n;for(var s=o[0],u=o[1],l=0;l<i;l++){var f=this.getRawIndex(l),c=r[f];c<s&&(s=c),c>u&&(u=c)}return o=[s,u],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][r]);return n},t.prototype.clone=function(e,r){var n=new t,i=this._chunks,a=e&&ri(e,function(s,u){return s[u]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?Yz(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),r||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},t.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=$e(this._extent),e._rawExtent=$e(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,r=void 0;if(e===Array){var n=this._indices.length;r=new e(n);for(var i=0;i<n;i++)r[i]=this._indices[i]}else r=new e(this._indices);return r}return null},t.prototype._getRawIdxIdentity=function(e){return e},t.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,i,a){return Yc(r[a],this._dimensions[a])}mm={arrayRows:e,objectRows:function(r,n,i,a){return Yc(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return Yc(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),nE=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(Gu(e)){var o=e,s=void 0,u=void 0,l=void 0;if(n){var f=r[0];f.prepareSource(),l=f.getSource(),s=l.data,u=l.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),u=rr(s)?hi:qr,a=[];var c=this._getSourceMetaRawOption()||{},h=l&&l.metaRawOption||{},d=Be(c.seriesLayoutBy,h.seriesLayoutBy)||null,p=Be(c.sourceHeader,h.sourceHeader),g=Be(c.dimensions,h.dimensions),v=d!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||g;i=v?[dm(s,{seriesLayoutBy:d,sourceHeader:p,dimensions:g},u)]:[]}else{var m=e;if(n){var y=this._applyTransform(r);i=y.sourceList,a=y.upstreamSignList}else{var b=m.get("source",!0);i=[dm(b,this._getSourceMetaRawOption(),null)],a=[]}}process.env.NODE_ENV!=="production"&&Ee(i&&a),this._setLocalSource(i,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(process.env.NODE_ENV!=="production"&&Ee(i!=null||n!=null),i!=null){var a="";e.length!==1&&(process.env.NODE_ENV!=="production"&&(a="When using `fromTransformResult`, there should be only one upstream dataset"),aE(a))}var o,s=[],u=[];return N(e,function(l){l.prepareSource();var f=l.getSource(i||0),c="";i!=null&&!f&&(process.env.NODE_ENV!=="production"&&(c="Can not retrieve result by `fromTransformResult`: "+i),aE(c)),s.push(f),u.push(l._getVersionSign())}),n?o=$z(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[xz(s[0])]),{sourceList:o,upstreamSignList:u}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r<e.length;r++){var n=e[r];if(n._isDirty()||this._upstreamSignList[r]!==n._getVersionSign())return!0}},t.prototype.getSource=function(e){e=e||0;var r=this._sourceList[e];if(!r){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return r},t.prototype.getSharedDataStore=function(e){process.env.NODE_ENV!=="production"&&Ee(Gu(this._sourceHost),"Can only call getDataStore on series source manager.");var r=e.makeStoreSchema();return this._innerGetDataStore(r.dimensions,e.source,r.hash)},t.prototype._innerGetDataStore=function(e,r,n){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var u=this._getUpstreamSourceManagers()[0];Gu(this._sourceHost)&&u?s=u._innerGetDataStore(e,r,n):(s=new ym,s.initData(new VS(r,e.length),e)),o[n]=s}return s},t.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Gu(e)){var r=im(e);return r?[r.getSourceManager()]:[]}else return ye(Z7(e),function(n){return n.getSourceManager()})},t.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,r,n,i;if(Gu(e))r=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),i=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=e;r=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:r,sourceHeader:n,dimensions:i}},t}();function iE(t){var e=t.option.transform;e&&Sf(t.option.transform)}function Gu(t){return t.mainType==="series"}function aE(t){throw new Error(t)}var oE="line-height:1";function sE(t,e){var r=t.color||"#6e7079",n=t.fontSize||12,i=t.fontWeight||"400",a=t.color||"#464646",o=t.fontSize||14,s=t.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+Tr(n+"")+"px;color:"+Tr(r)+";font-weight:"+Tr(i+""),valueStyle:"font-size:"+Tr(o+"")+"px;color:"+Tr(a)+";font-weight:"+Tr(s+"")}:{nameStyle:{fontSize:n,fill:r,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var Xz=[0,10,20,30],Kz=["",`
160
+ `);e6(l)}return ye(u,function(f,c){var h="";we(f)||(process.env.NODE_ENV!=="production"&&(h="A transform should not return some empty results."),qe(h)),f.data||(process.env.NODE_ENV!=="production"&&(h="Transform result data should be not be null or undefined"),qe(h));var d=IS(f.data);g0(d)||(process.env.NODE_ENV!=="production"&&(h="Transform result data should be array rows or object rows."),qe(h));var p,g=e[0];if(g&&c===0&&!f.dimensions){var v=g.startIndex;v&&(f.data=g.data.slice(0,v).concat(f.data)),p={seriesLayoutBy:Nn,sourceHeader:v,dimensions:g.metaRawOption.dimensions}}else p={seriesLayoutBy:Nn,sourceHeader:0,dimensions:f.dimensions};return d0(f.data,p,null)})}function g0(t){return t===ir||t===Yr}var Xc="undefined",Uz=typeof Uint32Array===Xc?Array:Uint32Array,qz=typeof Uint16Array===Xc?Array:Uint16Array,QS=typeof Int32Array===Xc?Array:Int32Array,eE=typeof Float64Array===Xc?Array:Float64Array,tE={float:eE,int:QS,ordinal:Array,number:Array,time:eE},m0;function $u(t){return t>65535?Uz:qz}function fs(){return[1/0,-1/0]}function Yz(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function rE(t,e,r,n,i){var a=tE[r||"float"];if(i){var o=t[e],s=o&&o.length;if(s!==n){for(var u=new a(n),l=0;l<s;l++)u[l]=o[l];t[e]=u}}else t[e]=new a(n)}var y0=function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Ae()}return t.prototype.initData=function(e,r,n){process.env.NODE_ENV!=="production"&&Ee(De(e.getItem)&&De(e.count),"Invalid data provider."),this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),a=this.defaultDimValueGetter=m0[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[];var o=kS(i);this._dimensions=ye(r,function(s){return process.env.NODE_ENV!=="production"&&o&&Ee(s.property!=null),{type:s.type,property:s.property}}),this._initDataFromProvider(0,e.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(e,r){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(e);if(a!=null){if(i[a].type===r)return a}else a=i.length;return i[a]={type:r},n.set(e,a),this._chunks[a]=new tE[r||"float"](this._rawCount),this._rawExtent[a]=fs(),a},t.prototype.collectOrdinalMeta=function(e,r){var n=this._chunks[e],i=this._dimensions[e],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[e]=fs());for(var u=a[e],l=o;l<s;l++){var f=n[l]=r.parseAndCollect(n[l]);isNaN(f)||(u[0]=Math.min(f,u[0]),u[1]=Math.max(f,u[1]))}i.ordinalMeta=r,i.ordinalOffset=s,i.type="ordinal"},t.prototype.getOrdinalMeta=function(e){var r=this._dimensions[e],n=r.ordinalMeta;return n},t.prototype.getDimensionProperty=function(e){var r=this._dimensions[e];return r&&r.property},t.prototype.appendData=function(e){process.env.NODE_ENV!=="production"&&Ee(!this._indices,"appendData can only be called on raw data.");var r=this._provider,n=this.count();r.appendData(e);var i=r.count();return r.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},t.prototype.appendValues=function(e,r){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),u=s+Math.max(e.length,r||0),l=0;l<a;l++){var f=i[l];rE(n,l,f.type,u,!0)}for(var c=[],h=s;h<u;h++)for(var d=h-s,p=0;p<a;p++){var f=i[p],g=m0.arrayRows.call(this,e[d]||c,f.property,d,p);n[p][h]=g;var v=o[p];g<v[0]&&(v[0]=g),g>v[1]&&(v[1]=g)}return this._rawCount=this._count=u,{start:s,end:u}},t.prototype._initDataFromProvider=function(e,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,u=this._rawExtent,l=ye(o,function(y){return y.property}),f=0;f<s;f++){var c=o[f];u[f]||(u[f]=fs()),rE(a,f,c.type,r,n)}if(i.fillStorage)i.fillStorage(e,r,a,u);else for(var h=[],d=e;d<r;d++){h=i.getItem(d,h);for(var p=0;p<s;p++){var g=a[p],v=this._dimValueGetter(h,l[p],d,p);g[d]=v;var m=u[p];v<m[0]&&(m[0]=v),v>m[1]&&(m[1]=v)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(r)]:NaN},t.prototype.getValues=function(e,r){var n=[],i=[];if(r==null){r=e,e=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=e;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],r));return n},t.prototype.getByRawIndex=function(e,r){if(!(r>=0&&r<this._rawCount))return NaN;var n=this._chunks[e];return n?n[r]:NaN},t.prototype.getSum=function(e){var r=this._chunks[e],n=0;if(r)for(var i=0,a=this.count();i<a;i++){var o=this.get(e,i);isNaN(o)||(n+=o)}return n},t.prototype.getMedian=function(e){var r=[];this.each([e],function(a){isNaN(a)||r.push(a)});var n=r.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},t.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&n<this._count&&n===e)return e;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(r[o]<e)i=o+1;else if(r[o]>e)a=o-1;else return o}return-1},t.prototype.indicesOfNearest=function(e,r,n){var i=this._chunks,a=i[e],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,u=-1,l=0,f=0,c=this.count();f<c;f++){var h=this.getRawIndex(f),d=r-a[h],p=Math.abs(d);p<=n&&((p<s||p===s&&d>=0&&u<0)&&(s=p,u=d,l=0),d===u&&(o[l++]=f))}return o.length=l,o},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a<i;a++)e[a]=r[a]}else e=new n(r.buffer,0,i)}else{var n=$u(this._rawCount);e=new n(this.count());for(var a=0;a<e.length;a++)e[a]=a}return e},t.prototype.filter=function(e,r){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=$u(n._rawCount),o=new a(i),s=[],u=e.length,l=0,f=e[0],c=n._chunks,h=0;h<i;h++){var d=void 0,p=n.getRawIndex(h);if(u===0)d=r(h);else if(u===1){var g=c[f][p];d=r(g,h)}else{for(var v=0;v<u;v++)s[v]=c[e[v]][p];s[v]=h,d=r.apply(null,s)}d&&(o[l++]=p)}return l<i&&(n._indices=o),n._count=l,n._extent=[],n._updateGetRawIdx(),n},t.prototype.selectRange=function(e){var r=this.clone(),n=r._count;if(!n)return this;var i=Ke(e),a=i.length;if(!a)return this;var o=r.count(),s=$u(r._rawCount),u=new s(o),l=0,f=i[0],c=e[f][0],h=e[f][1],d=r._chunks,p=!1;if(!r._indices){var g=0;if(a===1){for(var v=d[i[0]],m=0;m<n;m++){var y=v[m];(y>=c&&y<=h||isNaN(y))&&(u[l++]=g),g++}p=!0}else if(a===2){for(var v=d[i[0]],b=d[i[1]],w=e[i[1]][0],C=e[i[1]][1],m=0;m<n;m++){var y=v[m],_=b[m];(y>=c&&y<=h||isNaN(y))&&(_>=w&&_<=C||isNaN(_))&&(u[l++]=g),g++}p=!0}}if(!p)if(a===1)for(var m=0;m<o;m++){var D=r.getRawIndex(m),y=d[i[0]][D];(y>=c&&y<=h||isNaN(y))&&(u[l++]=D)}else for(var m=0;m<o;m++){for(var x=!0,D=r.getRawIndex(m),S=0;S<a;S++){var O=i[S],y=d[O][D];(y<e[O][0]||y>e[O][1])&&(x=!1)}x&&(u[l++]=r.getRawIndex(m))}return l<o&&(r._indices=u),r._count=l,r._extent=[],r._updateGetRawIdx(),r},t.prototype.map=function(e,r){var n=this.clone(e);return this._updateDims(n,e,r),n},t.prototype.modify=function(e,r){this._updateDims(this,e,r)},t.prototype._updateDims=function(e,r,n){for(var i=e._chunks,a=[],o=r.length,s=e.count(),u=[],l=e._rawExtent,f=0;f<r.length;f++)l[r[f]]=fs();for(var c=0;c<s;c++){for(var h=e.getRawIndex(c),d=0;d<o;d++)u[d]=i[r[d]][h];u[o]=c;var p=n&&n.apply(null,u);if(p!=null){typeof p!="object"&&(a[0]=p,p=a);for(var f=0;f<p.length;f++){var g=r[f],v=p[f],m=l[g],y=i[g];y&&(y[h]=v),v<m[0]&&(m[0]=v),v>m[1]&&(m[1]=v)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,u=Math.floor(1/r),l=this.getRawIndex(0),f,c,h,d=new($u(this._rawCount))(Math.min((Math.ceil(o/u)+2)*2,o));d[s++]=l;for(var p=1;p<o-1;p+=u){for(var g=Math.min(p+u,o-1),v=Math.min(p+u*2,o),m=(v+g)/2,y=0,b=g;b<v;b++){var w=this.getRawIndex(b),C=a[w];isNaN(C)||(y+=C)}y/=v-g;var _=p,D=Math.min(p+u,o),x=p-1,S=a[l];f=-1,h=_;for(var O=-1,E=0,b=_;b<D;b++){var w=this.getRawIndex(b),C=a[w];if(isNaN(C)){E++,O<0&&(O=w);continue}c=Math.abs((x-m)*(C-S)-(x-b)*(y-S)),c>f&&(f=c,h=w)}E>0&&E<D-_&&(d[s++]=Math.min(O,h),h=Math.max(O,h)),d[s++]=h,l=h}return d[s++]=this.getRawIndex(o-1),n._count=s,n._indices=d,n.getRawIndex=this._getRawIdx,n},t.prototype.downSample=function(e,r,n,i){for(var a=this.clone([e],!0),o=a._chunks,s=[],u=Math.floor(1/r),l=o[e],f=this.count(),c=a._rawExtent[e]=fs(),h=new($u(this._rawCount))(Math.ceil(f/u)),d=0,p=0;p<f;p+=u){u>f-p&&(u=f-p,s.length=u);for(var g=0;g<u;g++){var v=this.getRawIndex(p+g);s[g]=l[v]}var m=n(s),y=this.getRawIndex(Math.min(p+i(s,m)||0,f-1));l[y]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),h[d++]=y}return a._count=d,a._indices=h,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:r(a);break;case 1:r(i[e[0]][s],a);break;case 2:r(i[e[0]][s],i[e[1]][s],a);break;default:for(var u=0,l=[];u<n;u++)l[u]=i[e[u]][s];l[u]=a,r.apply(null,l)}}},t.prototype.getDataExtent=function(e){var r=this._chunks[e],n=fs();if(!r)return n;var i=this.count(),a=!this._indices,o;if(a)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=n;for(var s=o[0],u=o[1],l=0;l<i;l++){var f=this.getRawIndex(l),c=r[f];c<s&&(s=c),c>u&&(u=c)}return o=[s,u],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][r]);return n},t.prototype.clone=function(e,r){var n=new t,i=this._chunks,a=e&&ri(e,function(s,u){return s[u]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?Yz(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),r||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},t.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=$e(this._extent),e._rawExtent=$e(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,r=void 0;if(e===Array){var n=this._indices.length;r=new e(n);for(var i=0;i<n;i++)r[i]=this._indices[i]}else r=new e(this._indices);return r}return null},t.prototype._getRawIdxIdentity=function(e){return e},t.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,i,a){return Yc(r[a],this._dimensions[a])}m0={arrayRows:e,objectRows:function(r,n,i,a){return Yc(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return Yc(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),nE=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(Gu(e)){var o=e,s=void 0,u=void 0,l=void 0;if(n){var f=r[0];f.prepareSource(),l=f.getSource(),s=l.data,u=l.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),u=rr(s)?hi:qr,a=[];var c=this._getSourceMetaRawOption()||{},h=l&&l.metaRawOption||{},d=Be(c.seriesLayoutBy,h.seriesLayoutBy)||null,p=Be(c.sourceHeader,h.sourceHeader),g=Be(c.dimensions,h.dimensions),v=d!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||g;i=v?[d0(s,{seriesLayoutBy:d,sourceHeader:p,dimensions:g},u)]:[]}else{var m=e;if(n){var y=this._applyTransform(r);i=y.sourceList,a=y.upstreamSignList}else{var b=m.get("source",!0);i=[d0(b,this._getSourceMetaRawOption(),null)],a=[]}}process.env.NODE_ENV!=="production"&&Ee(i&&a),this._setLocalSource(i,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(process.env.NODE_ENV!=="production"&&Ee(i!=null||n!=null),i!=null){var a="";e.length!==1&&(process.env.NODE_ENV!=="production"&&(a="When using `fromTransformResult`, there should be only one upstream dataset"),aE(a))}var o,s=[],u=[];return N(e,function(l){l.prepareSource();var f=l.getSource(i||0),c="";i!=null&&!f&&(process.env.NODE_ENV!=="production"&&(c="Can not retrieve result by `fromTransformResult`: "+i),aE(c)),s.push(f),u.push(l._getVersionSign())}),n?o=$z(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[xz(s[0])]),{sourceList:o,upstreamSignList:u}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r<e.length;r++){var n=e[r];if(n._isDirty()||this._upstreamSignList[r]!==n._getVersionSign())return!0}},t.prototype.getSource=function(e){e=e||0;var r=this._sourceList[e];if(!r){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return r},t.prototype.getSharedDataStore=function(e){process.env.NODE_ENV!=="production"&&Ee(Gu(this._sourceHost),"Can only call getDataStore on series source manager.");var r=e.makeStoreSchema();return this._innerGetDataStore(r.dimensions,e.source,r.hash)},t.prototype._innerGetDataStore=function(e,r,n){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var u=this._getUpstreamSourceManagers()[0];Gu(this._sourceHost)&&u?s=u._innerGetDataStore(e,r,n):(s=new y0,s.initData(new VS(r,e.length),e)),o[n]=s}return s},t.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Gu(e)){var r=i0(e);return r?[r.getSourceManager()]:[]}else return ye(Z7(e),function(n){return n.getSourceManager()})},t.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,r,n,i;if(Gu(e))r=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),i=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=e;r=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:r,sourceHeader:n,dimensions:i}},t}();function iE(t){var e=t.option.transform;e&&Sf(t.option.transform)}function Gu(t){return t.mainType==="series"}function aE(t){throw new Error(t)}var oE="line-height:1";function sE(t,e){var r=t.color||"#6e7079",n=t.fontSize||12,i=t.fontWeight||"400",a=t.color||"#464646",o=t.fontSize||14,s=t.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+Tr(n+"")+"px;color:"+Tr(r)+";font-weight:"+Tr(i+""),valueStyle:"font-size:"+Tr(o+"")+"px;color:"+Tr(a)+";font-weight:"+Tr(s+"")}:{nameStyle:{fontSize:n,fill:r,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var Xz=[0,10,20,30],Kz=["",`
161
161
  `,`
162
162
 
163
163
  `,`
164
164
 
165
165
 
166
- `];function Uu(t,e){return e.type=t,e}function bm(t){return t.type==="section"}function uE(t){return bm(t)?Zz:Jz}function lE(t){if(bm(t)){var e=0,r=t.blocks.length,n=r>1||r>0&&!t.noHeader;return N(t.blocks,function(i){var a=lE(i);a>=e&&(e=a+ +(n&&(!a||bm(i)&&!i.noHeader)))}),e}return 0}function Zz(t,e,r,n){var i=e.noHeader,a=Qz(lE(e)),o=[],s=e.blocks||[];Ee(!s||he(s)),s=s||[];var u=t.orderMode;if(e.sortBlocks&&u){s=s.slice();var l={valueAsc:"asc",valueDesc:"desc"};if(xe(l,u)){var f=new ZS(l[u],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else u==="seriesDesc"&&s.reverse()}N(s,function(p,g){var v=e.valueFormatter,m=uE(p)(v?oe(oe({},t),{valueFormatter:v}):t,p,g>0?a.html:0,n);m!=null&&o.push(m)});var c=t.renderMode==="richText"?o.join(a.richText):Cm(o.join(""),i?r:a.html);if(i)return c;var h=em(e.header,"ordinal",t.useUTC),d=sE(n,t.renderMode).nameStyle;return t.renderMode==="richText"?cE(t,h,d)+a.richText+c:Cm('<div style="'+d+";"+oE+';">'+Tr(h)+"</div>"+c,r)}function Jz(t,e,r,n){var i=t.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,u=e.name,l=t.useUTC,f=e.valueFormatter||t.valueFormatter||function(w){return w=he(w)?w:[w],ye(w,function(C,_){return em(C,he(d)?d[_]:d,l)})};if(!(a&&o)){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",i),h=a?"":em(u,"ordinal",l),d=e.valueType,p=o?[]:f(e.value,e.dataIndex),g=!s||!a,v=!s&&a,m=sE(n,i),y=m.nameStyle,b=m.valueStyle;return i==="richText"?(s?"":c)+(a?"":cE(t,h,y))+(o?"":rj(t,p,g,v,b)):Cm((s?"":c)+(a?"":ej(h,!s,y))+(o?"":tj(p,g,v,b)),r)}}function fE(t,e,r,n,i,a){if(t){var o=uE(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function Qz(t){return{html:Xz[t],richText:Kz[t]}}function Cm(t,e){var r='<div style="clear:both"></div>',n="margin: "+e+"px 0 0";return'<div style="'+n+";"+oE+';">'+t+r+"</div>"}function ej(t,e,r){var n=e?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+Tr(t)+"</span>"}function tj(t,e,r,n){var i=r?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return t=he(t)?t:[t],'<span style="'+a+";"+n+'">'+ye(t,function(o){return Tr(o)}).join("&nbsp;&nbsp;")+"</span>"}function cE(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function rj(t,e,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(he(e)?e.join(" "):e,a)}function nj(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return Ga(n)}function hE(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var wm=function(){function t(){this.richTextStyles={},this._nextStyleNameId=lD()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,n){var i=n==="richText"?this._generateStyleName():null,a=W7({color:r,type:e,renderMode:n,markerId:i});return be(a)?a:(process.env.NODE_ENV!=="production"&&Ee(i),this.richTextStyles[i]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(e,r){var n={};he(r)?N(r,function(a){return oe(n,a)}):oe(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},t}();function ij(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),u=he(s),l=nj(e,r),f,c,h,d;if(o>1||u&&!o){var p=aj(s,e,r,a,l);f=p.inlineValues,c=p.inlineValueTypes,h=p.blocks,d=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=f=ls(i,r,a[0]),c=g.type}else d=f=u?s[0]:s;var v=ng(e),m=v&&e.name||"",y=i.getName(r),b=n?m:y;return Uu("section",{header:m,noHeader:n||!v,sortParam:d,blocks:[Uu("nameValue",{markerType:"item",markerColor:l,name:b,noName:!Sn(b),value:f,valueType:c,dataIndex:r})].concat(h||[])})}function aj(t,e,r,n,i){var a=e.getData(),o=ri(t,function(c,h,d){var p=a.getDimensionInfo(d);return c=c||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],u=[],l=[];n.length?N(n,function(c){f(ls(a,r,c),c)}):N(t,f);function f(c,h){var d=a.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(o?l.push(Uu("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:c,valueType:d.type})):(s.push(c),u.push(d.type)))}return{inlineValues:s,inlineValueTypes:u,blocks:l}}var ji=lt();function Kc(t,e){return t.getName(e)||t.getId(e)}var Zc="__universalTransitionEnabled",fn=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Wu({count:sj,reset:uj}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=ji(this).sourceManager=new nE(this);a.prepareSource();var o=this.getInitialData(r,i);vE(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&Ee(o,"getInitialData returned invalid data."),ji(this).dataBeforeProcessed=o,dE(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=ku(this),a=i?$c(r):{},o=this.subType;Ze.hasClass(o)&&(o+="Series"),Qe(r,n.getTheme().get(this.subType)),Qe(r,this.getDefaultOption()),rg(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&qa(r,a,i)},e.prototype.mergeOption=function(r,n){r=Qe(this.option,r,!0),this.fillDataTextStyle(r.data);var i=ku(this);i&&qa(this.option,r,i);var a=ji(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);vE(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,ji(this).dataBeforeProcessed=o,dE(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!rr(r))for(var n=["show"],i=0;i<r.length;i++)r[i]&&r[i].label&&rg(r[i],"label",n)},e.prototype.getInitialData=function(r,n){},e.prototype.appendData=function(r){var n=this.getRawData();n.appendData(r.data)},e.prototype.getData=function(r){var n=_m(this);if(n){var i=n.context.data;return r==null||!i.getLinkedData?i:i.getLinkedData(r)}else return ji(this).data},e.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},e.prototype.setData=function(r){var n=_m(this);if(n){var i=n.context;i.outputData=r,n!==this.dataTask&&(i.data=r)}ji(this).data=r},e.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return Ae(r)},e.prototype.getSourceManager=function(){return ji(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return ji(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},e.prototype.formatTooltip=function(r,n,i){return ij({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Pe.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=am.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,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<r.length;s++){var u=r[s],l=Kc(o,u);i[l]=!1,this._selectedDataIndicesMap[l]=-1}}},e.prototype.toggleSelect=function(r,n){for(var i=[],a=0;a<r.length;a++)i[0]=r[a],this.isSelected(r[a],n)?this.unselect(i,n):this.select(i,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=Ke(r),i=[],a=0;a<n.length;a++){var o=r[n[a]];o>=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Kc(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Zc])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,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"){we(o.selectedMap)||(o.selectedMap={});for(var l=o.selectedMap,f=0;f<u;f++){var c=n[f],h=Kc(r,c);l[h]=!0,this._selectedDataIndicesMap[h]=r.getRawIndex(c)}}else if(s==="single"||s===!0){var d=n[u-1],h=Kc(r,d);o.selectedMap=(i={},i[h]=!0,i),this._selectedDataIndicesMap=(a={},a[h]=r.getRawIndex(d),a)}}},e.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(i){var a=r.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(r,n)}},e.registerClass=function(r){return Ze.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Ze);xn(fn,Bz),xn(fn,am),DD(fn,Ze);function dE(t){var e=t.name;ng(t)||(t.name=oj(t)||e)}function oj(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return N(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function sj(t){return t.model.getRawData().count()}function uj(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),lj}function lj(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function vE(t,e){N(FN(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,Dt(fj,e))})}function fj(t,e){var r=_m(t);return r&&r.setOutputEnd((e||this).count()),e}function _m(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}var Br=function(){function t(){this.group=new It,this.uid=Mc("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();og(Br),ec(Br);function Dm(){var t=lt();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var pE=lt(),cj=Dm(),Zr=function(){function t(){this.group=new It,this.uid=Mc("viewChart"),this.renderTask=Wu({plan:hj,reset:dj}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Gt("Unknown dataType "+i.dataType);return}mE(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Gt("Unknown dataType "+i.dataType);return}mE(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){Pc(this.group,e)},t.markUpdateMethod=function(e,r){pE(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function gE(t,e,r){t&&Jo(t)&&(e==="emphasis"?dc:vc)(t,r)}function mE(t,e,r){var n=Pa(t,e),i=e&&e.highlightKey!=null?P9(e.highlightKey):null;n!=null?N(gt(n),function(a){gE(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){gE(a,r,i)})}og(Zr,["dispose"]),ec(Zr);function hj(t){return cj(t.model)}function dj(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&pE(i).updateMethod,u=a?"incrementalPrepareRender":s&&o[s]?s:"render";return u!=="render"&&o[u](e,r,n,i),vj[u]}var vj={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Jc="\0__throttleOriginMethod",yE="\0__throttleRate",bE="\0__throttleType";function xm(t,e,r){var n,i=0,a=0,o=null,s,u,l,f;e=e||0;function c(){a=new Date().getTime(),o=null,t.apply(u,l||[])}var h=function(){for(var d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];n=new Date().getTime(),u=this,l=d;var g=f||e,v=f||r;f=null,s=n-(v?i:a)-g,clearTimeout(o),v?o=setTimeout(c,g):s>=0?c():o=setTimeout(c,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(d){f=d},h}function CE(t,e,r,n){var i=t[e];if(i){var a=i[Jc]||i,o=i[bE],s=i[yE];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=xm(a,r,n==="debounce"),i[Jc]=a,i[bE]=n,i[yE]=r}return i}}function Sm(t,e){var r=t[e];r&&r[Jc]&&(r.clear&&r.clear(),t[e]=r[Jc])}var wE=lt(),_E={itemStyle:wu(qx,!0),lineStyle:wu(Ux,!0)},pj={lineStyle:"stroke",itemStyle:"fill"};function DE(t,e){var r=t.visualStyleMapper||_E[e];return r||(console.warn("Unknown style type '"+e+"'."),_E.itemStyle)}function xE(t,e){var r=t.visualDrawType||pj[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var gj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=DE(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var u=xE(t,n),l=o[u],f=De(l)?l:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[u]||f||c){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[u]||(o[u]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||De(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||De(o.stroke)?h:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",u),!e.isSeriesFiltered(t)&&f)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var g=t.getDataParams(p),v=oe({},o);v[u]=f(g),d.setItemVisual(p,"style",v)}}}},qu=new Ct,mj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=DE(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var u=o.getRawDataItem(s);if(u&&u[n]){qu.option=u[n];var l=i(qu),f=o.ensureUniqueItemVisual(s,"style");oe(f,l),qu.option.decal&&(o.setItemVisual(s,"decal",qu.option.decal),qu.option.decal.dirty=!0),a in l&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},yj={performRawSeries:!0,overallReset:function(t){var e=Ae();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),wE(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=wE(r).scope,s=r.visualStyleAccessPath||"itemStyle",u=xE(r,s);a.each(function(l){var f=a.getRawIndex(l);i[f]=l}),n.each(function(l){var f=i[l],c=a.getItemVisual(f,"colorFromPalette");if(c){var h=a.ensureUniqueItemVisual(f,"style"),d=n.getName(l)||l+"",p=n.count();h[u]=r.getColorFromPalette(d,o,p)}})}})}},Qc=Math.PI;function bj(t,e){e=e||{},je(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new It,n=new St({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new Ot({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new St({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new wc({shape:{startAngle:-Qc/2,endAngle:-Qc/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Qc*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Qc*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,u=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-u*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:u),f=t.getHeight()/2;e.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:t.getWidth(),height:t.getHeight()})},r.resize(),r}var SE=function(){function t(e,r,n,i){this._stageTaskMap=Ae(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__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}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),u=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:u,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=Ae();e.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}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;N(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";process.env.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),Ee(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;N(e,function(u,l){if(!(i.visualType&&i.visualType!==u.visualType)){var f=o._stageTaskMap.get(u.uid),c=f.seriesTaskMap,h=f.overallTask;if(h){var d,p=h.agentStubMap;p.each(function(v){s(i,v)&&(v.dirty(),d=!0)}),d&&h.dirty(),o.updatePayload(h,n);var g=o.getPerformArgs(h,i.block);p.each(function(v){v.perform(g)}),h.perform(g)&&(a=!0)}else c&&c.each(function(v,m){s(i,v)&&v.dirty();var y=o.getPerformArgs(v,i.block);y.skip=!u.performRawSeries&&r.isSeriesFiltered(v.context.model),o.updatePayload(v,n),v.perform(y)&&(a=!0)})}});function s(u,l){return u.setDirty&&(!u.dirtyMap||u.dirtyMap.get(l.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=Ae(),u=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(f):u?n.eachRawSeriesByType(u,f):l&&l(n,i).each(f);function f(c){var h=c.uid,d=s.set(h,o&&o.get(h)||Wu({plan:xj,reset:Sj,count:Aj}));d.context={model:c,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(c,d)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||Wu({reset:Cj});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,u=o.agentStubMap=Ae(),l=e.seriesType,f=e.getTargetSeries,c=!0,h=!1,d="";process.env.NODE_ENV!=="production"&&(d='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),Ee(!e.createOnAllSeries,d),l?n.eachRawSeriesByType(l,p):f?f(n,i).each(p):(c=!1,N(n.getSeries(),p));function p(g){var v=g.uid,m=u.set(v,s&&s.get(v)||(h=!0,Wu({reset:wj,onDirty:Dj})));m.context={model:g,overallProgress:c},m.agent=o,m.__block=c,a._pipe(g,m)}h&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return De(e)&&(e={overallReset:e,seriesType:Tj(e)}),e.uid=Mc("stageHandler"),r&&(e.visualType=r),e},t}();function Cj(t){t.overallReset(t.ecModel,t.api,t.payload)}function wj(t){return t.overallProgress&&_j}function _j(){this.agent.dirty(),this.getDownstream().dirty()}function Dj(){this.agent&&this.agent.dirty()}function xj(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Sj(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=gt(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?ye(e,function(r,n){return EE(n)}):Ej}var Ej=EE(0);function EE(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a<e.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(e,n)}}function Aj(t){return t.data.count()}function Tj(t){eh=null;try{t(Yu,AE)}catch{}return eh}var Yu={},AE={},eh;TE(Yu,sm),TE(AE,ES),Yu.eachSeriesByType=Yu.eachRawSeriesByType=function(t){eh=t},Yu.eachComponent=function(t){t.mainType==="series"&&t.subType&&(eh=t.subType)};function TE(t,e){for(var r in e.prototype)t[r]=dr}var OE=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const Oj={color:OE,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],OE]};var ar="#B9B8CE",PE="#100C2A",th=function(){return{axisLine:{lineStyle:{color:ar}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},BE=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],ME={darkMode:!0,color:BE,backgroundColor:PE,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:ar}},textStyle:{color:ar},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:ar}},dataZoom:{borderColor:"#71708A",textStyle:{color:ar},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:ar}},timeline:{lineStyle:{color:ar},label:{color:ar},controlStyle:{color:ar,borderColor:ar}},calendar:{itemStyle:{color:PE},dayLabel:{color:ar},monthLabel:{color:ar},yearLabel:{color:ar}},timeAxis:th(),logAxis:th(),valueAxis:th(),categoryAxis:th(),line:{symbol:"circle"},graph:{color:BE},gauge:{title:{color:ar},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:ar},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};ME.categoryAxis.splitLine.show=!1;var Pj=function(){function t(){}return t.prototype.normalizeQuery=function(e){var r={},n={},i={};if(be(e)){var a=Pn(e);r.mainType=a.main||null,r.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};N(e,function(u,l){for(var f=!1,c=0;c<o.length;c++){var h=o[c],d=l.lastIndexOf(h);if(d>0&&d===l.length-h.length){var p=l.slice(0,d);p!=="data"&&(r.mainType=p,r[h.toLowerCase()]=u,f=!0)}}s.hasOwnProperty(l)&&(n[l]=u,f=!0),f||(i[l]=u)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){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=r.cptQuery,l=r.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(e,r.otherQuery,i,a));function f(c,h,d,p){return c[d]==null||h[p||d]===c[d]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Em=["symbol","symbolSize","symbolRotate","symbolOffset"],FE=Em.concat(["symbolKeepAspect"]),Bj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<Em.length;o++){var s=Em[o],u=t.get(s);De(u)?(a=!0,i[s]=u):n[s]=u}if(n.symbol=n.symbol||t.defaultSymbol,r.setVisual(oe({legendIcon:t.legendIcon||n.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},n)),e.isSeriesFiltered(t))return;var l=Ke(i);function f(c,h){for(var d=t.getRawValue(h),p=t.getDataParams(h),g=0;g<l.length;g++){var v=l[g];c.setItemVisual(h,v,i[v](d,p))}}return{dataEach:a?f:null}}},Mj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.hasSymbolVisual||e.isSeriesFiltered(t))return;var r=t.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<FE.length;s++){var u=FE[s],l=o.getShallow(u,!0);l!=null&&i.setItemVisual(a,u,l)}}return{dataEach:r.hasItemOption?n:null}}};function Fj(t,e,r){switch(r){case"color":var n=t.getItemVisual(e,"style");return n[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,r);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+r)}}function Lj(t,e){switch(e){case"color":var r=t.getVisual("style");return r[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+e)}}function Ij(t,e){function r(n,i){var a=[];return n.eachComponent({mainType:"series",subType:t,query:i},function(o){a.push(o.seriesIndex)}),a}N([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],function(n){e(n[0],function(i,a,o){i=oe({},i),process.env.NODE_ENV!=="production"&&Mt(i.type,n[1]),o.dispatchAction(oe(i,{type:n[1],seriesIndex:r(a,i)}))})})}function cs(t,e,r,n,i){var a=t+e;r.isSilent(a)||(process.env.NODE_ENV!=="production"&&On("event "+a+" is deprecated."),n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,u=o.option.selectedMap,l=i.selected,f=0;f<l.length;f++)if(l[f].seriesIndex===s){var c=o.getData(),h=Pa(c,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:he(h)?c.getName(h[0]):c.getName(h),selected:be(u)?u:oe({},u)})}}))}function Rj(t,e,r){t.on("selectchanged",function(n){var i=r.getModel();n.isFromClick?(cs("map","selectchanged",e,i,n),cs("pie","selectchanged",e,i,n)):n.fromAction==="select"?(cs("map","selected",e,i,n),cs("pie","selected",e,i,n)):n.fromAction==="unselect"&&(cs("map","unselected",e,i,n),cs("pie","unselected",e,i,n))})}function Xu(t,e,r){for(var n;t&&!(e(t)&&(n=t,r));)t=t.__hostTarget||t.parent;return n}var Nj=Math.round(Math.random()*9),kj=typeof Object.defineProperty=="function",zj=function(){function t(){this._id="__ec_inner_"+Nj++}return t.prototype.get=function(e){return this._guard(e)[this._id]},t.prototype.set=function(e,r){var n=this._guard(e);return kj?Object.defineProperty(n,this._id,{value:r,enumerable:!1,configurable:!0}):n[this._id]=r,this},t.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},t.prototype.has=function(e){return!!this._guard(e)[this._id]},t.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},t}(),jj=Ve.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n+a),t.lineTo(r-i,n+a),t.closePath()}}),Vj=Ve.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n),t.lineTo(r,n+a),t.lineTo(r-i,n),t.closePath()}}),Hj=Ve.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.x,n=e.y,i=e.width/5*3,a=Math.max(i,e.height),o=i/2,s=o*o/(a-o),u=n-a+o+s,l=Math.asin(s/o),f=Math.cos(l)*o,c=Math.sin(l),h=Math.cos(l),d=o*.6,p=o*.7;t.moveTo(r-f,u+s),t.arc(r,u,o,Math.PI-l,Math.PI*2+l),t.bezierCurveTo(r+f-c*d,u+s+h*d,r,n-p,r,n),t.bezierCurveTo(r,n-p,r-f+c*d,u+s+h*d,r-f,u+s),t.closePath()}}),Wj=Ve.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.height,n=e.width,i=e.x,a=e.y,o=n/3*2;t.moveTo(i,a),t.lineTo(i+o,a+r),t.lineTo(i,a+r/4*3),t.lineTo(i-o,a+r),t.lineTo(i,a),t.closePath()}}),$j={line:Ni,rect:St,roundRect:St,square:St,circle:yc,diamond:Vj,pin:Hj,arrow:Wj,triangle:jj},Gj={line:function(t,e,r,n,i){i.x1=t,i.y1=e+n/2,i.x2=t+r,i.y2=e+n/2},rect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n},roundRect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n,i.r=Math.min(r,n)/4},square:function(t,e,r,n,i){var a=Math.min(r,n);i.x=t,i.y=e,i.width=a,i.height=a},circle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.r=Math.min(r,n)/2},diamond:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n},pin:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},arrow:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},triangle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n}},Am={};N($j,function(t,e){Am[e]=new t});var Uj=Ve.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,r){var n=Xf(t,e,r),i=this.shape;return i&&i.symbolType==="pin"&&e.position==="inside"&&(n.y=r.y+r.height*.4),n},buildPath:function(t,e,r){var n=e.symbolType;if(n!=="none"){var i=Am[n];i||(n="rect",i=Am[n]),Gj[n](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,r)}}});function qj(t,e){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=t,r.fill=e||"#fff",r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=t:r.fill=t,this.markRedraw()}}function hs(t,e,r,n,i,a,o){var s=t.indexOf("empty")===0;s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var u;return t.indexOf("image://")===0?u=Fx(t.slice(8),new Ue(e,r,n,i),o?"center":"cover"):t.indexOf("path://")===0?u=Vg(t.slice(7),{},new Ue(e,r,n,i),o?"center":"cover"):u=new Uj({shape:{symbolType:t,x:e,y:r,width:n,height:i}}),u.__isEmptyBrush=s,u.setColor=qj,a&&u.setColor(a),u}function Yj(t){return he(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function LE(t,e){if(t!=null)return he(t)||(t=[t,t]),[ut(t[0],e[0])||0,ut(Be(t[1],t[0]),e[1])||0]}function Za(t){return isFinite(t)}function Xj(t,e,r){var n=e.x==null?0:e.x,i=e.x2==null?1:e.x2,a=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*r.width+r.x,i=i*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),n=Za(n)?n:0,i=Za(i)?i:1,a=Za(a)?a:0,o=Za(o)?o:0;var s=t.createLinearGradient(n,a,i,o);return s}function Kj(t,e,r){var n=r.width,i=r.height,a=Math.min(n,i),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,u=e.r==null?.5:e.r;e.global||(o=o*n+r.x,s=s*i+r.y,u=u*a),o=Za(o)?o:.5,s=Za(s)?s:.5,u=u>=0&&Za(u)?u:.5;var l=t.createRadialGradient(o,s,0,o,s,u);return l}function Tm(t,e,r){for(var n=e.type==="radial"?Kj(t,e,r):Xj(t,e,r),i=e.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function Zj(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!0;return!1}function rh(t){return parseInt(t,10)}function nh(t,e,r){var n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var s=document.defaultView.getComputedStyle(t);return(t[i]||rh(s[n])||rh(t.style[n]))-(rh(s[a])||0)-(rh(s[o])||0)|0}function Jj(t,e){return!t||t==="solid"||!(e>0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:nt(t)?[t]:he(t)?t:null}function IE(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&Jj(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=ye(r,function(a){return a/i}),n/=i)}return[r,n]}var Qj=new ui(!0);function ih(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function RE(t){return typeof t=="string"&&t!=="none"}function ah(t){var e=t.fill;return e!=null&&e!=="none"}function NE(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function kE(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function Om(t,e,r){var n=xD(e.image,e.__image,r);if(tc(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*LN),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function eV(t,e,r,n){var i,a=ih(r),o=ah(r),s=r.strokePercent,u=s<1,l=!e.path;(!e.silent||u)&&l&&e.createPathProxy();var f=e.path||Qj,c=e.__dirty;if(!n){var h=r.fill,d=r.stroke,p=o&&!!h.colorStops,g=a&&!!d.colorStops,v=o&&!!h.image,m=a&&!!d.image,y=void 0,b=void 0,w=void 0,C=void 0,_=void 0;(p||g)&&(_=e.getBoundingRect()),p&&(y=c?Tm(t,h,_):e.__canvasFillGradient,e.__canvasFillGradient=y),g&&(b=c?Tm(t,d,_):e.__canvasStrokeGradient,e.__canvasStrokeGradient=b),v&&(w=c||!e.__canvasFillPattern?Om(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=w),m&&(C=c||!e.__canvasStrokePattern?Om(t,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=w),p?t.fillStyle=y:v&&(w?t.fillStyle=w:o=!1),g?t.strokeStyle=b:m&&(C?t.strokeStyle=C:a=!1)}var D=e.getGlobalScale();f.setScale(D[0],D[1],e.segmentIgnoreThreshold);var x,S;t.setLineDash&&r.lineDash&&(i=IE(e),x=i[0],S=i[1]);var O=!0;(l||c&Vo)&&(f.setDPR(t.dpr),u?f.setContext(null):(f.setContext(t),O=!1),f.reset(),e.buildPath(f,e.shape,n),f.toStatic(),e.pathUpdated()),O&&f.rebuildPath(t,u?s:1),x&&(t.setLineDash(x),t.lineDashOffset=S),n||(r.strokeFirst?(a&&kE(t,r),o&&NE(t,r)):(o&&NE(t,r),a&&kE(t,r))),x&&t.setLineDash([])}function tV(t,e,r){var n=e.__image=xD(r.image,e.__image,e,e.onload);if(!(!n||!tc(n))){var i=r.x||0,a=r.y||0,o=e.getWidth(),s=e.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),r.sWidth&&r.sHeight){var l=r.sx||0,f=r.sy||0;t.drawImage(n,l,f,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var l=r.sx,f=r.sy,c=o-l,h=s-f;t.drawImage(n,l,f,c,h,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function rV(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||Ca,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=IE(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(ih(r)&&t.strokeText(i,r.x,r.y),ah(r)&&t.fillText(i,r.x,r.y)):(ah(r)&&t.fillText(i,r.x,r.y),ih(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var zE=["shadowBlur","shadowOffsetX","shadowOffsetY"],jE=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function VE(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){br(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?Ma.opacity:o}(n||e.blend!==r.blend)&&(a||(br(t,i),a=!0),t.globalCompositeOperation=e.blend||Ma.blend);for(var s=0;s<zE.length;s++){var u=zE[s];(n||e[u]!==r[u])&&(a||(br(t,i),a=!0),t[u]=t.dpr*(e[u]||0))}return(n||e.shadowColor!==r.shadowColor)&&(a||(br(t,i),a=!0),t.shadowColor=e.shadowColor||Ma.shadowColor),a}function HE(t,e,r,n,i){var a=Ku(e,i.inHover),o=n?null:r&&Ku(r,i.inHover)||{};if(a===o)return!1;var s=VE(t,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(br(t,i),s=!0),RE(a.fill)&&(t.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(br(t,i),s=!0),RE(a.stroke)&&(t.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(br(t,i),s=!0),t.globalAlpha=a.opacity==null?1:a.opacity),e.hasStroke()){var u=a.lineWidth,l=u/(a.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==l&&(s||(br(t,i),s=!0),t.lineWidth=l)}for(var f=0;f<jE.length;f++){var c=jE[f],h=c[0];(n||a[h]!==o[h])&&(s||(br(t,i),s=!0),t[h]=a[h]||c[1])}return s}function nV(t,e,r,n,i){return VE(t,Ku(e,i.inHover),r&&Ku(r,i.inHover),n,i)}function WE(t,e){var r=e.transform,n=t.dpr||1;r?t.setTransform(n*r[0],n*r[1],n*r[2],n*r[3],n*r[4],n*r[5]):t.setTransform(n,0,0,n,0,0)}function iV(t,e,r){for(var n=!1,i=0;i<t.length;i++){var a=t[i];n=n||a.isZeroArea(),WE(e,a),e.beginPath(),a.buildPath(e,a.shape),e.clip()}r.allClipped=n}function aV(t,e){return t&&e?t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||t[4]!==e[4]||t[5]!==e[5]:!(!t&&!e)}var $E=1,GE=2,UE=3,qE=4;function oV(t){var e=ah(t),r=ih(t);return!(t.lineDash||!(+e^+r)||e&&typeof t.fill!="string"||r&&typeof t.stroke!="string"||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}function br(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function Ku(t,e){return e&&t.__hoverStyle||t.style}function YE(t,e){Ja(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Ja(t,e,r,n){var i=e.transform;if(!e.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){e.__dirty&=~Or,e.__isRendered=!1;return}var a=e.__clipPaths,o=r.prevElClipPaths,s=!1,u=!1;if((!o||Zj(a,o))&&(o&&o.length&&(br(t,r),t.restore(),u=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(br(t,r),t.save(),iV(a,t,r),s=!0),r.prevElClipPaths=a),r.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var l=r.prevEl;l||(u=s=!0);var f=e instanceof Ve&&e.autoBatch&&oV(e.style);s||aV(i,l.transform)?(br(t,r),WE(t,e)):f||br(t,r);var c=Ku(e,r.inHover);e instanceof Ve?(r.lastDrawType!==$E&&(u=!0,r.lastDrawType=$E),HE(t,e,l,u,r),(!f||!r.batchFill&&!r.batchStroke)&&t.beginPath(),eV(t,e,c,f),f&&(r.batchFill=c.fill||"",r.batchStroke=c.stroke||"")):e instanceof oc?(r.lastDrawType!==UE&&(u=!0,r.lastDrawType=UE),HE(t,e,l,u,r),rV(t,e,c)):e instanceof fi?(r.lastDrawType!==GE&&(u=!0,r.lastDrawType=GE),nV(t,e,l,u,r),tV(t,e,c)):e.getTemporalDisplayables&&(r.lastDrawType!==qE&&(u=!0,r.lastDrawType=qE),sV(t,e,r)),f&&n&&br(t,r),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),r.prevEl=e,e.__dirty=0,e.__isRendered=!0}function sV(t,e,r){var n=e.getDisplayables(),i=e.getTemporalDisplayables();t.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var u=n[o];u.beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),Ja(t,u,a,o===s-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),a.prevEl=u}for(var l=0,f=i.length;l<f;l++){var u=i[l];u.beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),Ja(t,u,a,l===f-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),a.prevEl=u}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}var Pm=new zj,XE=new fu(100),KE=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Bm(t,e){if(t==="none")return null;var r=e.getDevicePixelRatio(),n=e.getZr(),i=n.painter.type==="svg";t.dirty&&Pm.delete(t);var a=Pm.get(t);if(a)return a;var o=je(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return u(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/r,Pm.set(t,s),t.dirty=!1,s;function u(l){for(var f=[r],c=!0,h=0;h<KE.length;++h){var d=o[KE[h]];if(d!=null&&!he(d)&&!be(d)&&!nt(d)&&typeof d!="boolean"){c=!1;break}f.push(d)}var p;if(c){p=f.join(",")+(i?"-svg":"");var g=XE.get(p);g&&(i?l.svgElement=g:l.image=g)}var v=JE(o.dashArrayX),m=uV(o.dashArrayY),y=ZE(o.symbol),b=lV(v),w=QE(m),C=!i&&Po.createCanvas(),_=i&&{tag:"g",attrs:{},key:"dcl",children:[]},D=S(),x;C&&(C.width=D.width*r,C.height=D.height*r,x=C.getContext("2d")),O(),c&&XE.put(p,C||_),l.image=C,l.svgElement=_,l.svgWidth=D.width,l.svgHeight=D.height;function S(){for(var E=1,P=0,F=b.length;P<F;++P)E=cD(E,b[P]);for(var B=1,P=0,F=y.length;P<F;++P)B=cD(B,y[P].length);E*=B;var M=w*b.length*y.length;if(process.env.NODE_ENV!=="production"){var I=function(j){console.warn("Calculated decal size is greater than "+j+" due to decal option settings so "+j+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+j+" to be larger to avoid incontinuity.")};E>o.maxTileWidth&&I("maxTileWidth"),M>o.maxTileHeight&&I("maxTileHeight")}return{width:Math.max(1,Math.min(E,o.maxTileWidth)),height:Math.max(1,Math.min(M,o.maxTileHeight))}}function O(){x&&(x.clearRect(0,0,C.width,C.height),o.backgroundColor&&(x.fillStyle=o.backgroundColor,x.fillRect(0,0,C.width,C.height)));for(var E=0,P=0;P<m.length;++P)E+=m[P];if(E<=0)return;for(var F=-w,B=0,M=0,I=0;F<D.height;){if(B%2===0){for(var j=M/2%y.length,z=0,W=0,R=0;z<D.width*2;){for(var U=0,P=0;P<v[I].length;++P)U+=v[I][P];if(U<=0)break;if(W%2===0){var Z=(1-o.symbolSize)*.5,ee=z+v[I][W]*Z,ne=F+m[B]*Z,q=v[I][W]*o.symbolSize,L=m[B]*o.symbolSize,X=R/2%y[j].length;V(ee,ne,q,L,y[j][X])}z+=v[I][W],++R,++W,W===v[I].length&&(W=0)}++I,I===v.length&&(I=0)}F+=m[B],++M,++B,B===m.length&&(B=0)}function V(G,J,K,Y,fe){var ue=i?1:r,Ce=hs(fe,G*ue,J*ue,K*ue,Y*ue,o.color,o.symbolKeepAspect);if(i){var me=n.painter.renderOneToVNode(Ce);me&&_.children.push(me)}else YE(x,Ce)}}}}function ZE(t){if(!t||t.length===0)return[["rect"]];if(be(t))return[[t]];for(var e=!0,r=0;r<t.length;++r)if(!be(t[r])){e=!1;break}if(e)return ZE([t]);for(var n=[],r=0;r<t.length;++r)be(t[r])?n.push([t[r]]):n.push(t[r]);return n}function JE(t){if(!t||t.length===0)return[[0,0]];if(nt(t)){var e=Math.ceil(t);return[[e,e]]}for(var r=!0,n=0;n<t.length;++n)if(!nt(t[n])){r=!1;break}if(r)return JE([t]);for(var i=[],n=0;n<t.length;++n)if(nt(t[n])){var e=Math.ceil(t[n]);i.push([e,e])}else{var e=ye(t[n],function(s){return Math.ceil(s)});e.length%2===1?i.push(e.concat(e)):i.push(e)}return i}function uV(t){if(!t||typeof t=="object"&&t.length===0)return[0,0];if(nt(t)){var e=Math.ceil(t);return[e,e]}var r=ye(t,function(n){return Math.ceil(n)});return t.length%2?r.concat(r):r}function lV(t){return ye(t,function(e){return QE(e)})}function QE(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return t.length%2===1?e*2:e}function fV(t,e){t.eachRawSeries(function(r){if(!t.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var u=n.ensureUniqueItemVisual(o,"style");u.decal=Bm(s,e)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=Bm(i,e)}}})}var cn=new En,oh={};function cV(t,e){process.env.NODE_ENV!=="production"&&oh[t]&&Gt("Already has an implementation of "+t+"."),oh[t]=e}function hV(t){return process.env.NODE_ENV!=="production"&&(oh[t]||Gt("Implementation of "+t+" doesn't exists.")),oh[t]}var dV=1,vV=800,pV=900,gV=1e3,mV=2e3,yV=5e3,e2=1e3,bV=1100,Mm=2e3,t2=3e3,CV=4e3,sh=4500,wV=4600,_V=5e3,DV=6e3,r2=7e3,xV={PROCESSOR:{FILTER:gV,SERIES_FILTER:vV,STATISTIC:yV},VISUAL:{LAYOUT:e2,PROGRESSIVE_LAYOUT:bV,GLOBAL:Mm,CHART:t2,POST_CHART_LAYOUT:wV,COMPONENT:CV,BRUSH:_V,CHART_ITEM:sh,ARIA:DV,DECAL:r2}},Xt="__flagInMainProcess",Cr="__pendingUpdate",Fm="__needsUpdateStatus",n2=/^[a-zA-Z0-9_]+$/,Lm="__connectUpdateStatus",i2=0,SV=1,EV=2;function a2(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.isDisposed()){Mr(this.id);return}return s2(this,t,e)}}function o2(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return s2(this,t,e)}}function s2(t,e,r){return r[0]=r[0]&&r[0].toLowerCase(),En.prototype[e].apply(t,r)}var u2=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(En),l2=u2.prototype;l2.on=o2("on"),l2.off=o2("off");var ds,Im,uh,Vi,Rm,Nm,km,Zu,Ju,f2,c2,zm,h2,lh,d2,v2,Jr,p2,g2=function(t){ce(e,t);function e(r,n,i){var a=t.call(this,new Pj)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},be(n)&&(n=m2[n]),a._dom=r;var o="canvas",s="auto",u=!1;if(process.env.NODE_ENV!=="production"){var l=Pe.hasGlobalWindow?window:global;l&&(o=Be(l.__ECHARTS__DEFAULT__RENDERER__,o),s=Be(l.__ECHARTS__DEFAULT__COARSE_POINTER,s),u=Be(l.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,u))}i.ssr;var f=a._zr=nD(r,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:Be(i.useDirtyRect,u),useCoarsePointer:Be(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=xm(dt(f.flush,f),17),n=$e(n),n&&FS(n,!0),a._theme=n,a._locale=R7(i.locale||Xx),a._coordSysMgr=new lm;var c=a._api=d2(a);function h(d,p){return d.__prio-p.__prio}return Bf(ch,h),Bf(Vm,h),a._scheduler=new SE(a,c,Vm,ch),a._messageCenter=new u2,a._initEvents(),a.resize=dt(a.resize,a),f.animation.on("frame",a._onframe,a),f2(f,a),c2(f,a),Sf(a),a}return e.prototype._onframe=function(){if(!this._disposed){p2(this);var r=this._scheduler;if(this[Cr]){var n=this[Cr].silent;this[Xt]=!0;try{ds(this),Vi.update.call(this,null,this[Cr].updateParams)}catch(u){throw this[Xt]=!1,this[Cr]=null,u}this._zr.flush(),this[Xt]=!1,this[Cr]=null,Zu.call(this,n),Ju.call(this,n)}else if(r.unfinished){var i=dV,a=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(a),r.performDataProcessorTasks(a),Nm(this,a),r.performVisualTasks(a),lh(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,i){if(this[Xt]){process.env.NODE_ENV!=="production"&&Gt("`setOption` should not be called during main process.");return}if(this._disposed){Mr(this.id);return}var a,o,s;if(we(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Xt]=!0,!this._model||n){var u=new fz(this._api),l=this._theme,f=this._model=new sm;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,l,this._locale,u)}this._model.setOption(r,{replaceMerge:o},Hm);var c={seriesTransition:s,optionChanged:!0};if(i)this[Cr]={silent:a,updateParams:c},this[Xt]=!1,this.getZr().wakeUp();else{try{ds(this),Vi.update.call(this,null,c)}catch(h){throw this[Cr]=null,this[Xt]=!1,h}this._ssr||this._zr.flush(),this[Cr]=null,this[Xt]=!1,Zu.call(this,a),Ju.call(this,a)}},e.prototype.setTheme=function(){On("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Pe.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return process.env.NODE_ENV!=="production"&&Mt("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){if(Pe.svgSupported){var r=this._zr,n=r.storage.getDisplayList();return N(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()}},e.prototype.getDataURL=function(r){if(this._disposed){Mr(this.id);return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;N(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(r).toDataURL("image/"+(r&&r.type||"png"));return N(a,function(u){u.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){Mr(this.id);return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(y2[i]){var u=s,l=s,f=-s,c=-s,h=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();N(el,function(b,w){if(b.group===i){var C=n?b.getZr().painter.getSvgDom().innerHTML:b.renderToCanvas($e(r)),_=b.getDom().getBoundingClientRect();u=a(_.left,u),l=a(_.top,l),f=o(_.right,f),c=o(_.bottom,c),h.push({dom:C,left:_.left,top:_.top})}}),u*=d,l*=d,f*=d,c*=d;var p=f-u,g=c-l,v=Po.createCanvas(),m=nD(v,{renderer:n?"svg":"canvas"});if(m.resize({width:p,height:g}),n){var y="";return N(h,function(b){var w=b.left-u,C=b.top-l;y+='<g transform="translate('+w+","+C+')">'+b.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,r.connectedBackgroundColor&&m.painter.setBackgroundColor(r.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return r.connectedBackgroundColor&&m.add(new St({shape:{x:0,y:0,width:p,height:g},style:{fill:r.connectedBackgroundColor}})),N(h,function(b){var w=new fi({style:{x:b.left*d-u,y:b.top*d-l,image:b.dom}});m.add(w)}),m.refreshImmediately(),v.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n){return Rm(this,"convertToPixel",r,n)},e.prototype.convertFromPixel=function(r,n){return Rm(this,"convertFromPixel",r,n)},e.prototype.containPixel=function(r,n){if(this._disposed){Mr(this.id);return}var i=this._model,a,o=ig(i,r);return N(o,function(s,u){u.indexOf("Models")>=0&&N(s,function(l){var f=l.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(u==="seriesModels"){var c=this._chartsMap[l.__viewId];c&&c.containPoint?a=a||c.containPoint(n,l):process.env.NODE_ENV!=="production"&&xt(u+": "+(c?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&xt(u+": containPoint is not supported")},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=ig(i,r,{defaultMainType:"series"}),o=a.seriesModel;process.env.NODE_ENV!=="production"&&(o||xt("There is no specified series model"));var s=o.getData(),u=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return u!=null?Fj(s,u,n):Lj(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;N(AV,function(n){var i=function(a){var o=r.getModel(),s=a.target,u,l=n==="globalout";if(l?u={}:s&&Xu(s,function(p){var g=He(p);if(g&&g.dataIndex!=null){var v=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return u=v&&v.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return u=oe({},g.eventData),!0},!0),u){var f=u.componentType,c=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",c=u.seriesIndex);var h=f&&c!=null&&o.getComponent(f,c),d=h&&r[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];process.env.NODE_ENV!=="production"&&!l&&!(h&&d)&&xt("model or view can not be found by params"),u.event=a,u.type=n,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:u,model:h,view:d},r.trigger(n,u)}};i.zrEventfulCallAtLast=!0,r._zr.on(n,i,r)}),N(Qu,function(n,i){r._messageCenter.on(i,function(a){this.trigger(i,a)},r)}),N(["selectchanged"],function(n){r._messageCenter.on(n,function(i){this.trigger(n,i)},r)}),Rj(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){Mr(this.id);return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){Mr(this.id);return}this._disposed=!0;var r=this.getDom();r&&CD(this.getDom(),$m,"");var n=this,i=n._api,a=n._model;N(n._componentsViews,function(o){o.dispose(a,i)}),N(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 el[n.id]},e.prototype.resize=function(r){if(this[Xt]){process.env.NODE_ENV!=="production"&&Gt("`resize` should not be called during main process.");return}if(this._disposed){Mr(this.id);return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[Cr]&&(a==null&&(a=this[Cr].silent),i=!0,this[Cr]=null),this[Xt]=!0;try{i&&ds(this),Vi.update.call(this,{type:"resize",animation:oe({duration:0},r&&r.animation)})}catch(o){throw this[Xt]=!1,o}this[Xt]=!1,Zu.call(this,a),Ju.call(this,a)}},e.prototype.showLoading=function(r,n){if(this._disposed){Mr(this.id);return}if(we(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!Wm[r]){process.env.NODE_ENV!=="production"&&xt("Loading effects "+r+" not exists.");return}var i=Wm[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)},e.prototype.hideLoading=function(){if(this._disposed){Mr(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=oe({},r);return n.type=Qu[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){Mr(this.id);return}if(we(n)||(n={silent:!!n}),!!fh[r.type]&&this._model){if(this[Xt]){this._pendingActions.push(r);return}var i=n.silent;km.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Pe.browser.weChat&&this._throttledZrFlush(),Zu.call(this,i),Ju.call(this,i)}},e.prototype.updateLabelLayout=function(){cn.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){Mr(this.id);return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);process.env.NODE_ENV!=="production"&&Ee(r.data&&a),a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){ds=function(c){var h=c._scheduler;h.restorePipelines(c._model),h.prepareStageTasks(),Im(c,!0),Im(c,!1),h.plan()},Im=function(c,h){for(var d=c._model,p=c._scheduler,g=h?c._componentsViews:c._chartsViews,v=h?c._componentsMap:c._chartsMap,m=c._zr,y=c._api,b=0;b<g.length;b++)g[b].__alive=!1;h?d.eachComponent(function(_,D){_!=="series"&&w(D)}):d.eachSeries(w);function w(_){var D=_.__requireNewView;_.__requireNewView=!1;var x="_ec_"+_.id+"_"+_.type,S=!D&&v[x];if(!S){var O=Pn(_.type),E=h?Br.getClass(O.main,O.sub):Zr.getClass(O.sub);process.env.NODE_ENV!=="production"&&Ee(E,O.sub+" does not exist."),S=new E,S.init(d,y),v[x]=S,g.push(S),m.add(S.group)}_.__viewId=S.__id=x,S.__alive=!0,S.__model=_,S.group.__ecComponentInfo={mainType:_.mainType,index:_.componentIndex},!h&&p.prepareView(S,_,d,y)}for(var b=0;b<g.length;){var C=g[b];C.__alive?b++:(!h&&C.renderTask.dispose(),m.remove(C.group),C.dispose(d,y),g.splice(b,1),v[C.__id]===C&&delete v[C.__id],C.__id=C.group.__ecComponentInfo=null)}},uh=function(c,h,d,p,g){var v=c._model;if(v.setUpdatePayload(d),!p){N([].concat(c._componentsViews).concat(c._chartsViews),C);return}var m={};m[p+"Id"]=d[p+"Id"],m[p+"Index"]=d[p+"Index"],m[p+"Name"]=d[p+"Name"];var y={mainType:p,query:m};g&&(y.subType=g);var b=d.excludeSeriesId,w;b!=null&&(w=Ae(),N(gt(b),function(_){var D=pr(_,null);D!=null&&w.set(D,!0)})),v&&v.eachComponent(y,function(_){var D=w&&w.get(_.id)!=null;if(!D)if(vx(d))if(_ instanceof fn)d.type===Va&&!d.notBlur&&!_.get(["emphasis","disabled"])&&_9(_,d,c._api);else{var x=Tg(_.mainType,_.componentIndex,d.name,c._api),S=x.focusSelf,O=x.dispatchers;d.type===Va&&S&&!d.notBlur&&Ag(_.mainType,_.componentIndex,c._api),O&&N(O,function(E){d.type===Va?dc(E):vc(E)})}else Pg(d)&&_ instanceof fn&&(S9(_,d,c._api),cx(_),Jr(c))},c),v&&v.eachComponent(y,function(_){var D=w&&w.get(_.id)!=null;D||C(c[p==="series"?"_chartsMap":"_componentsMap"][_.__viewId])},c);function C(_){_&&_.__alive&&_[h]&&_[h](_.__model,v,c._api,d)}},Vi={prepareAndUpdate:function(c){ds(this),Vi.update.call(this,c,{optionChanged:c.newOption!=null})},update:function(c,h){var d=this._model,p=this._api,g=this._zr,v=this._coordSysMgr,m=this._scheduler;if(d){d.setUpdatePayload(c),m.restoreData(d,c),m.performSeriesTasks(d),v.create(d,p),m.performDataProcessorTasks(d,c),Nm(this,d),v.update(d,p),r(d),m.performVisualTasks(d,c),zm(this,d,p,c,h);var y=d.get("backgroundColor")||"transparent",b=d.get("darkMode");g.setBackgroundColor(y),b!=null&&b!=="auto"&&g.setDarkMode(b),cn.trigger("afterupdate",d,p)}},updateTransform:function(c){var h=this,d=this._model,p=this._api;if(d){d.setUpdatePayload(c);var g=[];d.eachComponent(function(m,y){if(m!=="series"){var b=h.getViewOfComponentModel(y);if(b&&b.__alive)if(b.updateTransform){var w=b.updateTransform(y,d,p,c);w&&w.update&&g.push(b)}else g.push(b)}});var v=Ae();d.eachSeries(function(m){var y=h._chartsMap[m.__viewId];if(y.updateTransform){var b=y.updateTransform(m,d,p,c);b&&b.update&&v.set(m.uid,1)}else v.set(m.uid,1)}),r(d),this._scheduler.performVisualTasks(d,c,{setDirty:!0,dirtyMap:v}),lh(this,d,p,c,{},v),cn.trigger("afterupdate",d,p)}},updateView:function(c){var h=this._model;h&&(h.setUpdatePayload(c),Zr.markUpdateMethod(c,"updateView"),r(h),this._scheduler.performVisualTasks(h,c,{setDirty:!0}),zm(this,h,this._api,c,{}),cn.trigger("afterupdate",h,this._api))},updateVisual:function(c){var h=this,d=this._model;d&&(d.setUpdatePayload(c),d.eachSeries(function(p){p.getData().clearAllVisual()}),Zr.markUpdateMethod(c,"updateVisual"),r(d),this._scheduler.performVisualTasks(d,c,{visualType:"visual",setDirty:!0}),d.eachComponent(function(p,g){if(p!=="series"){var v=h.getViewOfComponentModel(g);v&&v.__alive&&v.updateVisual(g,d,h._api,c)}}),d.eachSeries(function(p){var g=h._chartsMap[p.__viewId];g.updateVisual(p,d,h._api,c)}),cn.trigger("afterupdate",d,this._api))},updateLayout:function(c){Vi.update.call(this,c)}},Rm=function(c,h,d,p){if(c._disposed){Mr(c.id);return}for(var g=c._model,v=c._coordSysMgr.getCoordinateSystems(),m,y=ig(g,d),b=0;b<v.length;b++){var w=v[b];if(w[h]&&(m=w[h](g,y,p))!=null)return m}process.env.NODE_ENV!=="production"&&xt("No coordinate system that supports "+h+" found by the given finder.")},Nm=function(c,h){var d=c._chartsMap,p=c._scheduler;h.eachSeries(function(g){p.updateStreamModes(g,d[g.__viewId])})},km=function(c,h){var d=this,p=this.getModel(),g=c.type,v=c.escapeConnect,m=fh[g],y=m.actionInfo,b=(y.update||"update").split(":"),w=b.pop(),C=b[0]!=null&&Pn(b[0]);this[Xt]=!0;var _=[c],D=!1;c.batch&&(D=!0,_=ye(c.batch,function(B){return B=je(oe({},B),c),B.batch=null,B}));var x=[],S,O=Pg(c),E=vx(c);if(E&&fx(this._api),N(_,function(B){if(S=m.action(B,d._model,d._api),S=S||oe({},B),S.type=y.event||S.type,x.push(S),E){var M=ag(c),I=M.queryOptionMap,j=M.mainTypeSpecified,z=j?I.keys()[0]:"series";uh(d,w,B,z),Jr(d)}else O?(uh(d,w,B,"series"),Jr(d)):C&&uh(d,w,B,C.main,C.sub)}),w!=="none"&&!E&&!O&&!C)try{this[Cr]?(ds(this),Vi.update.call(this,c),this[Cr]=null):Vi[w].call(this,c)}catch(B){throw this[Xt]=!1,B}if(D?S={type:y.event||g,escapeConnect:v,batch:x}:S=x[0],this[Xt]=!1,!h){var P=this._messageCenter;if(P.trigger(S.type,S),O){var F={type:"selectchanged",escapeConnect:v,selected:E9(p),isFromClick:c.isFromClick||!1,fromAction:c.type,fromActionPayload:c};P.trigger(F.type,F)}}},Zu=function(c){for(var h=this._pendingActions;h.length;){var d=h.shift();km.call(this,d,c)}},Ju=function(c){!c&&this.trigger("updated")},f2=function(c,h){c.on("rendered",function(d){h.trigger("rendered",d),c.animation.isFinished()&&!h[Cr]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},c2=function(c,h){c.on("mouseover",function(d){var p=d.target,g=Xu(p,Jo);g&&(D9(g,d,h._api),Jr(h))}).on("mouseout",function(d){var p=d.target,g=Xu(p,Jo);g&&(x9(g,d,h._api),Jr(h))}).on("click",function(d){var p=d.target,g=Xu(p,function(y){return He(y).dataIndex!=null},!0);if(g){var v=g.selected?"unselect":"select",m=He(g);h._api.dispatchAction({type:v,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function r(c){c.clearColorPalette(),c.eachSeries(function(h){h.clearColorPalette()})}function n(c){var h=[],d=[],p=!1;if(c.eachComponent(function(y,b){var w=b.get("zlevel")||0,C=b.get("z")||0,_=b.getZLevelKey();p=p||!!_,(y==="series"?d:h).push({zlevel:w,z:C,idx:b.componentIndex,type:y,key:_})}),p){var g=h.concat(d),v,m;Bf(g,function(y,b){return y.zlevel===b.zlevel?y.z-b.z:y.zlevel-b.zlevel}),N(g,function(y){var b=c.getComponent(y.type,y.idx),w=y.zlevel,C=y.key;v!=null&&(w=Math.max(v,w)),C?(w===v&&C!==m&&w++,m=C):m&&(w===v&&w++,m=""),v=w,b.setZLevel(w)})}}zm=function(c,h,d,p,g){n(h),h2(c,h,d,p,g),N(c._chartsViews,function(v){v.__alive=!1}),lh(c,h,d,p,g),N(c._chartsViews,function(v){v.__alive||v.remove(h,d)})},h2=function(c,h,d,p,g,v){N(v||c._componentsViews,function(m){var y=m.__model;l(y,m),m.render(y,h,d,p),s(y,m),f(y,m)})},lh=function(c,h,d,p,g,v){var m=c._scheduler;g=oe(g||{},{updatedSeries:h.getSeries()}),cn.trigger("series:beforeupdate",h,d,g);var y=!1;h.eachSeries(function(b){var w=c._chartsMap[b.__viewId];w.__alive=!0;var C=w.renderTask;m.updatePayload(C,p),l(b,w),v&&v.get(b.uid)&&C.dirty(),C.perform(m.getPerformArgs(C))&&(y=!0),w.group.silent=!!b.get("silent"),o(b,w),cx(b)}),m.unfinished=y||m.unfinished,cn.trigger("series:layoutlabels",h,d,g),cn.trigger("series:transition",h,d,g),h.eachSeries(function(b){var w=c._chartsMap[b.__viewId];s(b,w),f(b,w)}),a(c,h),cn.trigger("series:afterupdate",h,d,g)},Jr=function(c){c[Fm]=!0,c.getZr().wakeUp()},p2=function(c){c[Fm]&&(c.getZr().storage.traverse(function(h){rs(h)||i(h)}),c[Fm]=!1)};function i(c){for(var h=[],d=c.currentStates,p=0;p<d.length;p++){var g=d[p];g==="emphasis"||g==="blur"||g==="select"||h.push(g)}c.selected&&c.states.select&&h.push("select"),c.hoverState===uc&&c.states.emphasis?h.push("emphasis"):c.hoverState===sc&&c.states.blur&&h.push("blur"),c.useStates(h)}function a(c,h){var d=c._zr,p=d.storage,g=0;p.traverse(function(v){v.isGroup||g++}),g>h.get("hoverLayerThreshold")&&!Pe.node&&!Pe.worker&&h.eachSeries(function(v){if(!v.preventUsingHoverLayer){var m=c._chartsMap[v.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(c,h){var d=c.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function s(c,h){if(!c.preventAutoZ){var d=c.get("z")||0,p=c.get("zlevel")||0;h.eachRendered(function(g){return u(g,d,p,-1/0),!0})}}function u(c,h,d,p){var g=c.getTextContent(),v=c.getTextGuideLine(),m=c.isGroup;if(m)for(var y=c.childrenRef(),b=0;b<y.length;b++)p=Math.max(u(y[b],h,d,p),p);else c.z=h,c.zlevel=d,p=Math.max(c.z2,p);if(g&&(g.z=h,g.zlevel=d,isFinite(p)&&(g.z2=p+2)),v){var w=c.textGuideLineConfig;v.z=h,v.zlevel=d,isFinite(p)&&(v.z2=p+(w&&w.showAbove?1:-1))}return p}function l(c,h){h.eachRendered(function(d){if(!rs(d)){var p=d.getTextContent(),g=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function f(c,h){var d=c.getModel("stateAnimation"),p=c.isAnimationEnabled(),g=d.get("duration"),v=g>0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(m){if(m.states&&m.states.emphasis){if(rs(m))return;if(m instanceof Ve&&B9(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(p){m.stateTransition=v;var b=m.getTextContent(),w=m.getTextGuideLine();b&&(b.stateTransition=v),w&&(w.stateTransition=v)}m.__dirty&&i(m)}})}d2=function(c){return new(function(h){ce(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return c._model.getComponent(g.mainType,g.index);p=p.parent}},d.prototype.enterEmphasis=function(p,g){dc(p,g),Jr(c)},d.prototype.leaveEmphasis=function(p,g){vc(p,g),Jr(c)},d.prototype.enterBlur=function(p){w9(p),Jr(c)},d.prototype.leaveBlur=function(p){ox(p),Jr(c)},d.prototype.enterSelect=function(p){sx(p),Jr(c)},d.prototype.leaveSelect=function(p){ux(p),Jr(c)},d.prototype.getModel=function(){return c.getModel()},d.prototype.getViewOfComponentModel=function(p){return c.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return c.getViewOfSeriesModel(p)},d}(ES))(c)},v2=function(c){function h(d,p){for(var g=0;g<d.length;g++){var v=d[g];v[Lm]=p}}N(Qu,function(d,p){c._messageCenter.on(p,function(g){if(y2[c.group]&&c[Lm]!==i2){if(g&&g.escapeConnect)return;var v=c.makeActionFromEvent(g),m=[];N(el,function(y){y!==c&&y.group===c.group&&m.push(y)}),h(m,i2),N(m,function(y){y[Lm]!==SV&&y.dispatchAction(v)}),h(m,EV)}})})}}(),e}(En),jm=g2.prototype;jm.on=a2("on"),jm.off=a2("off"),jm.one=function(t,e,r){var n=this;On("ECharts#one is deprecated.");function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];e&&e.apply&&e.apply(this,a),n.off(t,i)}this.on.call(this,t,i,r)};var AV=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Mr(t){process.env.NODE_ENV!=="production"&&xt("Instance "+t+" has been disposed")}var fh={},Qu={},Vm=[],Hm=[],ch=[],m2={},Wm={},el={},y2={},TV=+new Date-0,$m="_echarts_instance_";function OV(t,e,r){{if(process.env.NODE_ENV!=="production"&&!t)throw new Error("Initialize failed: invalid dom.");var n=PV(t);if(n)return process.env.NODE_ENV!=="production"&&xt("There is a chart instance already initialized on the dom."),n;process.env.NODE_ENV!=="production"&&Mo(t)&&t.nodeName.toUpperCase()!=="CANVAS"&&(!t.clientWidth&&!r||!t.clientHeight&&!r)&&xt("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var i=new g2(t,e,r);return i.id="ec_"+TV++,el[i.id]=i,CD(t,$m,i.id),v2(i),cn.trigger("afterinit",i),i}function PV(t){return el[h6(t,$m)]}function b2(t,e){m2[t]=e}function C2(t){Ge(Hm,t)<0&&Hm.push(t)}function w2(t,e){Um(Vm,t,e,mV)}function BV(t){Gm("afterinit",t)}function MV(t){Gm("afterupdate",t)}function Gm(t,e){cn.on(t,e)}function vs(t,e,r){De(e)&&(r=e,e="");var n=we(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,!Qu[e]&&(Ee(n2.test(n)&&n2.test(e)),fh[n]||(fh[n]={action:r,actionInfo:t}),Qu[e]=n)}function FV(t,e){lm.register(t,e)}function LV(t,e){Um(ch,t,e,e2,"layout")}function Qa(t,e){Um(ch,t,e,t2,"visual")}var _2=[];function Um(t,e,r,n,i){if((De(e)||we(e))&&(r=e,e=n),process.env.NODE_ENV!=="production"){if(isNaN(e)||e==null)throw new Error("Illegal priority");N(t,function(o){Ee(o.__raw!==r)})}if(!(Ge(_2,r)>=0)){_2.push(r);var a=SE.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function D2(t,e){Wm[t]=e}function IV(t,e,r){var n=hV("registerMap");n&&n(t,e,r)}var RV=Wz;Qa(Mm,gj),Qa(sh,mj),Qa(sh,yj),Qa(Mm,Bj),Qa(sh,Mj),Qa(r2,fV),C2(FS),w2(pV,_z),D2("default",bj),vs({type:Va,event:Va,update:Va},dr),vs({type:fc,event:fc,update:fc},dr),vs({type:xu,event:xu,update:xu},dr),vs({type:cc,event:cc,update:cc},dr),vs({type:Su,event:Su,update:Su},dr),b2("light",Oj),b2("dark",ME);function tl(t){return t==null?0:t.length||1}function x2(t){return t}var qm=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||x2,this._newKeyGetter=i||x2,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=i[o],u=n[s],l=tl(u);if(l>1){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)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var u=a[s],l=n[u],f=i[u],c=tl(l),h=tl(f);if(c>1&&h===1)this._updateManyToOne&&this._updateManyToOne(f,l),i[u]=null;else if(c===1&&h>1)this._updateOneToMany&&this._updateOneToMany(f,l),i[u]=null;else if(c===1&&h===1)this._update&&this._update(f,l),i[u]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(f,l),i[u]=null;else if(c>1)for(var d=0;d<c;d++)this._remove&&this._remove(l[d]);else this._remove&&this._remove(l)}this._performRestAdd(o,i)},t.prototype._performRestAdd=function(e,r){for(var n=0;n<e.length;n++){var i=e[n],a=r[i],o=tl(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);r[i]=null}},t.prototype._initIndexMap=function(e,r,n,i){for(var a=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[i](e[o],o);if(a||(n[o]=s),!!r){var u=r[s],l=tl(u);l===0?(r[s]=o,a&&n.push(s)):l===1?r[s]=[u,o]:u.push(o)}}},t}(),NV=function(){function t(e,r){this._encode=e,this._schema=r}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function kV(t,e){var r={},n=r.encode={},i=Ae(),a=[],o=[],s={};N(t.dimensions,function(h){var d=t.getDimensionInfo(h),p=d.coordDim;if(p){process.env.NODE_ENV!=="production"&&Ee(nm.get(p)==null);var g=d.coordDimIndex;Ym(n,p)[g]=h,d.isExtraCoord||(i.set(p,1),jV(d.type)&&(a[0]=h),Ym(s,p)[g]=t.getDimensionIndex(d.name)),d.defaultTooltip&&o.push(h)}nm.each(function(v,m){var y=Ym(n,m),b=d.otherDims[m];b!=null&&b!==!1&&(y[b]=d.name)})});var u=[],l={};i.each(function(h,d){var p=n[d];l[d]=p[0],u=u.concat(p)}),r.dataDimsOnCoord=u,r.dataDimIndicesOnCoord=ye(u,function(h){return t.getDimensionInfo(h).storeDimIndex}),r.encodeFirstDimNotExtra=l;var f=n.label;f&&f.length&&(a=f.slice());var c=n.tooltip;return c&&c.length?o=c.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,r.userOutput=new NV(s,e),r}function Ym(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function zV(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function jV(t){return!(t==="ordinal"||t==="time")}var hh=function(){function t(e){this.otherDims={},e!=null&&oe(this,e)}return t}(),VV=lt(),HV={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},S2=function(){function t(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=T2(this.source)))},t.prototype.getSourceDimensionIndex=function(e){return Be(this._dimNameMap.get(e),-1)},t.prototype.getSourceDimension=function(e){var r=this.source.dimensionsDefine;if(r)return r[e]},t.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,r=kS(this.source),n=!O2(e),i="",a=[],o=0,s=0;o<e;o++){var u=void 0,l=void 0,f=void 0,c=this.dimensions[s];if(c&&c.storeDimIndex===o)u=r?c.name:null,l=c.type,f=c.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(u=r?h.name:null,l=h.type)}a.push({property:u,type:l,ordinalMeta:f}),r&&u!=null&&(!c||!c.isCalculationCoord)&&(i+=n?u.replace(/\`/g,"`1").replace(/\$/g,"`2"):u),i+="$",i+=HV[l]||"f",f&&(i+=f.uid),i+="$"}var d=this.source,p=[d.seriesLayoutBy,d.startIndex,i].join("$$");return{dimensions:a,hash:p}},t.prototype.makeOutputDimensionNames=function(){for(var e=[],r=0,n=0;r<this._fullDimCount;r++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===r)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(r);o&&(i=o.name)}e.push(i)}return e},t.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function E2(t){return t instanceof S2}function A2(t){for(var e=Ae(),r=0;r<(t||[]).length;r++){var n=t[r],i=we(n)?n.name:n;i!=null&&e.get(i)==null&&e.set(i,r)}return e}function T2(t){var e=VV(t);return e.dimNameMap||(e.dimNameMap=A2(t.dimensionsDefine))}function O2(t){return t>30}var rl=we,Hi=ye,WV=typeof Int32Array>"u"?Array:Int32Array,$V="e\0\0",P2=-1,GV=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],UV=["_approximateExtent"],B2,dh,nl,ps,Xm,vh,Km,M2=function(){function t(e,r){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","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,i=!1;E2(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},u=!1,l={},f=0;f<n.length;f++){var c=n[f],h=be(c)?new hh({name:c}):c instanceof hh?c:new hh(c),d=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=d,h.coordDimIndex=0);var p=h.otherDims=h.otherDims||{};o.push(d),a[d]=h,l[d]!=null&&(u=!0),h.createInvertedIndices&&(s[d]=[]),p.itemName===0&&(this._nameDimIdx=f),p.itemId===0&&(this._idDimIdx=f),process.env.NODE_ENV!=="production"&&Ee(i||h.storeDimIndex>=0),i&&(h.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(u),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=Ae();N(o,function(v){g.set(a[v].storeDimIndex,v)})}}return t.prototype.getDimension=function(e){var r=this._recognizeDimIndex(e);if(r==null)return e;if(r=e,!this._dimOmitted)return this.dimensions[r];var n=this._dimIdxToName.get(r);if(n!=null)return n;var i=this._schema.getSourceDimension(r);if(i)return i.name},t.prototype.getDimensionIndex=function(e){var r=this._recognizeDimIndex(e);if(r!=null)return r;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},t.prototype._recognizeDimIndex=function(e){if(nt(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},t.prototype._getStoreDimIndex=function(e){var r=this.getDimensionIndex(e);if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Unknown dimension "+e);return r},t.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},t.prototype._initGetDimensionInfo=function(e){var r=this._dimInfos;this._getDimInfo=e?function(n){return r.hasOwnProperty(n)?r[n]:void 0}:function(n){return r[n]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(e,r){var n=this._dimSummary;if(r==null)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return i?i[r]:null},t.prototype.mapDimensionsAll=function(e){var r=this._dimSummary,n=r.encode[e];return(n||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(e,r,n){var i=this,a;if(e instanceof ym&&(a=e),!a){var o=this.dimensions,s=hm(e)||Wt(e)?new VS(e,o.length):e;a=new ym;var u=Hi(o,function(l){return{type:i._dimInfos[l].type,property:l}});a.initData(s,u,n)}this._store=a,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=kV(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(e){var r=this._store.appendData(e);this._doInit(r[0],r[1])},t.prototype.appendValues=function(e,r){var n=this._store.appendValues(e,r.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var s=i;s<a;s++){var u=s-i;this._nameList[s]=r[u],o&&Km(this,s)}},t.prototype._updateOrdinalMeta=function(){for(var e=this._store,r=this.dimensions,n=0;n<r.length;n++){var i=this._dimInfos[r[n]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==hi&&!e.fillStorage},t.prototype._doInit=function(e,r){if(!(e>=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,u=s===qr;if(u&&!i.pure)for(var l=[],f=e;f<r;f++){var c=i.getItem(f,l);if(!this.hasItemOption&&r6(c)&&(this.hasItemOption=!0),c){var h=c.name;a[f]==null&&h!=null&&(a[f]=pr(h,null));var d=c.id;o[f]==null&&d!=null&&(o[f]=pr(d,null))}}if(this._shouldMakeIdFromName())for(var f=e;f<r;f++)Km(this,f);B2(this)}},t.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.setApproximateExtent=function(e,r){r=this.getDimension(r),this._approximateExtent[r]=e.slice()},t.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},t.prototype.setCalculationInfo=function(e,r){rl(e)?oe(this._calculationInfo,e):this._calculationInfo[e]=r},t.prototype.getName=function(e){var r=this.getRawIndex(e),n=this._nameList[r];return n==null&&this._nameDimIdx!=null&&(n=nl(this,this._nameDimIdx,r)),n==null&&(n=""),n},t.prototype._getCategory=function(e,r){var n=this._store.get(e,r),i=this._store.getOrdinalMeta(e);return i?i.categories[n]:n},t.prototype.getId=function(e){return dh(this,this.getRawIndex(e))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.get(i.storeDimIndex,r)},t.prototype.getByRawIndex=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.getByRawIndex(i.storeDimIndex,r)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},t.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},t.prototype.getValues=function(e,r){var n=this,i=this._store;return he(e)?i.getValues(Hi(e,function(a){return n._getStoreDimIndex(a)}),r):i.getValues(e)},t.prototype.hasValue=function(e){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,i=r.length;n<i;n++)if(isNaN(this._store.get(r[n],e)))return!1;return!0},t.prototype.indexOfName=function(e){for(var r=0,n=this._store.count();r<n;r++)if(this.getName(r)===e)return r;return-1},t.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},t.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},t.prototype.rawIndexOf=function(e,r){var n=e&&this._invertedIndicesMap[e];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Do not supported yet");var i=n[r];return i==null||isNaN(i)?P2:i},t.prototype.indicesOfNearest=function(e,r,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),r,n)},t.prototype.each=function(e,r,n){De(e)&&(n=r,r=e,e=[]);var i=n||this,a=Hi(ps(e),this._getStoreDimIndex,this);this._store.each(a,i?dt(r,i):r)},t.prototype.filterSelf=function(e,r,n){De(e)&&(n=r,r=e,e=[]);var i=n||this,a=Hi(ps(e),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?dt(r,i):r),this},t.prototype.selectRange=function(e){var r=this,n={},i=Ke(e);return N(i,function(a){var o=r._getStoreDimIndex(a);n[o]=e[a]}),this._store=this._store.selectRange(n),this},t.prototype.mapArray=function(e,r,n){De(e)&&(n=r,r=e,e=[]),n=n||this;var i=[];return this.each(e,function(){i.push(r&&r.apply(this,arguments))},n),i},t.prototype.map=function(e,r,n,i){var a=n||i||this,o=Hi(ps(e),this._getStoreDimIndex,this),s=vh(this);return s._store=this._store.map(o,a?dt(r,a):r),s},t.prototype.modify=function(e,r,n,i){var a=this,o=n||i||this;process.env.NODE_ENV!=="production"&&N(ps(e),function(u){var l=a.getDimensionInfo(u);l.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=Hi(ps(e),this._getStoreDimIndex,this);this._store.modify(s,o?dt(r,o):r)},t.prototype.downSample=function(e,r,n,i){var a=vh(this);return a._store=this._store.downSample(this._getStoreDimIndex(e),r,n,i),a},t.prototype.lttbDownSample=function(e,r){var n=vh(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),r),n},t.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},t.prototype.getItemModel=function(e){var r=this.hostModel,n=this.getRawDataItem(e);return new Ct(n,r,r&&r.ecModel)},t.prototype.diff=function(e){var r=this;return new qm(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return dh(e,n)},function(n){return dh(r,n)})},t.prototype.getVisual=function(e){var r=this._visual;return r&&r[e]},t.prototype.setVisual=function(e,r){this._visual=this._visual||{},rl(e)?oe(this._visual,e):this._visual[e]=r},t.prototype.getItemVisual=function(e,r){var n=this._itemVisuals[e],i=n&&n[r];return i??this.getVisual(r)},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),he(a)?a=a.slice():rl(a)&&(a=oe({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,rl(r)?oe(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){rl(e)?oe(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?oe(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;c9(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){N(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:Hi(this.dimensions,this._getDimInfo,this),this.hostModel)),Xm(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];De(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(fp(arguments)))})},t.internalField=function(){B2=function(e){var r=e._invertedIndicesMap;N(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new WV(o.categories.length);for(var u=0;u<n.length;u++)n[u]=P2;for(var u=0;u<s.count();u++)n[s.get(a.storeDimIndex,u)]=u}})},nl=function(e,r,n){return pr(e._getCategory(r,n),null)},dh=function(e,r){var n=e._idList[r];return n==null&&e._idDimIdx!=null&&(n=nl(e,e._idDimIdx,r)),n==null&&(n=$V+r),n},ps=function(e){return he(e)||(e=e!=null?[e]:[]),e},vh=function(e){var r=new t(e._schema?e._schema:Hi(e.dimensions,e._getDimInfo,e),e.hostModel);return Xm(r,e),r},Xm=function(e,r){N(GV.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(e[n]=r[n])}),e.__wrappedMethods=r.__wrappedMethods,N(UV,function(n){e[n]=$e(r[n])}),e._calculationInfo=oe({},r._calculationInfo)},Km=function(e,r){var n=e._nameList,i=e._idList,a=e._nameDimIdx,o=e._idDimIdx,s=n[r],u=i[r];if(s==null&&a!=null&&(n[r]=s=nl(e,a,r)),u==null&&o!=null&&(i[r]=u=nl(e,o,r)),u==null&&s!=null){var l=e._nameRepeatCount,f=l[s]=(l[s]||0)+1;u=s,f>1&&(u+="__ec__"+f),i[r]=u}}}(),t}();function F2(t,e){hm(t)||(t=LS(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=Ae(),a=[],o=YV(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&O2(o),u=n===t.dimensionsDefine,l=u?T2(t):A2(n),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(t,o));for(var c=Ae(f),h=new QS(o),d=0;d<h.length;d++)h[d]=-1;function p(S){var O=h[S];if(O<0){var E=n[S],P=we(E)?E:{name:E},F=new hh,B=P.name;B!=null&&l.get(B)!=null&&(F.name=F.displayName=B),P.type!=null&&(F.type=P.type),P.displayName!=null&&(F.displayName=P.displayName);var M=a.length;return h[S]=M,F.storeDimIndex=S,a.push(F),F}return a[O]}if(!s)for(var d=0;d<o;d++)p(d);c.each(function(S,O){var E=gt(S).slice();if(E.length===1&&!be(E[0])&&E[0]<0){c.set(O,!1);return}var P=c.set(O,[]);N(E,function(F,B){var M=be(F)?l.get(F):F;M!=null&&M<o&&(P[B]=M,v(p(M),O,B))})});var g=0;N(r,function(S){var O,E,P,F;if(be(S))O=S,F={};else{F=S,O=F.name;var B=F.ordinalMeta;F.ordinalMeta=null,F=oe({},F),F.ordinalMeta=B,E=F.dimsDef,P=F.otherDims,F.name=F.coordDim=F.coordDimIndex=F.dimsDef=F.otherDims=null}var M=c.get(O);if(M!==!1){if(M=gt(M),!M.length)for(var I=0;I<(E&&E.length||1);I++){for(;g<o&&p(g).coordDim!=null;)g++;g<o&&M.push(g++)}N(M,function(j,z){var W=p(j);if(u&&F.type!=null&&(W.type=F.type),v(je(W,F),O,z),W.name==null&&E){var R=E[z];!we(R)&&(R={name:R}),W.name=W.displayName=R.name,W.defaultTooltip=R.defaultTooltip}P&&je(W.otherDims,P)})}});function v(S,O,E){nm.get(O)!=null?S.otherDims[O]=E:(S.coordDim=O,S.coordDimIndex=E,i.set(O,!0))}var m=e.generateCoord,y=e.generateCoordCount,b=y!=null;y=m?y||1:0;var w=m||"value";function C(S){S.name==null&&(S.name=S.coordDim)}if(s)N(a,function(S){C(S)}),a.sort(function(S,O){return S.storeDimIndex-O.storeDimIndex});else for(var _=0;_<o;_++){var D=p(_),x=D.coordDim;x==null&&(D.coordDim=XV(w,i,b),D.coordDimIndex=0,(!m||y<=0)&&(D.isExtraCoord=!0),y--),C(D),D.type==null&&(yS(t,_)===jt.Must||D.isExtraCoord&&(D.otherDims.itemName!=null||D.otherDims.seriesName!=null))&&(D.type="ordinal")}return qV(a),new S2({source:t,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function qV(t){for(var e=Ae(),r=0;r<t.length;r++){var n=t[r],i=n.name,a=e.get(i)||0;a>0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function YV(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return N(e,function(a){var o;we(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function XV(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var KV=function(){function t(e){this.coordSysDims=[],this.axisMap=Ae(),this.categoryAxisMap=Ae(),this.coordSysName=e}return t}();function ZV(t){var e=t.get("coordinateSystem"),r=new KV(e),n=JV[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var JV={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",sn).models[0],a=t.getReferringComponents("yAxis",sn).models[0];if(process.env.NODE_ENV!=="production"){if(!i)throw new Error('xAxis "'+_a(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+_a(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),gs(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),gs(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",sn).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],r.set("single",i),gs(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",sn).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!o)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),gs(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),gs(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();N(a.parallelAxisIndex,function(s,u){var l=i.getComponent("parallelAxis",s),f=o[u];r.set(f,l),gs(l)&&(n.set(f,l),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=u))})}};function gs(t){return t.get("type")==="category"}function QV(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;eH(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var u=!!(t&&t.get("stack")),l,f,c,h;if(N(a,function(y,b){be(y)&&(a[b]=y={name:y}),u&&!y.isExtraCoord&&(!n&&!l&&y.ordinalMeta&&(l=y),!f&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(f=y))}),f&&!n&&!l&&(n=!0),f){c="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var d=f.coordDim,p=f.type,g=0;N(a,function(y){y.coordDim===d&&g++});var v={name:c,coordDim:d,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:h,coordDim:h,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(h,p),m.storeDimIndex=s.ensureCalculationDimension(c,p)),o.appendCalculationDimension(v),o.appendCalculationDimension(m)):(a.push(v),a.push(m))}return{stackedDimension:f&&f.name,stackedByDimension:l&&l.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:c}}function eH(t){return!E2(t.schema)}function ms(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function tH(t,e){return ms(t,e)?t.getCalculationInfo("stackResultDimension"):e}function rH(t,e){var r=t.get("coordinateSystem"),n=lm.get(r),i;return e&&e.coordSysDims&&(i=ye(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var u=s.get("type");o.type=zV(u)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function nH(t,e,r){var n,i;return r&&N(t,function(a,o){var s=a.coordDim,u=r.categoryAxisMap.get(s);u&&(n==null&&(n=o),a.ordinalMeta=u.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function Zm(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===qr;var o=ZV(e),s=rH(e,o),u=r.useEncodeDefaulter,l=De(u)?u:u?Dt(X7,s,e):null,f={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},c=F2(i,f),h=nH(c.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(c),p=QV(e,{schema:c,store:d}),g=new M2(c,e);g.setCalculationInfo(p);var v=h!=null&&iH(i)?function(m,y,b,w){return w===h?b:this.defaultDimValueGetter(m,y,b,w)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,v),g}function iH(t){if(t.sourceFormat===qr){var e=aH(t.data||[]);return!he(yu(e))}}function aH(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}var kn=function(){function t(e){this._setting=e||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype.unionExtent=function(e){var r=this._extent;e[0]<r[0]&&(r[0]=e[0]),e[1]>r[1]&&(r[1]=e[1])},t.prototype.unionExtentFromData=function(e,r){this.unionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r)},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();ec(kn);var oH=0,Jm=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++oH}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&ye(n,sH);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!be(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Ae(this.categories))},t}();function sH(t){return we(t)&&t.value!=null?t.value:t+""}function uH(t){var e=Math.pow(10,Jf(Math.abs(t))),r=Math.abs(t/e);return r===0||r===1||r===2||r===3||r===5}function Qm(t){return t.type==="interval"||t.type==="log"}function lH(t,e,r,n){var i={},a=t[1]-t[0],o=i.interval=sD(a/e);r!=null&&o<r&&(o=i.interval=r),n!=null&&o>n&&(o=i.interval=n);var s=i.intervalPrecision=L2(o),u=i.niceTickExtent=[Tt(Math.ceil(t[0]/o)*o,s),Tt(Math.floor(t[1]/o)*o,s)];return fH(u,t),i}function e0(t){var e=Math.pow(10,Jf(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Tt(r*e)}function L2(t){return ai(t)+2}function I2(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function fH(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),I2(t,0,e),I2(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function ph(t,e){return t>=e[0]&&t<=e[1]}function gh(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function mh(t,e){return t*(e[1]-e[0])+e[0]}var t0=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new Jm({})),he(i)&&(i=new Jm({categories:ye(i,function(a){return we(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:be(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return r=this.parse(r),ph(r,this._extent)&&this._ordinalMeta.categories[r]!=null},e.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),gh(r,this._extent)},e.prototype.scale=function(r){return r=Math.round(mh(r,this._extent)),this.getRawOrdinalNumber(r)},e.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},e.prototype.getMinorTicks=function(r){},e.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,u=Math.min(s,n.length);o<u;++o){var l=n[o];i[o]=l,a[l]=o}for(var f=0;o<s;++o){for(;a[f]!=null;)f++;i.push(f),a[f]=o}},e.prototype._getTickNumber=function(r){var n=this._ticksByOrdinalNumber;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getRawOrdinalNumber=function(r){var n=this._ordinalNumbersByTick;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getLabel=function(r){if(!this.isBlank()){var n=this.getRawOrdinalNumber(r.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(r,n){this.unionExtent(r.getApproximateExtent(n))},e.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(kn);kn.registerClass(t0);var eo=Tt,ys=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return ph(r,this._extent)},e.prototype.normalize=function(r){return gh(r,this._extent)},e.prototype.scale=function(r){return mh(r,this._extent)},e.prototype.setExtent=function(r,n){var i=this._extent;isNaN(r)||(i[0]=parseFloat(r)),isNaN(n)||(i[1]=parseFloat(n))},e.prototype.unionExtent=function(r){var n=this._extent;r[0]<n[0]&&(n[0]=r[0]),r[1]>n[1]&&(n[1]=r[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=L2(r)},e.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var u=1e4;i[0]<a[0]&&(r?s.push({value:eo(a[0]-n,o)}):s.push({value:i[0]}));for(var l=a[0];l<=a[1]&&(s.push({value:l}),l=eo(l+n,o),l!==s[s.length-1].value);)if(s.length>u)return[];var f=s.length?s[s.length-1].value:a[1];return i[1]>f&&(r?s.push({value:eo(f+n,o)}):s.push({value:i[1]})),s},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;o<n.length;o++){for(var s=n[o],u=n[o-1],l=0,f=[],c=s.value-u.value,h=c/r;l<r-1;){var d=eo(u.value+(l+1)*h);d>a[0]&&d<a[1]&&f.push(d),l++}i.push(f)}return i},e.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=ai(r.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=eo(r.value,i,!0);return uS(a)},e.prototype.calcNiceTicks=function(r,n,i){r=r||5;var a=this._extent,o=a[1]-a[0];if(isFinite(o)){o<0&&(o=-o,a.reverse());var s=lH(a,r,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(r){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);r.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval;r.fixMin||(n[0]=eo(Math.floor(n[0]/o)*o)),r.fixMax||(n[1]=eo(Math.ceil(n[1]/o)*o))},e.prototype.setNiceExtent=function(r,n){this._niceExtent=[r,n]},e.type="interval",e}(kn);kn.registerClass(ys);var R2=typeof Float32Array<"u",cH=R2?Float32Array:Array;function vi(t){return he(t)?R2?new Float32Array(t):t:new cH(t)}var hH="__ec_stack_";function r0(t){return t.get("stack")||hH+t.seriesIndex}function n0(t){return t.dim+t.index}function N2(t,e){var r=[];return e.eachSeriesByType(t,function(n){z2(n)&&r.push(n)}),r}function dH(t){var e={};N(t,function(u){var l=u.coordinateSystem,f=l.getBaseAxis();if(!(f.type!=="time"&&f.type!=="value"))for(var c=u.getData(),h=f.dim+"_"+f.index,d=c.getDimensionIndex(c.mapDimension(f.dim)),p=c.getStore(),g=0,v=p.count();g<v;++g){var m=p.get(d,g);e[h]?e[h].push(m):e[h]=[m]}});var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(i){i.sort(function(u,l){return u-l});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function k2(t){var e=dH(t),r=[];return N(t,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=e[u],f=Math.abs(o[1]-o[0]),c=a.scale.getExtent(),h=Math.abs(c[1]-c[0]);s=l?f/h*l:f}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=ut(n.get("barWidth"),s),g=ut(n.get("barMaxWidth"),s),v=ut(n.get("barMinWidth")||(j2(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");r.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:v,barGap:m,barCategoryGap:y,axisKey:n0(a),stackId:r0(n)})}),vH(r)}function vH(t){var e={};N(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},u=s.stacks;e[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 c=n.barMaxWidth;c&&(u[l].maxWidth=c);var h=n.barMinWidth;h&&(u[l].minWidth=h);var d=n.barGap;d!=null&&(s.gap=d);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var r={};return N(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var u=Ke(a).length;s=Math.max(35-u*4,15)+"%"}var l=ut(s,o),f=ut(n.gap,1),c=n.remainedWidth,h=n.autoWidthCount,d=(c-l)/(h+(h-1)*f);d=Math.max(d,0),N(a,function(m){var y=m.maxWidth,b=m.minWidth;if(m.width){var w=m.width;y&&(w=Math.min(w,y)),b&&(w=Math.max(w,b)),m.width=w,c-=w+f*w,h--}else{var w=d;y&&y<w&&(w=Math.min(y,c)),b&&b>w&&(w=b),w!==d&&(m.width=w,c-=w+f*w,h--)}}),d=(c-l)/(h+(h-1)*f),d=Math.max(d,0);var p=0,g;N(a,function(m,y){m.width||(m.width=d),g=m,p+=m.width*(1+f)}),g&&(p-=g.width*f);var v=-p/2;N(a,function(m,y){r[i][y]=r[i][y]||{bandWidth:o,offset:v,width:m.width},v+=m.width*(1+f)})}),r}function pH(t,e,r){if(t&&e){var n=t[n0(e)];return n!=null&&r!=null?n[r0(r)]:n}}function gH(t,e){var r=N2(t,e),n=k2(r);N(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),u=r0(i),l=n[n0(s)][u],f=l.offset,c=l.width;a.setLayout({bandWidth:l.bandWidth,offset:f,size:c})})}function mH(t){return{seriesType:t,plan:Dm(),reset:function(e){if(z2(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),u=e.get("showBackground",!0),l=r.mapDimension(a.dim),f=r.getCalculationInfo("stackResultDimension"),c=ms(r,l)&&!!r.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),d=yH(i,a),p=j2(e),g=e.get("barMinHeight")||0,v=f&&r.getDimensionIndex(f),m=r.getLayout("size"),y=r.getLayout("offset");return{progress:function(b,w){for(var C=b.count,_=p&&vi(C*3),D=p&&u&&vi(C*3),x=p&&vi(C),S=n.master.getRect(),O=h?S.width:S.height,E,P=w.getStore(),F=0;(E=b.next())!=null;){var B=P.get(c?v:o,E),M=P.get(s,E),I=d,j=void 0;c&&(j=+B-P.get(o,E));var z=void 0,W=void 0,R=void 0,U=void 0;if(h){var Z=n.dataToPoint([B,M]);if(c){var ee=n.dataToPoint([j,M]);I=ee[0]}z=I,W=Z[1]+y,R=Z[0]-I,U=m,Math.abs(R)<g&&(R=(R<0?-1:1)*g)}else{var Z=n.dataToPoint([M,B]);if(c){var ee=n.dataToPoint([M,j]);I=ee[1]}z=Z[0]+y,W=I,R=m,U=Z[1]-I,Math.abs(U)<g&&(U=(U<=0?-1:1)*g)}p?(_[F]=z,_[F+1]=W,_[F+2]=h?R:U,D&&(D[F]=h?S.x:z,D[F+1]=h?W:S.y,D[F+2]=O),x[E]=E):w.setItemLayout(E,{x:z,y:W,width:R,height:U}),F+=3}p&&w.setLayout({largePoints:_,largeDataIndices:x,largeBackgroundPoints:D,valueAxisHorizontal:h})}}}}}}function z2(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function j2(t){return t.pipelineContext&&t.pipelineContext.large}function yH(t,e){var r=e.model.get("startValue");return r||(r=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?r>0?r:1:r))}var bH=function(t,e,r,n){for(;r<n;){var i=r+n>>>1;t[i][1]<e?r=i+1:n=i}return r},V2=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="time",n}return e.prototype.getLabel=function(r){var n=this.getSetting("useUTC");return Rc(r.value,Jx[j7(as(this._minLevelUnit))]||Jx.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(r,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return V7(r,n,i,o,a)},e.prototype.getTicks=function(){var r=this._interval,n=this._extent,i=[];if(!r)return i;i.push({value:n[0],level:0});var a=this.getSetting("useUTC"),o=EH(this._minLevelUnit,this._approxInterval,a,n);return i=i.concat(o),i.push({value:n[1],level:0}),i},e.prototype.calcNiceExtent=function(r){var n=this._extent;if(n[0]===n[1]&&(n[0]-=Ur,n[1]+=Ur),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-Ur}this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},e.prototype.calcNiceTicks=function(r,n,i){r=r||10;var a=this._extent,o=a[1]-a[0];this._approxInterval=o/r,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var s=yh.length,u=Math.min(bH(yh,this._approxInterval,0,s),s-1);this._interval=yh[u][1],this._minLevelUnit=yh[Math.max(u-1,0)][0]},e.prototype.parse=function(r){return nt(r)?r:+oi(r)},e.prototype.contain=function(r){return ph(this.parse(r),this._extent)},e.prototype.normalize=function(r){return gh(this.parse(r),this._extent)},e.prototype.scale=function(r){return mh(r,this._extent)},e.type="time",e}(ys),yh=[["second",Kg],["minute",Zg],["hour",Lu],["quarter-day",Lu*6],["half-day",Lu*12],["day",Ur*1.2],["half-week",Ur*3.5],["week",Ur*7],["month",Ur*31],["quarter",Ur*95],["half-year",Zx/2],["year",Zx]];function CH(t,e,r,n){var i=oi(e),a=oi(r),o=function(p){return tS(i,p,n)===tS(a,p,n)},s=function(){return o("year")},u=function(){return s()&&o("month")},l=function(){return u()&&o("day")},f=function(){return l()&&o("hour")},c=function(){return f()&&o("minute")},h=function(){return c()&&o("second")},d=function(){return h()&&o("millisecond")};switch(t){case"year":return s();case"month":return u();case"day":return l();case"hour":return f();case"minute":return c();case"second":return h();case"millisecond":return d()}}function wH(t,e){return t/=Ur,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function _H(t){var e=30*Ur;return t/=e,t>6?6:t>3?3:t>2?2:1}function DH(t){return t/=Lu,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function H2(t,e){return t/=e?Zg:Kg,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function xH(t){return sD(t)}function SH(t,e,r){var n=new Date(t);switch(as(e)){case"year":case"month":n[rS(r)](0);case"day":n[nS(r)](1);case"hour":n[iS(r)](0);case"minute":n[aS(r)](0);case"second":n[oS(r)](0),n[sS(r)](0)}return n.getTime()}function EH(t,e,r,n){var i=1e4,a=Qx,o=0;function s(O,E,P,F,B,M,I){for(var j=new Date(E),z=E,W=j[F]();z<P&&z<=n[1];)I.push({value:z}),W+=O,j[B](W),z=j.getTime();I.push({value:z,notAdd:!0})}function u(O,E,P){var F=[],B=!E.length;if(!CH(as(O),n[0],n[1],r)){B&&(E=[{value:SH(new Date(n[0]),O,r)},{value:n[1]}]);for(var M=0;M<E.length-1;M++){var I=E[M].value,j=E[M+1].value;if(I!==j){var z=void 0,W=void 0,R=void 0,U=!1;switch(O){case"year":z=Math.max(1,Math.round(e/Ur/365)),W=Qg(r),R=H7(r);break;case"half-year":case"quarter":case"month":z=_H(e),W=os(r),R=rS(r);break;case"week":case"half-week":case"day":z=wH(e),W=Nc(r),R=nS(r),U=!0;break;case"half-day":case"quarter-day":case"hour":z=DH(e),W=Ru(r),R=iS(r);break;case"minute":z=H2(e,!0),W=kc(r),R=aS(r);break;case"second":z=H2(e,!1),W=zc(r),R=oS(r);break;case"millisecond":z=xH(e),W=jc(r),R=sS(r);break}s(z,I,j,W,R,U,F),O==="year"&&P.length>1&&M===0&&P.unshift({value:P[0].value-z})}}for(var M=0;M<F.length;M++)P.push(F[M]);return F}}for(var l=[],f=[],c=0,h=0,d=0;d<a.length&&o++<i;++d){var p=as(a[d]);if(z7(a[d])){u(a[d],l[l.length-1]||[],f);var g=a[d+1]?as(a[d+1]):null;if(p!==g){if(f.length){h=c,f.sort(function(O,E){return O.value-E.value});for(var v=[],m=0;m<f.length;++m){var y=f[m].value;(m===0||f[m-1].value!==y)&&(v.push(f[m]),y>=n[0]&&y<=n[1]&&c++)}var b=(n[1]-n[0])/e;if(c>b*1.5&&h>b/1.5||(l.push(v),c>b||t===a[d]))break}f=[]}}}process.env.NODE_ENV!=="production"&&o>=i&&xt("Exceed safe limit.");for(var w=bt(ye(l,function(O){return bt(O,function(E){return E.value>=n[0]&&E.value<=n[1]&&!E.notAdd})}),function(O){return O.length>0}),C=[],_=w.length-1,d=0;d<w.length;++d)for(var D=w[d],x=0;x<D.length;++x)C.push({value:D[x].value,level:_-d});C.sort(function(O,E){return O.value-E.value});for(var S=[],d=0;d<C.length;++d)(d===0||C[d].value!==C[d-1].value)&&S.push(C[d]);return S}kn.registerClass(V2);var W2=kn.prototype,il=ys.prototype,AH=Tt,TH=Math.floor,OH=Math.ceil,bh=Math.pow,hn=Math.log,i0=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new ys,r._interval=0,r}return e.prototype.getTicks=function(r){var n=this._originalScale,i=this._extent,a=n.getExtent(),o=il.getTicks.call(this,r);return ye(o,function(s){var u=s.value,l=Tt(bh(this.base,u));return l=u===i[0]&&this._fixMin?Ch(l,a[0]):l,l=u===i[1]&&this._fixMax?Ch(l,a[1]):l,{value:l}},this)},e.prototype.setExtent=function(r,n){var i=hn(this.base);r=hn(Math.max(0,r))/i,n=hn(Math.max(0,n))/i,il.setExtent.call(this,r,n)},e.prototype.getExtent=function(){var r=this.base,n=W2.getExtent.call(this);n[0]=bh(r,n[0]),n[1]=bh(r,n[1]);var i=this._originalScale,a=i.getExtent();return this._fixMin&&(n[0]=Ch(n[0],a[0])),this._fixMax&&(n[1]=Ch(n[1],a[1])),n},e.prototype.unionExtent=function(r){this._originalScale.unionExtent(r);var n=this.base;r[0]=hn(r[0])/hn(n),r[1]=hn(r[1])/hn(n),W2.unionExtent.call(this,r)},e.prototype.unionExtentFromData=function(r,n){this.unionExtent(r.getApproximateExtent(n))},e.prototype.calcNiceTicks=function(r){r=r||10;var n=this._extent,i=n[1]-n[0];if(!(i===1/0||i<=0)){var a=Zk(i),o=r/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Tt(OH(n[0]/a)*a),Tt(TH(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){il.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return r=hn(r)/hn(this.base),ph(r,this._extent)},e.prototype.normalize=function(r){return r=hn(r)/hn(this.base),gh(r,this._extent)},e.prototype.scale=function(r){return r=mh(r,this._extent),bh(this.base,r)},e.type="log",e}(kn),$2=i0.prototype;$2.getMinorTicks=il.getMinorTicks,$2.getLabel=il.getLabel;function Ch(t,e){return AH(t,ai(e))}kn.registerClass(i0);var PH=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var a=r.get("min",!0);a==null&&(a=r.get("startValue",!0));var o=this._modelMinRaw=a;De(o)?this._modelMinNum=wh(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=wh(e,o));var s=this._modelMaxRaw=r.get("max",!0);if(De(s)?this._modelMaxNum=wh(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=wh(e,s)),i)this._axisDataLen=r.getCategories().length;else{var u=r.get("boundaryGap"),l=he(u)?u:[u||0,u||0];typeof l[0]=="boolean"||typeof l[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[Bi(l[0],1),Bi(l[1],1)]}},t.prototype.calculate=function(){var e=this._isOrdinal,r=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=e?null:n-r||Math.abs(r),s=this._modelMinRaw==="dataMin"?r:this._modelMinNum,u=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,l=s!=null,f=u!=null;s==null&&(s=e?i?0:NaN:r-a[0]*o),u==null&&(u=e?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(u==null||!isFinite(u))&&(u=NaN);var c=Fo(s)||Fo(u)||e&&!i;this._needCrossZero&&(s>0&&u>0&&!l&&(s=0),s<0&&u<0&&!f&&(u=0));var h=this._determinedMin,d=this._determinedMax;return h!=null&&(s=h,l=!0),d!=null&&(u=d,f=!0),{min:s,max:u,minFixed:l,maxFixed:f,isBlank:c}},t.prototype.modifyDataMinMax=function(e,r){process.env.NODE_ENV!=="production"&&Ee(!this.frozen),this[MH[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=BH[e];process.env.NODE_ENV!=="production"&&Ee(!this.frozen&&this[n]==null),this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),BH={min:"_determinedMin",max:"_determinedMax"},MH={min:"_dataMin",max:"_dataMax"};function FH(t,e,r){var n=t.rawExtentInfo;return n||(n=new PH(t,e,r),t.rawExtentInfo=n,n)}function wh(t,e){return e==null?null:Fo(e)?NaN:t.parse(e)}function G2(t,e){var r=t.type,n=FH(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=N2("bar",o),u=!1;if(N(s,function(c){u=u||c.getBaseAxis()===e.axis}),u){var l=k2(s),f=LH(i,a,e,l);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function LH(t,e,r,n){var i=r.axis.getExtent(),a=i[1]-i[0],o=pH(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;N(o,function(d){s=Math.min(d.offset,s)});var u=-1/0;N(o,function(d){u=Math.max(d.offset+d.width,u)}),s=Math.abs(s),u=Math.abs(u);var l=s+u,f=e-t,c=1-(s+u)/a,h=f/c-f;return e+=h*(u/l),t-=h*(s/l),{min:t,max:e}}function U2(t,e){var r=e,n=G2(t,r),i=n.extent,a=r.get("splitNumber");t instanceof i0&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),u=o==="interval"||o==="time";t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:u?r.get("minInterval"):null,maxInterval:u?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function IH(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new t0({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new V2({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(kn.getClass(e)||ys)}}function RH(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function bs(t){var e=t.getLabelModel().get("formatter"),r=t.type==="category"?t.scale.getExtent()[0]:null;return t.scale.type==="time"?function(n){return function(i,a){return t.scale.getFormattedLabel(i,a,n)}}(e):be(e)?function(n){return function(i){var a=t.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(e):De(e)?function(n){return function(i,a){return r!=null&&(a=i.value-r),n(a0(t,i),a,i.level!=null?{level:i.level}:null)}}(e):function(n){return t.scale.getLabel(n)}}function a0(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function NH(t){var e=t.model,r=t.scale;if(!(!e.get(["axisLabel","show"])||r.isBlank())){var n,i,a=r.getExtent();r instanceof t0?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=bs(t),u,l=1;i>40&&(l=Math.ceil(i/40));for(var f=0;f<i;f+=l){var c=n?n[f]:{value:a[0]+f},h=s(c,f),d=o.getTextRect(h),p=kH(d,o.get("rotate")||0);u?u.union(p):u=p}return u}}function kH(t,e){var r=e*Math.PI/180,n=t.width,i=t.height,a=n*Math.abs(Math.cos(r))+Math.abs(i*Math.sin(r)),o=n*Math.abs(Math.sin(r))+Math.abs(i*Math.cos(r)),s=new Ue(t.x,t.y,a,o);return s}function o0(t){var e=t.get("interval");return e??"auto"}function q2(t){return t.type==="category"&&o0(t.getLabelModel())===0}function zH(t,e){var r={};return N(t.mapDimensionsAll(e),function(n){r[tH(t,n)]=!0}),Ke(r)}var jH=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}(),Y2=[],VH={registerPreprocessor:C2,registerProcessor:w2,registerPostInit:BV,registerPostUpdate:MV,registerUpdateLifecycle:Gm,registerAction:vs,registerCoordinateSystem:FV,registerLayout:LV,registerVisual:Qa,registerTransform:RV,registerLoading:D2,registerMap:IV,registerImpl:cV,PRIORITY:xV,ComponentModel:Ze,ComponentView:Br,SeriesModel:fn,ChartView:Zr,registerComponentModel:function(t){Ze.registerClass(t)},registerComponentView:function(t){Br.registerClass(t)},registerSeriesModel:function(t){fn.registerClass(t)},registerChartView:function(t){Zr.registerClass(t)},registerSubTypeDefaulter:function(t,e){Ze.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Gk(t,e)}};function Wi(t){if(he(t)){N(t,function(e){Wi(e)});return}Ge(Y2,t)>=0||(Y2.push(t),De(t)&&(t={install:t}),t.install(VH))}var al=lt();function X2(t,e){var r=ye(e,function(n){return t.scale.parse(n)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function HH(t){var e=t.getLabelModel().get("customValues");if(e){var r=bs(t);return{labels:X2(t,e).map(function(n){var i={value:n};return{formattedLabel:r(i),rawLabel:t.scale.getLabel(i),tickValue:n}})}}return t.type==="category"?$H(t):UH(t)}function WH(t,e){var r=t.getTickModel().get("customValues");return r?{ticks:X2(t,r)}:t.type==="category"?GH(t,e):{ticks:ye(t.scale.getTicks(),function(n){return n.value})}}function $H(t){var e=t.getLabelModel(),r=K2(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function K2(t,e){var r=Z2(t,"labels"),n=o0(e),i=J2(r,n);if(i)return i;var a,o;return De(n)?a=tA(t,n):(o=n==="auto"?qH(t):n,a=eA(t,o)),Q2(r,n,{labels:a,labelCategoryInterval:o})}function GH(t,e){var r=Z2(t,"ticks"),n=o0(e),i=J2(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),De(n))a=tA(t,n,!0);else if(n==="auto"){var s=K2(t,t.getLabelModel());o=s.labelCategoryInterval,a=ye(s.labels,function(u){return u.tickValue})}else o=n,a=eA(t,o,!0);return Q2(r,n,{ticks:a,tickCategoryInterval:o})}function UH(t){var e=t.scale.getTicks(),r=bs(t);return{labels:ye(e,function(n,i){return{level:n.level,formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value}})}}function Z2(t,e){return al(t)[e]||(al(t)[e]=[])}function J2(t,e){for(var r=0;r<t.length;r++)if(t[r].key===e)return t[r].value}function Q2(t,e,r){return t.push({key:e,value:r}),r}function qH(t){var e=al(t).autoInterval;return e??(al(t).autoInterval=t.calculateCategoryInterval())}function YH(t){var e=XH(t),r=bs(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,i=t.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var u=a[0],l=t.dataToCoord(u+1)-t.dataToCoord(u),f=Math.abs(l*Math.cos(n)),c=Math.abs(l*Math.sin(n)),h=0,d=0;u<=a[1];u+=s){var p=0,g=0,v=Yp(r({value:u}),e.font,"center","top");p=v.width*1.3,g=v.height*1.3,h=Math.max(h,p,7),d=Math.max(d,g,7)}var m=h/f,y=d/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var b=Math.max(0,Math.floor(Math.min(m,y))),w=al(t.model),C=t.getExtent(),_=w.lastAutoInterval,D=w.lastTickCount;return _!=null&&D!=null&&Math.abs(_-b)<=1&&Math.abs(D-o)<=1&&_>b&&w.axisExtent0===C[0]&&w.axisExtent1===C[1]?b=_:(w.lastTickCount=o,w.lastAutoInterval=b,w.axisExtent0=C[0],w.axisExtent1=C[1]),b}function XH(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function eA(t,e,r){var n=bs(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],u=Math.max((e||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 c=q2(t),h=o.get("showMinLabel")||c,d=o.get("showMaxLabel")||c;h&&l!==a[0]&&g(a[0]);for(var p=l;p<=a[1];p+=u)g(p);d&&p-u!==a[1]&&g(a[1]);function g(v){var m={value:v};s.push(r?v:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:v})}return s}function tA(t,e,r){var n=t.scale,i=bs(t),a=[];return N(n.getTicks(),function(o){var s=n.getLabel(o),u=o.value;e(o.value,s)&&a.push(r?u:{formattedLabel:i(o),rawLabel:s,tickValue:u})}),a}var rA=[0,1],KH=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(e)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return qk(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&i.type==="ordinal"&&(n=n.slice(),nA(n,i.count())),eg(e,rA,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),nA(n,i.count()));var a=eg(e,n,rA,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=WH(this,r),i=n.ticks,a=ye(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return ZH(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=ye(n,function(a){return ye(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(){return HH(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return YH(this)},t}();function nA(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function ZH(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],o=e[1]={coord:a[1]};else{var u=e[i-1].tickValue-e[0].tickValue,l=(e[i-1].coord-e[0].coord)/u;N(e,function(d){d.coord-=l/2});var f=t.scale.getExtent();s=1+f[1]-e[i-1].tickValue,o={coord:e[i-1].coord+l*s},e.push(o)}var c=a[0]>a[1];h(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&h(a[0],e[0].coord)&&e.unshift({coord:a[0]}),h(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&h(o.coord,a[1])&&e.push({coord:a[1]});function h(d,p){return d=Tt(d),p=Tt(p),c?d>p:d<p}}var ol=Math.PI*2,to=ui.CMD,JH=["top","right","bottom","left"];function QH(t,e,r,n,i){var a=r.width,o=r.height;switch(t){case"top":n.set(r.x+a/2,r.y-e),i.set(0,-1);break;case"bottom":n.set(r.x+a/2,r.y+o+e),i.set(0,1);break;case"left":n.set(r.x-e,r.y+o/2),i.set(-1,0);break;case"right":n.set(r.x+a+e,r.y+o/2),i.set(1,0);break}}function eW(t,e,r,n,i,a,o,s,u){o-=t,s-=e;var l=Math.sqrt(o*o+s*s);o/=l,s/=l;var f=o*r+t,c=s*r+e;if(Math.abs(n-i)%ol<1e-4)return u[0]=f,u[1]=c,l-r;if(a){var h=n;n=li(i),i=li(h)}else n=li(n),i=li(i);n>i&&(i+=ol);var d=Math.atan2(s,o);if(d<0&&(d+=ol),d>=n&&d<=i||d+ol>=n&&d+ol<=i)return u[0]=f,u[1]=c,l-r;var p=r*Math.cos(n)+t,g=r*Math.sin(n)+e,v=r*Math.cos(i)+t,m=r*Math.sin(i)+e,y=(p-o)*(p-o)+(g-s)*(g-s),b=(v-o)*(v-o)+(m-s)*(m-s);return y<b?(u[0]=p,u[1]=g,Math.sqrt(y)):(u[0]=v,u[1]=m,Math.sqrt(b))}function _h(t,e,r,n,i,a,o,s){var u=i-t,l=a-e,f=r-t,c=n-e,h=Math.sqrt(f*f+c*c);f/=h,c/=h;var d=u*f+l*c,p=d/h;s&&(p=Math.min(Math.max(p,0),1)),p*=h;var g=o[0]=t+p*f,v=o[1]=e+p*c;return Math.sqrt((g-i)*(g-i)+(v-a)*(v-a))}function iA(t,e,r,n,i,a,o){r<0&&(t=t+r,r=-r),n<0&&(e=e+n,n=-n);var s=t+r,u=e+n,l=o[0]=Math.min(Math.max(i,t),s),f=o[1]=Math.min(Math.max(a,e),u);return Math.sqrt((l-i)*(l-i)+(f-a)*(f-a))}var dn=[];function tW(t,e,r){var n=iA(e.x,e.y,e.width,e.height,t.x,t.y,dn);return r.set(dn[0],dn[1]),n}function rW(t,e,r){for(var n=0,i=0,a=0,o=0,s,u,l=1/0,f=e.data,c=t.x,h=t.y,d=0;d<f.length;){var p=f[d++];d===1&&(n=f[d],i=f[d+1],a=n,o=i);var g=l;switch(p){case to.M:a=f[d++],o=f[d++],n=a,i=o;break;case to.L:g=_h(n,i,f[d],f[d+1],c,h,dn,!0),n=f[d++],i=f[d++];break;case to.C:g=P_(n,i,f[d++],f[d++],f[d++],f[d++],f[d],f[d+1],c,h,dn),n=f[d++],i=f[d++];break;case to.Q:g=F_(n,i,f[d++],f[d++],f[d],f[d+1],c,h,dn),n=f[d++],i=f[d++];break;case to.A:var v=f[d++],m=f[d++],y=f[d++],b=f[d++],w=f[d++],C=f[d++];d+=1;var _=!!(1-f[d++]);s=Math.cos(w)*y+v,u=Math.sin(w)*b+m,d<=1&&(a=s,o=u);var D=(c-v)*b/y+v;g=eW(v,m,b,w,w+C,_,D,h,dn),n=Math.cos(w+C)*y+v,i=Math.sin(w+C)*b+m;break;case to.R:a=n=f[d++],o=i=f[d++];var x=f[d++],S=f[d++];g=iA(a,o,x,S,c,h,dn);break;case to.Z:g=_h(n,i,a,o,c,h,dn,!0),n=a,i=o;break}g<l&&(l=g,r.set(dn[0],dn[1]))}return l}var vn=new _e,st=new _e,wt=new _e,zn=new _e,jn=new _e;function aA(t,e){if(t){var r=t.getTextGuideLine(),n=t.getTextContent();if(n&&r){var i=t.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||JH,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var u=1/0,l=i.anchor,f=t.getComputedTransform(),c=f&&Tf([],f),h=e.get("length2")||0;l&&wt.copy(l);for(var d=0;d<o.length;d++){var p=o[d];QH(p,0,s,vn,zn),_e.scaleAndAdd(st,vn,zn,h),st.transform(c);var g=t.getBoundingRect(),v=l?l.distance(st):t instanceof Ve?rW(st,t.path,wt):tW(st,g,wt);v<u&&(u=v,st.transform(f),wt.transform(f),wt.toArray(a[0]),st.toArray(a[1]),vn.toArray(a[2]))}oA(a,e.get("minTurnAngle")),r.setShape({points:a})}}}var Dh=[],or=new _e;function oA(t,e){if(e<=180&&e>0){e=e/180*Math.PI,vn.fromArray(t[0]),st.fromArray(t[1]),wt.fromArray(t[2]),_e.sub(zn,vn,st),_e.sub(jn,wt,st);var r=zn.len(),n=jn.len();if(!(r<.001||n<.001)){zn.scale(1/r),jn.scale(1/n);var i=zn.dot(jn),a=Math.cos(e);if(a<i){var o=_h(st.x,st.y,wt.x,wt.y,vn.x,vn.y,Dh,!1);or.fromArray(Dh),or.scaleAndAdd(jn,o/Math.tan(Math.PI-e));var s=wt.x!==st.x?(or.x-st.x)/(wt.x-st.x):(or.y-st.y)/(wt.y-st.y);if(isNaN(s))return;s<0?_e.copy(or,st):s>1&&_e.copy(or,wt),or.toArray(t[1])}}}}function nW(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,vn.fromArray(t[0]),st.fromArray(t[1]),wt.fromArray(t[2]),_e.sub(zn,st,vn),_e.sub(jn,wt,st);var n=zn.len(),i=jn.len();if(!(n<.001||i<.001)){zn.scale(1/n),jn.scale(1/i);var a=zn.dot(e),o=Math.cos(r);if(a<o){var s=_h(st.x,st.y,wt.x,wt.y,vn.x,vn.y,Dh,!1);or.fromArray(Dh);var u=Math.PI/2,l=Math.acos(jn.dot(e)),f=u+l-r;if(f>=u)_e.copy(or,wt);else{or.scaleAndAdd(jn,s/Math.tan(Math.PI/2-f));var c=wt.x!==st.x?(or.x-st.x)/(wt.x-st.x):(or.y-st.y)/(wt.y-st.y);if(isNaN(c))return;c<0?_e.copy(or,st):c>1&&_e.copy(or,wt)}or.toArray(t[1])}}}}function s0(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;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?t.useStyle(s):a.style=s}function iW(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=dp(n[0],n[1]),a=dp(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=Af([],n[1],n[0],o/i),u=Af([],n[1],n[2],o/a),l=Af([],s,u,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),t.bezierCurveTo(u[0],u[1],u[0],u[1],n[2][0],n[2][1])}else for(var f=1;f<n.length;f++)t.lineTo(n[f][0],n[f][1])}function sA(t,e,r){var n=t.getTextGuideLine(),i=t.getTextContent();if(!i){n&&t.removeTextGuideLine();return}for(var a=e.normal,o=a.get("show"),s=i.ignore,u=0;u<lc.length;u++){var l=lc[u],f=e[l],c=l==="normal";if(f){var h=f.get("show"),d=c?s:Be(i.states[l]&&i.states[l].ignore,s);if(d||!Be(h,o)){var p=c?n:n&&n.states[l];p&&(p.ignore=!0),n&&s0(n,!0,l,f);continue}n||(n=new Pu,t.setTextGuideLine(n),!c&&(s||!o)&&s0(n,!0,"normal",e.normal),t.stateProxy&&(n.stateProxy=t.stateProxy)),s0(n,!1,l,f)}}if(n){je(n.style,r),n.style.fill=null;var g=a.get("showAbove"),v=t.textGuideLineConfig=t.textGuideLineConfig||{};v.showAbove=g||!1,n.buildPath=iW}}function uA(t,e){e=e||"labelLine";for(var r={normal:t.getModel(e)},n=0;n<Gr.length;n++){var i=Gr[n];r[i]=t.getModel([i,e])}return r}function lA(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];if(!n.defaultAttr.ignore){var i=n.label,a=i.getComputedTransform(),o=i.getBoundingRect(),s=!a||a[1]<1e-5&&a[2]<1e-5,u=i.style.margin||0,l=o.clone();l.applyTransform(a),l.x-=u/2,l.y-=u/2,l.width+=u,l.height+=u;var f=s?new xc(o,a):null;e.push({label:i,labelLine:n.labelLine,rect:l,localRect:o,obb:f,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:a})}}return e}function fA(t,e,r,n,i,a){var o=t.length;if(o<2)return;t.sort(function(x,S){return x.rect[e]-S.rect[e]});for(var s=0,u,l=!1,f=0,c=0;c<o;c++){var h=t[c],d=h.rect;u=d[e]-s,u<0&&(d[e]-=u,h.label[e]-=u,l=!0);var p=Math.max(-u,0);f+=p,s=d[e]+d[r]}f>0&&a&&C(-f/o,0,o);var g=t[0],v=t[o-1],m,y;b(),m<0&&_(-m,.8),y<0&&_(y,.8),b(),w(m,y,1),w(y,m,-1),b(),m<0&&D(-m),y<0&&D(y);function b(){m=g.rect[e]-n,y=i-v.rect[e]-v.rect[r]}function w(x,S,O){if(x<0){var E=Math.min(S,-x);if(E>0){C(E*O,0,o);var P=E+x;P<0&&_(-P*O,1)}else _(-x*O,1)}}function C(x,S,O){x!==0&&(l=!0);for(var E=S;E<O;E++){var P=t[E],F=P.rect;F[e]+=x,P.label[e]+=x}}function _(x,S){for(var O=[],E=0,P=1;P<o;P++){var F=t[P-1].rect,B=Math.max(t[P].rect[e]-F[e]-F[r],0);O.push(B),E+=B}if(E){var M=Math.min(Math.abs(x)/E,S);if(x>0)for(var P=0;P<o-1;P++){var I=O[P]*M;C(I,0,P+1)}else for(var P=o-1;P>0;P--){var I=O[P-1]*M;C(-I,P,o)}}}function D(x){var S=x<0?-1:1;x=Math.abs(x);for(var O=Math.ceil(x/(o-1)),E=0;E<o-1;E++)if(S>0?C(O,0,E+1):C(-O,o-E-1,o),x-=O,x<=0)return}return l}function aW(t,e,r,n){return fA(t,"x","width",e,r,n)}function cA(t,e,r,n){return fA(t,"y","height",e,r,n)}function hA(t){var e=[];t.sort(function(g,v){return v.priority-g.priority});var r=new Ue(0,0,0,0);function n(g){if(!g.ignore){var v=g.ensureState("emphasis");v.ignore==null&&(v.ignore=!1)}g.ignore=!0}for(var i=0;i<t.length;i++){var a=t[i],o=a.axisAligned,s=a.localRect,u=a.transform,l=a.label,f=a.labelLine;r.copy(a.rect),r.width-=.1,r.height-=.1,r.x+=.05,r.y+=.05;for(var c=a.obb,h=!1,d=0;d<e.length;d++){var p=e[d];if(r.intersect(p.rect)){if(o&&p.axisAligned){h=!0;break}if(p.obb||(p.obb=new xc(p.localRect,p.transform)),c||(c=new xc(s,u)),c.intersect(p.obb)){h=!0;break}}}h?(n(l),f&&n(f)):(l.attr("ignore",a.defaultAttr.ignore),f&&f.attr("ignore",a.defaultAttr.labelGuideIgnore),e.push(a))}}function oW(t){if(t){for(var e=[],r=0;r<t.length;r++)e.push(t[r].slice());return e}}function sW(t,e){var r=t.label,n=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:r.style.align,verticalAlign:r.style.verticalAlign,labelLinePoints:oW(n&&n.shape.points)}}var dA=["align","verticalAlign","width","height","fontSize"],sr=new pu,u0=lt(),uW=lt();function xh(t,e,r){for(var n=0;n<r.length;n++){var i=r[n];e[i]!=null&&(t[i]=e[i])}}var Sh=["x","y","rotation"],lW=function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(e,r,n,i,a){var o=i.style,s=i.__hostTarget,u=s.textConfig||{},l=i.getComputedTransform(),f=i.getBoundingRect().plain();Ue.applyTransform(f,f,l),l?sr.setLocalTransform(l):(sr.x=sr.y=sr.rotation=sr.originX=sr.originY=0,sr.scaleX=sr.scaleY=1),sr.rotation=li(sr.rotation);var c=i.__hostTarget,h;if(c){h=c.getBoundingRect().plain();var d=c.getComputedTransform();Ue.applyTransform(h,h,d)}var p=h&&c.getTextGuideLine();this._labelList.push({label:i,labelLine:p,seriesModel:n,dataIndex:e,dataType:r,layoutOption:a,computedLayoutOption:null,rect:f,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:p&&p.ignore,x:sr.x,y:sr.y,scaleX:sr.scaleX,scaleY:sr.scaleY,rotation:sr.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:u.position,attachedRot:u.rotation}})},t.prototype.addLabelsOfSeries=function(e){var r=this;this._chartViewList.push(e);var n=e.__model,i=n.get("labelLayout");(De(i)||Ke(i).length)&&e.group.traverse(function(a){if(a.ignore)return!0;var o=a.getTextContent(),s=He(a);o&&!o.disableLabelLayout&&r._addLabel(s.dataIndex,s.dataType,n,o,i)})},t.prototype.updateLayoutConfig=function(e){var r=e.getWidth(),n=e.getHeight();function i(b,w){return function(){aA(b,w)}}for(var a=0;a<this._labelList.length;a++){var o=this._labelList[a],s=o.label,u=s.__hostTarget,l=o.defaultAttr,f=void 0;De(o.layoutOption)?f=o.layoutOption(sW(o,u)):f=o.layoutOption,f=f||{},o.computedLayoutOption=f;var c=Math.PI/180;u&&u.setTextConfig({local:!1,position:f.x!=null||f.y!=null?null:l.attachedPos,rotation:f.rotate!=null?f.rotate*c:l.attachedRot,offset:[f.dx||0,f.dy||0]});var h=!1;if(f.x!=null?(s.x=ut(f.x,r),s.setStyle("x",0),h=!0):(s.x=l.x,s.setStyle("x",l.style.x)),f.y!=null?(s.y=ut(f.y,n),s.setStyle("y",0),h=!0):(s.y=l.y,s.setStyle("y",l.style.y)),f.labelLinePoints){var d=u.getTextGuideLine();d&&(d.setShape({points:f.labelLinePoints}),h=!1)}var p=u0(s);p.needsUpdateLabelLine=h,s.rotation=f.rotate!=null?f.rotate*c:l.rotation,s.scaleX=l.scaleX,s.scaleY=l.scaleY;for(var g=0;g<dA.length;g++){var v=dA[g];s.setStyle(v,f[v]!=null?f[v]:l.style[v])}if(f.draggable){if(s.draggable=!0,s.cursor="move",u){var m=o.seriesModel;if(o.dataIndex!=null){var y=o.seriesModel.getData(o.dataType);m=y.getItemModel(o.dataIndex)}s.on("drag",i(u,m.getModel("labelLine")))}}else s.off("drag"),s.cursor=l.cursor}},t.prototype.layout=function(e){var r=e.getWidth(),n=e.getHeight(),i=lA(this._labelList),a=bt(i,function(u){return u.layoutOption.moveOverlap==="shiftX"}),o=bt(i,function(u){return u.layoutOption.moveOverlap==="shiftY"});aW(a,0,r),cA(o,0,n);var s=bt(i,function(u){return u.layoutOption.hideOverlap});hA(s)},t.prototype.processLabelsOverall=function(){var e=this;N(this._chartViewList,function(r){var n=r.__model,i=r.ignoreLabelLineUpdate,a=n.isAnimationEnabled();r.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!i,u=o.getTextContent();!s&&u&&(s=u0(u).needsUpdateLabelLine),s&&e._updateLabelLine(o,n),a&&e._animateLabels(o,n)})})},t.prototype._updateLabelLine=function(e,r){var n=e.getTextContent(),i=He(e),a=i.dataIndex;if(n&&a!=null){var o=r.getData(i.dataType),s=o.getItemModel(a),u={},l=o.getItemVisual(a,"style");if(l){var f=o.getVisual("drawType");u.stroke=l[f]}var c=s.getModel("labelLine");sA(e,uA(s),u),aA(e,c)}},t.prototype._animateLabels=function(e,r){var n=e.getTextContent(),i=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!rs(e))){var a=u0(n),o=a.oldLayout,s=He(e),u=s.dataIndex,l={x:n.x,y:n.y,rotation:n.rotation},f=r.getData(s.dataType);if(o){n.attr(o);var h=e.prevStates;h&&(Ge(h,"select")>=0&&n.attr(a.oldLayoutSelect),Ge(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Ft(n,l,r,u)}else if(n.attr(l),!ns(n).valueAnimation){var c=Be(n.style.opacity,1);n.style.opacity=0,qt(n,{style:{opacity:c}},r,u)}if(a.oldLayout=l,n.states.select){var d=a.oldLayoutSelect={};xh(d,l,Sh),xh(d,n.states.select,Sh)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};xh(p,l,Sh),xh(p,n.states.emphasis,Sh)}x7(n,u,f,r,r)}if(i&&!i.ignore&&!i.invisible){var a=uW(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Ft(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,qt(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},t}(),l0=lt();function fW(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=l0(r).labelManager;i||(i=l0(r).labelManager=new lW),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=l0(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var cW=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r){if(process.env.NODE_ENV!=="production"){var n=r.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return Zm(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(r){var n=new It,i=hs("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,u=r.itemHeight*.8,l=hs(s,(r.itemWidth-u)/2,(r.itemHeight-u)/2,u,u,r.itemStyle.fill);n.add(l),l.setStyle(r.itemStyle);var f=r.iconRotate==="inherit"?o:r.iconRotate||0;return l.rotation=f*Math.PI/180,l.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(l.style.stroke=l.style.fill,l.style.fill="#fff",l.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(fn);function f0(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=ls(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(ls(t,e,r[o]));return a.join(" ")}}function vA(t,e){var r=t.mapDimensionsAll("defaultedLabel");if(!he(e))return e+"";for(var n=[],i=0;i<r.length;i++){var a=t.getDimensionIndex(r[i]);a>=0&&n.push(e[a])}return n.join(" ")}var c0=function(t){ce(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o){this.removeAll();var s=hs(r,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=hW,this._symbolType=r,this.add(s)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){dc(this.childAt(0))},e.prototype.downplay=function(){vc(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,u=e.getSymbolSize(r,n),l=o!==this._symbolType,f=a&&a.disableAnimation;if(l){var c=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,u,c)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:u[0]/2,scaleY:u[1]/2};f?h.attr(d):Ft(h,d,s,n),zg(h)}if(this._updateCommon(r,n,u,i,a),l){var h=this.childAt(0);if(!f){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,qt(h,d,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),u=r.hostModel,l,f,c,h,d,p,g,v,m;if(a&&(l=a.emphasisItemStyle,f=a.blurItemStyle,c=a.selectItemStyle,h=a.focus,d=a.blurScope,g=a.labelStatesModels,v=a.hoverScale,m=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var y=a&&a.itemModel?a.itemModel:r.getItemModel(n),b=y.getModel("emphasis");l=b.getModel("itemStyle").getItemStyle(),c=y.getModel(["select","itemStyle"]).getItemStyle(),f=y.getModel(["blur","itemStyle"]).getItemStyle(),h=b.get("focus"),d=b.get("blurScope"),p=b.get("disabled"),g=Fu(y),v=b.getShallow("scale"),m=y.getShallow("cursor")}var w=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(w||0)*Math.PI/180||0);var C=LE(r.getItemVisual(n,"symbolOffset"),i);C&&(s.x=C[0],s.y=C[1]),m&&s.attr("cursor",m);var _=r.getItemVisual(n,"style"),D=_.fill;if(s instanceof fi){var x=s.style;s.useStyle(oe({image:x.image,x:x.x,y:x.y,width:x.width,height:x.height},_))}else s.__isEmptyBrush?s.useStyle(oe({},_)):s.useStyle(_),s.style.decal=null,s.setColor(D,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var S=r.getItemVisual(n,"liftZ"),O=this._z2;S!=null?O==null&&(this._z2=s.z2,s.z2+=S):O!=null&&(s.z2=O,this._z2=null);var E=o&&o.useNameLabel;Mu(s,g,{labelFetcher:u,labelDataIndex:n,defaultText:P,inheritColor:D,defaultOpacity:_.opacity});function P(M){return E?r.getName(M):f0(r,M)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var F=s.ensureState("emphasis");F.style=l,s.ensureState("select").style=c,s.ensureState("blur").style=f;var B=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;F.scaleX=this._sizeX*B,F.scaleY=this._sizeY*B,this.setSymbolScale(1),Eu(this,h,d,p)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=He(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var u=a.getTextContent();u&&Sc(u,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Sc(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return Yj(r.getItemVisual(n,"symbolSize"))},e}(It);function hW(t,e){this.parent.drift(t,e)}function h0(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function pA(t){return t!=null&&!we(t)&&(t={isIgnore:t}),t||{}}function gA(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:Fu(e),cursorStyle:e.get("cursor")}}var dW=function(){function t(e){this.group=new It,this._SymbolCtor=e||c0}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=pA(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,u=gA(e),l={disableAnimation:s},f=r.getSymbolPoint||function(c){return e.getItemLayout(c)};a||n.removeAll(),e.diff(a).add(function(c){var h=f(c);if(h0(e,h,c,r)){var d=new o(e,c,u,l);d.setPosition(h),e.setItemGraphicEl(c,d),n.add(d)}}).update(function(c,h){var d=a.getItemGraphicEl(h),p=f(c);if(!h0(e,p,c,r)){n.remove(d);return}var g=e.getItemVisual(c,"symbol")||"circle",v=d&&d.getSymbolType&&d.getSymbolType();if(!d||v&&v!==g)n.remove(d),d=new o(e,c,u,l),d.setPosition(p);else{d.updateData(e,c,u,l);var m={x:p[0],y:p[1]};s?d.attr(m):Ft(d,m,i)}n.add(d),e.setItemGraphicEl(c,d)}).remove(function(c){var h=a.getItemGraphicEl(c);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=f,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=gA(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=pA(n);function i(u){u.isGroup||(u.incremental=!0,u.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var o=r.getItemLayout(a);if(h0(r,o,a,n)){var s=new this._SymbolCtor(r,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},t.prototype.eachRendered=function(e){Pc(this._progressiveEls||this.group,e)},t.prototype.remove=function(e){var r=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(i){i.fadeOut(function(){r.remove(i)},n.hostModel)}):r.removeAll()},t}();function mA(t,e,r){var n=t.getBaseAxis(),i=t.getOtherAxis(n),a=vW(i,r),o=n.dim,s=i.dim,u=e.mapDimension(s),l=e.mapDimension(o),f=s==="x"||s==="radius"?1:0,c=ye(t.dimensions,function(p){return e.mapDimension(p)}),h=!1,d=e.getCalculationInfo("stackResultDimension");return ms(e,c[0])&&(h=!0,c[0]=d),ms(e,c[1])&&(h=!0,c[1]=d),{dataDimsForPoint:c,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:u,baseDim:l,baseDataOffset:f,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function vW(t,e){var r=0,n=t.scale.getExtent();return e==="start"?r=n[0]:e==="end"?r=n[1]:nt(e)&&!isNaN(e)?r=e:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function yA(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function pW(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function gW(t,e,r,n,i,a,o,s){for(var u=pW(t,e),l=[],f=[],c=[],h=[],d=[],p=[],g=[],v=mA(i,e,o),m=t.getLayout("points")||[],y=e.getLayout("points")||[],b=0;b<u.length;b++){var w=u[b],C=!0,_=void 0,D=void 0;switch(w.cmd){case"=":_=w.idx*2,D=w.idx1*2;var x=m[_],S=m[_+1],O=y[D],E=y[D+1];(isNaN(x)||isNaN(S))&&(x=O,S=E),l.push(x,S),f.push(O,E),c.push(r[_],r[_+1]),h.push(n[D],n[D+1]),g.push(e.getRawIndex(w.idx1));break;case"+":var P=w.idx,F=v.dataDimsForPoint,B=i.dataToPoint([e.get(F[0],P),e.get(F[1],P)]);D=P*2,l.push(B[0],B[1]),f.push(y[D],y[D+1]);var M=yA(v,i,e,P);c.push(M[0],M[1]),h.push(n[D],n[D+1]),g.push(e.getRawIndex(P));break;case"-":C=!1}C&&(d.push(w),p.push(p.length))}p.sort(function(q,L){return g[q]-g[L]});for(var I=l.length,j=vi(I),z=vi(I),W=vi(I),R=vi(I),U=[],b=0;b<p.length;b++){var Z=p[b],ee=b*2,ne=Z*2;j[ee]=l[ne],j[ee+1]=l[ne+1],z[ee]=f[ne],z[ee+1]=f[ne+1],W[ee]=c[ne],W[ee+1]=c[ne+1],R[ee]=h[ne],R[ee+1]=h[ne+1],U[b]=d[Z]}return{current:j,next:z,stackedOnCurrent:W,stackedOnNext:R,status:U}}var $i=Math.min,Gi=Math.max;function ro(t,e){return isNaN(t)||isNaN(e)}function d0(t,e,r,n,i,a,o,s,u){for(var l,f,c,h,d,p,g=r,v=0;v<n;v++){var m=e[g*2],y=e[g*2+1];if(g>=i||g<0)break;if(ro(m,y)){if(u){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](m,y),c=m,h=y;else{var b=m-l,w=y-f;if(b*b+w*w<.5){g+=a;continue}if(o>0){for(var C=g+a,_=e[C*2],D=e[C*2+1];_===m&&D===y&&v<n;)v++,C+=a,g+=a,_=e[C*2],D=e[C*2+1],m=e[g*2],y=e[g*2+1],b=m-l,w=y-f;var x=v+1;if(u)for(;ro(_,D)&&x<n;)x++,C+=a,_=e[C*2],D=e[C*2+1];var S=.5,O=0,E=0,P=void 0,F=void 0;if(x>=n||ro(_,D))d=m,p=y;else{O=_-l,E=D-f;var B=m-l,M=_-m,I=y-f,j=D-y,z=void 0,W=void 0;if(s==="x"){z=Math.abs(B),W=Math.abs(M);var R=O>0?1:-1;d=m-R*z*o,p=y,P=m+R*W*o,F=y}else if(s==="y"){z=Math.abs(I),W=Math.abs(j);var U=E>0?1:-1;d=m,p=y-U*z*o,P=m,F=y+U*W*o}else z=Math.sqrt(B*B+I*I),W=Math.sqrt(M*M+j*j),S=W/(W+z),d=m-O*o*(1-S),p=y-E*o*(1-S),P=m+O*o*S,F=y+E*o*S,P=$i(P,Gi(_,m)),F=$i(F,Gi(D,y)),P=Gi(P,$i(_,m)),F=Gi(F,$i(D,y)),O=P-m,E=F-y,d=m-O*z/W,p=y-E*z/W,d=$i(d,Gi(l,m)),p=$i(p,Gi(f,y)),d=Gi(d,$i(l,m)),p=Gi(p,$i(f,y)),O=m-d,E=y-p,P=m+O*W/z,F=y+E*W/z}t.bezierCurveTo(c,h,d,p,m,y),c=P,h=F}else t.lineTo(m,y)}l=m,f=y,g+=a}return v}var bA=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),mW=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new bA},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&ro(i[o*2-2],i[o*2-1]);o--);for(;a<o&&ro(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=d0(r,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=ui.CMD,s,u,l=n==="x",f=[],c=0;c<a.length;){var h=a[c++],d=void 0,p=void 0,g=void 0,v=void 0,m=void 0,y=void 0,b=void 0;switch(h){case o.M:s=a[c++],u=a[c++];break;case o.L:if(d=a[c++],p=a[c++],b=l?(r-s)/(d-s):(r-u)/(p-u),b<=1&&b>=0){var w=l?(p-u)*b+u:(d-s)*b+s;return l?[r,w]:[w,r]}s=d,u=p;break;case o.C:d=a[c++],p=a[c++],g=a[c++],v=a[c++],m=a[c++],y=a[c++];var C=l?Rf(s,d,g,m,r,f):Rf(u,p,v,y,r,f);if(C>0)for(var _=0;_<C;_++){var D=f[_];if(D<=1&&D>=0){var w=l?Bt(u,p,v,y,D):Bt(s,d,g,m,D);return l?[r,w]:[w,r]}}s=m,u=y;break}}},e}(Ve),yW=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(bA),bW=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new yW},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,u=n.smoothMonotone;if(n.connectNulls){for(;s>0&&ro(i[s*2-2],i[s*2-1]);s--);for(;o<s&&ro(i[o*2],i[o*2+1]);o++);}for(;o<s;){var l=d0(r,i,o,s,s,1,n.smooth,u,n.connectNulls);d0(r,a,o+l-1,l,s,-1,n.stackedOnSmooth,u,n.connectNulls),o+=l+1,r.closePath()}},e}(Ve);function CA(t,e,r,n,i){var a=t.getArea(),o=a.x,s=a.y,u=a.width,l=a.height,f=r.get(["lineStyle","width"])||2;o-=f/2,s-=f/2,u+=f,l+=f,u=Math.ceil(u),o!==Math.floor(o)&&(o=Math.floor(o),u++);var c=new St({shape:{x:o,y:s,width:u,height:l}});if(e){var h=t.getBaseAxis(),d=h.isHorizontal(),p=h.inverse;d?(p&&(c.shape.x+=u),c.shape.width=0):(p||(c.shape.y+=l),c.shape.height=0);var g=De(i)?function(v){i(v,c)}:null;qt(c,{shape:{width:u,height:l,x:o,y:s}},r,null,n,g)}return c}function wA(t,e,r){var n=t.getArea(),i=Tt(n.r0,1),a=Tt(n.r,1),o=new In({shape:{cx:Tt(t.cx,1),cy:Tt(t.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=t.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,qt(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function CW(t,e,r,n,i){if(t){if(t.type==="polar")return wA(t,e,r);if(t.type==="cartesian2d")return CA(t,e,r,n,i)}else return null;return null}function v0(t,e){return t.type===e}function _A(t,e){if(t.length===e.length){for(var r=0;r<t.length;r++)if(t[r]!==e[r])return;return!0}}function DA(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(r=Math.min(s,r),i=Math.max(s,i))}return[[e,r],[n,i]]}function xA(t,e){var r=DA(t),n=r[0],i=r[1],a=DA(e),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function SA(t){return nt(t)?t:t?.5:0}function wW(t,e,r){if(!r.valueDim)return[];for(var n=e.count(),i=vi(n*2),a=0;a<n;a++){var o=yA(r,t,e,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Ui(t,e,r,n){var i=e.getBaseAxis(),a=i.dim==="x"||i.dim==="radius"?0:1,o=[],s=0,u=[],l=[],f=[],c=[];if(n){for(s=0;s<t.length;s+=2)!isNaN(t[s])&&!isNaN(t[s+1])&&c.push(t[s],t[s+1]);t=c}for(s=0;s<t.length-2;s+=2)switch(f[0]=t[s+2],f[1]=t[s+3],l[0]=t[s],l[1]=t[s+1],o.push(l[0],l[1]),r){case"end":u[a]=f[a],u[1-a]=l[1-a],o.push(u[0],u[1]);break;case"middle":var h=(l[a]+f[a])/2,d=[];u[a]=d[a]=h,u[1-a]=l[1-a],d[1-a]=f[1-a],o.push(u[0],u[1]),o.push(d[0],d[1]);break;default:u[a]=l[a],u[1-a]=f[1-a],o.push(u[0],u[1])}return o.push(t[s++],t[s++]),o}function _W(t,e){var r=[],n=t.length,i,a;function o(f,c,h){var d=f.coord,p=(h-d)/(c.coord-d),g=yk(p,[f.color,c.color]);return{coord:h,color:g}}for(var s=0;s<n;s++){var u=t[s],l=u.coord;if(l<0)i=u;else if(l>e){a?r.push(o(a,u,e)):i&&r.push(o(i,u,0),o(i,u,e));break}else i&&(r.push(o(i,u,0)),i=null),r.push(u),a=u}return r}function DW(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())){if(e.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!a){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var u=e.getAxis(i),l=ye(a.stops,function(b){return{coord:u.toGlobalCoord(u.dataToCoord(b.value)),color:b.color}}),f=l.length,c=a.outerColors.slice();f&&l[0].coord>l[f-1].coord&&(l.reverse(),c.reverse());var h=_W(l,i==="x"?r.getWidth():r.getHeight()),d=h.length;if(!d&&f)return l[0].coord<0?c[1]?c[1]:l[f-1].color:c[0]?c[0]:l[0].color;var p=10,g=h[0].coord-p,v=h[d-1].coord+p,m=v-g;if(m<.001)return"transparent";N(h,function(b){b.offset=(b.coord-g)/m}),h.push({offset:d?h[d-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:d?h[0].offset:.5,color:c[0]||"transparent"});var y=new Ox(0,0,0,0,h,!0);return y[i]=g,y[i+"2"]=v,y}}function xW(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&SW(a,e))){var o=e.mapDimension(a.dim),s={};return N(a.getViewLabels(),function(u){var l=a.scale.getRawOrdinalNumber(u.tickValue);s[l]=1}),function(u){return!s.hasOwnProperty(e.get(o,u))}}}}function SW(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(c0.getSymbolSize(e,o)[t.isHorizontal()?1:0]*1.5>n)return!1;return!0}function EW(t,e){return isNaN(t)||isNaN(e)}function AW(t){for(var e=t.length/2;e>0&&EW(t[e*2-2],t[e*2-1]);e--);return e-1}function EA(t,e){return[t[e*2],t[e*2+1]]}function TW(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,u=-1,l=0;l<n;l++)if(o=t[l*2+i],!(isNaN(o)||isNaN(t[l*2+1-i]))){if(l===0){a=o;continue}if(a<=e&&o>=e||a>=e&&o<=e){u=l;break}s=l,a=o}return{range:[s,u],t:(e-a)/(o-a)}}function AA(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<Gr.length;e++)if(t.get([Gr[e],"endLabel","show"]))return!0;return!1}function p0(t,e,r,n){if(v0(e,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},u=AA(n)?function(d,p){t._endLabelOnDuring(d,p,o,s,a,i,e)}:null,l=e.getBaseAxis().isHorizontal(),f=CA(e,r,n,function(){var d=t._endLabel;d&&r&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},u);if(!n.get("clip",!0)){var c=f.shape,h=Math.max(c.width,c.height);l?(c.y-=h,c.height+=h*2):(c.x-=h,c.width+=h*2)}return u&&u(1,f),f}else return process.env.NODE_ENV!=="production"&&n.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),wA(e,r,n)}function OW(t,e){var r=e.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:t.get("align")||a,verticalAlign:t.get("verticalAlign")||o}}}var PW=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(){var r=new It,n=new dW;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r},e.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=this.group,u=r.getData(),l=r.getModel("lineStyle"),f=r.getModel("areaStyle"),c=u.getLayout("points")||[],h=o.type==="polar",d=this._coordSys,p=this._symbolDraw,g=this._polyline,v=this._polygon,m=this._lineGroup,y=!n.ssr&&r.get("animation"),b=!f.isEmpty(),w=f.get("origin"),C=mA(o,u,w),_=b&&wW(o,u,C),D=r.get("showSymbol"),x=r.get("connectNulls"),S=D&&!h&&xW(r,u,o),O=this._data;O&&O.eachItemGraphicEl(function(L,X){L.__temp&&(s.remove(L),O.setItemGraphicEl(X,null))}),D||p.remove(),s.add(m);var E=h?!1:r.get("step"),P;o&&o.getArea&&r.get("clip",!0)&&(P=o.getArea(),P.width!=null?(P.x-=.1,P.y-=.1,P.width+=.2,P.height+=.2):P.r0&&(P.r0-=.5,P.r+=.5)),this._clipShapeForSymbol=P;var F=DW(u,o,i)||u.getVisual("style")[u.getVisual("drawType")];if(!(g&&d.type===o.type&&E===this._step))D&&p.updateData(u,{isIgnore:S,clipShape:P,disableAnimation:!0,getSymbolPoint:function(L){return[c[L*2],c[L*2+1]]}}),y&&this._initSymbolLabelAnimation(u,o,P),E&&(c=Ui(c,o,E,x),_&&(_=Ui(_,o,E,x))),g=this._newPolyline(c),b?v=this._newPolygon(c,_):v&&(m.remove(v),v=this._polygon=null),h||this._initOrUpdateEndLabel(r,o,Ga(F)),m.setClipPath(p0(this,o,!0,r));else{b&&!v?v=this._newPolygon(c,_):v&&!b&&(m.remove(v),v=this._polygon=null),h||this._initOrUpdateEndLabel(r,o,Ga(F));var B=m.getClipPath();if(B){var M=p0(this,o,!1,r);qt(B,{shape:M.shape},r)}else m.setClipPath(p0(this,o,!0,r));D&&p.updateData(u,{isIgnore:S,clipShape:P,disableAnimation:!0,getSymbolPoint:function(L){return[c[L*2],c[L*2+1]]}}),(!_A(this._stackedOnPoints,_)||!_A(this._points,c))&&(y?this._doUpdateAnimation(u,_,o,i,E,w,x):(E&&(c=Ui(c,o,E,x),_&&(_=Ui(_,o,E,x))),g.setShape({points:c}),v&&v.setShape({points:c,stackedOnPoints:_})))}var I=r.getModel("emphasis"),j=I.get("focus"),z=I.get("blurScope"),W=I.get("disabled");if(g.useStyle(je(l.getLineStyle(),{fill:"none",stroke:F,lineJoin:"bevel"})),pc(g,r,"lineStyle"),g.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var R=g.getState("emphasis").style;R.lineWidth=+g.style.lineWidth+1}He(g).seriesIndex=r.seriesIndex,Eu(g,j,z,W);var U=SA(r.get("smooth")),Z=r.get("smoothMonotone");if(g.setShape({smooth:U,smoothMonotone:Z,connectNulls:x}),v){var ee=u.getCalculationInfo("stackedOnSeries"),ne=0;v.useStyle(je(f.getAreaStyle(),{fill:F,opacity:.7,lineJoin:"bevel",decal:u.getVisual("style").decal})),ee&&(ne=SA(ee.get("smooth"))),v.setShape({smooth:U,stackedOnSmooth:ne,smoothMonotone:Z,connectNulls:x}),pc(v,r,"areaStyle"),He(v).seriesIndex=r.seriesIndex,Eu(v,j,z,W)}var q=function(L){a._changePolyState(L)};u.eachItemGraphicEl(function(L){L&&(L.onHoverStateChange=q)}),this._polyline.onHoverStateChange=q,this._data=u,this._coordSys=o,this._stackedOnPoints=_,this._points=c,this._step=E,this._valueOrigin=w,r.get("triggerLineEvent")&&(this.packEventData(r,g),v&&this.packEventData(r,v))},e.prototype.packEventData=function(r,n){He(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Pa(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],c=u[s*2+1];if(isNaN(f)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,c))return;var h=r.get("zlevel")||0,d=r.get("z")||0;l=new c0(o,s),l.x=f,l.y=c,l.setZ(h,d);var p=l.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=d,p.z2=this._polyline.z2+1),l.__temp=!0,o.setItemGraphicEl(s,l),l.stopSymbolAnimation(!0),this.group.add(l)}l.highlight()}else Zr.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Pa(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 Zr.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;nx(this._polyline,r),n&&nx(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new mW({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new bW({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,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=r.hostModel,f=l.get("animationDuration");De(f)&&(f=f(null));var c=l.get("animationDelay")||0,h=De(c)?c(null):c;r.eachItemGraphicEl(function(d,p){var g=d;if(g){var v=[d.x,d.y],m=void 0,y=void 0,b=void 0;if(i)if(o){var w=i,C=n.pointToCoord(v);a?(m=w.startAngle,y=w.endAngle,b=-C[1]/180*Math.PI):(m=w.r0,y=w.r,b=C[0])}else{var _=i;a?(m=_.x,y=_.x+_.width,b=d.x):(m=_.y+_.height,y=_.y,b=d.y)}var D=y===m?0:(b-m)/(y-m);u&&(D=1-D);var x=De(c)?c(p):f*D+h,S=g.getSymbolPath(),O=S.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),O&&O.animateFrom({style:{opacity:0}},{duration:300,delay:x}),S.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(AA(r)){var o=r.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 Ot({z2:200}),l.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=AW(u);f>=0&&(Mu(s,Fu(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:f,defaultText:function(c,h,d){return d!=null?vA(o,d):f0(o,c)},enableTextSetter:!0},OW(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,u){var l=this._endLabel,f=this._polyline;if(l){r<1&&a.originalX==null&&(a.originalX=l.x,a.originalY=l.y);var c=i.getLayout("points"),h=i.hostModel,d=h.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,v=u.getBaseAxis(),m=v.isHorizontal(),y=v.inverse,b=n.shape,w=y?m?b.x:b.y+b.height:m?b.x+b.width:b.y,C=(m?g:0)*(y?-1:1),_=(m?0:-g)*(y?-1:1),D=m?"x":"y",x=TW(c,w,D),S=x.range,O=S[1]-S[0],E=void 0;if(O>=1){if(O>1&&!d){var P=EA(c,S[0]);l.attr({x:P[0]+C,y:P[1]+_}),o&&(E=h.getRawValue(S[0]))}else{var P=f.getPointOn(w,D);P&&l.attr({x:P[0]+C,y:P[1]+_});var F=h.getRawValue(S[0]),B=h.getRawValue(S[1]);o&&(E=wD(i,p,F,B,x.t))}a.lastFrameIndex=S[0]}else{var M=r===1||a.lastFrameIndex>0?S[0]:0,P=EA(c,M);o&&(E=h.getRawValue(M)),l.attr({x:P[0]+C,y:P[1]+_})}if(o){var I=ns(l);typeof I.setLabelText=="function"&&I.setLabelText(E)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,u){var l=this._polyline,f=this._polygon,c=r.hostModel,h=gW(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=h.current,p=h.stackedOnCurrent,g=h.next,v=h.stackedOnNext;if(o&&(d=Ui(h.current,i,o,u),p=Ui(h.stackedOnCurrent,i,o,u),g=Ui(h.next,i,o,u),v=Ui(h.stackedOnNext,i,o,u)),xA(d,g)>3e3||f&&xA(p,v)>3e3){l.stopAnimation(),l.setShape({points:g}),f&&(f.stopAnimation(),f.setShape({points:g,stackedOnPoints:v}));return}l.shape.__points=h.current,l.shape.points=d;var m={shape:{points:g}};h.current!==d&&(m.shape.__points=h.next),l.stopAnimation(),Ft(l,m,c),f&&(f.setShape({points:d,stackedOnPoints:p}),f.stopAnimation(),Ft(f,{shape:{stackedOnPoints:v}},c),l.shape.points!==f.shape.points&&(f.shape.points=l.shape.points));for(var y=[],b=h.status,w=0;w<b.length;w++){var C=b[w].cmd;if(C==="="){var _=r.getItemGraphicEl(b[w].idx1);_&&y.push({el:_,ptIdx:w})}}l.animators&&l.animators.length&&l.animators[0].during(function(){f&&f.dirtyShape();for(var D=l.shape.__points,x=0;x<y.length;x++){var S=y[x].el,O=y[x].ptIdx*2;S.x=D[O],S.y=D[O+1],S.markRedraw()}})},e.prototype.remove=function(r){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(Zr);function BW(t,e){return{seriesType:t,plan:Dm(),reset:function(r){var n=r.getData(),i=r.coordinateSystem;if(r.pipelineContext,!!i){var a=ye(i.dimensions,function(c){return n.mapDimension(c)}).slice(0,2),o=a.length,s=n.getCalculationInfo("stackResultDimension");ms(n,a[0])&&(a[0]=s),ms(n,a[1])&&(a[1]=s);var u=n.getStore(),l=n.getDimensionIndex(a[0]),f=n.getDimensionIndex(a[1]);return o&&{progress:function(c,h){for(var d=c.end-c.start,p=vi(d*o),g=[],v=[],m=c.start,y=0;m<c.end;m++){var b=void 0;if(o===1){var w=u.get(l,m);b=i.dataToPoint(w,null,v)}else g[0]=u.get(l,m),g[1]=u.get(f,m),b=i.dataToPoint(g,null,v);p[y++]=b[0],p[y++]=b[1]}h.setLayout("points",p)}}}}}}var MW={average:function(t){for(var e=0,r=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],r++);return r===0?NaN:e/r},sum:function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r]||0;return e},max:function(t){for(var e=-1/0,r=0;r<t.length;r++)t[r]>e&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r<t.length;r++)t[r]<e&&(e=t[r]);return isFinite(e)?e:NaN},minmax:function(t){for(var e=-1/0,r=-1/0,n=0;n<t.length;n++){var i=t[n],a=Math.abs(i);a>e&&(e=a,r=i)}return isFinite(r)?r:NaN},nearest:function(t){return t[0]}},FW=function(t){return Math.round(t.length/2)};function TA(t){return{seriesType:t,reset:function(e,r,n){var i=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var u=o.getBaseAxis(),l=o.getOtherAxis(u),f=u.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(f[1]-f[0])*(c||1),d=Math.round(s/h);if(isFinite(d)&&d>1){a==="lttb"&&e.setData(i.lttbDownSample(i.mapDimension(l.dim),1/d));var p=void 0;be(a)?p=MW[a]:De(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(l.dim),1/d,p,FW))}}}}}function LW(t){t.registerChartView(PW),t.registerSeriesModel(cW),t.registerLayout(BW("line")),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,TA("line"))}var g0=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return Zm(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)N(a.getAxes(),function(h,d){if(h.type==="category"&&n!=null){var p=h.getTicksCoords(),g=h.getTickModel().get("alignWithLabel"),v=o[d],m=n[d]==="x1"||n[d]==="y1";if(m&&!g&&(v+=1),p.length<2)return;if(p.length===2){s[d]=h.toGlobalCoord(h.getExtent()[m?1:0]);return}for(var y=void 0,b=void 0,w=1,C=0;C<p.length;C++){var _=p[C].coord,D=C===p.length-1?p[C-1].tickValue+w:p[C].tickValue;if(D===v){b=_;break}else if(D<v)y=_;else if(y!=null&&D>v){b=(_+y)/2;break}C===1&&(w=D-p[0].tickValue)}b==null&&(y?y&&(b=p[p.length-1].coord):b=p[0].coord),s[d]=h.toGlobalCoord(b)}});else{var u=this.getData(),l=u.getLayout("offset"),f=u.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;s[c]+=l+f/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(fn);fn.registerClass(g0);var IW=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return Zm(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Yx(g0.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(g0),RW=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),OA=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new RW},e.prototype.buildPath=function(r,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,c=n.endAngle,h=n.clockwise,d=Math.PI*2,p=h?c-f<d:f-c<d;p||(f=c-(h?d:-d));var g=Math.cos(f),v=Math.sin(f),m=Math.cos(c),y=Math.sin(c);p?(r.moveTo(g*o+i,v*o+a),r.arc(g*l+i,v*l+a,u,-Math.PI+f,f,!h)):r.moveTo(g*s+i,v*s+a),r.arc(i,a,s,f,c,!h),r.arc(m*l+i,y*l+a,u,c-Math.PI*2,c-Math.PI,!h),o!==0&&r.arc(i,a,o,c,f,h)},e}(Ve);function NW(t,e){e=e||{};var r=e.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return Xf(n,i,a);var s=t(o),u=i.distance!=null?i.distance:5,l=this.shape,f=l.cx,c=l.cy,h=l.r,d=l.r0,p=(h+d)/2,g=l.startAngle,v=l.endAngle,m=(g+v)/2,y=r?Math.abs(h-d)/2:0,b=Math.cos,w=Math.sin,C=f+h*b(g),_=c+h*w(g),D="left",x="top";switch(s){case"startArc":C=f+(d-u)*b(m),_=c+(d-u)*w(m),D="center",x="top";break;case"insideStartArc":C=f+(d+u)*b(m),_=c+(d+u)*w(m),D="center",x="bottom";break;case"startAngle":C=f+p*b(g)+Eh(g,u+y,!1),_=c+p*w(g)+Ah(g,u+y,!1),D="right",x="middle";break;case"insideStartAngle":C=f+p*b(g)+Eh(g,-u+y,!1),_=c+p*w(g)+Ah(g,-u+y,!1),D="left",x="middle";break;case"middle":C=f+p*b(m),_=c+p*w(m),D="center",x="middle";break;case"endArc":C=f+(h+u)*b(m),_=c+(h+u)*w(m),D="center",x="bottom";break;case"insideEndArc":C=f+(h-u)*b(m),_=c+(h-u)*w(m),D="center",x="top";break;case"endAngle":C=f+p*b(v)+Eh(v,u+y,!0),_=c+p*w(v)+Ah(v,u+y,!0),D="left",x="middle";break;case"insideEndAngle":C=f+p*b(v)+Eh(v,-u+y,!0),_=c+p*w(v)+Ah(v,-u+y,!0),D="right",x="middle";break;default:return Xf(n,i,a)}return n=n||{},n.x=C,n.y=_,n.align=D,n.verticalAlign=x,n}}function kW(t,e,r,n){if(nt(n)){t.setTextConfig({rotation:n});return}else if(he(e)){t.setTextConfig({rotation:0});return}var i=t.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,u,l=r(e);switch(l){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":u=s;break;case"startAngle":case"insideStartAngle":u=a;break;case"endAngle":case"insideEndAngle":u=o;break;default:t.setTextConfig({rotation:0});return}var f=Math.PI*1.5-u;l==="middle"&&f>Math.PI/2&&f<Math.PI*1.5&&(f-=Math.PI),t.setTextConfig({rotation:f})}function Eh(t,e,r){return e*Math.sin(t)*(r?-1:1)}function Ah(t,e,r){return e*Math.cos(t)*(r?1:-1)}function sl(t,e,r){var n=t.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;he(n)||(n=[n,n,n,n]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:ye(n,function(a){return Bi(a,i)})}}var m0=Math.max,y0=Math.min;function zW(t,e){var r=t.getArea&&t.getArea();if(v0(t,"cartesian2d")){var n=t.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=e.getLayout("bandWidth");n.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}var jW=function(t){ce(e,t);function e(){var r=t.call(this)||this;return r.type=e.type,r._isFirstFrame=!0,r}return e.prototype.render=function(r,n,i,a){this._model=r,this._removeOnRenderedListener(i),this._updateDrawMode(r);var o=r.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,i):this._renderNormal(r,n,i,a)):process.env.NODE_ENV!=="production"&&xt("Only cartesian2d and polar supported for bar.")},e.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},e.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},e.prototype.eachRendered=function(r){Pc(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r,n,i,a){var o=this.group,s=r.getData(),u=this._data,l=r.coordinateSystem,f=l.getBaseAxis(),c;l.type==="cartesian2d"?c=f.isHorizontal():l.type==="polar"&&(c=f.dim==="angle");var h=r.isAnimationEnabled()?r:null,d=VW(r,l);d&&this._enableRealtimeSort(d,s,i);var p=r.get("clip",!0)||d,g=zW(l,s);o.removeClipPath();var v=r.get("roundCap",!0),m=r.get("showBackground",!0),y=r.getModel("backgroundStyle"),b=y.get("borderRadius")||0,w=[],C=this._backgroundEls,_=a&&a.isInitSort,D=a&&a.type==="changeAxisOrder";function x(E){var P=Th[l.type](s,E),F=YW(l,c,P);return F.useStyle(y.getItemStyle()),l.type==="cartesian2d"?F.setShape("r",b):F.setShape("cornerRadius",b),w[E]=F,F}s.diff(u).add(function(E){var P=s.getItemModel(E),F=Th[l.type](s,E,P);if(m&&x(E),!(!s.hasValue(E)||!LA[l.type](F))){var B=!1;p&&(B=PA[l.type](g,F));var M=BA[l.type](r,s,E,F,c,h,f.model,!1,v);d&&(M.forceLabelAnimation=!0),RA(M,s,E,P,F,r,c,l.type==="polar"),_?M.attr({shape:F}):d?MA(d,h,M,F,E,c,!1,!1):qt(M,{shape:F},r,E),s.setItemGraphicEl(E,M),o.add(M),M.ignore=B}}).update(function(E,P){var F=s.getItemModel(E),B=Th[l.type](s,E,F);if(m){var M=void 0;C.length===0?M=x(P):(M=C[P],M.useStyle(y.getItemStyle()),l.type==="cartesian2d"?M.setShape("r",b):M.setShape("cornerRadius",b),w[E]=M);var I=Th[l.type](s,E),j=jA(c,I,l);Ft(M,{shape:j},h,E)}var z=u.getItemGraphicEl(P);if(!s.hasValue(E)||!LA[l.type](B)){o.remove(z);return}var W=!1;if(p&&(W=PA[l.type](g,B),W&&o.remove(z)),z?zg(z):z=BA[l.type](r,s,E,B,c,h,f.model,!!z,v),d&&(z.forceLabelAnimation=!0),D){var R=z.getTextContent();if(R){var U=ns(R);U.prevValue!=null&&(U.prevValue=U.value)}}else RA(z,s,E,F,B,r,c,l.type==="polar");_?z.attr({shape:B}):d?MA(d,h,z,B,E,c,!0,D):Ft(z,{shape:B},r,E,null),s.setItemGraphicEl(E,z),z.ignore=W,o.add(z)}).remove(function(E){var P=u.getItemGraphicEl(E);P&&Ec(P,r,E)}).execute();var S=this._backgroundGroup||(this._backgroundGroup=new It);S.removeAll();for(var O=0;O<w.length;++O)S.add(w[O]);o.add(S),this._backgroundEls=w,this._data=s},e.prototype._renderLarge=function(r,n,i){this._clear(),kA(r,this.group),this._updateLargeClip(r)},e.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),kA(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&CW(r.coordinateSystem,!1,r),i=this.group;n?i.setClipPath(n):i.removeClipPath()},e.prototype._enableRealtimeSort=function(r,n,i){var a=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,i),this._isFirstFrame=!1;else{var s=function(u){var l=n.getItemGraphicEl(u),f=l&&l.shape;return f&&Math.abs(o.isHorizontal()?f.height:f.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(r,n,i){var a=[];return r.each(r.mapDimension(n.dim),function(o,s){var u=i(s);u=u??NaN,a.push({dataIndex:s,mappedValue:u,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:ye(a,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(r,n,i){for(var a=i.scale,o=r.mapDimension(i.dim),s=Number.MAX_VALUE,u=0,l=a.getOrdinalMeta().categories.length;u<l;++u){var f=r.rawIndexOf(o,a.getRawOrdinalNumber(u)),c=f<0?Number.MIN_VALUE:n(r.indexOfRawIndex(f));if(c>s)return!0;s=c}return!1},e.prototype._isOrderDifferentInView=function(r,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(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Ec(a,r,He(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Zr),PA={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=m0(e.x,t.x),s=y0(e.x+e.width,i),u=m0(e.y,t.y),l=y0(e.y+e.height,a),f=s<o,c=l<u;return e.x=f&&o>i?s:o,e.y=c&&u>a?l:u,e.width=f?0:s-o,e.height=c?0:l-u,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),f||c},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=y0(e.r,t.r),a=m0(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},BA={cartesian2d:function(t,e,r,n,i,a,o,s,u){var l=new St({shape:oe({},n),z2:1});if(l.__dataIndex=r,l.name="item",a){var f=l.shape,c=i?"height":"width";f[c]=0}return l},polar:function(t,e,r,n,i,a,o,s,u){var l=!i&&u?OA:In,f=new l({shape:n,z2:1});f.name="item";var c=IA(i);if(f.calculateTextPosition=NW(c,{isRoundCap:l===OA}),a){var h=f.shape,d=i?"r":"endAngle",p={};h[d]=i?n.r0:n.startAngle,p[d]=n[d],(s?Ft:qt)(f,{shape:p},a)}return f}};function VW(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(process.env.NODE_ENV!=="production"&&r&&(n.type!=="category"&&xt("`realtimeSort` will not work because this bar series is not based on a category axis."),e.type!=="cartesian2d"&&xt("`realtimeSort` will not work because this bar series is not on cartesian2d.")),r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function MA(t,e,r,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?Ft:qt)(r,{shape:u},e,i,null);var f=e?t.baseAxis.model:null;(o?Ft:qt)(r,{shape:l},f,i)}function FA(t,e){for(var r=0;r<e.length;r++)if(!isFinite(t[e[r]]))return!0;return!1}var HW=["x","y","width","height"],WW=["cx","cy","r","startAngle","endAngle"],LA={cartesian2d:function(t){return!FA(t,HW)},polar:function(t){return!FA(t,WW)}},Th={cartesian2d:function(t,e,r){var n=t.getItemLayout(e),i=r?GW(r,n):0,a=n.width>0?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(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function $W(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function IA(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function RA(t,e,r,n,i,a,o,s){var u=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var f=t.shape,c=sl(n.getModel("itemStyle"),f,!0);oe(f,c),t.setShape(f)}}else{var l=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",l)}t.useStyle(u);var h=n.getShallow("cursor");h&&t.attr("cursor",h);var d=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",p=Fu(n);Mu(t,p,{labelFetcher:a,labelDataIndex:r,defaultText:f0(a.getData(),r),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:d});var g=t.getTextContent();if(s&&g){var v=n.get(["label","position"]);t.textConfig.inside=v==="middle"?!0:null,kW(t,v==="outside"?d:v,IA(o),n.get(["label","rotate"]))}D7(g,p,a.getRawValue(r),function(y){return vA(e,y)});var m=n.getModel(["emphasis"]);Eu(t,m.get("focus"),m.get("blurScope"),m.get("disabled")),pc(t,n),$W(i)&&(t.style.fill="none",t.style.stroke="none",N(t.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function GW(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var UW=function(){function t(){}return t}(),NA=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new UW},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],u=[],l=this.barWidth,f=0;f<i.length;f+=3)u[a]=l,u[o]=i[f+2],s[a]=i[f+a],s[o]=i[f+o],r.rect(s[0],s[1],u[0],u[1])},e}(Ve);function kA(t,e,r,n){var i=t.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),u=t.getModel("backgroundStyle"),l=i.getLayout("largeBackgroundPoints");if(l){var f=new NA({shape:{points:l},incremental:!!n,silent:!0,z2:0});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,f.useStyle(u.getItemStyle()),e.add(f),r&&r.push(f)}var c=new NA({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,e.add(c),c.useStyle(i.getVisual("style")),He(c).seriesIndex=t.seriesIndex,t.get("silent")||(c.on("mousedown",zA),c.on("mousemove",zA)),r&&r.push(c)}var zA=xm(function(t){var e=this,r=qW(e,t.offsetX,t.offsetY);He(e).dataIndex=r>=0?r:null},30,!1);function qW(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],u=[],l=t.barWidth,f=0,c=a.length/3;f<c;f++){var h=f*3;if(u[n]=l,u[i]=a[h+2],s[n]=a[h+n],s[i]=a[h+i],u[i]<0&&(s[i]+=u[i],u[i]=-u[i]),e>=s[0]&&e<=s[0]+u[0]&&r>=s[1]&&r<=s[1]+u[1])return o[f]}return-1}function jA(t,e,r){if(v0(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function YW(t,e,r){var n=t.type==="polar"?In:St;return new n({shape:jA(e,r,t),silent:!0,z2:0})}function XW(t){t.registerChartView(jW),t.registerSeriesModel(IW),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Dt(gH,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,mH("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,TA("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var VA=Math.PI*2,Oh=Math.PI/180;function HA(t,e){return Ua(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function WA(t,e){var r=HA(t,e),n=t.get("center"),i=t.get("radius");he(i)||(i=[0,i]);var a=ut(r.width,e.getWidth()),o=ut(r.height,e.getHeight()),s=Math.min(a,o),u=ut(i[0],s/2),l=ut(i[1],s/2),f,c,h=t.coordinateSystem;if(h){var d=h.dataToPoint(n);f=d[0]||0,c=d[1]||0}else he(n)||(n=[n,n]),f=ut(n[0],a)+r.x,c=ut(n[1],o)+r.y;return{cx:f,cy:c,r0:u,r:l}}function KW(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=HA(n,r),s=WA(n,r),u=s.cx,l=s.cy,f=s.r,c=s.r0,h=-n.get("startAngle")*Oh,d=n.get("endAngle"),p=n.get("padAngle")*Oh;d=d==="auto"?h-VA:-d*Oh;var g=n.get("minAngle")*Oh,v=g+p,m=0;i.each(a,function(j){!isNaN(j)&&m++});var y=i.getSum(a),b=Math.PI/(y||m)*2,w=n.get("clockwise"),C=n.get("roseType"),_=n.get("stillShowZeroSum"),D=i.getDataExtent(a);D[0]=0;var x=w?1:-1,S=[h,d],O=x*p/2;ID(S,!w),h=S[0],d=S[1];var E=$A(n);E.startAngle=h,E.endAngle=d,E.clockwise=w;var P=Math.abs(d-h),F=P,B=0,M=h;if(i.setLayout({viewRect:o,r:f}),i.each(a,function(j,z){var W;if(isNaN(j)){i.setItemLayout(z,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:w,cx:u,cy:l,r0:c,r:C?NaN:f});return}C!=="area"?W=y===0&&_?b:j*b:W=P/m,W<v?(W=v,F-=v):B+=j;var R=M+x*W,U=0,Z=0;p>W?(U=M+x*W/2,Z=U):(U=M+O,Z=R-O),i.setItemLayout(z,{angle:W,startAngle:U,endAngle:Z,clockwise:w,cx:u,cy:l,r0:c,r:C?eg(j,D,[c,f]):f}),M=R}),F<VA&&m)if(F<=.001){var I=P/m;i.each(a,function(j,z){if(!isNaN(j)){var W=i.getItemLayout(z);W.angle=I;var R=0,U=0;I<p?(R=h+x*(z+1/2)*I,U=R):(R=h+x*z*I+O,U=h+x*(z+1)*I-O),W.startAngle=R,W.endAngle=U}})}else b=F/B,M=h,i.each(a,function(j,z){if(!isNaN(j)){var W=i.getItemLayout(z),R=W.angle===v?v:j*b,U=0,Z=0;R<p?(U=M+x*R/2,Z=U):(U=M+O,Z=M+x*R-O),W.startAngle=U,W.endAngle=Z,M+=x*R}})})}var $A=lt();function ZW(t){return{seriesType:t,reset:function(e,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=e.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var JW=Math.PI/180;function GA(t,e,r,n,i,a,o,s,u,l){if(t.length<2)return;function f(g){for(var v=g.rB,m=v*v,y=0;y<g.list.length;y++){var b=g.list[y],w=Math.abs(b.label.y-r),C=n+b.len,_=C*C,D=Math.sqrt((1-Math.abs(w*w/m))*_),x=e+(D+b.len2)*i,S=x-b.label.x,O=b.targetTextWidth-S*i;UA(b,O,!0),b.label.x=x}}function c(g){for(var v={list:[],maxY:0},m={list:[],maxY:0},y=0;y<g.length;y++)if(g[y].labelAlignTo==="none"){var b=g[y],w=b.label.y>r?m:v,C=Math.abs(b.label.y-r);if(C>=w.maxY){var _=b.label.x-e-b.len2*i,D=n+b.len,x=Math.abs(_)<D?Math.sqrt(C*C/(1-_*_/D/D)):D;w.rB=x,w.maxY=C}w.list.push(b)}f(v),f(m)}for(var h=t.length,d=0;d<h;d++)if(t[d].position==="outer"&&t[d].labelAlignTo==="labelLine"){var p=t[d].label.x-l;t[d].linePoints[1][0]+=p,t[d].label.x=l}cA(t,u,u+o)&&c(t)}function QW(t,e,r,n,i,a,o,s){for(var u=[],l=[],f=Number.MAX_VALUE,c=-Number.MAX_VALUE,h=0;h<t.length;h++){var d=t[h].label;b0(t[h])||(d.x<e?(f=Math.min(f,d.x),u.push(t[h])):(c=Math.max(c,d.x),l.push(t[h])))}for(var h=0;h<t.length;h++){var p=t[h];if(!b0(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var d=p.label,g=p.linePoints,v=void 0;p.labelAlignTo==="edge"?d.x<e?v=g[2][0]-p.labelDistance-o-p.edgeDistance:v=o+i-p.edgeDistance-g[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?d.x<e?v=f-o-p.bleedMargin:v=o+i-c-p.bleedMargin:d.x<e?v=d.x-o-p.bleedMargin:v=o+i-d.x-p.bleedMargin,p.targetTextWidth=v,UA(p,v)}}GA(l,e,r,n,1,i,a,o,s,c),GA(u,e,r,n,-1,i,a,o,s,f);for(var h=0;h<t.length;h++){var p=t[h];if(!b0(p)&&p.linePoints){var d=p.label,g=p.linePoints,m=p.labelAlignTo==="edge",y=d.style.padding,b=y?y[1]+y[3]:0,w=d.style.backgroundColor?0:b,C=p.rect.width+w,_=g[1][0]-g[2][0];m?d.x<e?g[2][0]=o+p.edgeDistance+C+p.labelDistance:g[2][0]=o+i-p.edgeDistance-C-p.labelDistance:(d.x<e?g[2][0]=d.x+p.labelDistance:g[2][0]=d.x-p.labelDistance,g[1][0]=g[2][0]+_),g[1][1]=g[2][1]=d.y}}}function UA(t,e,r){if(r===void 0&&(r=!1),t.labelStyleWidth==null){var n=t.label,i=n.style,a=t.rect,o=i.backgroundColor,s=i.padding,u=s?s[1]+s[3]:0,l=i.overflow,f=a.width+(o?0:u);if(e<f||r){var c=a.height;if(l&&l.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-u);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var d=e-u,p=e<f?d:r?d>t.unconstrainedWidth?null:d:null;n.setStyle("width",p)}var g=n.getBoundingRect();a.width=g.width;var v=(n.style.margin||0)+2.1;a.height=g.height+v,a.y-=(a.height-c)/2}}}function b0(t){return t.position==="center"}function e$(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*JW,s=e.getLayout("viewRect"),u=e.getLayout("r"),l=s.width,f=s.x,c=s.y,h=s.height;function d(_){_.ignore=!0}function p(_){if(!_.ignore)return!0;for(var D in _.states)if(_.states[D].ignore===!1)return!0;return!1}e.each(function(_){var D=e.getItemGraphicEl(_),x=D.shape,S=D.getTextContent(),O=D.getTextGuideLine(),E=e.getItemModel(_),P=E.getModel("label"),F=P.get("position")||E.get(["emphasis","label","position"]),B=P.get("distanceToLabelLine"),M=P.get("alignTo"),I=ut(P.get("edgeDistance"),l),j=P.get("bleedMargin"),z=E.getModel("labelLine"),W=z.get("length");W=ut(W,l);var R=z.get("length2");if(R=ut(R,l),Math.abs(x.endAngle-x.startAngle)<o){N(S.states,d),S.ignore=!0,O&&(N(O.states,d),O.ignore=!0);return}if(p(S)){var U=(x.startAngle+x.endAngle)/2,Z=Math.cos(U),ee=Math.sin(U),ne,q,L,X;n=x.cx,i=x.cy;var V=F==="inside"||F==="inner";if(F==="center")ne=x.cx,q=x.cy,X="center";else{var G=(V?(x.r+x.r0)/2*Z:x.r*Z)+n,J=(V?(x.r+x.r0)/2*ee:x.r*ee)+i;if(ne=G+Z*3,q=J+ee*3,!V){var K=G+Z*(W+u-x.r),Y=J+ee*(W+u-x.r),fe=K+(Z<0?-1:1)*R,ue=Y;M==="edge"?ne=Z<0?f+I:f+l-I:ne=fe+(Z<0?-B:B),q=ue,L=[[G,J],[K,Y],[fe,ue]]}X=V?"center":M==="edge"?Z>0?"right":"left":Z>0?"left":"right"}var Ce=Math.PI,me=0,Fe=P.get("rotate");if(nt(Fe))me=Fe*(Ce/180);else if(F==="center")me=0;else if(Fe==="radial"||Fe===!0){var ae=Z<0?-U+Ce:-U;me=ae}else if(Fe==="tangential"&&F!=="outside"&&F!=="outer"){var ve=Math.atan2(Z,ee);ve<0&&(ve=Ce*2+ve);var Le=ee>0;Le&&(ve=Ce+ve),me=ve-Ce}if(a=!!me,S.x=ne,S.y=q,S.rotation=me,S.setStyle({verticalAlign:"middle"}),V){S.setStyle({align:X});var at=S.states.select;at&&(at.x+=S.x,at.y+=S.y)}else{var ft=S.getBoundingRect().clone();ft.applyTransform(S.getComputedTransform());var Ie=(S.style.margin||0)+2.1;ft.y-=Ie/2,ft.height+=Ie,r.push({label:S,labelLine:O,position:F,len:W,len2:R,minTurnAngle:z.get("minTurnAngle"),maxSurfaceAngle:z.get("maxSurfaceAngle"),surfaceNormal:new _e(Z,ee),linePoints:L,textAlign:X,labelDistance:B,labelAlignTo:M,edgeDistance:I,bleedMargin:j,rect:ft,unconstrainedWidth:ft.width,labelStyleWidth:S.style.width})}D.setTextConfig({inside:V})}}),!a&&t.get("avoidLabelOverlap")&&QW(r,n,i,u,l,h,f,c);for(var g=0;g<r.length;g++){var v=r[g],m=v.label,y=v.labelLine,b=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:v.textAlign}),b&&(N(m.states,d),m.ignore=!0);var w=m.states.select;w&&(w.x+=m.x,w.y+=m.y)}if(y){var C=v.linePoints;b||!C?(N(y.states,d),y.ignore=!0):(oA(C,v.minTurnAngle),nW(C,v.surfaceNormal,v.maxSurfaceAngle),y.setShape({points:C}),m.__hostTarget.textGuideLineConfig={anchor:new _e(C[0][0],C[0][1])})}}}var t$=function(t){ce(e,t);function e(r,n,i){var a=t.call(this)||this;a.z2=2;var o=new Ot;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return e.prototype.updateData=function(r,n,i,a){var o=this,s=r.hostModel,u=r.getItemModel(n),l=u.getModel("emphasis"),f=r.getItemLayout(n),c=oe(sl(u.getModel("itemStyle"),f,!0),f);if(isNaN(c.startAngle)){o.setShape(c);return}if(a){o.setShape(c);var h=s.getShallow("animationType");s.ecModel.ssr?(qt(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=c.cx,o.originY=c.cy):h==="scale"?(o.shape.r=f.r0,qt(o,{shape:{r:f.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),qt(o,{shape:{startAngle:f.startAngle,endAngle:f.endAngle}},s,n)):(o.shape.endAngle=f.startAngle,Ft(o,{shape:{endAngle:f.endAngle}},s,n))}else zg(o),Ft(o,{shape:c},s,n);o.useStyle(r.getItemVisual(n,"style")),pc(o,u);var d=(f.startAngle+f.endAngle)/2,p=s.get("selectedOffset"),g=Math.cos(d)*p,v=Math.sin(d)*p,m=u.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=oe({r:f.r+(l.get("scale")&&l.get("scaleSize")||0)},sl(l.getModel("itemStyle"),f)),oe(o.ensureState("select"),{x:g,y:v,shape:sl(u.getModel(["select","itemStyle"]),f)}),oe(o.ensureState("blur"),{shape:sl(u.getModel(["blur","itemStyle"]),f)});var y=o.getTextGuideLine(),b=o.getTextContent();y&&oe(y.ensureState("select"),{x:g,y:v}),oe(b.ensureState("select"),{x:g,y:v}),Eu(this,l.get("focus"),l.get("blurScope"),l.get("disabled"))},e.prototype._updateLabel=function(r,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),u=n.getItemVisual(i,"style"),l=u&&u.fill,f=u&&u.opacity;Mu(a,Fu(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:l,defaultOpacity:f,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var c=a.getTextContent();a.setTextConfig({position:null,rotation:null}),c.attr({z2:10});var h=r.get(["label","position"]);if(h!=="outside"&&h!=="outer")a.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Pu,this.setTextGuideLine(d)),sA(this,uA(o),{stroke:l,opacity:Da(s.get(["lineStyle","opacity"]),f,1)})}},e}(In),r$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i,a){var o=r.getData(),s=this._data,u=this.group,l;if(!s&&o.count()>0){for(var f=o.getItemLayout(0),c=1;isNaN(f&&f.startAngle)&&c<o.count();++c)f=o.getItemLayout(c);f&&(l=f.startAngle)}if(this._emptyCircleSector&&u.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var h=$A(r),d=new In({shape:oe(WA(r,i),h)});d.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,u.add(d)}o.diff(s).add(function(p){var g=new t$(o,p,l);o.setItemGraphicEl(p,g),u.add(g)}).update(function(p,g){var v=s.getItemGraphicEl(g);v.updateData(o,p,l),v.off("click"),u.add(v),o.setItemGraphicEl(p,v)}).remove(function(p){var g=s.getItemGraphicEl(p);Ec(g,r,p)}).execute(),e$(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,u=Math.sqrt(o*o+s*s);return u<=a.r&&u>=a.r0}},e.type="pie",e}(Zr);function n$(t,e,r){e=he(e)&&{coordDimensions:e}||oe({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=F2(n,e).dimensions,a=new M2(i,t);return a.initData(n,r),a}var i$=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),a$=lt(),o$=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new i$(dt(this.getData,this),dt(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return n$(this,{coordDimensions:["value"],encodeDefaulter:Dt(K7,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=a$(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(u){o.push(u)}),a=i.seats=Yk(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){rg(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(fn);function s$(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(nt(o)&&!isNaN(o)&&o<0)})}}}function u$(t){t.registerChartView(r$),t.registerSeriesModel(o$),Ij("pie",t.registerAction),t.registerLayout(Dt(KW,"pie")),t.registerProcessor(ZW("pie")),t.registerProcessor(s$("pie"))}var l$=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Ze),C0=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",sn).models[0]},e.type="cartesian2dAxis",e}(Ze);xn(C0,jH);var qA={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,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},f$=Qe({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},qA),w0=Qe({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}}},qA),c$=Qe({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},w0),h$=je({logBase:10},w0);const d$={category:f$,value:w0,time:c$,log:h$};var v$={value:1,category:1,time:1,log:1};function YA(t,e,r,n){N(v$,function(i,a){var o=Qe(Qe({},d$[a],!0),n,!0),s=function(u){ce(l,u);function l(){var f=u!==null&&u.apply(this,arguments)||this;return f.type=e+"Axis."+a,f}return l.prototype.mergeDefaultAndTheme=function(f,c){var h=ku(this),d=h?$c(f):{},p=c.getTheme();Qe(f,p.get(a+"Axis")),Qe(f,this.getDefaultOption()),f.type=XA(f),h&&qa(f,d,h)},l.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Jm.createByAxisModel(this))},l.prototype.getCategories=function(f){var c=this.option;if(c.type==="category")return f?c.data:this.__ordinalMeta.categories},l.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},l.type=e+"Axis."+a,l.defaultOption=o,l}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",XA)}function XA(t){return t.type||(t.data?"category":"value")}var p$=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return ye(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),bt(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),_0=["x","y"];function KA(t){return t.type==="interval"||t.type==="time"}var g$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=_0,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!KA(r)||!KA(n))){var i=r.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,c=(s[1]-o[1])/l,h=o[0]-i[0]*f,d=o[1]-a[0]*c,p=this._transform=[f,0,0,c,h,d];this._invTransform=Tf([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Ue(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return jr(i,r,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},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),u=i.parse(r[0]),l=a.parse(r[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},e.prototype.pointToData=function(r,n){var i=[];if(this._invTransform)return jr(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,u=Math.max(i[0],i[1])-o+r;return new Ue(a,o,s,u)},e}(p$),m$=function(t){ce(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(KH);function D0(t,e,r){r=r||{};var n=t.coordinateSystem,i=e.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,u=o?"onZero":s,l=i.dim,f=n.getRect(),c=[f.x,f.x+f.width,f.y,f.y+f.height],h={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,p=l==="x"?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[h.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=[l==="y"?p[h[u]]:c[0],l==="x"?p[h[u]]:c[3]],a.rotation=Math.PI/2*(l==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=v[s],a.labelOffset=o?p[h[s]]-p[h.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),_a(r.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=e.get(["axisLabel","rotate"]);return a.labelRotate=u==="top"?-m:m,a.z2=1,a}function ZA(t){return t.get("coordinateSystem")==="cartesian2d"}function JA(t){var e={xAxisModel:null,yAxisModel:null};return N(e,function(r,n){var i=n.replace(/Model$/,""),a=t.getReferringComponents(i,sn).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error(i+' "'+Da(t.get(i+"Index"),t.get(i+"Id"),0)+'" not found');e[n]=a}),e}var x0=Math.log;function y$(t,e,r){var n=ys.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,!0),o=i.length-1,s=n.getInterval.call(r),u=G2(t,e),l=u.extent,f=u.fixMin,c=u.fixMax;if(t.type==="log"){var h=x0(t.base);l=[x0(l[0])/h,x0(l[1])/h]}t.setExtent(l[0],l[1]),t.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:c});var d=n.getExtent.call(t);f&&(l[0]=d[0]),c&&(l[1]=d[1]);var p=n.getInterval.call(t),g=l[0],v=l[1];if(f&&c)p=(v-g)/o;else if(f)for(v=l[0]+p*o;v<l[1]&&isFinite(v)&&isFinite(l[1]);)p=e0(p),v=l[0]+p*o;else if(c)for(g=l[1]-p*o;g>l[0]&&isFinite(g)&&isFinite(l[0]);)p=e0(p),g=l[1]-p*o;else{var m=t.getTicks().length-1;m>o&&(p=e0(p));var y=p*o;v=Math.ceil(l[1]/p)*p,g=Tt(v-y),g<0&&l[0]>=0?(g=0,v=Tt(y)):v>0&&l[1]<=0&&(v=0,g=-Tt(y))}var b=(i[0].value-a[0].value)/s,w=(i[o].value-a[o].value)/s;if(n.setExtent.call(t,g+p*b,v+p*w),n.setInterval.call(t,p),(b||w)&&n.setNiceExtent.call(t,g+p,v-p),process.env.NODE_ENV!=="production"){var C=n.getTicks.call(t);C[1]&&(!uH(p)||tg(C[1].value)>tg(p))&&xt("The ticks may be not readable when set min: "+e.get("min")+", max: "+e.get("max")+" and alignTicks: true")}}var b$=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=_0,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,u=Ke(o),l=u.length;if(l){for(var f=[],c=l-1;c>=0;c--){var h=+u[c],d=o[h],p=d.model,g=d.scale;Qm(g)&&p.get("alignTicks")&&p.get("interval")==null?f.push(d):(U2(g,p),Qm(g)&&(s=d))}f.length&&(s||(s=f.pop(),U2(s.scale,s.model)),N(f,function(v){y$(v.scale,v.model,s.scale)}))}}i(n.x),i(n.y);var a={};N(n.x,function(o){QA(n,"y",o,a)}),N(n.y,function(o){QA(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=e.getBoxLayoutParams(),a=!n&&e.get("containLabel"),o=Ua(i,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;u(),a&&(N(s,function(l){if(!l.model.get(["axisLabel","inside"])){var f=NH(l);if(f){var c=l.isHorizontal()?"height":"width",h=l.model.get(["axisLabel","margin"]);o[c]-=f[c]+h,l.position==="top"?o.y+=f.height+h:l.position==="left"&&(o.x+=f.width+h)}}}),u()),N(this._coordsList,function(l){l.calcAffineTransform()});function u(){N(s,function(l){var f=l.isHorizontal(),c=f?[0,o.width]:[0,o.height],h=l.inverse?1:0;l.setExtent(c[h],c[1-h]),C$(l,f?o.x:o.y)})}},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}we(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===e||a[i].getAxis("y").index===r)return a[i]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},t.prototype.convertFromPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},t.prototype._findConvertTarget=function(e){var r=e.seriesModel,n=e.xAxisModel||r&&r.getReferringComponents("xAxis",sn).models[0],i=e.yAxisModel||r&&r.getReferringComponents("yAxis",sn).models[0],a=e.gridModel,o=this._coordsList,s,u;if(r)s=r.coordinateSystem,Ge(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)u=this.getAxis("x",n.componentIndex);else if(i)u=this.getAxis("y",i.componentIndex);else if(a){var l=a.coordinateSystem;l===this&&(s=this._coordsList[0])}return{cartesian:s,axis:u}},t.prototype.containPoint=function(e){var r=this._coordsList[0];if(r)return r.containPoint(e)},t.prototype._initCartesian=function(e,r,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},u={x:0,y:0};if(r.eachComponent("xAxis",l("x"),this),r.eachComponent("yAxis",l("y"),this),!u.x||!u.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,N(s.x,function(f,c){N(s.y,function(h,d){var p="x"+c+"y"+d,g=new g$(p);g.master=i,g.model=e,i._coordsMap[p]=g,i._coordsList.push(g),g.addAxis(f),g.addAxis(h)})});function l(f){return function(c,h){if(S0(c,e)){var d=c.get("position");f==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var p=new m$(f,IH(c),[0,0],c.get("type"),d),g=p.type==="category";p.onBand=g&&c.get("boundaryGap"),p.inverse=c.get("inverse"),c.axis=p,p.model=c,p.grid=a,p.index=h,a._axesList.push(p),s[f][h]=p,u[f]++}}}},t.prototype._updateScale=function(e,r){N(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),e.eachSeries(function(i){if(ZA(i)){var a=JA(i),o=a.xAxisModel,s=a.yAxisModel;if(!S0(o,r)||!S0(s,r))return;var u=this.getCartesian(o.componentIndex,s.componentIndex),l=i.getData(),f=u.getAxis("x"),c=u.getAxis("y");n(l,f),n(l,c)}},this);function n(i,a){N(zH(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},t.prototype.getTooltipAxes=function(e){var r=[],n=[];return N(this.getCartesians(),function(i){var a=e!=null&&e!=="auto"?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(a);Ge(r,a)<0&&r.push(a),Ge(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},t.create=function(e,r){var n=[];return e.eachComponent("grid",function(i,a){var o=new t(i,e,r);o.name="grid_"+a,o.resize(i,r,!0),i.coordinateSystem=o,n.push(o)}),e.eachSeries(function(i){if(ZA(i)){var a=JA(i),o=a.xAxisModel,s=a.yAxisModel,u=o.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!u)throw new Error('Grid "'+Da(o.get("gridIndex"),o.get("gridId"),0)+'" not found');if(o.getCoordSysModel()!==s.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var l=u.coordinateSystem;i.coordinateSystem=l.getCartesian(o.componentIndex,s.componentIndex)}}),n},t.dimensions=_0,t}();function S0(t,e){return t.getCoordSysModel()===e}function QA(t,e,r,n){r.getAxesOnZeroOf=function(){return a?[a]:[]};var i=t[e],a,o=r.model,s=o.get(["axisLine","onZero"]),u=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(u!=null)eT(i[u])&&(a=i[u]);else for(var l in i)if(i.hasOwnProperty(l)&&eT(i[l])&&!n[f(i[l])]){a=i[l];break}a&&(n[f(a)]=!0);function f(c){return c.dim+"_"+c.index}}function eT(t){return t&&t.type!=="category"&&t.type!=="time"&&RH(t)}function C$(t,e){var r=t.getExtent(),n=r[0]+r[1];t.toGlobalCoord=t.dim==="x"?function(i){return i+e}:function(i){return n-i+e},t.toLocalCoord=t.dim==="x"?function(i){return i-e}:function(i){return n-i+e}}var qi=Math.PI,Yi=function(){function t(e,r){this.group=new It,this.opt=r,this.axisModel=e,je(r,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new It({x:r.position[0],y:r.position[1],rotation:r.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(e){return!!tT[e]},t.prototype.add=function(e){tT[e](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(e,r,n){var i=oD(r-e),a,o;return Zf(i)?(o=n>0?"top":"bottom",a="center"):Zf(i-qi)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<qi?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),tT={axisLine:function(t,e,r,n){var i=e.get(["axisLine","show"]);if(i==="auto"&&t.handleAutoShown&&(i=t.handleAutoShown("axisLine")),!!i){var a=e.axis.getExtent(),o=n.transform,s=[a[0],0],u=[a[1],0],l=s[0]>u[0];o&&(jr(s,s,o),jr(u,u,o));var f=oe({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new Ni({shape:{x1:s[0],y1:s[1],x2:u[0],y2:u[1]},style:f,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});Bu(c.shape,c.style.lineWidth),c.anid="line",r.add(c);var h=e.get(["axisLine","symbol"]);if(h!=null){var d=e.get(["axisLine","symbolSize"]);be(h)&&(h=[h,h]),(be(d)||nt(d))&&(d=[d,d]);var p=LE(e.get(["axisLine","symbolOffset"])||0,d),g=d[0],v=d[1];N([{rotate:t.rotation+Math.PI/2,offset:p[0],r:0},{rotate:t.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-u[0])*(s[0]-u[0])+(s[1]-u[1])*(s[1]-u[1]))}],function(m,y){if(h[y]!=="none"&&h[y]!=null){var b=hs(h[y],-g/2,-v/2,g,v,f.stroke,!0),w=m.r+m.offset,C=l?u:s;b.attr({rotation:m.rotate,x:C[0]+w*Math.cos(t.rotation),y:C[1]-w*Math.sin(t.rotation),silent:!0,z2:11}),r.add(b)}})}}},axisTickLabel:function(t,e,r,n){var i=D$(r,n,e,t),a=S$(r,n,e,t);if(_$(e,a,i),x$(r,n,e,t.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=lA(ye(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));hA(o)}},axisName:function(t,e,r,n){var i=_a(t.axisName,e.get("name"));if(i){var a=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),u=e.get("nameGap")||0,l=e.axis.getExtent(),f=l[0]>l[1]?-1:1,c=[a==="start"?l[0]-f*u:a==="end"?l[1]+f*u:(l[0]+l[1])/2,nT(a)?t.labelOffset+o*u:0],h,d=e.get("nameRotate");d!=null&&(d=d*qi/180);var p;nT(a)?h=Yi.innerTextLayout(t.rotation,d??t.rotation,o):(h=w$(t.rotation,a,d||0,l),p=t.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(h.rotation)),!isFinite(p)&&(p=null)));var g=s.getFont(),v=e.get("nameTruncate",!0)||{},m=v.ellipsis,y=_a(t.nameTruncateMaxWidth,v.maxWidth,p),b=new Ot({x:c[0],y:c[1],rotation:h.rotation,silent:Yi.isLabelSilent(e),style:ki(s,{text:i,font:g,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Oc({el:b,componentModel:e,itemName:i}),b.__fullText=i,b.anid="name",e.get("triggerEvent")){var w=Yi.makeAxisEventDataBase(e);w.targetType="axisName",w.name=i,He(b).eventData=w}n.add(b),b.updateTransform(),r.add(b),b.decomposeTransform()}}};function w$(t,e,r,n){var i=oD(r-t),a,o,s=n[0]>n[1],u=e==="start"&&!s||e!=="start"&&s;return Zf(i-qi/2)?(o=u?"bottom":"top",a="center"):Zf(i-qi*1.5)?(o=u?"top":"bottom",a="center"):(o="middle",i<qi*1.5&&i>qi/2?a=u?"left":"right":a=u?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function _$(t,e,r){if(!q2(t.axis)){var n=t.get(["axisLabel","showMinLabel"]),i=t.get(["axisLabel","showMaxLabel"]);e=e||[],r=r||[];var a=e[0],o=e[1],s=e[e.length-1],u=e[e.length-2],l=r[0],f=r[1],c=r[r.length-1],h=r[r.length-2];n===!1?(Qr(a),Qr(l)):rT(a,o)&&(n?(Qr(o),Qr(f)):(Qr(a),Qr(l))),i===!1?(Qr(s),Qr(c)):rT(u,s)&&(i?(Qr(u),Qr(h)):(Qr(s),Qr(c)))}}function Qr(t){t&&(t.ignore=!0)}function rT(t,e){var r=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!r||!n)){var i=wp([]);return Dp(i,i,-t.rotation),r.applyTransform(jo([],i,t.getLocalTransform())),n.applyTransform(jo([],i,e.getLocalTransform())),r.intersect(n)}}function nT(t){return t==="middle"||t==="center"}function iT(t,e,r,n,i){for(var a=[],o=[],s=[],u=0;u<t.length;u++){var l=t[u].coord;o[0]=l,o[1]=0,s[0]=l,s[1]=r,e&&(jr(o,o,e),jr(s,s,e));var f=new Ni({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Bu(f.shape,f.style.lineWidth),f.anid=i+"_"+t[u].tickValue,a.push(f)}return a}function D$(t,e,r,n){var i=r.axis,a=r.getModel("axisTick"),o=a.get("show");if(o==="auto"&&n.handleAutoShown&&(o=n.handleAutoShown("axisTick")),!(!o||i.scale.isBlank())){for(var s=a.getModel("lineStyle"),u=n.tickDirection*a.get("length"),l=i.getTicksCoords(),f=iT(l,e.transform,u,je(s.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<f.length;c++)t.add(f[c]);return f}}function x$(t,e,r,n){var i=r.axis,a=r.getModel("minorTick");if(!(!a.get("show")||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(o.length)for(var s=a.getModel("lineStyle"),u=n*a.get("length"),l=je(s.getLineStyle(),je(r.getModel("axisTick").getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])})),f=0;f<o.length;f++)for(var c=iT(o[f],e.transform,u,l,"minorticks_"+f),h=0;h<c.length;h++)t.add(c[h])}}function S$(t,e,r,n){var i=r.axis,a=_a(n.axisLabelShow,r.get(["axisLabel","show"]));if(!(!a||i.scale.isBlank())){var o=r.getModel("axisLabel"),s=o.get("margin"),u=i.getViewLabels(),l=(_a(n.labelRotate,o.get("rotate"))||0)*qi/180,f=Yi.innerTextLayout(n.rotation,l,n.labelDirection),c=r.getCategories&&r.getCategories(!0),h=[],d=Yi.isLabelSilent(r),p=r.get("triggerEvent");return N(u,function(g,v){var m=i.scale.type==="ordinal"?i.scale.getRawOrdinalNumber(g.tickValue):g.tickValue,y=g.formattedLabel,b=g.rawLabel,w=o;if(c&&c[m]){var C=c[m];we(C)&&C.textStyle&&(w=new Ct(C.textStyle,o,r.ecModel))}var _=w.getTextColor()||r.get(["axisLine","lineStyle","color"]),D=i.dataToCoord(m),x=w.getShallow("align",!0)||f.textAlign,S=Be(w.getShallow("alignMinLabel",!0),x),O=Be(w.getShallow("alignMaxLabel",!0),x),E=w.getShallow("verticalAlign",!0)||w.getShallow("baseline",!0)||f.textVerticalAlign,P=Be(w.getShallow("verticalAlignMinLabel",!0),E),F=Be(w.getShallow("verticalAlignMaxLabel",!0),E),B=new Ot({x:D,y:n.labelOffset+n.labelDirection*s,rotation:f.rotation,silent:d,z2:10+(g.level||0),style:ki(w,{text:y,align:v===0?S:v===u.length-1?O:x,verticalAlign:v===0?P:v===u.length-1?F:E,fill:De(_)?_(i.type==="category"?b:i.type==="value"?m+"":m,v):_})});if(B.anid="label_"+m,p){var M=Yi.makeAxisEventDataBase(r);M.targetType="axisLabel",M.value=b,M.tickIndex=v,i.type==="category"&&(M.dataIndex=m),He(B).eventData=M}e.add(B),B.updateTransform(),h.push(B),t.add(B),B.decomposeTransform()}),h}}function E$(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return A$(r,t,e),r.seriesInvolved&&O$(r,t),r}function A$(t,e,r){var n=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];N(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var u=ul(s.model),l=t.coordSysAxesInfo[u]={};t.coordSysMap[u]=s;var f=s.model,c=f.getModel("tooltip",n);if(N(s.getAxes(),Dt(g,!1,null)),s.getTooltipAxes&&n&&c.get("show")){var h=c.get("trigger")==="axis",d=c.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(c.get(["axisPointer","axis"]));(h||d)&&N(p.baseAxes,Dt(g,d?"cross":!0,h)),d&&N(p.otherAxes,Dt(g,"cross",!1))}function g(v,m,y){var b=y.model.getModel("axisPointer",i),w=b.get("show");if(!(!w||w==="auto"&&!v&&!T0(b))){m==null&&(m=b.get("triggerTooltip")),b=v?T$(y,c,i,e,v,m):b;var C=b.get("snap"),_=b.get("triggerEmphasis"),D=ul(y.model),x=m||C||y.type==="category",S=t.axesInfo[D]={key:D,axis:y,coordSys:s,axisPointerModel:b,triggerTooltip:m,triggerEmphasis:_,involveSeries:x,snap:C,useHandle:T0(b),seriesModels:[],linkGroup:null};l[D]=S,t.seriesInvolved=t.seriesInvolved||x;var O=P$(a,y);if(O!=null){var E=o[O]||(o[O]={axesInfo:{}});E.axesInfo[D]=S,E.mapper=a[O].mapper,S.linkGroup=E}}}})}function T$(t,e,r,n,i,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],u={};N(s,function(h){u[h]=$e(o.get(h))}),u.snap=t.type!=="category"&&!!a,o.get("type")==="cross"&&(u.type="line");var l=u.label||(u.label={});if(l.show==null&&(l.show=!1),i==="cross"){var f=o.get(["label","show"]);if(l.show=f??!0,!a){var c=u.lineStyle=o.get("crossStyle");c&&je(l,c.textStyle)}}return t.model.getModel("axisPointer",new Ct(u,r,n))}function O$(t,e){e.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||N(t.coordSysAxesInfo[ul(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function P$(t,e){for(var r=e.model,n=e.dim,i=0;i<t.length;i++){var a=t[i]||{};if(E0(a[n+"AxisId"],r.id)||E0(a[n+"AxisIndex"],r.componentIndex)||E0(a[n+"AxisName"],r.name))return i}}function E0(t,e){return t==="all"||he(t)&&Ge(t,e)>=0||t===e}function B$(t){var e=A0(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=T0(r);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]),o<u[0]&&(o=u[0]),i.value=o,s&&(i.status=e.axis.scale.isBlank()?"hide":"show")}}function A0(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[ul(t)]}function M$(t){var e=A0(t);return e&&e.axisPointerModel}function T0(t){return!!t.get(["handle","show"])}function ul(t){return t.type+"||"+t.id}var O0={},aT=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i,a){this.axisPointerClass&&B$(r),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,i,!0)},e.prototype.updateAxisPointer=function(r,n,i,a){this._doUpdateAxisPointerClass(r,i,!1)},e.prototype.remove=function(r,n){var i=this._axisPointer;i&&i.remove(n)},e.prototype.dispose=function(r,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(r,n,i){var a=e.getAxisPointerClass(this.axisPointerClass);if(a){var o=M$(r);o?(this._axisPointer||(this._axisPointer=new a)).render(r,o,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},e.registerAxisPointerClass=function(r,n){if(process.env.NODE_ENV!=="production"&&O0[r])throw new Error("axisPointer "+r+" exists");O0[r]=n},e.getAxisPointerClass=function(r){return r&&O0[r]},e.type="axis",e}(Br),P0=lt();function F$(t,e,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),u=n.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:a,clamp:!0});if(l.length){var f=s.length,c=P0(t).splitAreaColors,h=Ae(),d=0;if(c)for(var p=0;p<l.length;p++){var g=c.get(l[p].tickValue);if(g!=null){d=(g+(f-1)*p)%f;break}}var v=i.toGlobalCoord(l[0].coord),m=o.getAreaStyle();s=he(s)?s:[s];for(var p=1;p<l.length;p++){var y=i.toGlobalCoord(l[p].coord),b=void 0,w=void 0,C=void 0,_=void 0;i.isHorizontal()?(b=v,w=u.y,C=y-b,_=u.height,v=b+C):(b=u.x,w=v,C=u.width,_=y-w,v=w+_);var D=l[p-1].tickValue;D!=null&&h.set(D,d),e.add(new St({anid:D!=null?"area_"+D:null,shape:{x:b,y:w,width:C,height:_},style:je({fill:s[d]},m),autoBatch:!0,silent:!0})),d=(d+1)%f}P0(t).splitAreaColors=h}}}function L$(t){P0(t).splitAreaColors=null}var I$=["axisLine","axisTickLabel","axisName"],R$=["splitArea","splitLine","minorSplitLine"],oT=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="CartesianAxisPointer",r}return e.prototype.render=function(r,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new It,this.group.add(this._axisGroup),!!r.get("show")){var s=r.getCoordSysModel(),u=D0(s,r),l=new Yi(r,oe({handleAutoShown:function(c){for(var h=s.coordinateSystem.getCartesians(),d=0;d<h.length;d++)if(Qm(h[d].getOtherAxis(r.axis).scale))return!0;return!1}},u));N(I$,l.add,l),this._axisGroup.add(l.getGroup()),N(R$,function(c){r.get([c,"show"])&&N$[c](this,this._axisGroup,r,s)},this);var f=a&&a.type==="changeAxisOrder"&&a.isInitSort;f||Nx(o,this._axisGroup,r),t.prototype.render.call(this,r,n,i,a)}},e.prototype.remove=function(){L$(this)},e.type="cartesianAxis",e}(aT),N$={splitLine:function(t,e,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=he(s)?s:[s];for(var u=n.coordinateSystem.getRect(),l=i.isHorizontal(),f=0,c=i.getTicksCoords({tickModel:a}),h=[],d=[],p=o.getLineStyle(),g=0;g<c.length;g++){var v=i.toGlobalCoord(c[g].coord);l?(h[0]=v,h[1]=u.y,d[0]=v,d[1]=u.y+u.height):(h[0]=u.x,h[1]=v,d[0]=u.x+u.width,d[1]=v);var m=f++%s.length,y=c[g].tickValue,b=new Ni({anid:y!=null?"line_"+c[g].tickValue:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:d[0],y2:d[1]},style:je({stroke:s[m]},p),silent:!0});Bu(b.shape,p.lineWidth),e.add(b)}}},minorSplitLine:function(t,e,r,n){var i=r.axis,a=r.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=n.coordinateSystem.getRect(),u=i.isHorizontal(),l=i.getMinorTicksCoords();if(l.length)for(var f=[],c=[],h=o.getLineStyle(),d=0;d<l.length;d++)for(var p=0;p<l[d].length;p++){var g=i.toGlobalCoord(l[d][p].coord);u?(f[0]=g,f[1]=s.y,c[0]=g,c[1]=s.y+s.height):(f[0]=s.x,f[1]=g,c[0]=s.x+s.width,c[1]=g);var v=new Ni({anid:"minor_line_"+l[d][p].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]},style:h,silent:!0});Bu(v.shape,h.lineWidth),e.add(v)}},splitArea:function(t,e,r,n){F$(t,e,r,n)}},sT=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="xAxis",e}(oT),k$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=sT.type,r}return e.type="yAxis",e}(oT),z$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="grid",r}return e.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new St({shape:r.coordinateSystem.getRect(),style:je({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(Br),uT={offset:0};function j$(t){t.registerComponentView(z$),t.registerComponentModel(l$),t.registerCoordinateSystem("cartesian2d",b$),YA(t,"x",C0,uT),YA(t,"y",C0,uT),t.registerComponentView(sT),t.registerComponentView(k$),t.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function V$(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||xe(t,"text")))}function H$(t,e,r){var n=t,i,a,o;if(e==="text")o=n;else{o={},xe(n,"text")&&(o.text=n.text),xe(n,"rich")&&(o.rich=n.rich),xe(n,"textFill")&&(o.fill=n.textFill),xe(n,"textStroke")&&(o.stroke=n.textStroke),xe(n,"fontFamily")&&(o.fontFamily=n.fontFamily),xe(n,"fontSize")&&(o.fontSize=n.fontSize),xe(n,"fontStyle")&&(o.fontStyle=n.fontStyle),xe(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=xe(n,"textPosition");i.position=s?n.textPosition:"inside",xe(n,"textPosition")&&(i.position=n.textPosition),xe(n,"textOffset")&&(i.offset=n.textOffset),xe(n,"textRotation")&&(i.rotation=n.textRotation),xe(n,"textDistance")&&(i.distance=n.textDistance)}return lT(o,t),N(o.rich,function(u){lT(u,u)}),{textConfig:i,textContent:a}}function lT(t,e){e&&(e.font=e.textFont||e.font,xe(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),xe(e,"textAlign")&&(t.align=e.textAlign),xe(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),xe(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),xe(e,"textWidth")&&(t.width=e.textWidth),xe(e,"textHeight")&&(t.height=e.textHeight),xe(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),xe(e,"textPadding")&&(t.padding=e.textPadding),xe(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),xe(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),xe(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),xe(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),xe(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),xe(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),xe(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}var fT={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},cT=Ke(fT),Ph=ri(Tn,function(t,e){return t[e]=1,t},{}),hT=Tn.join(", "),Bh=["","style","shape","extra"],Cs=lt();function B0(t,e,r,n,i){var a=t+"Animation",o=ts(t,n,i)||{},s=Cs(e).userDuring;return o.duration>0&&(o.during=s?dt(Y$,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),oe(o,r[a]),o}function M0(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),u=Cs(t),l=e.style;u.userDuring=e.during;var f={},c={};if(K$(t,e,c),pT("shape",e,c),pT("extra",e,c),!a&&s&&(X$(t,e,f),vT("shape",t,e,f),vT("extra",t,e,f),Z$(t,e,l,f)),c.style=l,$$(t,c,o),U$(t,e),s)if(a){var h={};N(Bh,function(p){var g=p?e[p]:e;g&&g.enterFrom&&(p&&(h[p]=h[p]||{}),oe(p?h[p]:h,g.enterFrom))});var d=B0("enter",t,e,r,i);d.duration>0&&t.animateFrom(h,d)}else G$(t,e,i||0,r,f);dT(t,e),l?t.dirty():t.markRedraw()}function dT(t,e){for(var r=Cs(t).leaveToProps,n=0;n<Bh.length;n++){var i=Bh[n],a=i?e[i]:e;a&&a.leaveTo&&(r||(r=Cs(t).leaveToProps={}),i&&(r[i]=r[i]||{}),oe(i?r[i]:r,a.leaveTo))}}function W$(t,e,r,n){if(t){var i=t.parent,a=Cs(t).leaveToProps;if(a){var o=B0("update",t,e,r,0);o.done=function(){i.remove(t)},t.animateTo(a,o)}else i.remove(t)}}function no(t){return t==="all"}function $$(t,e,r){var n=e.style;if(!t.isGroup&&n){if(r){t.useStyle({});for(var i=t.animators,a=0;a<i.length;a++){var o=i[a];o.targetName==="style"&&o.changeTarget(t.style)}}t.setStyle(n)}e&&(e.style=null,e&&t.attr(e),e.style=n)}function G$(t,e,r,n,i){if(i){var a=B0("update",t,e,n,r);a.duration>0&&t.animateFrom(i,a)}}function U$(t,e){xe(e,"silent")&&(t.silent=e.silent),xe(e,"ignore")&&(t.ignore=e.ignore),t instanceof Fi&&xe(e,"invisible")&&(t.invisible=e.invisible),t instanceof Ve&&xe(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var Vn={},q$={setTransform:function(t,e){return process.env.NODE_ENV!=="production"&&Ee(xe(Ph,t),"Only "+hT+" available in `setTransform`."),Vn.el[t]=e,this},getTransform:function(t){return process.env.NODE_ENV!=="production"&&Ee(xe(Ph,t),"Only "+hT+" available in `getTransform`."),Vn.el[t]},setShape:function(t,e){process.env.NODE_ENV!=="production"&&ws(t);var r=Vn.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){process.env.NODE_ENV!=="production"&&ws(t);var e=Vn.el.shape;if(e)return e[t]},setStyle:function(t,e){process.env.NODE_ENV!=="production"&&ws(t);var r=Vn.el,n=r.style;return n&&(process.env.NODE_ENV!=="production"&&Fo(e)&&xt("style."+t+" must not be assigned with NaN."),n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){process.env.NODE_ENV!=="production"&&ws(t);var e=Vn.el.style;if(e)return e[t]},setExtra:function(t,e){process.env.NODE_ENV!=="production"&&ws(t);var r=Vn.el.extra||(Vn.el.extra={});return r[t]=e,this},getExtra:function(t){process.env.NODE_ENV!=="production"&&ws(t);var e=Vn.el.extra;if(e)return e[t]}};function ws(t){if(process.env.NODE_ENV!=="production"&&(t==="transition"||t==="enterFrom"||t==="leaveTo"))throw new Error('key must not be "'+t+'"')}function Y$(){var t=this,e=t.el;if(e){var r=Cs(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}Vn.el=e,n(q$)}}function vT(t,e,r,n){var i=r[t];if(i){var a=e[t],o;if(a){var s=r.transition,u=i.transition;if(u)if(!o&&(o=n[t]={}),no(u))oe(o,a);else for(var l=gt(u),f=0;f<l.length;f++){var c=l[f],h=a[c];o[c]=h}else if(no(s)||Ge(s,t)>=0){!o&&(o=n[t]={});for(var d=Ke(a),f=0;f<d.length;f++){var c=d[f],h=a[c];J$(i[c],h)&&(o[c]=h)}}}}}function pT(t,e,r){var n=e[t];if(n)for(var i=r[t]={},a=Ke(n),o=0;o<a.length;o++){var s=a[o];i[s]=hu(n[s])}}function X$(t,e,r){for(var n=e.transition,i=no(n)?Tn:gt(n||[]),a=0;a<i.length;a++){var o=i[a];if(!(o==="style"||o==="shape"||o==="extra")){var s=t[o];process.env.NODE_ENV!=="production"&&gT(o,"el.transition"),r[o]=s}}}function K$(t,e,r){for(var n=0;n<cT.length;n++){var i=cT[n],a=fT[i],o=e[i];o&&(r[a[0]]=o[0],r[a[1]]=o[1])}for(var n=0;n<Tn.length;n++){var s=Tn[n];e[s]!=null&&(r[s]=e[s])}}function Z$(t,e,r,n){if(r){var i=t.style,a;if(i){var o=r.transition,s=e.transition;if(o&&!no(o)){var u=gt(o);!a&&(a=n.style={});for(var l=0;l<u.length;l++){var f=u[l],c=i[f];a[f]=c}}else if(t.getAnimationStyleProps&&(no(s)||no(o)||Ge(s,"style")>=0)){var h=t.getAnimationStyleProps(),d=h?h.style:null;if(d){!a&&(a=n.style={});for(var p=Ke(r),l=0;l<p.length;l++){var f=p[l];if(d[f]){var c=i[f];a[f]=c}}}}}}}function J$(t,e){return Wt(t)?t!==e:t!=null&&isFinite(t)}var gT;process.env.NODE_ENV!=="production"&&(gT=function(t,e){xe(Ph,t)||xt("Prop `"+t+"` is not a permitted in `"+e+"`. Only `"+Ke(Ph).join("`, `")+"` are permitted.")});var mT=lt(),Q$=["percent","easing","shape","style","extra"];function eG(t){t.stopAnimation("keyframe"),t.attr(mT(t))}function F0(t,e,r){if(!(!r.isAnimationEnabled()||!e)){if(he(e)){N(e,function(s){F0(t,s,r)});return}var n=e.keyframes,i=e.duration;if(r&&i==null){var a=ts("enter",r,0);i=a&&a.duration}if(!(!n||!i)){var o=mT(t);N(Bh,function(s){if(!(s&&!t[s])){var u,l=!1;n.sort(function(f,c){return f.percent-c.percent}),N(n,function(f){var c=t.animators,h=s?f[s]:f;if(process.env.NODE_ENV!=="production"&&f.percent>=1&&(l=!0),!!h){var d=Ke(h);if(s||(d=bt(d,function(v){return Ge(Q$,v)<0})),!!d.length){u||(u=t.animate(s,e.loop,!0),u.scope="keyframe");for(var p=0;p<c.length;p++)c[p]!==u&&c[p].targetName===u.targetName&&c[p].stopTracks(d);s&&(o[s]=o[s]||{});var g=s?o[s]:o;N(d,function(v){g[v]=((s?t[s]:t)||{})[v]}),u.whenWithKeys(i*f.percent,h,d,f.easing)}}}),u&&(process.env.NODE_ENV!=="production"&&(l||xt("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),u.delay(e.delay||0).duration(i).start(e.easing))}})}}}var io=lt(),yT=$e,L0=dt,tG=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,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,e,r,n);var f=l.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var c=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new It,this.createPointerEl(s,l,e,r),this.createLabelEl(s,l,e,r),n.getZr().add(s);else{var h=Dt(bT,r,c);this.updatePointerEl(s,l,h),this.updateLabelEl(s,l,h,r)}_T(s,r,!0),this._renderHandle(a)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var n=r.get("animation"),i=e.axis,a=i.type==="category",o=r.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=A0(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/u>s}return!1}return n===!0},t.prototype.makeElOption=function(e,r,n,i,a){},t.prototype.createPointerEl=function(e,r,n,i){var a=r.pointer;if(a){var o=io(e).pointerEl=new b7[a.type](yT(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=io(e).labelEl=new Ot(yT(r.label));e.add(a),wT(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=io(e).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,n,i){var a=io(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),wT(a,i))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.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=Wg(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(l){v_(l.event)},onmousedown:L0(this._onHandleDragMove,this,0,0),drift:L0(this._onHandleDragMove,this),ondragend:L0(this._onHandleDragEnd,this)}),n.add(i)),_T(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var u=a.get("size");he(u)||(u=[u,u]),i.scaleX=u[0]/2,i.scaleY=u[1]/2,CE(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){bT(this._axisPointerModel,!r&&this._moveAnimation,this._handle,I0(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(I0(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(I0(i)),io(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Sm(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,n){return n=n||0,{x:e[n],y:e[1-n],width:r[n],height:r[1-n]}},t}();function bT(t,e,r,n){CT(io(r).lastProp,n)||(io(r).lastProp=n,e?Ft(r,n,t):(r.stopAnimation(),r.attr(n)))}function CT(t,e){if(we(t)&&we(e)){var r=!0;return N(e,function(n,i){r=r&&CT(t[i],n)}),!!r}else return t===e}function wT(t,e){t[e.get(["label","show"])?"show":"hide"]()}function I0(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function _T(t,e,r){var n=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function rG(t){var e=t.get("type"),r=t.getModel(e+"Style"),n;return e==="line"?(n=r.getLineStyle(),n.fill=null):e==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function nG(t,e,r,n,i){var a=r.get("value"),o=DT(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),u=Vc(s.get("padding")||0),l=s.getFont(),f=Yp(o,l),c=i.position,h=f.width+u[1]+u[3],d=f.height+u[0]+u[2],p=i.align;p==="right"&&(c[0]-=h),p==="center"&&(c[0]-=h/2);var g=i.verticalAlign;g==="bottom"&&(c[1]-=d),g==="middle"&&(c[1]-=d/2),iG(c,h,d,n);var v=s.get("backgroundColor");(!v||v==="auto")&&(v=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:ki(s,{text:o,font:l,fill:s.getTextColor(),padding:u,backgroundColor:v}),z2:10}}function iG(t,e,r,n){var i=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,a)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function DT(t,e,r,n,i){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:i.precision}),o=i.formatter;if(o){var s={value:a0(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};N(n,function(u){var l=r.getSeriesByIndex(u.seriesIndex),f=u.dataIndexInside,c=l&&l.getDataParams(f);c&&s.seriesData.push(c)}),be(o)?a=o.replace("{value}",a):De(o)&&(a=o(s))}return a}function xT(t,e,r){var n=zo();return Dp(n,n,r.rotation),_p(n,n,r.position),Hg([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function aG(t,e,r,n,i,a){var o=Yi.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),nG(e,n,i,a,{position:xT(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function oG(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function sG(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}var uG=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,u=s.grid,l=a.get("type"),f=ST(u,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(n,!0));if(l&&l!=="none"){var h=rG(a),d=lG[l](s,c,f);d.style=h,r.graphicKey=d.type,r.pointer=d}var p=D0(u.model,i);aG(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=D0(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=xT(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,u=o.getGlobalExtent(!0),l=ST(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,c=[r.x,r.y];c[f]+=n[f],c[f]=Math.min(u[1],c[f]),c[f]=Math.max(u[0],c[f]);var h=(l[1]+l[0])/2,d=[h,h];d[f]=c[f];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:p[f]}},e}(tG);function ST(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var lG={line:function(t,e,r){var n=oG([e,r[0]],[e,r[1]],ET(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:sG([e-n/2,r[0]],[n,i],ET(t))}}};function ET(t){return t.dim==="x"?0:1}var fG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Ze),pi=lt(),cG=N;function AT(t,e,r){if(!Pe.node){var n=e.getZr();pi(n).records||(pi(n).records={}),hG(n,e);var i=pi(n).records[t]||(pi(n).records[t]={});i.handler=r}}function hG(t,e){if(pi(t).initialized)return;pi(t).initialized=!0,r("click",Dt(TT,"click")),r("mousemove",Dt(TT,"mousemove")),r("globalout",vG);function r(n,i){t.on(n,function(a){var o=pG(e);cG(pi(t).records,function(s){s&&i(s,a,o.dispatchAction)}),dG(o.pendings,e)})}}function dG(t,e){var r=t.showTip.length,n=t.hideTip.length,i;r?i=t.showTip[r-1]:n&&(i=t.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function vG(t,e,r){t.handler("leave",null,r)}function TT(t,e,r,n){e.handler(t,r,n)}function pG(t){var e={showTip:[],hideTip:[]},r=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=r,t.dispatchAction(n))};return{dispatchAction:r,pendings:e}}function R0(t,e){if(!Pe.node){var r=e.getZr(),n=(pi(r).records||{})[t];n&&(pi(r).records[t]=null)}}var gG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";AT("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})})},e.prototype.remove=function(r,n){R0("axisPointer",n)},e.prototype.dispose=function(r,n){R0("axisPointer",n)},e.type="axisPointer",e}(Br);function OT(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Pa(a,t);if(o==null||o<0||he(o))return{point:[]};var s=a.getItemGraphicEl(o),u=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(u&&u.dataToPoint)if(t.isStacked){var l=u.getBaseAxis(),f=u.getOtherAxis(l),c=f.dim,h=l.dim,d=c==="x"||c==="radius"?1:0,p=a.mapDimension(h),g=[];g[d]=a.get(p,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=u.dataToPoint(g)||[]}else r=u.dataToPoint(a.getValues(ye(u.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var v=s.getBoundingRect().clone();v.applyTransform(s.transform),r=[v.x+v.width/2,v.y+v.height/2]}return{point:r,el:s}}var PT=lt();function mG(t,e,r){var n=t.currTrigger,i=[t.x,t.y],a=t,o=t.dispatchAction||dt(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Mh(i)&&(i=OT({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var u=Mh(i),l=a.axesInfo,f=s.axesInfo,c=n==="leave"||Mh(i),h={},d={},p={list:[],map:{}},g={showPointer:Dt(bG,d),showTooltip:Dt(CG,p)};N(s.coordSysMap,function(m,y){var b=u||m.containPoint(i);N(s.coordSysAxesInfo[y],function(w,C){var _=w.axis,D=xG(l,w);if(!c&&b&&(!l||D)){var x=D&&D.value;x==null&&!u&&(x=_.pointToData(i)),x!=null&&BT(w,x,g,!1,h)}})});var v={};return N(f,function(m,y){var b=m.linkGroup;b&&!d[y]&&N(b.axesInfo,function(w,C){var _=d[C];if(w!==m&&_){var D=_.value;b.mapper&&(D=m.axis.scale.parse(b.mapper(D,MT(w),MT(m)))),v[m.key]=D}})}),N(v,function(m,y){BT(f[y],m,g,!0,h)}),wG(d,f,h),_G(p,i,t,o),DG(f,o,r),h}}function BT(t,e,r,n,i){var a=t.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=yG(e,t),s=o.payloadBatch,u=o.snapToValue;s[0]&&i.seriesIndex==null&&oe(i,s[0]),!n&&t.snap&&a.containData(u)&&u!=null&&(e=u),r.showPointer(t,e,s),r.showTooltip(t,o,u)}}function yG(t,e){var r=e.axis,n=r.dim,i=t,a=[],o=Number.MAX_VALUE,s=-1;return N(e.seriesModels,function(u,l){var f=u.getData().mapDimensionsAll(n),c,h;if(u.getAxisTooltipData){var d=u.getAxisTooltipData(f,t,r);h=d.dataIndices,c=d.nestestValue}else{if(h=u.getData().indicesOfNearest(f[0],t,r.type==="category"?.5:null),!h.length)return;c=u.getData().get(f[0],h[0])}if(!(c==null||!isFinite(c))){var p=t-c,g=Math.abs(p);g<=o&&((g<o||p>=0&&s<0)&&(o=g,s=p,i=c,a.length=0),N(h,function(v){a.push({seriesIndex:u.seriesIndex,dataIndexInside:v,dataIndex:u.getData().getRawIndex(v)})}))}}),{payloadBatch:a,snapToValue:i}}function bG(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function CG(t,e,r,n){var i=r.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var u=e.coordSys.model,l=ul(u),f=t.map[l];f||(f=t.map[l]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},t.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 wG(t,e,r){var n=r.axesInfo=[];N(e,function(i,a){var o=i.axisPointerModel.option,s=t[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 _G(t,e,r,n){if(Mh(e)||!t.list.length){n({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function DG(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=PT(n)[i]||{},o=PT(n)[i]={};N(t,function(l,f){var c=l.axisPointerModel.option;c.status==="show"&&l.triggerEmphasis&&N(c.seriesDataIndices,function(h){var d=h.seriesIndex+" | "+h.dataIndex;o[d]=h})});var s=[],u=[];N(a,function(l,f){!o[f]&&u.push(l)}),N(o,function(l,f){!a[f]&&s.push(l)}),u.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:u}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function xG(t,e){for(var r=0;r<(t||[]).length;r++){var n=t[r];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function MT(t){var e=t.axis.model,r={},n=r.axisDim=t.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=e.componentIndex,r.axisName=r[n+"AxisName"]=e.name,r.axisId=r[n+"AxisId"]=e.id,r}function Mh(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function FT(t){aT.registerAxisPointerClass("CartesianAxisPointer",uG),t.registerComponentModel(fG),t.registerComponentView(gG),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!he(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=E$(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},mG)}function SG(t){Wi(j$),Wi(FT)}function EG(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function LT(t,e){var r;return N(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function AG(t,e,r){var n=oe({},r),i=t[e],a=r.$action||"merge";if(a==="merge")if(i){if(process.env.NODE_ENV!=="production"){var o=r.type;Ee(!o||i.type===o,'Please set $action: "replace" to change `type`')}Qe(i,n,!0),qa(i,n,{ignoreSize:!0}),vS(r,i),Fh(r,i),Fh(r,i,"shape"),Fh(r,i,"style"),Fh(r,i,"extra"),r.clipPath=i.clipPath}else t[e]=n;else a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var IT=["transition","enterFrom","leaveTo"],TG=IT.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Fh(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?IT:TG,i=0;i<n.length;i++){var a=n[i];t[a]==null&&e[a]!=null&&(t[a]=e[a])}}function OG(t,e){if(t&&(t.hv=e.hv=[LT(e,["left","right"]),LT(e,["top","bottom"])],t.type==="group")){var r=t,n=e;r.width==null&&(r.width=n.width=0),r.height==null&&(r.height=n.height=0)}}var PG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventAutoZ=!0,r}return e.prototype.mergeOption=function(r,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,r,n),this.option.elements=i},e.prototype.optionUpdated=function(r,n){var i=this.option,a=(n?i:r).elements,o=i.elements=n?[]:i.elements,s=[];this._flatten(a,s,null);var u=gD(o,s,"normalMerge"),l=this._elOptionsToUpdate=[];N(u,function(f,c){var h=f.newOption;process.env.NODE_ENV!=="production"&&Ee(we(h)||f.existing,"Empty graphic option definition"),h&&(l.push(h),EG(f,h),AG(o,c,h),OG(o[c],h))},this),i.elements=bt(o,function(f){return f&&delete f.$action,f!=null})},e.prototype._flatten=function(r,n,i){N(r,function(a){if(a){i&&(a.parentOption=i),n.push(a);var o=a.children;o&&o.length&&this._flatten(o,n,a),delete a.children}},this)},e.prototype.useElOptionsToUpdate=function(){var r=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,r},e.type="graphic",e.defaultOption={elements:[]},e}(Ze),RT={path:null,compoundPath:null,group:It,image:fi,text:Ot},en=lt(),BG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this._elMap=Ae()},e.prototype.render=function(r,n,i){r!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=r,this._updateElements(r),this._relocate(r,i)},e.prototype._updateElements=function(r){var n=r.useElOptionsToUpdate();if(n){var i=this._elMap,a=this.group,o=r.get("z"),s=r.get("zlevel");N(n,function(u){var l=pr(u.id,null),f=l!=null?i.get(l):null,c=pr(u.parentId,null),h=c!=null?i.get(c):a,d=u.type,p=u.style;d==="text"&&p&&u.hv&&u.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var g=u.textContent,v=u.textConfig;if(p&&V$(p,d,!!v,!!g)){var m=H$(p,d);!v&&m.textConfig&&(v=u.textConfig=m.textConfig),!g&&m.textContent&&(g=m.textContent)}var y=MG(u);process.env.NODE_ENV!=="production"&&f&&Ee(h===f.parent,"Changing parent is not supported.");var b=u.$action||"merge",w=b==="merge",C=b==="replace";if(w){var _=!f,D=f;_?D=NT(l,h,u.type,i):(D&&(en(D).isNew=!1),eG(D)),D&&(M0(D,y,r,{isInit:_}),kT(D,u,o,s))}else if(C){Lh(f,u,i,r);var x=NT(l,h,u.type,i);x&&(M0(x,y,r,{isInit:!0}),kT(x,u,o,s))}else b==="remove"&&(dT(f,u),Lh(f,u,i,r));var S=i.get(l);if(S&&g)if(w){var O=S.getTextContent();O?O.attr(g):S.setTextContent(new Ot(g))}else C&&S.setTextContent(new Ot(g));if(S){var E=u.clipPath;if(E){var P=E.type,F=void 0,_=!1;if(w){var B=S.getClipPath();_=!B||en(B).type!==P,F=_?N0(P):B}else C&&(_=!0,F=N0(P));S.setClipPath(F),M0(F,E,r,{isInit:_}),F0(F,E.keyframeAnimation,r)}var M=en(S);S.setTextConfig(v),M.option=u,FG(S,r,u),Oc({el:S,componentModel:r,itemName:S.name,itemTooltipOption:u.tooltip}),F0(S,u.keyframeAnimation,r)}})}},e.prototype._relocate=function(r,n){for(var i=r.option.elements,a=this.group,o=this._elMap,s=n.getWidth(),u=n.getHeight(),l=["x","y"],f=0;f<i.length;f++){var c=i[f],h=pr(c.id,null),d=h!=null?o.get(h):null;if(!(!d||!d.isGroup)){var p=d.parent,g=p===a,v=en(d),m=en(p);v.width=ut(v.option.width,g?s:m.width)||0,v.height=ut(v.option.height,g?u:m.height)||0}}for(var f=i.length-1;f>=0;f--){var c=i[f],h=pr(c.id,null),d=h!=null?o.get(h):null;if(d){var p=d.parent,m=en(p),y=p===a?{width:s,height:u}:{width:m.width,height:m.height},b={},w=$7(d,c,y,null,{hv:c.hv,boundingMode:c.bounding},b);if(!en(d).isNew&&w){for(var C=c.transition,_={},D=0;D<l.length;D++){var x=l[D],S=b[x];C&&(no(C)||Ge(C,x)>=0)?_[x]=S:d[x]=S}Ft(d,_,r,0)}else d.attr(b)}}},e.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){Lh(i,en(i).option,n,r._lastGraphicModel)}),this._elMap=Ae()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Br);function N0(t){process.env.NODE_ENV!=="production"&&Ee(t,"graphic type MUST be set");var e=xe(RT,t)?RT[t]:Mx(t);process.env.NODE_ENV!=="production"&&Ee(e,"graphic type "+t+" can not be found");var r=new e({});return en(r).type=t,r}function NT(t,e,r,n){var i=N0(r);return e.add(i),n.set(t,i),en(i).id=t,en(i).isNew=!0,i}function Lh(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){Lh(a,e,r,n)}),W$(t,e,n),r.removeKey(en(t).id))}function kT(t,e,r,n){t.isGroup||N([["cursor",Fi.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];xe(e,a)?t[a]=Be(e[a],i[1]):t[a]==null&&(t[a]=i[1])}),N(Ke(e),function(i){if(i.indexOf("on")===0){var a=e[i];t[i]=De(a)?a:null}}),xe(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function MG(t){return t=oe({},t),N(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(dS),function(e){delete t[e]}),t}function FG(t,e,r){var n=He(t).eventData;!t.silent&&!t.ignore&&!n&&(n=He(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=r.info)}function LG(t){t.registerComponentModel(PG),t.registerComponentView(BG),t.registerPreprocessor(function(e){var r=e.graphic;he(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}function IG(t,e){var r=Vc(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new St({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}),t}var RG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Ze);function zT(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function jT(t){if(Pe.domSupported){for(var e=document.documentElement.style,r=0,n=t.length;r<n;r++)if(t[r]in e)return t[r]}}var VT=jT(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),NG=jT(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function HT(t,e){if(!t)return e;e=lS(e,!0);var r=t.indexOf(e);return t=r===-1?e:"-"+t.slice(0,r)+"-"+e,t.toLowerCase()}function kG(t,e){var r=t.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t);return r?r[e]:null}var zG=HT(NG,"transition"),k0=HT(VT,"transform"),jG="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Pe.transform3dSupported?"will-change:transform;":"");function VG(t){return t=t==="left"?"right":t==="right"?"left":t==="top"?"bottom":"top",t}function HG(t,e,r){if(!be(r)||r==="inside")return"";var n=t.get("backgroundColor"),i=t.get("borderWidth");e=Ga(e);var a=VG(r),o=Math.max(Math.round(i)*1.5,6),s="",u=k0+":",l;Ge(["left","right"],a)>-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,c=o+i,h=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),d=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-c)/2)*100)/100;s+=";"+a+":-"+d+"px";var p=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+u+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'<div style="'+g.join("")+'"></div>'}function WG(t,e){var r="cubic-bezier(0.23,1,0.32,1)",n=" "+t/2+"s "+r,i="opacity"+n+",visibility"+n;return e||(n=" "+t+"s "+r,i+=Pe.transformSupported?","+k0+n:",left"+n+",top"+n),zG+":"+i}function WT(t,e,r){var n=t.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Pe.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Pe.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+k0+":"+o+";":[["top",0],["left",0],[VT,o]]}function $G(t){var e=[],r=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont()),r&&e.push("line-height:"+Math.round(r*3/2)+"px");var i=t.get("textShadowColor"),a=t.get("textShadowBlur")||0,o=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return i&&a&&e.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),N(["decoration","align"],function(u){var l=t.get(u);l&&e.push("text-"+u+":"+l)}),e.join(";")}function GG(t,e,r){var n=[],i=t.get("transitionDuration"),a=t.get("backgroundColor"),o=t.get("shadowBlur"),s=t.get("shadowColor"),u=t.get("shadowOffsetX"),l=t.get("shadowOffsetY"),f=t.getModel("textStyle"),c=hE(t,"html"),h=u+"px "+l+"px "+o+"px "+s;return n.push("box-shadow:"+h),e&&i&&n.push(WG(i,r)),a&&n.push("background-color:"+a),N(["width","color","radius"],function(d){var p="border-"+d,g=lS(p),v=t.get(g);v!=null&&n.push(p+":"+v+(d==="color"?"":"px"))}),n.push($G(f)),c!=null&&n.push("padding:"+Vc(c).join("px ")+"px"),n.join(";")+";"}function $T(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&WN(t,o,r,n,i)}else{t[0]=n,t[1]=i;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var UG=function(){function t(e,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Pe.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=r.appendTo,o=a&&(be(a)?document.querySelector(a):Mo(a)?a:De(a)&&a(e.getDom()));$T(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,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();Vr(f,u,!0),l.dispatch("mousemove",u)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){if(!this._container){var r=this._api.getDom(),n=kG(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=jG+GG(e,!this._firstShow,this._longHide)+WT(a[0],a[1],!0)+("border-color:"+Ga(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(be(a)&&n.get("trigger")==="item"&&!zT(n)&&(s=HG(n,i,a)),be(e))o.innerHTML=e+s;else if(e){o.innerHTML="",he(e)||(e=[e]);for(var u=0;u<e.length;u++)Mo(e[u])&&e[u].parentNode!==o&&o.appendChild(e[u]);if(s&&o.childNodes.length){var l=document.createElement("div");l.innerHTML=s,o.appendChild(l)}}},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},t.prototype.moveTo=function(e,r){var n=this._styleCoord;if($T(n,this._zr,this._container,e,r),n[0]!=null&&n[1]!=null){var i=this.el.style,a=WT(n[0],n[1]);N(a,function(o){i[o[0]]=o[1]})}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){var e=this,r=this.el.style;r.visibility="hidden",r.opacity="0",Pe.transform3dSupported&&(r.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(dt(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},t}(),qG=function(){function t(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),UT(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return t.prototype.update=function(e){var r=e.get("alwaysShowContent");r&&this._moveIfResized(),this._alwaysShowContent=r},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(e,r,n,i,a){var o=this;we(e)&&qe(process.env.NODE_ENV!=="production"?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new Ot({style:{rich:r.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:hE(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),N(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(l){o.el.style[l]=n.get(l)}),N(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(l){o.el.style[l]=s.get(l)||0}),this._zr.add(this.el);var u=this;this.el.on("mouseover",function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0}),this.el.on("mouseout",function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1})},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el,r=this.el.getBoundingRect(),n=GT(e.style);return[r.width+n.left+n.right,r.height+n.top+n.bottom]},t.prototype.moveTo=function(e,r){var n=this.el;if(n){var i=this._styleCoord;UT(i,this._zr,e,r),e=i[0],r=i[1];var a=n.style,o=Xi(a.borderWidth||0),s=GT(a);n.x=e+o+s.left,n.y=r+o+s.top,n.markRedraw()}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(dt(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();function Xi(t){return Math.max(0,t)}function GT(t){var e=Xi(t.shadowBlur||0),r=Xi(t.shadowOffsetX||0),n=Xi(t.shadowOffsetY||0);return{left:Xi(e-r),right:Xi(e+r),top:Xi(e-n),bottom:Xi(e+n)}}function UT(t,e,r,n){t[0]=r,t[1]=n,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var YG=new St({shape:{x:-1,y:-1,width:2,height:2}}),XG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){if(!(Pe.node||!n.getDom())){var i=r.getComponent("tooltip"),a=this._renderMode=d6(i.get("renderMode"));this._tooltipContent=a==="richText"?new qG(n):new UG(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},e.prototype.render=function(r,n,i){if(!(Pe.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=r,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(r),a.setEnterable(r.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&r.get("transitionDuration")?CE(this,"_updatePosition",50,"fixRate"):Sm(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var r=this._tooltipModel,n=r.get("triggerOn");AT("itemTooltip",this._api,dt(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.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(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Pe.node||!i.getDom())){var o=qT(a,i);this._ticket="";var s=a.dataByCoordSys,u=QG(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=YG;f.x=a.x,f.y=a.y,f.update(),He(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(r,n,i,a))return;var c=OT(a,n),h=c.point[0],d=c.point[1];h!=null&&d!=null&&this._tryShow({offsetX:h,offsetY:d,target:c.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))}},e.prototype.manuallyHideTip=function(r,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(qT(a,i))},e.prototype._manuallyAxisShowTip=function(r,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(),c=ll([f.getItemModel(s),l,(l.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=He(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var u,l;Xu(i,function(f){if(He(f).dataIndex!=null)return u=f,!0;if(He(f).tooltipConfig!=null)return l=f,!0},!0),u?this._showSeriesItemTooltip(r,u,n):l?this._showComponentItemTooltip(r,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=dt(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=ll([n.tooltipOption],a),u=this._renderMode,l=[],f=Uu("section",{blocks:[],noHeader:!0}),c=[],h=new wm;N(r,function(y){N(y.dataByAxis,function(b){var w=i.getComponent(b.axisDim+"Axis",b.axisIndex),C=b.value;if(!(!w||C==null)){var _=DT(C,w.axis,i,b.seriesDataIndices,b.valueLabelOpt),D=Uu("section",{header:_,noHeader:!Sn(_),sortBlocks:!0,blocks:[]});f.blocks.push(D),N(b.seriesDataIndices,function(x){var S=i.getSeriesByIndex(x.seriesIndex),O=x.dataIndexInside,E=S.getDataParams(O);if(!(E.dataIndex<0)){E.axisDim=b.axisDim,E.axisIndex=b.axisIndex,E.axisType=b.axisType,E.axisId=b.axisId,E.axisValue=a0(w.axis,{value:C}),E.axisValueLabel=_,E.marker=h.makeTooltipMarker("item",Ga(E.color),u);var P=qS(S.formatTooltip(O,!0,null)),F=P.frag;if(F){var B=ll([S],a).get("valueFormatter");D.blocks.push(B?oe({valueFormatter:B},F):F)}P.text&&c.push(P.text),l.push(E)}})}})}),f.blocks.reverse(),c.reverse();var d=n.position,p=s.get("order"),g=fE(f,h,u,p,i.get("useUTC"),s.get("textStyle"));g&&c.unshift(g);var v=u==="richText"?`
166
+ `];function Uu(t,e){return e.type=t,e}function b0(t){return t.type==="section"}function uE(t){return b0(t)?Zz:Jz}function lE(t){if(b0(t)){var e=0,r=t.blocks.length,n=r>1||r>0&&!t.noHeader;return N(t.blocks,function(i){var a=lE(i);a>=e&&(e=a+ +(n&&(!a||b0(i)&&!i.noHeader)))}),e}return 0}function Zz(t,e,r,n){var i=e.noHeader,a=Qz(lE(e)),o=[],s=e.blocks||[];Ee(!s||he(s)),s=s||[];var u=t.orderMode;if(e.sortBlocks&&u){s=s.slice();var l={valueAsc:"asc",valueDesc:"desc"};if(xe(l,u)){var f=new ZS(l[u],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else u==="seriesDesc"&&s.reverse()}N(s,function(p,g){var v=e.valueFormatter,m=uE(p)(v?oe(oe({},t),{valueFormatter:v}):t,p,g>0?a.html:0,n);m!=null&&o.push(m)});var c=t.renderMode==="richText"?o.join(a.richText):C0(o.join(""),i?r:a.html);if(i)return c;var h=e0(e.header,"ordinal",t.useUTC),d=sE(n,t.renderMode).nameStyle;return t.renderMode==="richText"?cE(t,h,d)+a.richText+c:C0('<div style="'+d+";"+oE+';">'+Tr(h)+"</div>"+c,r)}function Jz(t,e,r,n){var i=t.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,u=e.name,l=t.useUTC,f=e.valueFormatter||t.valueFormatter||function(w){return w=he(w)?w:[w],ye(w,function(C,_){return e0(C,he(d)?d[_]:d,l)})};if(!(a&&o)){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",i),h=a?"":e0(u,"ordinal",l),d=e.valueType,p=o?[]:f(e.value,e.dataIndex),g=!s||!a,v=!s&&a,m=sE(n,i),y=m.nameStyle,b=m.valueStyle;return i==="richText"?(s?"":c)+(a?"":cE(t,h,y))+(o?"":rj(t,p,g,v,b)):C0((s?"":c)+(a?"":ej(h,!s,y))+(o?"":tj(p,g,v,b)),r)}}function fE(t,e,r,n,i,a){if(t){var o=uE(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function Qz(t){return{html:Xz[t],richText:Kz[t]}}function C0(t,e){var r='<div style="clear:both"></div>',n="margin: "+e+"px 0 0";return'<div style="'+n+";"+oE+';">'+t+r+"</div>"}function ej(t,e,r){var n=e?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+Tr(t)+"</span>"}function tj(t,e,r,n){var i=r?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return t=he(t)?t:[t],'<span style="'+a+";"+n+'">'+ye(t,function(o){return Tr(o)}).join("&nbsp;&nbsp;")+"</span>"}function cE(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function rj(t,e,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(he(e)?e.join(" "):e,a)}function nj(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return Ga(n)}function hE(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var w0=function(){function t(){this.richTextStyles={},this._nextStyleNameId=lD()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,n){var i=n==="richText"?this._generateStyleName():null,a=W7({color:r,type:e,renderMode:n,markerId:i});return be(a)?a:(process.env.NODE_ENV!=="production"&&Ee(i),this.richTextStyles[i]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(e,r){var n={};he(r)?N(r,function(a){return oe(n,a)}):oe(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},t}();function ij(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),u=he(s),l=nj(e,r),f,c,h,d;if(o>1||u&&!o){var p=aj(s,e,r,a,l);f=p.inlineValues,c=p.inlineValueTypes,h=p.blocks,d=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=f=ls(i,r,a[0]),c=g.type}else d=f=u?s[0]:s;var v=ng(e),m=v&&e.name||"",y=i.getName(r),b=n?m:y;return Uu("section",{header:m,noHeader:n||!v,sortParam:d,blocks:[Uu("nameValue",{markerType:"item",markerColor:l,name:b,noName:!Sn(b),value:f,valueType:c,dataIndex:r})].concat(h||[])})}function aj(t,e,r,n,i){var a=e.getData(),o=ri(t,function(c,h,d){var p=a.getDimensionInfo(d);return c=c||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],u=[],l=[];n.length?N(n,function(c){f(ls(a,r,c),c)}):N(t,f);function f(c,h){var d=a.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(o?l.push(Uu("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:c,valueType:d.type})):(s.push(c),u.push(d.type)))}return{inlineValues:s,inlineValueTypes:u,blocks:l}}var ji=lt();function Kc(t,e){return t.getName(e)||t.getId(e)}var Zc="__universalTransitionEnabled",fn=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Wu({count:sj,reset:uj}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=ji(this).sourceManager=new nE(this);a.prepareSource();var o=this.getInitialData(r,i);vE(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&Ee(o,"getInitialData returned invalid data."),ji(this).dataBeforeProcessed=o,dE(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=ku(this),a=i?$c(r):{},o=this.subType;Ze.hasClass(o)&&(o+="Series"),Qe(r,n.getTheme().get(this.subType)),Qe(r,this.getDefaultOption()),rg(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&qa(r,a,i)},e.prototype.mergeOption=function(r,n){r=Qe(this.option,r,!0),this.fillDataTextStyle(r.data);var i=ku(this);i&&qa(this.option,r,i);var a=ji(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);vE(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,ji(this).dataBeforeProcessed=o,dE(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!rr(r))for(var n=["show"],i=0;i<r.length;i++)r[i]&&r[i].label&&rg(r[i],"label",n)},e.prototype.getInitialData=function(r,n){},e.prototype.appendData=function(r){var n=this.getRawData();n.appendData(r.data)},e.prototype.getData=function(r){var n=_0(this);if(n){var i=n.context.data;return r==null||!i.getLinkedData?i:i.getLinkedData(r)}else return ji(this).data},e.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},e.prototype.setData=function(r){var n=_0(this);if(n){var i=n.context;i.outputData=r,n!==this.dataTask&&(i.data=r)}ji(this).data=r},e.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return Ae(r)},e.prototype.getSourceManager=function(){return ji(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return ji(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},e.prototype.formatTooltip=function(r,n,i){return ij({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Pe.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=a0.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,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<r.length;s++){var u=r[s],l=Kc(o,u);i[l]=!1,this._selectedDataIndicesMap[l]=-1}}},e.prototype.toggleSelect=function(r,n){for(var i=[],a=0;a<r.length;a++)i[0]=r[a],this.isSelected(r[a],n)?this.unselect(i,n):this.select(i,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=Ke(r),i=[],a=0;a<n.length;a++){var o=r[n[a]];o>=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Kc(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Zc])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,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"){we(o.selectedMap)||(o.selectedMap={});for(var l=o.selectedMap,f=0;f<u;f++){var c=n[f],h=Kc(r,c);l[h]=!0,this._selectedDataIndicesMap[h]=r.getRawIndex(c)}}else if(s==="single"||s===!0){var d=n[u-1],h=Kc(r,d);o.selectedMap=(i={},i[h]=!0,i),this._selectedDataIndicesMap=(a={},a[h]=r.getRawIndex(d),a)}}},e.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(i){var a=r.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(r,n)}},e.registerClass=function(r){return Ze.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Ze);xn(fn,Bz),xn(fn,a0),DD(fn,Ze);function dE(t){var e=t.name;ng(t)||(t.name=oj(t)||e)}function oj(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return N(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function sj(t){return t.model.getRawData().count()}function uj(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),lj}function lj(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function vE(t,e){N(FN(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,Dt(fj,e))})}function fj(t,e){var r=_0(t);return r&&r.setOutputEnd((e||this).count()),e}function _0(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}var Br=function(){function t(){this.group=new It,this.uid=Mc("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();og(Br),ec(Br);function D0(){var t=lt();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var pE=lt(),cj=D0(),Zr=function(){function t(){this.group=new It,this.uid=Mc("viewChart"),this.renderTask=Wu({plan:hj,reset:dj}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Gt("Unknown dataType "+i.dataType);return}mE(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Gt("Unknown dataType "+i.dataType);return}mE(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){Pc(this.group,e)},t.markUpdateMethod=function(e,r){pE(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function gE(t,e,r){t&&Jo(t)&&(e==="emphasis"?dc:vc)(t,r)}function mE(t,e,r){var n=Pa(t,e),i=e&&e.highlightKey!=null?P9(e.highlightKey):null;n!=null?N(gt(n),function(a){gE(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){gE(a,r,i)})}og(Zr,["dispose"]),ec(Zr);function hj(t){return cj(t.model)}function dj(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&pE(i).updateMethod,u=a?"incrementalPrepareRender":s&&o[s]?s:"render";return u!=="render"&&o[u](e,r,n,i),vj[u]}var vj={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Jc="\0__throttleOriginMethod",yE="\0__throttleRate",bE="\0__throttleType";function x0(t,e,r){var n,i=0,a=0,o=null,s,u,l,f;e=e||0;function c(){a=new Date().getTime(),o=null,t.apply(u,l||[])}var h=function(){for(var d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];n=new Date().getTime(),u=this,l=d;var g=f||e,v=f||r;f=null,s=n-(v?i:a)-g,clearTimeout(o),v?o=setTimeout(c,g):s>=0?c():o=setTimeout(c,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(d){f=d},h}function CE(t,e,r,n){var i=t[e];if(i){var a=i[Jc]||i,o=i[bE],s=i[yE];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=x0(a,r,n==="debounce"),i[Jc]=a,i[bE]=n,i[yE]=r}return i}}function S0(t,e){var r=t[e];r&&r[Jc]&&(r.clear&&r.clear(),t[e]=r[Jc])}var wE=lt(),_E={itemStyle:wu(qx,!0),lineStyle:wu(Ux,!0)},pj={lineStyle:"stroke",itemStyle:"fill"};function DE(t,e){var r=t.visualStyleMapper||_E[e];return r||(console.warn("Unknown style type '"+e+"'."),_E.itemStyle)}function xE(t,e){var r=t.visualDrawType||pj[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var gj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=DE(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var u=xE(t,n),l=o[u],f=De(l)?l:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[u]||f||c){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[u]||(o[u]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||De(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||De(o.stroke)?h:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",u),!e.isSeriesFiltered(t)&&f)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var g=t.getDataParams(p),v=oe({},o);v[u]=f(g),d.setItemVisual(p,"style",v)}}}},qu=new Ct,mj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=DE(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var u=o.getRawDataItem(s);if(u&&u[n]){qu.option=u[n];var l=i(qu),f=o.ensureUniqueItemVisual(s,"style");oe(f,l),qu.option.decal&&(o.setItemVisual(s,"decal",qu.option.decal),qu.option.decal.dirty=!0),a in l&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},yj={performRawSeries:!0,overallReset:function(t){var e=Ae();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),wE(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=wE(r).scope,s=r.visualStyleAccessPath||"itemStyle",u=xE(r,s);a.each(function(l){var f=a.getRawIndex(l);i[f]=l}),n.each(function(l){var f=i[l],c=a.getItemVisual(f,"colorFromPalette");if(c){var h=a.ensureUniqueItemVisual(f,"style"),d=n.getName(l)||l+"",p=n.count();h[u]=r.getColorFromPalette(d,o,p)}})}})}},Qc=Math.PI;function bj(t,e){e=e||{},je(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new It,n=new St({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new Ot({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new St({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new wc({shape:{startAngle:-Qc/2,endAngle:-Qc/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Qc*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Qc*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,u=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-u*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:u),f=t.getHeight()/2;e.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:t.getWidth(),height:t.getHeight()})},r.resize(),r}var SE=function(){function t(e,r,n,i){this._stageTaskMap=Ae(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__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}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),u=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:u,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=Ae();e.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}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;N(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";process.env.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),Ee(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;N(e,function(u,l){if(!(i.visualType&&i.visualType!==u.visualType)){var f=o._stageTaskMap.get(u.uid),c=f.seriesTaskMap,h=f.overallTask;if(h){var d,p=h.agentStubMap;p.each(function(v){s(i,v)&&(v.dirty(),d=!0)}),d&&h.dirty(),o.updatePayload(h,n);var g=o.getPerformArgs(h,i.block);p.each(function(v){v.perform(g)}),h.perform(g)&&(a=!0)}else c&&c.each(function(v,m){s(i,v)&&v.dirty();var y=o.getPerformArgs(v,i.block);y.skip=!u.performRawSeries&&r.isSeriesFiltered(v.context.model),o.updatePayload(v,n),v.perform(y)&&(a=!0)})}});function s(u,l){return u.setDirty&&(!u.dirtyMap||u.dirtyMap.get(l.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=Ae(),u=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(f):u?n.eachRawSeriesByType(u,f):l&&l(n,i).each(f);function f(c){var h=c.uid,d=s.set(h,o&&o.get(h)||Wu({plan:xj,reset:Sj,count:Aj}));d.context={model:c,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(c,d)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||Wu({reset:Cj});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,u=o.agentStubMap=Ae(),l=e.seriesType,f=e.getTargetSeries,c=!0,h=!1,d="";process.env.NODE_ENV!=="production"&&(d='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),Ee(!e.createOnAllSeries,d),l?n.eachRawSeriesByType(l,p):f?f(n,i).each(p):(c=!1,N(n.getSeries(),p));function p(g){var v=g.uid,m=u.set(v,s&&s.get(v)||(h=!0,Wu({reset:wj,onDirty:Dj})));m.context={model:g,overallProgress:c},m.agent=o,m.__block=c,a._pipe(g,m)}h&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return De(e)&&(e={overallReset:e,seriesType:Tj(e)}),e.uid=Mc("stageHandler"),r&&(e.visualType=r),e},t}();function Cj(t){t.overallReset(t.ecModel,t.api,t.payload)}function wj(t){return t.overallProgress&&_j}function _j(){this.agent.dirty(),this.getDownstream().dirty()}function Dj(){this.agent&&this.agent.dirty()}function xj(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Sj(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=gt(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?ye(e,function(r,n){return EE(n)}):Ej}var Ej=EE(0);function EE(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a<e.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(e,n)}}function Aj(t){return t.data.count()}function Tj(t){eh=null;try{t(Yu,AE)}catch{}return eh}var Yu={},AE={},eh;TE(Yu,s0),TE(AE,ES),Yu.eachSeriesByType=Yu.eachRawSeriesByType=function(t){eh=t},Yu.eachComponent=function(t){t.mainType==="series"&&t.subType&&(eh=t.subType)};function TE(t,e){for(var r in e.prototype)t[r]=dr}var OE=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const Oj={color:OE,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],OE]};var ar="#B9B8CE",PE="#100C2A",th=function(){return{axisLine:{lineStyle:{color:ar}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},BE=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],ME={darkMode:!0,color:BE,backgroundColor:PE,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:ar}},textStyle:{color:ar},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:ar}},dataZoom:{borderColor:"#71708A",textStyle:{color:ar},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:ar}},timeline:{lineStyle:{color:ar},label:{color:ar},controlStyle:{color:ar,borderColor:ar}},calendar:{itemStyle:{color:PE},dayLabel:{color:ar},monthLabel:{color:ar},yearLabel:{color:ar}},timeAxis:th(),logAxis:th(),valueAxis:th(),categoryAxis:th(),line:{symbol:"circle"},graph:{color:BE},gauge:{title:{color:ar},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:ar},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};ME.categoryAxis.splitLine.show=!1;var Pj=function(){function t(){}return t.prototype.normalizeQuery=function(e){var r={},n={},i={};if(be(e)){var a=Pn(e);r.mainType=a.main||null,r.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};N(e,function(u,l){for(var f=!1,c=0;c<o.length;c++){var h=o[c],d=l.lastIndexOf(h);if(d>0&&d===l.length-h.length){var p=l.slice(0,d);p!=="data"&&(r.mainType=p,r[h.toLowerCase()]=u,f=!0)}}s.hasOwnProperty(l)&&(n[l]=u,f=!0),f||(i[l]=u)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){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=r.cptQuery,l=r.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(e,r.otherQuery,i,a));function f(c,h,d,p){return c[d]==null||h[p||d]===c[d]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),E0=["symbol","symbolSize","symbolRotate","symbolOffset"],FE=E0.concat(["symbolKeepAspect"]),Bj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<E0.length;o++){var s=E0[o],u=t.get(s);De(u)?(a=!0,i[s]=u):n[s]=u}if(n.symbol=n.symbol||t.defaultSymbol,r.setVisual(oe({legendIcon:t.legendIcon||n.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},n)),e.isSeriesFiltered(t))return;var l=Ke(i);function f(c,h){for(var d=t.getRawValue(h),p=t.getDataParams(h),g=0;g<l.length;g++){var v=l[g];c.setItemVisual(h,v,i[v](d,p))}}return{dataEach:a?f:null}}},Mj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.hasSymbolVisual||e.isSeriesFiltered(t))return;var r=t.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<FE.length;s++){var u=FE[s],l=o.getShallow(u,!0);l!=null&&i.setItemVisual(a,u,l)}}return{dataEach:r.hasItemOption?n:null}}};function Fj(t,e,r){switch(r){case"color":var n=t.getItemVisual(e,"style");return n[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,r);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+r)}}function Lj(t,e){switch(e){case"color":var r=t.getVisual("style");return r[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+e)}}function Ij(t,e){function r(n,i){var a=[];return n.eachComponent({mainType:"series",subType:t,query:i},function(o){a.push(o.seriesIndex)}),a}N([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],function(n){e(n[0],function(i,a,o){i=oe({},i),process.env.NODE_ENV!=="production"&&Mt(i.type,n[1]),o.dispatchAction(oe(i,{type:n[1],seriesIndex:r(a,i)}))})})}function cs(t,e,r,n,i){var a=t+e;r.isSilent(a)||(process.env.NODE_ENV!=="production"&&On("event "+a+" is deprecated."),n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,u=o.option.selectedMap,l=i.selected,f=0;f<l.length;f++)if(l[f].seriesIndex===s){var c=o.getData(),h=Pa(c,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:he(h)?c.getName(h[0]):c.getName(h),selected:be(u)?u:oe({},u)})}}))}function Rj(t,e,r){t.on("selectchanged",function(n){var i=r.getModel();n.isFromClick?(cs("map","selectchanged",e,i,n),cs("pie","selectchanged",e,i,n)):n.fromAction==="select"?(cs("map","selected",e,i,n),cs("pie","selected",e,i,n)):n.fromAction==="unselect"&&(cs("map","unselected",e,i,n),cs("pie","unselected",e,i,n))})}function Xu(t,e,r){for(var n;t&&!(e(t)&&(n=t,r));)t=t.__hostTarget||t.parent;return n}var Nj=Math.round(Math.random()*9),kj=typeof Object.defineProperty=="function",zj=function(){function t(){this._id="__ec_inner_"+Nj++}return t.prototype.get=function(e){return this._guard(e)[this._id]},t.prototype.set=function(e,r){var n=this._guard(e);return kj?Object.defineProperty(n,this._id,{value:r,enumerable:!1,configurable:!0}):n[this._id]=r,this},t.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},t.prototype.has=function(e){return!!this._guard(e)[this._id]},t.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},t}(),jj=Ve.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n+a),t.lineTo(r-i,n+a),t.closePath()}}),Vj=Ve.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n),t.lineTo(r,n+a),t.lineTo(r-i,n),t.closePath()}}),Hj=Ve.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.x,n=e.y,i=e.width/5*3,a=Math.max(i,e.height),o=i/2,s=o*o/(a-o),u=n-a+o+s,l=Math.asin(s/o),f=Math.cos(l)*o,c=Math.sin(l),h=Math.cos(l),d=o*.6,p=o*.7;t.moveTo(r-f,u+s),t.arc(r,u,o,Math.PI-l,Math.PI*2+l),t.bezierCurveTo(r+f-c*d,u+s+h*d,r,n-p,r,n),t.bezierCurveTo(r,n-p,r-f+c*d,u+s+h*d,r-f,u+s),t.closePath()}}),Wj=Ve.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.height,n=e.width,i=e.x,a=e.y,o=n/3*2;t.moveTo(i,a),t.lineTo(i+o,a+r),t.lineTo(i,a+r/4*3),t.lineTo(i-o,a+r),t.lineTo(i,a),t.closePath()}}),$j={line:Ni,rect:St,roundRect:St,square:St,circle:yc,diamond:Vj,pin:Hj,arrow:Wj,triangle:jj},Gj={line:function(t,e,r,n,i){i.x1=t,i.y1=e+n/2,i.x2=t+r,i.y2=e+n/2},rect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n},roundRect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n,i.r=Math.min(r,n)/4},square:function(t,e,r,n,i){var a=Math.min(r,n);i.x=t,i.y=e,i.width=a,i.height=a},circle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.r=Math.min(r,n)/2},diamond:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n},pin:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},arrow:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},triangle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n}},A0={};N($j,function(t,e){A0[e]=new t});var Uj=Ve.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,r){var n=Xf(t,e,r),i=this.shape;return i&&i.symbolType==="pin"&&e.position==="inside"&&(n.y=r.y+r.height*.4),n},buildPath:function(t,e,r){var n=e.symbolType;if(n!=="none"){var i=A0[n];i||(n="rect",i=A0[n]),Gj[n](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,r)}}});function qj(t,e){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=t,r.fill=e||"#fff",r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=t:r.fill=t,this.markRedraw()}}function hs(t,e,r,n,i,a,o){var s=t.indexOf("empty")===0;s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var u;return t.indexOf("image://")===0?u=Fx(t.slice(8),new Ue(e,r,n,i),o?"center":"cover"):t.indexOf("path://")===0?u=Vg(t.slice(7),{},new Ue(e,r,n,i),o?"center":"cover"):u=new Uj({shape:{symbolType:t,x:e,y:r,width:n,height:i}}),u.__isEmptyBrush=s,u.setColor=qj,a&&u.setColor(a),u}function Yj(t){return he(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function LE(t,e){if(t!=null)return he(t)||(t=[t,t]),[ut(t[0],e[0])||0,ut(Be(t[1],t[0]),e[1])||0]}function Za(t){return isFinite(t)}function Xj(t,e,r){var n=e.x==null?0:e.x,i=e.x2==null?1:e.x2,a=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*r.width+r.x,i=i*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),n=Za(n)?n:0,i=Za(i)?i:1,a=Za(a)?a:0,o=Za(o)?o:0;var s=t.createLinearGradient(n,a,i,o);return s}function Kj(t,e,r){var n=r.width,i=r.height,a=Math.min(n,i),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,u=e.r==null?.5:e.r;e.global||(o=o*n+r.x,s=s*i+r.y,u=u*a),o=Za(o)?o:.5,s=Za(s)?s:.5,u=u>=0&&Za(u)?u:.5;var l=t.createRadialGradient(o,s,0,o,s,u);return l}function T0(t,e,r){for(var n=e.type==="radial"?Kj(t,e,r):Xj(t,e,r),i=e.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function Zj(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!0;return!1}function rh(t){return parseInt(t,10)}function nh(t,e,r){var n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var s=document.defaultView.getComputedStyle(t);return(t[i]||rh(s[n])||rh(t.style[n]))-(rh(s[a])||0)-(rh(s[o])||0)|0}function Jj(t,e){return!t||t==="solid"||!(e>0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:nt(t)?[t]:he(t)?t:null}function IE(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&Jj(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=ye(r,function(a){return a/i}),n/=i)}return[r,n]}var Qj=new ui(!0);function ih(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function RE(t){return typeof t=="string"&&t!=="none"}function ah(t){var e=t.fill;return e!=null&&e!=="none"}function NE(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function kE(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function O0(t,e,r){var n=xD(e.image,e.__image,r);if(tc(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*LN),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function eV(t,e,r,n){var i,a=ih(r),o=ah(r),s=r.strokePercent,u=s<1,l=!e.path;(!e.silent||u)&&l&&e.createPathProxy();var f=e.path||Qj,c=e.__dirty;if(!n){var h=r.fill,d=r.stroke,p=o&&!!h.colorStops,g=a&&!!d.colorStops,v=o&&!!h.image,m=a&&!!d.image,y=void 0,b=void 0,w=void 0,C=void 0,_=void 0;(p||g)&&(_=e.getBoundingRect()),p&&(y=c?T0(t,h,_):e.__canvasFillGradient,e.__canvasFillGradient=y),g&&(b=c?T0(t,d,_):e.__canvasStrokeGradient,e.__canvasStrokeGradient=b),v&&(w=c||!e.__canvasFillPattern?O0(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=w),m&&(C=c||!e.__canvasStrokePattern?O0(t,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=w),p?t.fillStyle=y:v&&(w?t.fillStyle=w:o=!1),g?t.strokeStyle=b:m&&(C?t.strokeStyle=C:a=!1)}var D=e.getGlobalScale();f.setScale(D[0],D[1],e.segmentIgnoreThreshold);var x,S;t.setLineDash&&r.lineDash&&(i=IE(e),x=i[0],S=i[1]);var O=!0;(l||c&Vo)&&(f.setDPR(t.dpr),u?f.setContext(null):(f.setContext(t),O=!1),f.reset(),e.buildPath(f,e.shape,n),f.toStatic(),e.pathUpdated()),O&&f.rebuildPath(t,u?s:1),x&&(t.setLineDash(x),t.lineDashOffset=S),n||(r.strokeFirst?(a&&kE(t,r),o&&NE(t,r)):(o&&NE(t,r),a&&kE(t,r))),x&&t.setLineDash([])}function tV(t,e,r){var n=e.__image=xD(r.image,e.__image,e,e.onload);if(!(!n||!tc(n))){var i=r.x||0,a=r.y||0,o=e.getWidth(),s=e.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),r.sWidth&&r.sHeight){var l=r.sx||0,f=r.sy||0;t.drawImage(n,l,f,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var l=r.sx,f=r.sy,c=o-l,h=s-f;t.drawImage(n,l,f,c,h,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function rV(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||Ca,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=IE(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(ih(r)&&t.strokeText(i,r.x,r.y),ah(r)&&t.fillText(i,r.x,r.y)):(ah(r)&&t.fillText(i,r.x,r.y),ih(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var zE=["shadowBlur","shadowOffsetX","shadowOffsetY"],jE=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function VE(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){br(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?Ma.opacity:o}(n||e.blend!==r.blend)&&(a||(br(t,i),a=!0),t.globalCompositeOperation=e.blend||Ma.blend);for(var s=0;s<zE.length;s++){var u=zE[s];(n||e[u]!==r[u])&&(a||(br(t,i),a=!0),t[u]=t.dpr*(e[u]||0))}return(n||e.shadowColor!==r.shadowColor)&&(a||(br(t,i),a=!0),t.shadowColor=e.shadowColor||Ma.shadowColor),a}function HE(t,e,r,n,i){var a=Ku(e,i.inHover),o=n?null:r&&Ku(r,i.inHover)||{};if(a===o)return!1;var s=VE(t,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(br(t,i),s=!0),RE(a.fill)&&(t.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(br(t,i),s=!0),RE(a.stroke)&&(t.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(br(t,i),s=!0),t.globalAlpha=a.opacity==null?1:a.opacity),e.hasStroke()){var u=a.lineWidth,l=u/(a.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==l&&(s||(br(t,i),s=!0),t.lineWidth=l)}for(var f=0;f<jE.length;f++){var c=jE[f],h=c[0];(n||a[h]!==o[h])&&(s||(br(t,i),s=!0),t[h]=a[h]||c[1])}return s}function nV(t,e,r,n,i){return VE(t,Ku(e,i.inHover),r&&Ku(r,i.inHover),n,i)}function WE(t,e){var r=e.transform,n=t.dpr||1;r?t.setTransform(n*r[0],n*r[1],n*r[2],n*r[3],n*r[4],n*r[5]):t.setTransform(n,0,0,n,0,0)}function iV(t,e,r){for(var n=!1,i=0;i<t.length;i++){var a=t[i];n=n||a.isZeroArea(),WE(e,a),e.beginPath(),a.buildPath(e,a.shape),e.clip()}r.allClipped=n}function aV(t,e){return t&&e?t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||t[4]!==e[4]||t[5]!==e[5]:!(!t&&!e)}var $E=1,GE=2,UE=3,qE=4;function oV(t){var e=ah(t),r=ih(t);return!(t.lineDash||!(+e^+r)||e&&typeof t.fill!="string"||r&&typeof t.stroke!="string"||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}function br(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function Ku(t,e){return e&&t.__hoverStyle||t.style}function YE(t,e){Ja(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Ja(t,e,r,n){var i=e.transform;if(!e.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){e.__dirty&=~Or,e.__isRendered=!1;return}var a=e.__clipPaths,o=r.prevElClipPaths,s=!1,u=!1;if((!o||Zj(a,o))&&(o&&o.length&&(br(t,r),t.restore(),u=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(br(t,r),t.save(),iV(a,t,r),s=!0),r.prevElClipPaths=a),r.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var l=r.prevEl;l||(u=s=!0);var f=e instanceof Ve&&e.autoBatch&&oV(e.style);s||aV(i,l.transform)?(br(t,r),WE(t,e)):f||br(t,r);var c=Ku(e,r.inHover);e instanceof Ve?(r.lastDrawType!==$E&&(u=!0,r.lastDrawType=$E),HE(t,e,l,u,r),(!f||!r.batchFill&&!r.batchStroke)&&t.beginPath(),eV(t,e,c,f),f&&(r.batchFill=c.fill||"",r.batchStroke=c.stroke||"")):e instanceof oc?(r.lastDrawType!==UE&&(u=!0,r.lastDrawType=UE),HE(t,e,l,u,r),rV(t,e,c)):e instanceof fi?(r.lastDrawType!==GE&&(u=!0,r.lastDrawType=GE),nV(t,e,l,u,r),tV(t,e,c)):e.getTemporalDisplayables&&(r.lastDrawType!==qE&&(u=!0,r.lastDrawType=qE),sV(t,e,r)),f&&n&&br(t,r),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),r.prevEl=e,e.__dirty=0,e.__isRendered=!0}function sV(t,e,r){var n=e.getDisplayables(),i=e.getTemporalDisplayables();t.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var u=n[o];u.beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),Ja(t,u,a,o===s-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),a.prevEl=u}for(var l=0,f=i.length;l<f;l++){var u=i[l];u.beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),Ja(t,u,a,l===f-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),a.prevEl=u}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}var P0=new zj,XE=new fu(100),KE=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function B0(t,e){if(t==="none")return null;var r=e.getDevicePixelRatio(),n=e.getZr(),i=n.painter.type==="svg";t.dirty&&P0.delete(t);var a=P0.get(t);if(a)return a;var o=je(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return u(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/r,P0.set(t,s),t.dirty=!1,s;function u(l){for(var f=[r],c=!0,h=0;h<KE.length;++h){var d=o[KE[h]];if(d!=null&&!he(d)&&!be(d)&&!nt(d)&&typeof d!="boolean"){c=!1;break}f.push(d)}var p;if(c){p=f.join(",")+(i?"-svg":"");var g=XE.get(p);g&&(i?l.svgElement=g:l.image=g)}var v=JE(o.dashArrayX),m=uV(o.dashArrayY),y=ZE(o.symbol),b=lV(v),w=QE(m),C=!i&&Po.createCanvas(),_=i&&{tag:"g",attrs:{},key:"dcl",children:[]},D=S(),x;C&&(C.width=D.width*r,C.height=D.height*r,x=C.getContext("2d")),O(),c&&XE.put(p,C||_),l.image=C,l.svgElement=_,l.svgWidth=D.width,l.svgHeight=D.height;function S(){for(var E=1,P=0,F=b.length;P<F;++P)E=cD(E,b[P]);for(var B=1,P=0,F=y.length;P<F;++P)B=cD(B,y[P].length);E*=B;var M=w*b.length*y.length;if(process.env.NODE_ENV!=="production"){var I=function(j){console.warn("Calculated decal size is greater than "+j+" due to decal option settings so "+j+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+j+" to be larger to avoid incontinuity.")};E>o.maxTileWidth&&I("maxTileWidth"),M>o.maxTileHeight&&I("maxTileHeight")}return{width:Math.max(1,Math.min(E,o.maxTileWidth)),height:Math.max(1,Math.min(M,o.maxTileHeight))}}function O(){x&&(x.clearRect(0,0,C.width,C.height),o.backgroundColor&&(x.fillStyle=o.backgroundColor,x.fillRect(0,0,C.width,C.height)));for(var E=0,P=0;P<m.length;++P)E+=m[P];if(E<=0)return;for(var F=-w,B=0,M=0,I=0;F<D.height;){if(B%2===0){for(var j=M/2%y.length,z=0,W=0,R=0;z<D.width*2;){for(var U=0,P=0;P<v[I].length;++P)U+=v[I][P];if(U<=0)break;if(W%2===0){var Z=(1-o.symbolSize)*.5,ee=z+v[I][W]*Z,ne=F+m[B]*Z,q=v[I][W]*o.symbolSize,L=m[B]*o.symbolSize,X=R/2%y[j].length;V(ee,ne,q,L,y[j][X])}z+=v[I][W],++R,++W,W===v[I].length&&(W=0)}++I,I===v.length&&(I=0)}F+=m[B],++M,++B,B===m.length&&(B=0)}function V(G,J,K,Y,fe){var ue=i?1:r,Ce=hs(fe,G*ue,J*ue,K*ue,Y*ue,o.color,o.symbolKeepAspect);if(i){var me=n.painter.renderOneToVNode(Ce);me&&_.children.push(me)}else YE(x,Ce)}}}}function ZE(t){if(!t||t.length===0)return[["rect"]];if(be(t))return[[t]];for(var e=!0,r=0;r<t.length;++r)if(!be(t[r])){e=!1;break}if(e)return ZE([t]);for(var n=[],r=0;r<t.length;++r)be(t[r])?n.push([t[r]]):n.push(t[r]);return n}function JE(t){if(!t||t.length===0)return[[0,0]];if(nt(t)){var e=Math.ceil(t);return[[e,e]]}for(var r=!0,n=0;n<t.length;++n)if(!nt(t[n])){r=!1;break}if(r)return JE([t]);for(var i=[],n=0;n<t.length;++n)if(nt(t[n])){var e=Math.ceil(t[n]);i.push([e,e])}else{var e=ye(t[n],function(s){return Math.ceil(s)});e.length%2===1?i.push(e.concat(e)):i.push(e)}return i}function uV(t){if(!t||typeof t=="object"&&t.length===0)return[0,0];if(nt(t)){var e=Math.ceil(t);return[e,e]}var r=ye(t,function(n){return Math.ceil(n)});return t.length%2?r.concat(r):r}function lV(t){return ye(t,function(e){return QE(e)})}function QE(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return t.length%2===1?e*2:e}function fV(t,e){t.eachRawSeries(function(r){if(!t.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var u=n.ensureUniqueItemVisual(o,"style");u.decal=B0(s,e)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=B0(i,e)}}})}var cn=new En,oh={};function cV(t,e){process.env.NODE_ENV!=="production"&&oh[t]&&Gt("Already has an implementation of "+t+"."),oh[t]=e}function hV(t){return process.env.NODE_ENV!=="production"&&(oh[t]||Gt("Implementation of "+t+" doesn't exists.")),oh[t]}var dV=1,vV=800,pV=900,gV=1e3,mV=2e3,yV=5e3,e2=1e3,bV=1100,M0=2e3,t2=3e3,CV=4e3,sh=4500,wV=4600,_V=5e3,DV=6e3,r2=7e3,xV={PROCESSOR:{FILTER:gV,SERIES_FILTER:vV,STATISTIC:yV},VISUAL:{LAYOUT:e2,PROGRESSIVE_LAYOUT:bV,GLOBAL:M0,CHART:t2,POST_CHART_LAYOUT:wV,COMPONENT:CV,BRUSH:_V,CHART_ITEM:sh,ARIA:DV,DECAL:r2}},Xt="__flagInMainProcess",Cr="__pendingUpdate",F0="__needsUpdateStatus",n2=/^[a-zA-Z0-9_]+$/,L0="__connectUpdateStatus",i2=0,SV=1,EV=2;function a2(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.isDisposed()){Mr(this.id);return}return s2(this,t,e)}}function o2(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return s2(this,t,e)}}function s2(t,e,r){return r[0]=r[0]&&r[0].toLowerCase(),En.prototype[e].apply(t,r)}var u2=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(En),l2=u2.prototype;l2.on=o2("on"),l2.off=o2("off");var ds,I0,uh,Vi,R0,N0,k0,Zu,Ju,f2,c2,z0,h2,lh,d2,v2,Jr,p2,g2=function(t){ce(e,t);function e(r,n,i){var a=t.call(this,new Pj)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},be(n)&&(n=m2[n]),a._dom=r;var o="canvas",s="auto",u=!1;if(process.env.NODE_ENV!=="production"){var l=Pe.hasGlobalWindow?window:global;l&&(o=Be(l.__ECHARTS__DEFAULT__RENDERER__,o),s=Be(l.__ECHARTS__DEFAULT__COARSE_POINTER,s),u=Be(l.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,u))}i.ssr;var f=a._zr=nD(r,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:Be(i.useDirtyRect,u),useCoarsePointer:Be(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=x0(dt(f.flush,f),17),n=$e(n),n&&FS(n,!0),a._theme=n,a._locale=R7(i.locale||Xx),a._coordSysMgr=new l0;var c=a._api=d2(a);function h(d,p){return d.__prio-p.__prio}return Bf(ch,h),Bf(V0,h),a._scheduler=new SE(a,c,V0,ch),a._messageCenter=new u2,a._initEvents(),a.resize=dt(a.resize,a),f.animation.on("frame",a._onframe,a),f2(f,a),c2(f,a),Sf(a),a}return e.prototype._onframe=function(){if(!this._disposed){p2(this);var r=this._scheduler;if(this[Cr]){var n=this[Cr].silent;this[Xt]=!0;try{ds(this),Vi.update.call(this,null,this[Cr].updateParams)}catch(u){throw this[Xt]=!1,this[Cr]=null,u}this._zr.flush(),this[Xt]=!1,this[Cr]=null,Zu.call(this,n),Ju.call(this,n)}else if(r.unfinished){var i=dV,a=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(a),r.performDataProcessorTasks(a),N0(this,a),r.performVisualTasks(a),lh(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,i){if(this[Xt]){process.env.NODE_ENV!=="production"&&Gt("`setOption` should not be called during main process.");return}if(this._disposed){Mr(this.id);return}var a,o,s;if(we(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Xt]=!0,!this._model||n){var u=new fz(this._api),l=this._theme,f=this._model=new s0;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,l,this._locale,u)}this._model.setOption(r,{replaceMerge:o},H0);var c={seriesTransition:s,optionChanged:!0};if(i)this[Cr]={silent:a,updateParams:c},this[Xt]=!1,this.getZr().wakeUp();else{try{ds(this),Vi.update.call(this,null,c)}catch(h){throw this[Cr]=null,this[Xt]=!1,h}this._ssr||this._zr.flush(),this[Cr]=null,this[Xt]=!1,Zu.call(this,a),Ju.call(this,a)}},e.prototype.setTheme=function(){On("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Pe.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return process.env.NODE_ENV!=="production"&&Mt("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){if(Pe.svgSupported){var r=this._zr,n=r.storage.getDisplayList();return N(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()}},e.prototype.getDataURL=function(r){if(this._disposed){Mr(this.id);return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;N(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(r).toDataURL("image/"+(r&&r.type||"png"));return N(a,function(u){u.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){Mr(this.id);return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(y2[i]){var u=s,l=s,f=-s,c=-s,h=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();N(el,function(b,w){if(b.group===i){var C=n?b.getZr().painter.getSvgDom().innerHTML:b.renderToCanvas($e(r)),_=b.getDom().getBoundingClientRect();u=a(_.left,u),l=a(_.top,l),f=o(_.right,f),c=o(_.bottom,c),h.push({dom:C,left:_.left,top:_.top})}}),u*=d,l*=d,f*=d,c*=d;var p=f-u,g=c-l,v=Po.createCanvas(),m=nD(v,{renderer:n?"svg":"canvas"});if(m.resize({width:p,height:g}),n){var y="";return N(h,function(b){var w=b.left-u,C=b.top-l;y+='<g transform="translate('+w+","+C+')">'+b.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,r.connectedBackgroundColor&&m.painter.setBackgroundColor(r.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return r.connectedBackgroundColor&&m.add(new St({shape:{x:0,y:0,width:p,height:g},style:{fill:r.connectedBackgroundColor}})),N(h,function(b){var w=new fi({style:{x:b.left*d-u,y:b.top*d-l,image:b.dom}});m.add(w)}),m.refreshImmediately(),v.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n){return R0(this,"convertToPixel",r,n)},e.prototype.convertFromPixel=function(r,n){return R0(this,"convertFromPixel",r,n)},e.prototype.containPixel=function(r,n){if(this._disposed){Mr(this.id);return}var i=this._model,a,o=ig(i,r);return N(o,function(s,u){u.indexOf("Models")>=0&&N(s,function(l){var f=l.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(u==="seriesModels"){var c=this._chartsMap[l.__viewId];c&&c.containPoint?a=a||c.containPoint(n,l):process.env.NODE_ENV!=="production"&&xt(u+": "+(c?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&xt(u+": containPoint is not supported")},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=ig(i,r,{defaultMainType:"series"}),o=a.seriesModel;process.env.NODE_ENV!=="production"&&(o||xt("There is no specified series model"));var s=o.getData(),u=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return u!=null?Fj(s,u,n):Lj(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;N(AV,function(n){var i=function(a){var o=r.getModel(),s=a.target,u,l=n==="globalout";if(l?u={}:s&&Xu(s,function(p){var g=He(p);if(g&&g.dataIndex!=null){var v=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return u=v&&v.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return u=oe({},g.eventData),!0},!0),u){var f=u.componentType,c=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",c=u.seriesIndex);var h=f&&c!=null&&o.getComponent(f,c),d=h&&r[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];process.env.NODE_ENV!=="production"&&!l&&!(h&&d)&&xt("model or view can not be found by params"),u.event=a,u.type=n,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:u,model:h,view:d},r.trigger(n,u)}};i.zrEventfulCallAtLast=!0,r._zr.on(n,i,r)}),N(Qu,function(n,i){r._messageCenter.on(i,function(a){this.trigger(i,a)},r)}),N(["selectchanged"],function(n){r._messageCenter.on(n,function(i){this.trigger(n,i)},r)}),Rj(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){Mr(this.id);return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){Mr(this.id);return}this._disposed=!0;var r=this.getDom();r&&CD(this.getDom(),$0,"");var n=this,i=n._api,a=n._model;N(n._componentsViews,function(o){o.dispose(a,i)}),N(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 el[n.id]},e.prototype.resize=function(r){if(this[Xt]){process.env.NODE_ENV!=="production"&&Gt("`resize` should not be called during main process.");return}if(this._disposed){Mr(this.id);return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[Cr]&&(a==null&&(a=this[Cr].silent),i=!0,this[Cr]=null),this[Xt]=!0;try{i&&ds(this),Vi.update.call(this,{type:"resize",animation:oe({duration:0},r&&r.animation)})}catch(o){throw this[Xt]=!1,o}this[Xt]=!1,Zu.call(this,a),Ju.call(this,a)}},e.prototype.showLoading=function(r,n){if(this._disposed){Mr(this.id);return}if(we(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!W0[r]){process.env.NODE_ENV!=="production"&&xt("Loading effects "+r+" not exists.");return}var i=W0[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)},e.prototype.hideLoading=function(){if(this._disposed){Mr(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=oe({},r);return n.type=Qu[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){Mr(this.id);return}if(we(n)||(n={silent:!!n}),!!fh[r.type]&&this._model){if(this[Xt]){this._pendingActions.push(r);return}var i=n.silent;k0.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Pe.browser.weChat&&this._throttledZrFlush(),Zu.call(this,i),Ju.call(this,i)}},e.prototype.updateLabelLayout=function(){cn.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){Mr(this.id);return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);process.env.NODE_ENV!=="production"&&Ee(r.data&&a),a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){ds=function(c){var h=c._scheduler;h.restorePipelines(c._model),h.prepareStageTasks(),I0(c,!0),I0(c,!1),h.plan()},I0=function(c,h){for(var d=c._model,p=c._scheduler,g=h?c._componentsViews:c._chartsViews,v=h?c._componentsMap:c._chartsMap,m=c._zr,y=c._api,b=0;b<g.length;b++)g[b].__alive=!1;h?d.eachComponent(function(_,D){_!=="series"&&w(D)}):d.eachSeries(w);function w(_){var D=_.__requireNewView;_.__requireNewView=!1;var x="_ec_"+_.id+"_"+_.type,S=!D&&v[x];if(!S){var O=Pn(_.type),E=h?Br.getClass(O.main,O.sub):Zr.getClass(O.sub);process.env.NODE_ENV!=="production"&&Ee(E,O.sub+" does not exist."),S=new E,S.init(d,y),v[x]=S,g.push(S),m.add(S.group)}_.__viewId=S.__id=x,S.__alive=!0,S.__model=_,S.group.__ecComponentInfo={mainType:_.mainType,index:_.componentIndex},!h&&p.prepareView(S,_,d,y)}for(var b=0;b<g.length;){var C=g[b];C.__alive?b++:(!h&&C.renderTask.dispose(),m.remove(C.group),C.dispose(d,y),g.splice(b,1),v[C.__id]===C&&delete v[C.__id],C.__id=C.group.__ecComponentInfo=null)}},uh=function(c,h,d,p,g){var v=c._model;if(v.setUpdatePayload(d),!p){N([].concat(c._componentsViews).concat(c._chartsViews),C);return}var m={};m[p+"Id"]=d[p+"Id"],m[p+"Index"]=d[p+"Index"],m[p+"Name"]=d[p+"Name"];var y={mainType:p,query:m};g&&(y.subType=g);var b=d.excludeSeriesId,w;b!=null&&(w=Ae(),N(gt(b),function(_){var D=pr(_,null);D!=null&&w.set(D,!0)})),v&&v.eachComponent(y,function(_){var D=w&&w.get(_.id)!=null;if(!D)if(vx(d))if(_ instanceof fn)d.type===Va&&!d.notBlur&&!_.get(["emphasis","disabled"])&&_9(_,d,c._api);else{var x=Tg(_.mainType,_.componentIndex,d.name,c._api),S=x.focusSelf,O=x.dispatchers;d.type===Va&&S&&!d.notBlur&&Ag(_.mainType,_.componentIndex,c._api),O&&N(O,function(E){d.type===Va?dc(E):vc(E)})}else Pg(d)&&_ instanceof fn&&(S9(_,d,c._api),cx(_),Jr(c))},c),v&&v.eachComponent(y,function(_){var D=w&&w.get(_.id)!=null;D||C(c[p==="series"?"_chartsMap":"_componentsMap"][_.__viewId])},c);function C(_){_&&_.__alive&&_[h]&&_[h](_.__model,v,c._api,d)}},Vi={prepareAndUpdate:function(c){ds(this),Vi.update.call(this,c,{optionChanged:c.newOption!=null})},update:function(c,h){var d=this._model,p=this._api,g=this._zr,v=this._coordSysMgr,m=this._scheduler;if(d){d.setUpdatePayload(c),m.restoreData(d,c),m.performSeriesTasks(d),v.create(d,p),m.performDataProcessorTasks(d,c),N0(this,d),v.update(d,p),r(d),m.performVisualTasks(d,c),z0(this,d,p,c,h);var y=d.get("backgroundColor")||"transparent",b=d.get("darkMode");g.setBackgroundColor(y),b!=null&&b!=="auto"&&g.setDarkMode(b),cn.trigger("afterupdate",d,p)}},updateTransform:function(c){var h=this,d=this._model,p=this._api;if(d){d.setUpdatePayload(c);var g=[];d.eachComponent(function(m,y){if(m!=="series"){var b=h.getViewOfComponentModel(y);if(b&&b.__alive)if(b.updateTransform){var w=b.updateTransform(y,d,p,c);w&&w.update&&g.push(b)}else g.push(b)}});var v=Ae();d.eachSeries(function(m){var y=h._chartsMap[m.__viewId];if(y.updateTransform){var b=y.updateTransform(m,d,p,c);b&&b.update&&v.set(m.uid,1)}else v.set(m.uid,1)}),r(d),this._scheduler.performVisualTasks(d,c,{setDirty:!0,dirtyMap:v}),lh(this,d,p,c,{},v),cn.trigger("afterupdate",d,p)}},updateView:function(c){var h=this._model;h&&(h.setUpdatePayload(c),Zr.markUpdateMethod(c,"updateView"),r(h),this._scheduler.performVisualTasks(h,c,{setDirty:!0}),z0(this,h,this._api,c,{}),cn.trigger("afterupdate",h,this._api))},updateVisual:function(c){var h=this,d=this._model;d&&(d.setUpdatePayload(c),d.eachSeries(function(p){p.getData().clearAllVisual()}),Zr.markUpdateMethod(c,"updateVisual"),r(d),this._scheduler.performVisualTasks(d,c,{visualType:"visual",setDirty:!0}),d.eachComponent(function(p,g){if(p!=="series"){var v=h.getViewOfComponentModel(g);v&&v.__alive&&v.updateVisual(g,d,h._api,c)}}),d.eachSeries(function(p){var g=h._chartsMap[p.__viewId];g.updateVisual(p,d,h._api,c)}),cn.trigger("afterupdate",d,this._api))},updateLayout:function(c){Vi.update.call(this,c)}},R0=function(c,h,d,p){if(c._disposed){Mr(c.id);return}for(var g=c._model,v=c._coordSysMgr.getCoordinateSystems(),m,y=ig(g,d),b=0;b<v.length;b++){var w=v[b];if(w[h]&&(m=w[h](g,y,p))!=null)return m}process.env.NODE_ENV!=="production"&&xt("No coordinate system that supports "+h+" found by the given finder.")},N0=function(c,h){var d=c._chartsMap,p=c._scheduler;h.eachSeries(function(g){p.updateStreamModes(g,d[g.__viewId])})},k0=function(c,h){var d=this,p=this.getModel(),g=c.type,v=c.escapeConnect,m=fh[g],y=m.actionInfo,b=(y.update||"update").split(":"),w=b.pop(),C=b[0]!=null&&Pn(b[0]);this[Xt]=!0;var _=[c],D=!1;c.batch&&(D=!0,_=ye(c.batch,function(B){return B=je(oe({},B),c),B.batch=null,B}));var x=[],S,O=Pg(c),E=vx(c);if(E&&fx(this._api),N(_,function(B){if(S=m.action(B,d._model,d._api),S=S||oe({},B),S.type=y.event||S.type,x.push(S),E){var M=ag(c),I=M.queryOptionMap,j=M.mainTypeSpecified,z=j?I.keys()[0]:"series";uh(d,w,B,z),Jr(d)}else O?(uh(d,w,B,"series"),Jr(d)):C&&uh(d,w,B,C.main,C.sub)}),w!=="none"&&!E&&!O&&!C)try{this[Cr]?(ds(this),Vi.update.call(this,c),this[Cr]=null):Vi[w].call(this,c)}catch(B){throw this[Xt]=!1,B}if(D?S={type:y.event||g,escapeConnect:v,batch:x}:S=x[0],this[Xt]=!1,!h){var P=this._messageCenter;if(P.trigger(S.type,S),O){var F={type:"selectchanged",escapeConnect:v,selected:E9(p),isFromClick:c.isFromClick||!1,fromAction:c.type,fromActionPayload:c};P.trigger(F.type,F)}}},Zu=function(c){for(var h=this._pendingActions;h.length;){var d=h.shift();k0.call(this,d,c)}},Ju=function(c){!c&&this.trigger("updated")},f2=function(c,h){c.on("rendered",function(d){h.trigger("rendered",d),c.animation.isFinished()&&!h[Cr]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},c2=function(c,h){c.on("mouseover",function(d){var p=d.target,g=Xu(p,Jo);g&&(D9(g,d,h._api),Jr(h))}).on("mouseout",function(d){var p=d.target,g=Xu(p,Jo);g&&(x9(g,d,h._api),Jr(h))}).on("click",function(d){var p=d.target,g=Xu(p,function(y){return He(y).dataIndex!=null},!0);if(g){var v=g.selected?"unselect":"select",m=He(g);h._api.dispatchAction({type:v,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function r(c){c.clearColorPalette(),c.eachSeries(function(h){h.clearColorPalette()})}function n(c){var h=[],d=[],p=!1;if(c.eachComponent(function(y,b){var w=b.get("zlevel")||0,C=b.get("z")||0,_=b.getZLevelKey();p=p||!!_,(y==="series"?d:h).push({zlevel:w,z:C,idx:b.componentIndex,type:y,key:_})}),p){var g=h.concat(d),v,m;Bf(g,function(y,b){return y.zlevel===b.zlevel?y.z-b.z:y.zlevel-b.zlevel}),N(g,function(y){var b=c.getComponent(y.type,y.idx),w=y.zlevel,C=y.key;v!=null&&(w=Math.max(v,w)),C?(w===v&&C!==m&&w++,m=C):m&&(w===v&&w++,m=""),v=w,b.setZLevel(w)})}}z0=function(c,h,d,p,g){n(h),h2(c,h,d,p,g),N(c._chartsViews,function(v){v.__alive=!1}),lh(c,h,d,p,g),N(c._chartsViews,function(v){v.__alive||v.remove(h,d)})},h2=function(c,h,d,p,g,v){N(v||c._componentsViews,function(m){var y=m.__model;l(y,m),m.render(y,h,d,p),s(y,m),f(y,m)})},lh=function(c,h,d,p,g,v){var m=c._scheduler;g=oe(g||{},{updatedSeries:h.getSeries()}),cn.trigger("series:beforeupdate",h,d,g);var y=!1;h.eachSeries(function(b){var w=c._chartsMap[b.__viewId];w.__alive=!0;var C=w.renderTask;m.updatePayload(C,p),l(b,w),v&&v.get(b.uid)&&C.dirty(),C.perform(m.getPerformArgs(C))&&(y=!0),w.group.silent=!!b.get("silent"),o(b,w),cx(b)}),m.unfinished=y||m.unfinished,cn.trigger("series:layoutlabels",h,d,g),cn.trigger("series:transition",h,d,g),h.eachSeries(function(b){var w=c._chartsMap[b.__viewId];s(b,w),f(b,w)}),a(c,h),cn.trigger("series:afterupdate",h,d,g)},Jr=function(c){c[F0]=!0,c.getZr().wakeUp()},p2=function(c){c[F0]&&(c.getZr().storage.traverse(function(h){rs(h)||i(h)}),c[F0]=!1)};function i(c){for(var h=[],d=c.currentStates,p=0;p<d.length;p++){var g=d[p];g==="emphasis"||g==="blur"||g==="select"||h.push(g)}c.selected&&c.states.select&&h.push("select"),c.hoverState===uc&&c.states.emphasis?h.push("emphasis"):c.hoverState===sc&&c.states.blur&&h.push("blur"),c.useStates(h)}function a(c,h){var d=c._zr,p=d.storage,g=0;p.traverse(function(v){v.isGroup||g++}),g>h.get("hoverLayerThreshold")&&!Pe.node&&!Pe.worker&&h.eachSeries(function(v){if(!v.preventUsingHoverLayer){var m=c._chartsMap[v.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(c,h){var d=c.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function s(c,h){if(!c.preventAutoZ){var d=c.get("z")||0,p=c.get("zlevel")||0;h.eachRendered(function(g){return u(g,d,p,-1/0),!0})}}function u(c,h,d,p){var g=c.getTextContent(),v=c.getTextGuideLine(),m=c.isGroup;if(m)for(var y=c.childrenRef(),b=0;b<y.length;b++)p=Math.max(u(y[b],h,d,p),p);else c.z=h,c.zlevel=d,p=Math.max(c.z2,p);if(g&&(g.z=h,g.zlevel=d,isFinite(p)&&(g.z2=p+2)),v){var w=c.textGuideLineConfig;v.z=h,v.zlevel=d,isFinite(p)&&(v.z2=p+(w&&w.showAbove?1:-1))}return p}function l(c,h){h.eachRendered(function(d){if(!rs(d)){var p=d.getTextContent(),g=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function f(c,h){var d=c.getModel("stateAnimation"),p=c.isAnimationEnabled(),g=d.get("duration"),v=g>0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(m){if(m.states&&m.states.emphasis){if(rs(m))return;if(m instanceof Ve&&B9(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(p){m.stateTransition=v;var b=m.getTextContent(),w=m.getTextGuideLine();b&&(b.stateTransition=v),w&&(w.stateTransition=v)}m.__dirty&&i(m)}})}d2=function(c){return new(function(h){ce(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return c._model.getComponent(g.mainType,g.index);p=p.parent}},d.prototype.enterEmphasis=function(p,g){dc(p,g),Jr(c)},d.prototype.leaveEmphasis=function(p,g){vc(p,g),Jr(c)},d.prototype.enterBlur=function(p){w9(p),Jr(c)},d.prototype.leaveBlur=function(p){ox(p),Jr(c)},d.prototype.enterSelect=function(p){sx(p),Jr(c)},d.prototype.leaveSelect=function(p){ux(p),Jr(c)},d.prototype.getModel=function(){return c.getModel()},d.prototype.getViewOfComponentModel=function(p){return c.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return c.getViewOfSeriesModel(p)},d}(ES))(c)},v2=function(c){function h(d,p){for(var g=0;g<d.length;g++){var v=d[g];v[L0]=p}}N(Qu,function(d,p){c._messageCenter.on(p,function(g){if(y2[c.group]&&c[L0]!==i2){if(g&&g.escapeConnect)return;var v=c.makeActionFromEvent(g),m=[];N(el,function(y){y!==c&&y.group===c.group&&m.push(y)}),h(m,i2),N(m,function(y){y[L0]!==SV&&y.dispatchAction(v)}),h(m,EV)}})})}}(),e}(En),j0=g2.prototype;j0.on=a2("on"),j0.off=a2("off"),j0.one=function(t,e,r){var n=this;On("ECharts#one is deprecated.");function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];e&&e.apply&&e.apply(this,a),n.off(t,i)}this.on.call(this,t,i,r)};var AV=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Mr(t){process.env.NODE_ENV!=="production"&&xt("Instance "+t+" has been disposed")}var fh={},Qu={},V0=[],H0=[],ch=[],m2={},W0={},el={},y2={},TV=+new Date-0,$0="_echarts_instance_";function OV(t,e,r){{if(process.env.NODE_ENV!=="production"&&!t)throw new Error("Initialize failed: invalid dom.");var n=PV(t);if(n)return process.env.NODE_ENV!=="production"&&xt("There is a chart instance already initialized on the dom."),n;process.env.NODE_ENV!=="production"&&Mo(t)&&t.nodeName.toUpperCase()!=="CANVAS"&&(!t.clientWidth&&!r||!t.clientHeight&&!r)&&xt("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var i=new g2(t,e,r);return i.id="ec_"+TV++,el[i.id]=i,CD(t,$0,i.id),v2(i),cn.trigger("afterinit",i),i}function PV(t){return el[h6(t,$0)]}function b2(t,e){m2[t]=e}function C2(t){Ge(H0,t)<0&&H0.push(t)}function w2(t,e){U0(V0,t,e,mV)}function BV(t){G0("afterinit",t)}function MV(t){G0("afterupdate",t)}function G0(t,e){cn.on(t,e)}function vs(t,e,r){De(e)&&(r=e,e="");var n=we(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,!Qu[e]&&(Ee(n2.test(n)&&n2.test(e)),fh[n]||(fh[n]={action:r,actionInfo:t}),Qu[e]=n)}function FV(t,e){l0.register(t,e)}function LV(t,e){U0(ch,t,e,e2,"layout")}function Qa(t,e){U0(ch,t,e,t2,"visual")}var _2=[];function U0(t,e,r,n,i){if((De(e)||we(e))&&(r=e,e=n),process.env.NODE_ENV!=="production"){if(isNaN(e)||e==null)throw new Error("Illegal priority");N(t,function(o){Ee(o.__raw!==r)})}if(!(Ge(_2,r)>=0)){_2.push(r);var a=SE.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function D2(t,e){W0[t]=e}function IV(t,e,r){var n=hV("registerMap");n&&n(t,e,r)}var RV=Wz;Qa(M0,gj),Qa(sh,mj),Qa(sh,yj),Qa(M0,Bj),Qa(sh,Mj),Qa(r2,fV),C2(FS),w2(pV,_z),D2("default",bj),vs({type:Va,event:Va,update:Va},dr),vs({type:fc,event:fc,update:fc},dr),vs({type:xu,event:xu,update:xu},dr),vs({type:cc,event:cc,update:cc},dr),vs({type:Su,event:Su,update:Su},dr),b2("light",Oj),b2("dark",ME);function tl(t){return t==null?0:t.length||1}function x2(t){return t}var q0=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||x2,this._newKeyGetter=i||x2,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=i[o],u=n[s],l=tl(u);if(l>1){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)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var u=a[s],l=n[u],f=i[u],c=tl(l),h=tl(f);if(c>1&&h===1)this._updateManyToOne&&this._updateManyToOne(f,l),i[u]=null;else if(c===1&&h>1)this._updateOneToMany&&this._updateOneToMany(f,l),i[u]=null;else if(c===1&&h===1)this._update&&this._update(f,l),i[u]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(f,l),i[u]=null;else if(c>1)for(var d=0;d<c;d++)this._remove&&this._remove(l[d]);else this._remove&&this._remove(l)}this._performRestAdd(o,i)},t.prototype._performRestAdd=function(e,r){for(var n=0;n<e.length;n++){var i=e[n],a=r[i],o=tl(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);r[i]=null}},t.prototype._initIndexMap=function(e,r,n,i){for(var a=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[i](e[o],o);if(a||(n[o]=s),!!r){var u=r[s],l=tl(u);l===0?(r[s]=o,a&&n.push(s)):l===1?r[s]=[u,o]:u.push(o)}}},t}(),NV=function(){function t(e,r){this._encode=e,this._schema=r}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function kV(t,e){var r={},n=r.encode={},i=Ae(),a=[],o=[],s={};N(t.dimensions,function(h){var d=t.getDimensionInfo(h),p=d.coordDim;if(p){process.env.NODE_ENV!=="production"&&Ee(n0.get(p)==null);var g=d.coordDimIndex;Y0(n,p)[g]=h,d.isExtraCoord||(i.set(p,1),jV(d.type)&&(a[0]=h),Y0(s,p)[g]=t.getDimensionIndex(d.name)),d.defaultTooltip&&o.push(h)}n0.each(function(v,m){var y=Y0(n,m),b=d.otherDims[m];b!=null&&b!==!1&&(y[b]=d.name)})});var u=[],l={};i.each(function(h,d){var p=n[d];l[d]=p[0],u=u.concat(p)}),r.dataDimsOnCoord=u,r.dataDimIndicesOnCoord=ye(u,function(h){return t.getDimensionInfo(h).storeDimIndex}),r.encodeFirstDimNotExtra=l;var f=n.label;f&&f.length&&(a=f.slice());var c=n.tooltip;return c&&c.length?o=c.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,r.userOutput=new NV(s,e),r}function Y0(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function zV(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function jV(t){return!(t==="ordinal"||t==="time")}var hh=function(){function t(e){this.otherDims={},e!=null&&oe(this,e)}return t}(),VV=lt(),HV={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},S2=function(){function t(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=T2(this.source)))},t.prototype.getSourceDimensionIndex=function(e){return Be(this._dimNameMap.get(e),-1)},t.prototype.getSourceDimension=function(e){var r=this.source.dimensionsDefine;if(r)return r[e]},t.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,r=kS(this.source),n=!O2(e),i="",a=[],o=0,s=0;o<e;o++){var u=void 0,l=void 0,f=void 0,c=this.dimensions[s];if(c&&c.storeDimIndex===o)u=r?c.name:null,l=c.type,f=c.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(u=r?h.name:null,l=h.type)}a.push({property:u,type:l,ordinalMeta:f}),r&&u!=null&&(!c||!c.isCalculationCoord)&&(i+=n?u.replace(/\`/g,"`1").replace(/\$/g,"`2"):u),i+="$",i+=HV[l]||"f",f&&(i+=f.uid),i+="$"}var d=this.source,p=[d.seriesLayoutBy,d.startIndex,i].join("$$");return{dimensions:a,hash:p}},t.prototype.makeOutputDimensionNames=function(){for(var e=[],r=0,n=0;r<this._fullDimCount;r++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===r)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(r);o&&(i=o.name)}e.push(i)}return e},t.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function E2(t){return t instanceof S2}function A2(t){for(var e=Ae(),r=0;r<(t||[]).length;r++){var n=t[r],i=we(n)?n.name:n;i!=null&&e.get(i)==null&&e.set(i,r)}return e}function T2(t){var e=VV(t);return e.dimNameMap||(e.dimNameMap=A2(t.dimensionsDefine))}function O2(t){return t>30}var rl=we,Hi=ye,WV=typeof Int32Array>"u"?Array:Int32Array,$V="e\0\0",P2=-1,GV=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],UV=["_approximateExtent"],B2,dh,nl,ps,X0,vh,K0,M2=function(){function t(e,r){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","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,i=!1;E2(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},u=!1,l={},f=0;f<n.length;f++){var c=n[f],h=be(c)?new hh({name:c}):c instanceof hh?c:new hh(c),d=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=d,h.coordDimIndex=0);var p=h.otherDims=h.otherDims||{};o.push(d),a[d]=h,l[d]!=null&&(u=!0),h.createInvertedIndices&&(s[d]=[]),p.itemName===0&&(this._nameDimIdx=f),p.itemId===0&&(this._idDimIdx=f),process.env.NODE_ENV!=="production"&&Ee(i||h.storeDimIndex>=0),i&&(h.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(u),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=Ae();N(o,function(v){g.set(a[v].storeDimIndex,v)})}}return t.prototype.getDimension=function(e){var r=this._recognizeDimIndex(e);if(r==null)return e;if(r=e,!this._dimOmitted)return this.dimensions[r];var n=this._dimIdxToName.get(r);if(n!=null)return n;var i=this._schema.getSourceDimension(r);if(i)return i.name},t.prototype.getDimensionIndex=function(e){var r=this._recognizeDimIndex(e);if(r!=null)return r;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},t.prototype._recognizeDimIndex=function(e){if(nt(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},t.prototype._getStoreDimIndex=function(e){var r=this.getDimensionIndex(e);if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Unknown dimension "+e);return r},t.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},t.prototype._initGetDimensionInfo=function(e){var r=this._dimInfos;this._getDimInfo=e?function(n){return r.hasOwnProperty(n)?r[n]:void 0}:function(n){return r[n]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(e,r){var n=this._dimSummary;if(r==null)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return i?i[r]:null},t.prototype.mapDimensionsAll=function(e){var r=this._dimSummary,n=r.encode[e];return(n||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(e,r,n){var i=this,a;if(e instanceof y0&&(a=e),!a){var o=this.dimensions,s=h0(e)||Wt(e)?new VS(e,o.length):e;a=new y0;var u=Hi(o,function(l){return{type:i._dimInfos[l].type,property:l}});a.initData(s,u,n)}this._store=a,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=kV(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(e){var r=this._store.appendData(e);this._doInit(r[0],r[1])},t.prototype.appendValues=function(e,r){var n=this._store.appendValues(e,r.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var s=i;s<a;s++){var u=s-i;this._nameList[s]=r[u],o&&K0(this,s)}},t.prototype._updateOrdinalMeta=function(){for(var e=this._store,r=this.dimensions,n=0;n<r.length;n++){var i=this._dimInfos[r[n]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==hi&&!e.fillStorage},t.prototype._doInit=function(e,r){if(!(e>=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,u=s===qr;if(u&&!i.pure)for(var l=[],f=e;f<r;f++){var c=i.getItem(f,l);if(!this.hasItemOption&&r6(c)&&(this.hasItemOption=!0),c){var h=c.name;a[f]==null&&h!=null&&(a[f]=pr(h,null));var d=c.id;o[f]==null&&d!=null&&(o[f]=pr(d,null))}}if(this._shouldMakeIdFromName())for(var f=e;f<r;f++)K0(this,f);B2(this)}},t.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.setApproximateExtent=function(e,r){r=this.getDimension(r),this._approximateExtent[r]=e.slice()},t.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},t.prototype.setCalculationInfo=function(e,r){rl(e)?oe(this._calculationInfo,e):this._calculationInfo[e]=r},t.prototype.getName=function(e){var r=this.getRawIndex(e),n=this._nameList[r];return n==null&&this._nameDimIdx!=null&&(n=nl(this,this._nameDimIdx,r)),n==null&&(n=""),n},t.prototype._getCategory=function(e,r){var n=this._store.get(e,r),i=this._store.getOrdinalMeta(e);return i?i.categories[n]:n},t.prototype.getId=function(e){return dh(this,this.getRawIndex(e))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.get(i.storeDimIndex,r)},t.prototype.getByRawIndex=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.getByRawIndex(i.storeDimIndex,r)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},t.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},t.prototype.getValues=function(e,r){var n=this,i=this._store;return he(e)?i.getValues(Hi(e,function(a){return n._getStoreDimIndex(a)}),r):i.getValues(e)},t.prototype.hasValue=function(e){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,i=r.length;n<i;n++)if(isNaN(this._store.get(r[n],e)))return!1;return!0},t.prototype.indexOfName=function(e){for(var r=0,n=this._store.count();r<n;r++)if(this.getName(r)===e)return r;return-1},t.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},t.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},t.prototype.rawIndexOf=function(e,r){var n=e&&this._invertedIndicesMap[e];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Do not supported yet");var i=n[r];return i==null||isNaN(i)?P2:i},t.prototype.indicesOfNearest=function(e,r,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),r,n)},t.prototype.each=function(e,r,n){De(e)&&(n=r,r=e,e=[]);var i=n||this,a=Hi(ps(e),this._getStoreDimIndex,this);this._store.each(a,i?dt(r,i):r)},t.prototype.filterSelf=function(e,r,n){De(e)&&(n=r,r=e,e=[]);var i=n||this,a=Hi(ps(e),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?dt(r,i):r),this},t.prototype.selectRange=function(e){var r=this,n={},i=Ke(e);return N(i,function(a){var o=r._getStoreDimIndex(a);n[o]=e[a]}),this._store=this._store.selectRange(n),this},t.prototype.mapArray=function(e,r,n){De(e)&&(n=r,r=e,e=[]),n=n||this;var i=[];return this.each(e,function(){i.push(r&&r.apply(this,arguments))},n),i},t.prototype.map=function(e,r,n,i){var a=n||i||this,o=Hi(ps(e),this._getStoreDimIndex,this),s=vh(this);return s._store=this._store.map(o,a?dt(r,a):r),s},t.prototype.modify=function(e,r,n,i){var a=this,o=n||i||this;process.env.NODE_ENV!=="production"&&N(ps(e),function(u){var l=a.getDimensionInfo(u);l.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=Hi(ps(e),this._getStoreDimIndex,this);this._store.modify(s,o?dt(r,o):r)},t.prototype.downSample=function(e,r,n,i){var a=vh(this);return a._store=this._store.downSample(this._getStoreDimIndex(e),r,n,i),a},t.prototype.lttbDownSample=function(e,r){var n=vh(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),r),n},t.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},t.prototype.getItemModel=function(e){var r=this.hostModel,n=this.getRawDataItem(e);return new Ct(n,r,r&&r.ecModel)},t.prototype.diff=function(e){var r=this;return new q0(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return dh(e,n)},function(n){return dh(r,n)})},t.prototype.getVisual=function(e){var r=this._visual;return r&&r[e]},t.prototype.setVisual=function(e,r){this._visual=this._visual||{},rl(e)?oe(this._visual,e):this._visual[e]=r},t.prototype.getItemVisual=function(e,r){var n=this._itemVisuals[e],i=n&&n[r];return i??this.getVisual(r)},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),he(a)?a=a.slice():rl(a)&&(a=oe({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,rl(r)?oe(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){rl(e)?oe(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?oe(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;c9(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){N(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:Hi(this.dimensions,this._getDimInfo,this),this.hostModel)),X0(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];De(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(fp(arguments)))})},t.internalField=function(){B2=function(e){var r=e._invertedIndicesMap;N(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new WV(o.categories.length);for(var u=0;u<n.length;u++)n[u]=P2;for(var u=0;u<s.count();u++)n[s.get(a.storeDimIndex,u)]=u}})},nl=function(e,r,n){return pr(e._getCategory(r,n),null)},dh=function(e,r){var n=e._idList[r];return n==null&&e._idDimIdx!=null&&(n=nl(e,e._idDimIdx,r)),n==null&&(n=$V+r),n},ps=function(e){return he(e)||(e=e!=null?[e]:[]),e},vh=function(e){var r=new t(e._schema?e._schema:Hi(e.dimensions,e._getDimInfo,e),e.hostModel);return X0(r,e),r},X0=function(e,r){N(GV.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(e[n]=r[n])}),e.__wrappedMethods=r.__wrappedMethods,N(UV,function(n){e[n]=$e(r[n])}),e._calculationInfo=oe({},r._calculationInfo)},K0=function(e,r){var n=e._nameList,i=e._idList,a=e._nameDimIdx,o=e._idDimIdx,s=n[r],u=i[r];if(s==null&&a!=null&&(n[r]=s=nl(e,a,r)),u==null&&o!=null&&(i[r]=u=nl(e,o,r)),u==null&&s!=null){var l=e._nameRepeatCount,f=l[s]=(l[s]||0)+1;u=s,f>1&&(u+="__ec__"+f),i[r]=u}}}(),t}();function F2(t,e){h0(t)||(t=LS(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=Ae(),a=[],o=YV(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&O2(o),u=n===t.dimensionsDefine,l=u?T2(t):A2(n),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(t,o));for(var c=Ae(f),h=new QS(o),d=0;d<h.length;d++)h[d]=-1;function p(S){var O=h[S];if(O<0){var E=n[S],P=we(E)?E:{name:E},F=new hh,B=P.name;B!=null&&l.get(B)!=null&&(F.name=F.displayName=B),P.type!=null&&(F.type=P.type),P.displayName!=null&&(F.displayName=P.displayName);var M=a.length;return h[S]=M,F.storeDimIndex=S,a.push(F),F}return a[O]}if(!s)for(var d=0;d<o;d++)p(d);c.each(function(S,O){var E=gt(S).slice();if(E.length===1&&!be(E[0])&&E[0]<0){c.set(O,!1);return}var P=c.set(O,[]);N(E,function(F,B){var M=be(F)?l.get(F):F;M!=null&&M<o&&(P[B]=M,v(p(M),O,B))})});var g=0;N(r,function(S){var O,E,P,F;if(be(S))O=S,F={};else{F=S,O=F.name;var B=F.ordinalMeta;F.ordinalMeta=null,F=oe({},F),F.ordinalMeta=B,E=F.dimsDef,P=F.otherDims,F.name=F.coordDim=F.coordDimIndex=F.dimsDef=F.otherDims=null}var M=c.get(O);if(M!==!1){if(M=gt(M),!M.length)for(var I=0;I<(E&&E.length||1);I++){for(;g<o&&p(g).coordDim!=null;)g++;g<o&&M.push(g++)}N(M,function(j,z){var W=p(j);if(u&&F.type!=null&&(W.type=F.type),v(je(W,F),O,z),W.name==null&&E){var R=E[z];!we(R)&&(R={name:R}),W.name=W.displayName=R.name,W.defaultTooltip=R.defaultTooltip}P&&je(W.otherDims,P)})}});function v(S,O,E){n0.get(O)!=null?S.otherDims[O]=E:(S.coordDim=O,S.coordDimIndex=E,i.set(O,!0))}var m=e.generateCoord,y=e.generateCoordCount,b=y!=null;y=m?y||1:0;var w=m||"value";function C(S){S.name==null&&(S.name=S.coordDim)}if(s)N(a,function(S){C(S)}),a.sort(function(S,O){return S.storeDimIndex-O.storeDimIndex});else for(var _=0;_<o;_++){var D=p(_),x=D.coordDim;x==null&&(D.coordDim=XV(w,i,b),D.coordDimIndex=0,(!m||y<=0)&&(D.isExtraCoord=!0),y--),C(D),D.type==null&&(yS(t,_)===jt.Must||D.isExtraCoord&&(D.otherDims.itemName!=null||D.otherDims.seriesName!=null))&&(D.type="ordinal")}return qV(a),new S2({source:t,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function qV(t){for(var e=Ae(),r=0;r<t.length;r++){var n=t[r],i=n.name,a=e.get(i)||0;a>0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function YV(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return N(e,function(a){var o;we(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function XV(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var KV=function(){function t(e){this.coordSysDims=[],this.axisMap=Ae(),this.categoryAxisMap=Ae(),this.coordSysName=e}return t}();function ZV(t){var e=t.get("coordinateSystem"),r=new KV(e),n=JV[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var JV={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",sn).models[0],a=t.getReferringComponents("yAxis",sn).models[0];if(process.env.NODE_ENV!=="production"){if(!i)throw new Error('xAxis "'+_a(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+_a(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),gs(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),gs(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",sn).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],r.set("single",i),gs(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",sn).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!o)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),gs(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),gs(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();N(a.parallelAxisIndex,function(s,u){var l=i.getComponent("parallelAxis",s),f=o[u];r.set(f,l),gs(l)&&(n.set(f,l),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=u))})}};function gs(t){return t.get("type")==="category"}function QV(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;eH(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var u=!!(t&&t.get("stack")),l,f,c,h;if(N(a,function(y,b){be(y)&&(a[b]=y={name:y}),u&&!y.isExtraCoord&&(!n&&!l&&y.ordinalMeta&&(l=y),!f&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(f=y))}),f&&!n&&!l&&(n=!0),f){c="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var d=f.coordDim,p=f.type,g=0;N(a,function(y){y.coordDim===d&&g++});var v={name:c,coordDim:d,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:h,coordDim:h,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(h,p),m.storeDimIndex=s.ensureCalculationDimension(c,p)),o.appendCalculationDimension(v),o.appendCalculationDimension(m)):(a.push(v),a.push(m))}return{stackedDimension:f&&f.name,stackedByDimension:l&&l.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:c}}function eH(t){return!E2(t.schema)}function ms(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function tH(t,e){return ms(t,e)?t.getCalculationInfo("stackResultDimension"):e}function rH(t,e){var r=t.get("coordinateSystem"),n=l0.get(r),i;return e&&e.coordSysDims&&(i=ye(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var u=s.get("type");o.type=zV(u)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function nH(t,e,r){var n,i;return r&&N(t,function(a,o){var s=a.coordDim,u=r.categoryAxisMap.get(s);u&&(n==null&&(n=o),a.ordinalMeta=u.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function Z0(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===qr;var o=ZV(e),s=rH(e,o),u=r.useEncodeDefaulter,l=De(u)?u:u?Dt(X7,s,e):null,f={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},c=F2(i,f),h=nH(c.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(c),p=QV(e,{schema:c,store:d}),g=new M2(c,e);g.setCalculationInfo(p);var v=h!=null&&iH(i)?function(m,y,b,w){return w===h?b:this.defaultDimValueGetter(m,y,b,w)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,v),g}function iH(t){if(t.sourceFormat===qr){var e=aH(t.data||[]);return!he(yu(e))}}function aH(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}var kn=function(){function t(e){this._setting=e||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype.unionExtent=function(e){var r=this._extent;e[0]<r[0]&&(r[0]=e[0]),e[1]>r[1]&&(r[1]=e[1])},t.prototype.unionExtentFromData=function(e,r){this.unionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r)},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();ec(kn);var oH=0,J0=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++oH}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&ye(n,sH);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!be(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Ae(this.categories))},t}();function sH(t){return we(t)&&t.value!=null?t.value:t+""}function uH(t){var e=Math.pow(10,Jf(Math.abs(t))),r=Math.abs(t/e);return r===0||r===1||r===2||r===3||r===5}function Q0(t){return t.type==="interval"||t.type==="log"}function lH(t,e,r,n){var i={},a=t[1]-t[0],o=i.interval=sD(a/e);r!=null&&o<r&&(o=i.interval=r),n!=null&&o>n&&(o=i.interval=n);var s=i.intervalPrecision=L2(o),u=i.niceTickExtent=[Tt(Math.ceil(t[0]/o)*o,s),Tt(Math.floor(t[1]/o)*o,s)];return fH(u,t),i}function em(t){var e=Math.pow(10,Jf(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Tt(r*e)}function L2(t){return ai(t)+2}function I2(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function fH(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),I2(t,0,e),I2(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function ph(t,e){return t>=e[0]&&t<=e[1]}function gh(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function mh(t,e){return t*(e[1]-e[0])+e[0]}var tm=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new J0({})),he(i)&&(i=new J0({categories:ye(i,function(a){return we(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:be(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return r=this.parse(r),ph(r,this._extent)&&this._ordinalMeta.categories[r]!=null},e.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),gh(r,this._extent)},e.prototype.scale=function(r){return r=Math.round(mh(r,this._extent)),this.getRawOrdinalNumber(r)},e.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},e.prototype.getMinorTicks=function(r){},e.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,u=Math.min(s,n.length);o<u;++o){var l=n[o];i[o]=l,a[l]=o}for(var f=0;o<s;++o){for(;a[f]!=null;)f++;i.push(f),a[f]=o}},e.prototype._getTickNumber=function(r){var n=this._ticksByOrdinalNumber;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getRawOrdinalNumber=function(r){var n=this._ordinalNumbersByTick;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getLabel=function(r){if(!this.isBlank()){var n=this.getRawOrdinalNumber(r.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(r,n){this.unionExtent(r.getApproximateExtent(n))},e.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(kn);kn.registerClass(tm);var eo=Tt,ys=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return ph(r,this._extent)},e.prototype.normalize=function(r){return gh(r,this._extent)},e.prototype.scale=function(r){return mh(r,this._extent)},e.prototype.setExtent=function(r,n){var i=this._extent;isNaN(r)||(i[0]=parseFloat(r)),isNaN(n)||(i[1]=parseFloat(n))},e.prototype.unionExtent=function(r){var n=this._extent;r[0]<n[0]&&(n[0]=r[0]),r[1]>n[1]&&(n[1]=r[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=L2(r)},e.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var u=1e4;i[0]<a[0]&&(r?s.push({value:eo(a[0]-n,o)}):s.push({value:i[0]}));for(var l=a[0];l<=a[1]&&(s.push({value:l}),l=eo(l+n,o),l!==s[s.length-1].value);)if(s.length>u)return[];var f=s.length?s[s.length-1].value:a[1];return i[1]>f&&(r?s.push({value:eo(f+n,o)}):s.push({value:i[1]})),s},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;o<n.length;o++){for(var s=n[o],u=n[o-1],l=0,f=[],c=s.value-u.value,h=c/r;l<r-1;){var d=eo(u.value+(l+1)*h);d>a[0]&&d<a[1]&&f.push(d),l++}i.push(f)}return i},e.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=ai(r.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=eo(r.value,i,!0);return uS(a)},e.prototype.calcNiceTicks=function(r,n,i){r=r||5;var a=this._extent,o=a[1]-a[0];if(isFinite(o)){o<0&&(o=-o,a.reverse());var s=lH(a,r,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(r){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);r.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval;r.fixMin||(n[0]=eo(Math.floor(n[0]/o)*o)),r.fixMax||(n[1]=eo(Math.ceil(n[1]/o)*o))},e.prototype.setNiceExtent=function(r,n){this._niceExtent=[r,n]},e.type="interval",e}(kn);kn.registerClass(ys);var R2=typeof Float32Array<"u",cH=R2?Float32Array:Array;function vi(t){return he(t)?R2?new Float32Array(t):t:new cH(t)}var hH="__ec_stack_";function rm(t){return t.get("stack")||hH+t.seriesIndex}function nm(t){return t.dim+t.index}function N2(t,e){var r=[];return e.eachSeriesByType(t,function(n){z2(n)&&r.push(n)}),r}function dH(t){var e={};N(t,function(u){var l=u.coordinateSystem,f=l.getBaseAxis();if(!(f.type!=="time"&&f.type!=="value"))for(var c=u.getData(),h=f.dim+"_"+f.index,d=c.getDimensionIndex(c.mapDimension(f.dim)),p=c.getStore(),g=0,v=p.count();g<v;++g){var m=p.get(d,g);e[h]?e[h].push(m):e[h]=[m]}});var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(i){i.sort(function(u,l){return u-l});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function k2(t){var e=dH(t),r=[];return N(t,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=e[u],f=Math.abs(o[1]-o[0]),c=a.scale.getExtent(),h=Math.abs(c[1]-c[0]);s=l?f/h*l:f}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=ut(n.get("barWidth"),s),g=ut(n.get("barMaxWidth"),s),v=ut(n.get("barMinWidth")||(j2(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");r.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:v,barGap:m,barCategoryGap:y,axisKey:nm(a),stackId:rm(n)})}),vH(r)}function vH(t){var e={};N(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},u=s.stacks;e[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 c=n.barMaxWidth;c&&(u[l].maxWidth=c);var h=n.barMinWidth;h&&(u[l].minWidth=h);var d=n.barGap;d!=null&&(s.gap=d);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var r={};return N(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var u=Ke(a).length;s=Math.max(35-u*4,15)+"%"}var l=ut(s,o),f=ut(n.gap,1),c=n.remainedWidth,h=n.autoWidthCount,d=(c-l)/(h+(h-1)*f);d=Math.max(d,0),N(a,function(m){var y=m.maxWidth,b=m.minWidth;if(m.width){var w=m.width;y&&(w=Math.min(w,y)),b&&(w=Math.max(w,b)),m.width=w,c-=w+f*w,h--}else{var w=d;y&&y<w&&(w=Math.min(y,c)),b&&b>w&&(w=b),w!==d&&(m.width=w,c-=w+f*w,h--)}}),d=(c-l)/(h+(h-1)*f),d=Math.max(d,0);var p=0,g;N(a,function(m,y){m.width||(m.width=d),g=m,p+=m.width*(1+f)}),g&&(p-=g.width*f);var v=-p/2;N(a,function(m,y){r[i][y]=r[i][y]||{bandWidth:o,offset:v,width:m.width},v+=m.width*(1+f)})}),r}function pH(t,e,r){if(t&&e){var n=t[nm(e)];return n!=null&&r!=null?n[rm(r)]:n}}function gH(t,e){var r=N2(t,e),n=k2(r);N(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),u=rm(i),l=n[nm(s)][u],f=l.offset,c=l.width;a.setLayout({bandWidth:l.bandWidth,offset:f,size:c})})}function mH(t){return{seriesType:t,plan:D0(),reset:function(e){if(z2(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),u=e.get("showBackground",!0),l=r.mapDimension(a.dim),f=r.getCalculationInfo("stackResultDimension"),c=ms(r,l)&&!!r.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),d=yH(i,a),p=j2(e),g=e.get("barMinHeight")||0,v=f&&r.getDimensionIndex(f),m=r.getLayout("size"),y=r.getLayout("offset");return{progress:function(b,w){for(var C=b.count,_=p&&vi(C*3),D=p&&u&&vi(C*3),x=p&&vi(C),S=n.master.getRect(),O=h?S.width:S.height,E,P=w.getStore(),F=0;(E=b.next())!=null;){var B=P.get(c?v:o,E),M=P.get(s,E),I=d,j=void 0;c&&(j=+B-P.get(o,E));var z=void 0,W=void 0,R=void 0,U=void 0;if(h){var Z=n.dataToPoint([B,M]);if(c){var ee=n.dataToPoint([j,M]);I=ee[0]}z=I,W=Z[1]+y,R=Z[0]-I,U=m,Math.abs(R)<g&&(R=(R<0?-1:1)*g)}else{var Z=n.dataToPoint([M,B]);if(c){var ee=n.dataToPoint([M,j]);I=ee[1]}z=Z[0]+y,W=I,R=m,U=Z[1]-I,Math.abs(U)<g&&(U=(U<=0?-1:1)*g)}p?(_[F]=z,_[F+1]=W,_[F+2]=h?R:U,D&&(D[F]=h?S.x:z,D[F+1]=h?W:S.y,D[F+2]=O),x[E]=E):w.setItemLayout(E,{x:z,y:W,width:R,height:U}),F+=3}p&&w.setLayout({largePoints:_,largeDataIndices:x,largeBackgroundPoints:D,valueAxisHorizontal:h})}}}}}}function z2(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function j2(t){return t.pipelineContext&&t.pipelineContext.large}function yH(t,e){var r=e.model.get("startValue");return r||(r=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?r>0?r:1:r))}var bH=function(t,e,r,n){for(;r<n;){var i=r+n>>>1;t[i][1]<e?r=i+1:n=i}return r},V2=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="time",n}return e.prototype.getLabel=function(r){var n=this.getSetting("useUTC");return Rc(r.value,Jx[j7(as(this._minLevelUnit))]||Jx.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(r,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return V7(r,n,i,o,a)},e.prototype.getTicks=function(){var r=this._interval,n=this._extent,i=[];if(!r)return i;i.push({value:n[0],level:0});var a=this.getSetting("useUTC"),o=EH(this._minLevelUnit,this._approxInterval,a,n);return i=i.concat(o),i.push({value:n[1],level:0}),i},e.prototype.calcNiceExtent=function(r){var n=this._extent;if(n[0]===n[1]&&(n[0]-=Ur,n[1]+=Ur),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-Ur}this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},e.prototype.calcNiceTicks=function(r,n,i){r=r||10;var a=this._extent,o=a[1]-a[0];this._approxInterval=o/r,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var s=yh.length,u=Math.min(bH(yh,this._approxInterval,0,s),s-1);this._interval=yh[u][1],this._minLevelUnit=yh[Math.max(u-1,0)][0]},e.prototype.parse=function(r){return nt(r)?r:+oi(r)},e.prototype.contain=function(r){return ph(this.parse(r),this._extent)},e.prototype.normalize=function(r){return gh(this.parse(r),this._extent)},e.prototype.scale=function(r){return mh(r,this._extent)},e.type="time",e}(ys),yh=[["second",Kg],["minute",Zg],["hour",Lu],["quarter-day",Lu*6],["half-day",Lu*12],["day",Ur*1.2],["half-week",Ur*3.5],["week",Ur*7],["month",Ur*31],["quarter",Ur*95],["half-year",Zx/2],["year",Zx]];function CH(t,e,r,n){var i=oi(e),a=oi(r),o=function(p){return tS(i,p,n)===tS(a,p,n)},s=function(){return o("year")},u=function(){return s()&&o("month")},l=function(){return u()&&o("day")},f=function(){return l()&&o("hour")},c=function(){return f()&&o("minute")},h=function(){return c()&&o("second")},d=function(){return h()&&o("millisecond")};switch(t){case"year":return s();case"month":return u();case"day":return l();case"hour":return f();case"minute":return c();case"second":return h();case"millisecond":return d()}}function wH(t,e){return t/=Ur,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function _H(t){var e=30*Ur;return t/=e,t>6?6:t>3?3:t>2?2:1}function DH(t){return t/=Lu,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function H2(t,e){return t/=e?Zg:Kg,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function xH(t){return sD(t)}function SH(t,e,r){var n=new Date(t);switch(as(e)){case"year":case"month":n[rS(r)](0);case"day":n[nS(r)](1);case"hour":n[iS(r)](0);case"minute":n[aS(r)](0);case"second":n[oS(r)](0),n[sS(r)](0)}return n.getTime()}function EH(t,e,r,n){var i=1e4,a=Qx,o=0;function s(O,E,P,F,B,M,I){for(var j=new Date(E),z=E,W=j[F]();z<P&&z<=n[1];)I.push({value:z}),W+=O,j[B](W),z=j.getTime();I.push({value:z,notAdd:!0})}function u(O,E,P){var F=[],B=!E.length;if(!CH(as(O),n[0],n[1],r)){B&&(E=[{value:SH(new Date(n[0]),O,r)},{value:n[1]}]);for(var M=0;M<E.length-1;M++){var I=E[M].value,j=E[M+1].value;if(I!==j){var z=void 0,W=void 0,R=void 0,U=!1;switch(O){case"year":z=Math.max(1,Math.round(e/Ur/365)),W=Qg(r),R=H7(r);break;case"half-year":case"quarter":case"month":z=_H(e),W=os(r),R=rS(r);break;case"week":case"half-week":case"day":z=wH(e),W=Nc(r),R=nS(r),U=!0;break;case"half-day":case"quarter-day":case"hour":z=DH(e),W=Ru(r),R=iS(r);break;case"minute":z=H2(e,!0),W=kc(r),R=aS(r);break;case"second":z=H2(e,!1),W=zc(r),R=oS(r);break;case"millisecond":z=xH(e),W=jc(r),R=sS(r);break}s(z,I,j,W,R,U,F),O==="year"&&P.length>1&&M===0&&P.unshift({value:P[0].value-z})}}for(var M=0;M<F.length;M++)P.push(F[M]);return F}}for(var l=[],f=[],c=0,h=0,d=0;d<a.length&&o++<i;++d){var p=as(a[d]);if(z7(a[d])){u(a[d],l[l.length-1]||[],f);var g=a[d+1]?as(a[d+1]):null;if(p!==g){if(f.length){h=c,f.sort(function(O,E){return O.value-E.value});for(var v=[],m=0;m<f.length;++m){var y=f[m].value;(m===0||f[m-1].value!==y)&&(v.push(f[m]),y>=n[0]&&y<=n[1]&&c++)}var b=(n[1]-n[0])/e;if(c>b*1.5&&h>b/1.5||(l.push(v),c>b||t===a[d]))break}f=[]}}}process.env.NODE_ENV!=="production"&&o>=i&&xt("Exceed safe limit.");for(var w=bt(ye(l,function(O){return bt(O,function(E){return E.value>=n[0]&&E.value<=n[1]&&!E.notAdd})}),function(O){return O.length>0}),C=[],_=w.length-1,d=0;d<w.length;++d)for(var D=w[d],x=0;x<D.length;++x)C.push({value:D[x].value,level:_-d});C.sort(function(O,E){return O.value-E.value});for(var S=[],d=0;d<C.length;++d)(d===0||C[d].value!==C[d-1].value)&&S.push(C[d]);return S}kn.registerClass(V2);var W2=kn.prototype,il=ys.prototype,AH=Tt,TH=Math.floor,OH=Math.ceil,bh=Math.pow,hn=Math.log,im=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new ys,r._interval=0,r}return e.prototype.getTicks=function(r){var n=this._originalScale,i=this._extent,a=n.getExtent(),o=il.getTicks.call(this,r);return ye(o,function(s){var u=s.value,l=Tt(bh(this.base,u));return l=u===i[0]&&this._fixMin?Ch(l,a[0]):l,l=u===i[1]&&this._fixMax?Ch(l,a[1]):l,{value:l}},this)},e.prototype.setExtent=function(r,n){var i=hn(this.base);r=hn(Math.max(0,r))/i,n=hn(Math.max(0,n))/i,il.setExtent.call(this,r,n)},e.prototype.getExtent=function(){var r=this.base,n=W2.getExtent.call(this);n[0]=bh(r,n[0]),n[1]=bh(r,n[1]);var i=this._originalScale,a=i.getExtent();return this._fixMin&&(n[0]=Ch(n[0],a[0])),this._fixMax&&(n[1]=Ch(n[1],a[1])),n},e.prototype.unionExtent=function(r){this._originalScale.unionExtent(r);var n=this.base;r[0]=hn(r[0])/hn(n),r[1]=hn(r[1])/hn(n),W2.unionExtent.call(this,r)},e.prototype.unionExtentFromData=function(r,n){this.unionExtent(r.getApproximateExtent(n))},e.prototype.calcNiceTicks=function(r){r=r||10;var n=this._extent,i=n[1]-n[0];if(!(i===1/0||i<=0)){var a=Zk(i),o=r/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Tt(OH(n[0]/a)*a),Tt(TH(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){il.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return r=hn(r)/hn(this.base),ph(r,this._extent)},e.prototype.normalize=function(r){return r=hn(r)/hn(this.base),gh(r,this._extent)},e.prototype.scale=function(r){return r=mh(r,this._extent),bh(this.base,r)},e.type="log",e}(kn),$2=im.prototype;$2.getMinorTicks=il.getMinorTicks,$2.getLabel=il.getLabel;function Ch(t,e){return AH(t,ai(e))}kn.registerClass(im);var PH=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var a=r.get("min",!0);a==null&&(a=r.get("startValue",!0));var o=this._modelMinRaw=a;De(o)?this._modelMinNum=wh(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=wh(e,o));var s=this._modelMaxRaw=r.get("max",!0);if(De(s)?this._modelMaxNum=wh(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=wh(e,s)),i)this._axisDataLen=r.getCategories().length;else{var u=r.get("boundaryGap"),l=he(u)?u:[u||0,u||0];typeof l[0]=="boolean"||typeof l[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[Bi(l[0],1),Bi(l[1],1)]}},t.prototype.calculate=function(){var e=this._isOrdinal,r=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=e?null:n-r||Math.abs(r),s=this._modelMinRaw==="dataMin"?r:this._modelMinNum,u=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,l=s!=null,f=u!=null;s==null&&(s=e?i?0:NaN:r-a[0]*o),u==null&&(u=e?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(u==null||!isFinite(u))&&(u=NaN);var c=Fo(s)||Fo(u)||e&&!i;this._needCrossZero&&(s>0&&u>0&&!l&&(s=0),s<0&&u<0&&!f&&(u=0));var h=this._determinedMin,d=this._determinedMax;return h!=null&&(s=h,l=!0),d!=null&&(u=d,f=!0),{min:s,max:u,minFixed:l,maxFixed:f,isBlank:c}},t.prototype.modifyDataMinMax=function(e,r){process.env.NODE_ENV!=="production"&&Ee(!this.frozen),this[MH[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=BH[e];process.env.NODE_ENV!=="production"&&Ee(!this.frozen&&this[n]==null),this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),BH={min:"_determinedMin",max:"_determinedMax"},MH={min:"_dataMin",max:"_dataMax"};function FH(t,e,r){var n=t.rawExtentInfo;return n||(n=new PH(t,e,r),t.rawExtentInfo=n,n)}function wh(t,e){return e==null?null:Fo(e)?NaN:t.parse(e)}function G2(t,e){var r=t.type,n=FH(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=N2("bar",o),u=!1;if(N(s,function(c){u=u||c.getBaseAxis()===e.axis}),u){var l=k2(s),f=LH(i,a,e,l);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function LH(t,e,r,n){var i=r.axis.getExtent(),a=i[1]-i[0],o=pH(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;N(o,function(d){s=Math.min(d.offset,s)});var u=-1/0;N(o,function(d){u=Math.max(d.offset+d.width,u)}),s=Math.abs(s),u=Math.abs(u);var l=s+u,f=e-t,c=1-(s+u)/a,h=f/c-f;return e+=h*(u/l),t-=h*(s/l),{min:t,max:e}}function U2(t,e){var r=e,n=G2(t,r),i=n.extent,a=r.get("splitNumber");t instanceof im&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),u=o==="interval"||o==="time";t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:u?r.get("minInterval"):null,maxInterval:u?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function IH(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new tm({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new V2({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(kn.getClass(e)||ys)}}function RH(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function bs(t){var e=t.getLabelModel().get("formatter"),r=t.type==="category"?t.scale.getExtent()[0]:null;return t.scale.type==="time"?function(n){return function(i,a){return t.scale.getFormattedLabel(i,a,n)}}(e):be(e)?function(n){return function(i){var a=t.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(e):De(e)?function(n){return function(i,a){return r!=null&&(a=i.value-r),n(am(t,i),a,i.level!=null?{level:i.level}:null)}}(e):function(n){return t.scale.getLabel(n)}}function am(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function NH(t){var e=t.model,r=t.scale;if(!(!e.get(["axisLabel","show"])||r.isBlank())){var n,i,a=r.getExtent();r instanceof tm?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=bs(t),u,l=1;i>40&&(l=Math.ceil(i/40));for(var f=0;f<i;f+=l){var c=n?n[f]:{value:a[0]+f},h=s(c,f),d=o.getTextRect(h),p=kH(d,o.get("rotate")||0);u?u.union(p):u=p}return u}}function kH(t,e){var r=e*Math.PI/180,n=t.width,i=t.height,a=n*Math.abs(Math.cos(r))+Math.abs(i*Math.sin(r)),o=n*Math.abs(Math.sin(r))+Math.abs(i*Math.cos(r)),s=new Ue(t.x,t.y,a,o);return s}function om(t){var e=t.get("interval");return e??"auto"}function q2(t){return t.type==="category"&&om(t.getLabelModel())===0}function zH(t,e){var r={};return N(t.mapDimensionsAll(e),function(n){r[tH(t,n)]=!0}),Ke(r)}var jH=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}(),Y2=[],VH={registerPreprocessor:C2,registerProcessor:w2,registerPostInit:BV,registerPostUpdate:MV,registerUpdateLifecycle:G0,registerAction:vs,registerCoordinateSystem:FV,registerLayout:LV,registerVisual:Qa,registerTransform:RV,registerLoading:D2,registerMap:IV,registerImpl:cV,PRIORITY:xV,ComponentModel:Ze,ComponentView:Br,SeriesModel:fn,ChartView:Zr,registerComponentModel:function(t){Ze.registerClass(t)},registerComponentView:function(t){Br.registerClass(t)},registerSeriesModel:function(t){fn.registerClass(t)},registerChartView:function(t){Zr.registerClass(t)},registerSubTypeDefaulter:function(t,e){Ze.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Gk(t,e)}};function Wi(t){if(he(t)){N(t,function(e){Wi(e)});return}Ge(Y2,t)>=0||(Y2.push(t),De(t)&&(t={install:t}),t.install(VH))}var al=lt();function X2(t,e){var r=ye(e,function(n){return t.scale.parse(n)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function HH(t){var e=t.getLabelModel().get("customValues");if(e){var r=bs(t);return{labels:X2(t,e).map(function(n){var i={value:n};return{formattedLabel:r(i),rawLabel:t.scale.getLabel(i),tickValue:n}})}}return t.type==="category"?$H(t):UH(t)}function WH(t,e){var r=t.getTickModel().get("customValues");return r?{ticks:X2(t,r)}:t.type==="category"?GH(t,e):{ticks:ye(t.scale.getTicks(),function(n){return n.value})}}function $H(t){var e=t.getLabelModel(),r=K2(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function K2(t,e){var r=Z2(t,"labels"),n=om(e),i=J2(r,n);if(i)return i;var a,o;return De(n)?a=tA(t,n):(o=n==="auto"?qH(t):n,a=eA(t,o)),Q2(r,n,{labels:a,labelCategoryInterval:o})}function GH(t,e){var r=Z2(t,"ticks"),n=om(e),i=J2(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),De(n))a=tA(t,n,!0);else if(n==="auto"){var s=K2(t,t.getLabelModel());o=s.labelCategoryInterval,a=ye(s.labels,function(u){return u.tickValue})}else o=n,a=eA(t,o,!0);return Q2(r,n,{ticks:a,tickCategoryInterval:o})}function UH(t){var e=t.scale.getTicks(),r=bs(t);return{labels:ye(e,function(n,i){return{level:n.level,formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value}})}}function Z2(t,e){return al(t)[e]||(al(t)[e]=[])}function J2(t,e){for(var r=0;r<t.length;r++)if(t[r].key===e)return t[r].value}function Q2(t,e,r){return t.push({key:e,value:r}),r}function qH(t){var e=al(t).autoInterval;return e??(al(t).autoInterval=t.calculateCategoryInterval())}function YH(t){var e=XH(t),r=bs(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,i=t.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var u=a[0],l=t.dataToCoord(u+1)-t.dataToCoord(u),f=Math.abs(l*Math.cos(n)),c=Math.abs(l*Math.sin(n)),h=0,d=0;u<=a[1];u+=s){var p=0,g=0,v=Yp(r({value:u}),e.font,"center","top");p=v.width*1.3,g=v.height*1.3,h=Math.max(h,p,7),d=Math.max(d,g,7)}var m=h/f,y=d/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var b=Math.max(0,Math.floor(Math.min(m,y))),w=al(t.model),C=t.getExtent(),_=w.lastAutoInterval,D=w.lastTickCount;return _!=null&&D!=null&&Math.abs(_-b)<=1&&Math.abs(D-o)<=1&&_>b&&w.axisExtent0===C[0]&&w.axisExtent1===C[1]?b=_:(w.lastTickCount=o,w.lastAutoInterval=b,w.axisExtent0=C[0],w.axisExtent1=C[1]),b}function XH(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function eA(t,e,r){var n=bs(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],u=Math.max((e||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 c=q2(t),h=o.get("showMinLabel")||c,d=o.get("showMaxLabel")||c;h&&l!==a[0]&&g(a[0]);for(var p=l;p<=a[1];p+=u)g(p);d&&p-u!==a[1]&&g(a[1]);function g(v){var m={value:v};s.push(r?v:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:v})}return s}function tA(t,e,r){var n=t.scale,i=bs(t),a=[];return N(n.getTicks(),function(o){var s=n.getLabel(o),u=o.value;e(o.value,s)&&a.push(r?u:{formattedLabel:i(o),rawLabel:s,tickValue:u})}),a}var rA=[0,1],KH=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(e)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return qk(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&i.type==="ordinal"&&(n=n.slice(),nA(n,i.count())),eg(e,rA,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),nA(n,i.count()));var a=eg(e,n,rA,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=WH(this,r),i=n.ticks,a=ye(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return ZH(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=ye(n,function(a){return ye(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(){return HH(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return YH(this)},t}();function nA(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function ZH(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],o=e[1]={coord:a[1]};else{var u=e[i-1].tickValue-e[0].tickValue,l=(e[i-1].coord-e[0].coord)/u;N(e,function(d){d.coord-=l/2});var f=t.scale.getExtent();s=1+f[1]-e[i-1].tickValue,o={coord:e[i-1].coord+l*s},e.push(o)}var c=a[0]>a[1];h(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&h(a[0],e[0].coord)&&e.unshift({coord:a[0]}),h(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&h(o.coord,a[1])&&e.push({coord:a[1]});function h(d,p){return d=Tt(d),p=Tt(p),c?d>p:d<p}}var ol=Math.PI*2,to=ui.CMD,JH=["top","right","bottom","left"];function QH(t,e,r,n,i){var a=r.width,o=r.height;switch(t){case"top":n.set(r.x+a/2,r.y-e),i.set(0,-1);break;case"bottom":n.set(r.x+a/2,r.y+o+e),i.set(0,1);break;case"left":n.set(r.x-e,r.y+o/2),i.set(-1,0);break;case"right":n.set(r.x+a+e,r.y+o/2),i.set(1,0);break}}function eW(t,e,r,n,i,a,o,s,u){o-=t,s-=e;var l=Math.sqrt(o*o+s*s);o/=l,s/=l;var f=o*r+t,c=s*r+e;if(Math.abs(n-i)%ol<1e-4)return u[0]=f,u[1]=c,l-r;if(a){var h=n;n=li(i),i=li(h)}else n=li(n),i=li(i);n>i&&(i+=ol);var d=Math.atan2(s,o);if(d<0&&(d+=ol),d>=n&&d<=i||d+ol>=n&&d+ol<=i)return u[0]=f,u[1]=c,l-r;var p=r*Math.cos(n)+t,g=r*Math.sin(n)+e,v=r*Math.cos(i)+t,m=r*Math.sin(i)+e,y=(p-o)*(p-o)+(g-s)*(g-s),b=(v-o)*(v-o)+(m-s)*(m-s);return y<b?(u[0]=p,u[1]=g,Math.sqrt(y)):(u[0]=v,u[1]=m,Math.sqrt(b))}function _h(t,e,r,n,i,a,o,s){var u=i-t,l=a-e,f=r-t,c=n-e,h=Math.sqrt(f*f+c*c);f/=h,c/=h;var d=u*f+l*c,p=d/h;s&&(p=Math.min(Math.max(p,0),1)),p*=h;var g=o[0]=t+p*f,v=o[1]=e+p*c;return Math.sqrt((g-i)*(g-i)+(v-a)*(v-a))}function iA(t,e,r,n,i,a,o){r<0&&(t=t+r,r=-r),n<0&&(e=e+n,n=-n);var s=t+r,u=e+n,l=o[0]=Math.min(Math.max(i,t),s),f=o[1]=Math.min(Math.max(a,e),u);return Math.sqrt((l-i)*(l-i)+(f-a)*(f-a))}var dn=[];function tW(t,e,r){var n=iA(e.x,e.y,e.width,e.height,t.x,t.y,dn);return r.set(dn[0],dn[1]),n}function rW(t,e,r){for(var n=0,i=0,a=0,o=0,s,u,l=1/0,f=e.data,c=t.x,h=t.y,d=0;d<f.length;){var p=f[d++];d===1&&(n=f[d],i=f[d+1],a=n,o=i);var g=l;switch(p){case to.M:a=f[d++],o=f[d++],n=a,i=o;break;case to.L:g=_h(n,i,f[d],f[d+1],c,h,dn,!0),n=f[d++],i=f[d++];break;case to.C:g=P_(n,i,f[d++],f[d++],f[d++],f[d++],f[d],f[d+1],c,h,dn),n=f[d++],i=f[d++];break;case to.Q:g=F_(n,i,f[d++],f[d++],f[d],f[d+1],c,h,dn),n=f[d++],i=f[d++];break;case to.A:var v=f[d++],m=f[d++],y=f[d++],b=f[d++],w=f[d++],C=f[d++];d+=1;var _=!!(1-f[d++]);s=Math.cos(w)*y+v,u=Math.sin(w)*b+m,d<=1&&(a=s,o=u);var D=(c-v)*b/y+v;g=eW(v,m,b,w,w+C,_,D,h,dn),n=Math.cos(w+C)*y+v,i=Math.sin(w+C)*b+m;break;case to.R:a=n=f[d++],o=i=f[d++];var x=f[d++],S=f[d++];g=iA(a,o,x,S,c,h,dn);break;case to.Z:g=_h(n,i,a,o,c,h,dn,!0),n=a,i=o;break}g<l&&(l=g,r.set(dn[0],dn[1]))}return l}var vn=new _e,st=new _e,wt=new _e,zn=new _e,jn=new _e;function aA(t,e){if(t){var r=t.getTextGuideLine(),n=t.getTextContent();if(n&&r){var i=t.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||JH,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var u=1/0,l=i.anchor,f=t.getComputedTransform(),c=f&&Tf([],f),h=e.get("length2")||0;l&&wt.copy(l);for(var d=0;d<o.length;d++){var p=o[d];QH(p,0,s,vn,zn),_e.scaleAndAdd(st,vn,zn,h),st.transform(c);var g=t.getBoundingRect(),v=l?l.distance(st):t instanceof Ve?rW(st,t.path,wt):tW(st,g,wt);v<u&&(u=v,st.transform(f),wt.transform(f),wt.toArray(a[0]),st.toArray(a[1]),vn.toArray(a[2]))}oA(a,e.get("minTurnAngle")),r.setShape({points:a})}}}var Dh=[],or=new _e;function oA(t,e){if(e<=180&&e>0){e=e/180*Math.PI,vn.fromArray(t[0]),st.fromArray(t[1]),wt.fromArray(t[2]),_e.sub(zn,vn,st),_e.sub(jn,wt,st);var r=zn.len(),n=jn.len();if(!(r<.001||n<.001)){zn.scale(1/r),jn.scale(1/n);var i=zn.dot(jn),a=Math.cos(e);if(a<i){var o=_h(st.x,st.y,wt.x,wt.y,vn.x,vn.y,Dh,!1);or.fromArray(Dh),or.scaleAndAdd(jn,o/Math.tan(Math.PI-e));var s=wt.x!==st.x?(or.x-st.x)/(wt.x-st.x):(or.y-st.y)/(wt.y-st.y);if(isNaN(s))return;s<0?_e.copy(or,st):s>1&&_e.copy(or,wt),or.toArray(t[1])}}}}function nW(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,vn.fromArray(t[0]),st.fromArray(t[1]),wt.fromArray(t[2]),_e.sub(zn,st,vn),_e.sub(jn,wt,st);var n=zn.len(),i=jn.len();if(!(n<.001||i<.001)){zn.scale(1/n),jn.scale(1/i);var a=zn.dot(e),o=Math.cos(r);if(a<o){var s=_h(st.x,st.y,wt.x,wt.y,vn.x,vn.y,Dh,!1);or.fromArray(Dh);var u=Math.PI/2,l=Math.acos(jn.dot(e)),f=u+l-r;if(f>=u)_e.copy(or,wt);else{or.scaleAndAdd(jn,s/Math.tan(Math.PI/2-f));var c=wt.x!==st.x?(or.x-st.x)/(wt.x-st.x):(or.y-st.y)/(wt.y-st.y);if(isNaN(c))return;c<0?_e.copy(or,st):c>1&&_e.copy(or,wt)}or.toArray(t[1])}}}}function sm(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;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?t.useStyle(s):a.style=s}function iW(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=dp(n[0],n[1]),a=dp(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=Af([],n[1],n[0],o/i),u=Af([],n[1],n[2],o/a),l=Af([],s,u,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),t.bezierCurveTo(u[0],u[1],u[0],u[1],n[2][0],n[2][1])}else for(var f=1;f<n.length;f++)t.lineTo(n[f][0],n[f][1])}function sA(t,e,r){var n=t.getTextGuideLine(),i=t.getTextContent();if(!i){n&&t.removeTextGuideLine();return}for(var a=e.normal,o=a.get("show"),s=i.ignore,u=0;u<lc.length;u++){var l=lc[u],f=e[l],c=l==="normal";if(f){var h=f.get("show"),d=c?s:Be(i.states[l]&&i.states[l].ignore,s);if(d||!Be(h,o)){var p=c?n:n&&n.states[l];p&&(p.ignore=!0),n&&sm(n,!0,l,f);continue}n||(n=new Pu,t.setTextGuideLine(n),!c&&(s||!o)&&sm(n,!0,"normal",e.normal),t.stateProxy&&(n.stateProxy=t.stateProxy)),sm(n,!1,l,f)}}if(n){je(n.style,r),n.style.fill=null;var g=a.get("showAbove"),v=t.textGuideLineConfig=t.textGuideLineConfig||{};v.showAbove=g||!1,n.buildPath=iW}}function uA(t,e){e=e||"labelLine";for(var r={normal:t.getModel(e)},n=0;n<Gr.length;n++){var i=Gr[n];r[i]=t.getModel([i,e])}return r}function lA(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];if(!n.defaultAttr.ignore){var i=n.label,a=i.getComputedTransform(),o=i.getBoundingRect(),s=!a||a[1]<1e-5&&a[2]<1e-5,u=i.style.margin||0,l=o.clone();l.applyTransform(a),l.x-=u/2,l.y-=u/2,l.width+=u,l.height+=u;var f=s?new xc(o,a):null;e.push({label:i,labelLine:n.labelLine,rect:l,localRect:o,obb:f,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:a})}}return e}function fA(t,e,r,n,i,a){var o=t.length;if(o<2)return;t.sort(function(x,S){return x.rect[e]-S.rect[e]});for(var s=0,u,l=!1,f=0,c=0;c<o;c++){var h=t[c],d=h.rect;u=d[e]-s,u<0&&(d[e]-=u,h.label[e]-=u,l=!0);var p=Math.max(-u,0);f+=p,s=d[e]+d[r]}f>0&&a&&C(-f/o,0,o);var g=t[0],v=t[o-1],m,y;b(),m<0&&_(-m,.8),y<0&&_(y,.8),b(),w(m,y,1),w(y,m,-1),b(),m<0&&D(-m),y<0&&D(y);function b(){m=g.rect[e]-n,y=i-v.rect[e]-v.rect[r]}function w(x,S,O){if(x<0){var E=Math.min(S,-x);if(E>0){C(E*O,0,o);var P=E+x;P<0&&_(-P*O,1)}else _(-x*O,1)}}function C(x,S,O){x!==0&&(l=!0);for(var E=S;E<O;E++){var P=t[E],F=P.rect;F[e]+=x,P.label[e]+=x}}function _(x,S){for(var O=[],E=0,P=1;P<o;P++){var F=t[P-1].rect,B=Math.max(t[P].rect[e]-F[e]-F[r],0);O.push(B),E+=B}if(E){var M=Math.min(Math.abs(x)/E,S);if(x>0)for(var P=0;P<o-1;P++){var I=O[P]*M;C(I,0,P+1)}else for(var P=o-1;P>0;P--){var I=O[P-1]*M;C(-I,P,o)}}}function D(x){var S=x<0?-1:1;x=Math.abs(x);for(var O=Math.ceil(x/(o-1)),E=0;E<o-1;E++)if(S>0?C(O,0,E+1):C(-O,o-E-1,o),x-=O,x<=0)return}return l}function aW(t,e,r,n){return fA(t,"x","width",e,r,n)}function cA(t,e,r,n){return fA(t,"y","height",e,r,n)}function hA(t){var e=[];t.sort(function(g,v){return v.priority-g.priority});var r=new Ue(0,0,0,0);function n(g){if(!g.ignore){var v=g.ensureState("emphasis");v.ignore==null&&(v.ignore=!1)}g.ignore=!0}for(var i=0;i<t.length;i++){var a=t[i],o=a.axisAligned,s=a.localRect,u=a.transform,l=a.label,f=a.labelLine;r.copy(a.rect),r.width-=.1,r.height-=.1,r.x+=.05,r.y+=.05;for(var c=a.obb,h=!1,d=0;d<e.length;d++){var p=e[d];if(r.intersect(p.rect)){if(o&&p.axisAligned){h=!0;break}if(p.obb||(p.obb=new xc(p.localRect,p.transform)),c||(c=new xc(s,u)),c.intersect(p.obb)){h=!0;break}}}h?(n(l),f&&n(f)):(l.attr("ignore",a.defaultAttr.ignore),f&&f.attr("ignore",a.defaultAttr.labelGuideIgnore),e.push(a))}}function oW(t){if(t){for(var e=[],r=0;r<t.length;r++)e.push(t[r].slice());return e}}function sW(t,e){var r=t.label,n=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:r.style.align,verticalAlign:r.style.verticalAlign,labelLinePoints:oW(n&&n.shape.points)}}var dA=["align","verticalAlign","width","height","fontSize"],sr=new pu,um=lt(),uW=lt();function xh(t,e,r){for(var n=0;n<r.length;n++){var i=r[n];e[i]!=null&&(t[i]=e[i])}}var Sh=["x","y","rotation"],lW=function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(e,r,n,i,a){var o=i.style,s=i.__hostTarget,u=s.textConfig||{},l=i.getComputedTransform(),f=i.getBoundingRect().plain();Ue.applyTransform(f,f,l),l?sr.setLocalTransform(l):(sr.x=sr.y=sr.rotation=sr.originX=sr.originY=0,sr.scaleX=sr.scaleY=1),sr.rotation=li(sr.rotation);var c=i.__hostTarget,h;if(c){h=c.getBoundingRect().plain();var d=c.getComputedTransform();Ue.applyTransform(h,h,d)}var p=h&&c.getTextGuideLine();this._labelList.push({label:i,labelLine:p,seriesModel:n,dataIndex:e,dataType:r,layoutOption:a,computedLayoutOption:null,rect:f,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:p&&p.ignore,x:sr.x,y:sr.y,scaleX:sr.scaleX,scaleY:sr.scaleY,rotation:sr.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:u.position,attachedRot:u.rotation}})},t.prototype.addLabelsOfSeries=function(e){var r=this;this._chartViewList.push(e);var n=e.__model,i=n.get("labelLayout");(De(i)||Ke(i).length)&&e.group.traverse(function(a){if(a.ignore)return!0;var o=a.getTextContent(),s=He(a);o&&!o.disableLabelLayout&&r._addLabel(s.dataIndex,s.dataType,n,o,i)})},t.prototype.updateLayoutConfig=function(e){var r=e.getWidth(),n=e.getHeight();function i(b,w){return function(){aA(b,w)}}for(var a=0;a<this._labelList.length;a++){var o=this._labelList[a],s=o.label,u=s.__hostTarget,l=o.defaultAttr,f=void 0;De(o.layoutOption)?f=o.layoutOption(sW(o,u)):f=o.layoutOption,f=f||{},o.computedLayoutOption=f;var c=Math.PI/180;u&&u.setTextConfig({local:!1,position:f.x!=null||f.y!=null?null:l.attachedPos,rotation:f.rotate!=null?f.rotate*c:l.attachedRot,offset:[f.dx||0,f.dy||0]});var h=!1;if(f.x!=null?(s.x=ut(f.x,r),s.setStyle("x",0),h=!0):(s.x=l.x,s.setStyle("x",l.style.x)),f.y!=null?(s.y=ut(f.y,n),s.setStyle("y",0),h=!0):(s.y=l.y,s.setStyle("y",l.style.y)),f.labelLinePoints){var d=u.getTextGuideLine();d&&(d.setShape({points:f.labelLinePoints}),h=!1)}var p=um(s);p.needsUpdateLabelLine=h,s.rotation=f.rotate!=null?f.rotate*c:l.rotation,s.scaleX=l.scaleX,s.scaleY=l.scaleY;for(var g=0;g<dA.length;g++){var v=dA[g];s.setStyle(v,f[v]!=null?f[v]:l.style[v])}if(f.draggable){if(s.draggable=!0,s.cursor="move",u){var m=o.seriesModel;if(o.dataIndex!=null){var y=o.seriesModel.getData(o.dataType);m=y.getItemModel(o.dataIndex)}s.on("drag",i(u,m.getModel("labelLine")))}}else s.off("drag"),s.cursor=l.cursor}},t.prototype.layout=function(e){var r=e.getWidth(),n=e.getHeight(),i=lA(this._labelList),a=bt(i,function(u){return u.layoutOption.moveOverlap==="shiftX"}),o=bt(i,function(u){return u.layoutOption.moveOverlap==="shiftY"});aW(a,0,r),cA(o,0,n);var s=bt(i,function(u){return u.layoutOption.hideOverlap});hA(s)},t.prototype.processLabelsOverall=function(){var e=this;N(this._chartViewList,function(r){var n=r.__model,i=r.ignoreLabelLineUpdate,a=n.isAnimationEnabled();r.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!i,u=o.getTextContent();!s&&u&&(s=um(u).needsUpdateLabelLine),s&&e._updateLabelLine(o,n),a&&e._animateLabels(o,n)})})},t.prototype._updateLabelLine=function(e,r){var n=e.getTextContent(),i=He(e),a=i.dataIndex;if(n&&a!=null){var o=r.getData(i.dataType),s=o.getItemModel(a),u={},l=o.getItemVisual(a,"style");if(l){var f=o.getVisual("drawType");u.stroke=l[f]}var c=s.getModel("labelLine");sA(e,uA(s),u),aA(e,c)}},t.prototype._animateLabels=function(e,r){var n=e.getTextContent(),i=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!rs(e))){var a=um(n),o=a.oldLayout,s=He(e),u=s.dataIndex,l={x:n.x,y:n.y,rotation:n.rotation},f=r.getData(s.dataType);if(o){n.attr(o);var h=e.prevStates;h&&(Ge(h,"select")>=0&&n.attr(a.oldLayoutSelect),Ge(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Ft(n,l,r,u)}else if(n.attr(l),!ns(n).valueAnimation){var c=Be(n.style.opacity,1);n.style.opacity=0,qt(n,{style:{opacity:c}},r,u)}if(a.oldLayout=l,n.states.select){var d=a.oldLayoutSelect={};xh(d,l,Sh),xh(d,n.states.select,Sh)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};xh(p,l,Sh),xh(p,n.states.emphasis,Sh)}x7(n,u,f,r,r)}if(i&&!i.ignore&&!i.invisible){var a=uW(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Ft(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,qt(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},t}(),lm=lt();function fW(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=lm(r).labelManager;i||(i=lm(r).labelManager=new lW),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=lm(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var cW=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r){if(process.env.NODE_ENV!=="production"){var n=r.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return Z0(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(r){var n=new It,i=hs("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,u=r.itemHeight*.8,l=hs(s,(r.itemWidth-u)/2,(r.itemHeight-u)/2,u,u,r.itemStyle.fill);n.add(l),l.setStyle(r.itemStyle);var f=r.iconRotate==="inherit"?o:r.iconRotate||0;return l.rotation=f*Math.PI/180,l.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(l.style.stroke=l.style.fill,l.style.fill="#fff",l.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(fn);function fm(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=ls(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(ls(t,e,r[o]));return a.join(" ")}}function vA(t,e){var r=t.mapDimensionsAll("defaultedLabel");if(!he(e))return e+"";for(var n=[],i=0;i<r.length;i++){var a=t.getDimensionIndex(r[i]);a>=0&&n.push(e[a])}return n.join(" ")}var cm=function(t){ce(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o){this.removeAll();var s=hs(r,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=hW,this._symbolType=r,this.add(s)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){dc(this.childAt(0))},e.prototype.downplay=function(){vc(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,u=e.getSymbolSize(r,n),l=o!==this._symbolType,f=a&&a.disableAnimation;if(l){var c=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,u,c)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:u[0]/2,scaleY:u[1]/2};f?h.attr(d):Ft(h,d,s,n),zg(h)}if(this._updateCommon(r,n,u,i,a),l){var h=this.childAt(0);if(!f){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,qt(h,d,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),u=r.hostModel,l,f,c,h,d,p,g,v,m;if(a&&(l=a.emphasisItemStyle,f=a.blurItemStyle,c=a.selectItemStyle,h=a.focus,d=a.blurScope,g=a.labelStatesModels,v=a.hoverScale,m=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var y=a&&a.itemModel?a.itemModel:r.getItemModel(n),b=y.getModel("emphasis");l=b.getModel("itemStyle").getItemStyle(),c=y.getModel(["select","itemStyle"]).getItemStyle(),f=y.getModel(["blur","itemStyle"]).getItemStyle(),h=b.get("focus"),d=b.get("blurScope"),p=b.get("disabled"),g=Fu(y),v=b.getShallow("scale"),m=y.getShallow("cursor")}var w=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(w||0)*Math.PI/180||0);var C=LE(r.getItemVisual(n,"symbolOffset"),i);C&&(s.x=C[0],s.y=C[1]),m&&s.attr("cursor",m);var _=r.getItemVisual(n,"style"),D=_.fill;if(s instanceof fi){var x=s.style;s.useStyle(oe({image:x.image,x:x.x,y:x.y,width:x.width,height:x.height},_))}else s.__isEmptyBrush?s.useStyle(oe({},_)):s.useStyle(_),s.style.decal=null,s.setColor(D,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var S=r.getItemVisual(n,"liftZ"),O=this._z2;S!=null?O==null&&(this._z2=s.z2,s.z2+=S):O!=null&&(s.z2=O,this._z2=null);var E=o&&o.useNameLabel;Mu(s,g,{labelFetcher:u,labelDataIndex:n,defaultText:P,inheritColor:D,defaultOpacity:_.opacity});function P(M){return E?r.getName(M):fm(r,M)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var F=s.ensureState("emphasis");F.style=l,s.ensureState("select").style=c,s.ensureState("blur").style=f;var B=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;F.scaleX=this._sizeX*B,F.scaleY=this._sizeY*B,this.setSymbolScale(1),Eu(this,h,d,p)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=He(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var u=a.getTextContent();u&&Sc(u,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Sc(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return Yj(r.getItemVisual(n,"symbolSize"))},e}(It);function hW(t,e){this.parent.drift(t,e)}function hm(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function pA(t){return t!=null&&!we(t)&&(t={isIgnore:t}),t||{}}function gA(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:Fu(e),cursorStyle:e.get("cursor")}}var dW=function(){function t(e){this.group=new It,this._SymbolCtor=e||cm}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=pA(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,u=gA(e),l={disableAnimation:s},f=r.getSymbolPoint||function(c){return e.getItemLayout(c)};a||n.removeAll(),e.diff(a).add(function(c){var h=f(c);if(hm(e,h,c,r)){var d=new o(e,c,u,l);d.setPosition(h),e.setItemGraphicEl(c,d),n.add(d)}}).update(function(c,h){var d=a.getItemGraphicEl(h),p=f(c);if(!hm(e,p,c,r)){n.remove(d);return}var g=e.getItemVisual(c,"symbol")||"circle",v=d&&d.getSymbolType&&d.getSymbolType();if(!d||v&&v!==g)n.remove(d),d=new o(e,c,u,l),d.setPosition(p);else{d.updateData(e,c,u,l);var m={x:p[0],y:p[1]};s?d.attr(m):Ft(d,m,i)}n.add(d),e.setItemGraphicEl(c,d)}).remove(function(c){var h=a.getItemGraphicEl(c);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=f,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=gA(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=pA(n);function i(u){u.isGroup||(u.incremental=!0,u.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var o=r.getItemLayout(a);if(hm(r,o,a,n)){var s=new this._SymbolCtor(r,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},t.prototype.eachRendered=function(e){Pc(this._progressiveEls||this.group,e)},t.prototype.remove=function(e){var r=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(i){i.fadeOut(function(){r.remove(i)},n.hostModel)}):r.removeAll()},t}();function mA(t,e,r){var n=t.getBaseAxis(),i=t.getOtherAxis(n),a=vW(i,r),o=n.dim,s=i.dim,u=e.mapDimension(s),l=e.mapDimension(o),f=s==="x"||s==="radius"?1:0,c=ye(t.dimensions,function(p){return e.mapDimension(p)}),h=!1,d=e.getCalculationInfo("stackResultDimension");return ms(e,c[0])&&(h=!0,c[0]=d),ms(e,c[1])&&(h=!0,c[1]=d),{dataDimsForPoint:c,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:u,baseDim:l,baseDataOffset:f,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function vW(t,e){var r=0,n=t.scale.getExtent();return e==="start"?r=n[0]:e==="end"?r=n[1]:nt(e)&&!isNaN(e)?r=e:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function yA(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function pW(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function gW(t,e,r,n,i,a,o,s){for(var u=pW(t,e),l=[],f=[],c=[],h=[],d=[],p=[],g=[],v=mA(i,e,o),m=t.getLayout("points")||[],y=e.getLayout("points")||[],b=0;b<u.length;b++){var w=u[b],C=!0,_=void 0,D=void 0;switch(w.cmd){case"=":_=w.idx*2,D=w.idx1*2;var x=m[_],S=m[_+1],O=y[D],E=y[D+1];(isNaN(x)||isNaN(S))&&(x=O,S=E),l.push(x,S),f.push(O,E),c.push(r[_],r[_+1]),h.push(n[D],n[D+1]),g.push(e.getRawIndex(w.idx1));break;case"+":var P=w.idx,F=v.dataDimsForPoint,B=i.dataToPoint([e.get(F[0],P),e.get(F[1],P)]);D=P*2,l.push(B[0],B[1]),f.push(y[D],y[D+1]);var M=yA(v,i,e,P);c.push(M[0],M[1]),h.push(n[D],n[D+1]),g.push(e.getRawIndex(P));break;case"-":C=!1}C&&(d.push(w),p.push(p.length))}p.sort(function(q,L){return g[q]-g[L]});for(var I=l.length,j=vi(I),z=vi(I),W=vi(I),R=vi(I),U=[],b=0;b<p.length;b++){var Z=p[b],ee=b*2,ne=Z*2;j[ee]=l[ne],j[ee+1]=l[ne+1],z[ee]=f[ne],z[ee+1]=f[ne+1],W[ee]=c[ne],W[ee+1]=c[ne+1],R[ee]=h[ne],R[ee+1]=h[ne+1],U[b]=d[Z]}return{current:j,next:z,stackedOnCurrent:W,stackedOnNext:R,status:U}}var $i=Math.min,Gi=Math.max;function ro(t,e){return isNaN(t)||isNaN(e)}function dm(t,e,r,n,i,a,o,s,u){for(var l,f,c,h,d,p,g=r,v=0;v<n;v++){var m=e[g*2],y=e[g*2+1];if(g>=i||g<0)break;if(ro(m,y)){if(u){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](m,y),c=m,h=y;else{var b=m-l,w=y-f;if(b*b+w*w<.5){g+=a;continue}if(o>0){for(var C=g+a,_=e[C*2],D=e[C*2+1];_===m&&D===y&&v<n;)v++,C+=a,g+=a,_=e[C*2],D=e[C*2+1],m=e[g*2],y=e[g*2+1],b=m-l,w=y-f;var x=v+1;if(u)for(;ro(_,D)&&x<n;)x++,C+=a,_=e[C*2],D=e[C*2+1];var S=.5,O=0,E=0,P=void 0,F=void 0;if(x>=n||ro(_,D))d=m,p=y;else{O=_-l,E=D-f;var B=m-l,M=_-m,I=y-f,j=D-y,z=void 0,W=void 0;if(s==="x"){z=Math.abs(B),W=Math.abs(M);var R=O>0?1:-1;d=m-R*z*o,p=y,P=m+R*W*o,F=y}else if(s==="y"){z=Math.abs(I),W=Math.abs(j);var U=E>0?1:-1;d=m,p=y-U*z*o,P=m,F=y+U*W*o}else z=Math.sqrt(B*B+I*I),W=Math.sqrt(M*M+j*j),S=W/(W+z),d=m-O*o*(1-S),p=y-E*o*(1-S),P=m+O*o*S,F=y+E*o*S,P=$i(P,Gi(_,m)),F=$i(F,Gi(D,y)),P=Gi(P,$i(_,m)),F=Gi(F,$i(D,y)),O=P-m,E=F-y,d=m-O*z/W,p=y-E*z/W,d=$i(d,Gi(l,m)),p=$i(p,Gi(f,y)),d=Gi(d,$i(l,m)),p=Gi(p,$i(f,y)),O=m-d,E=y-p,P=m+O*W/z,F=y+E*W/z}t.bezierCurveTo(c,h,d,p,m,y),c=P,h=F}else t.lineTo(m,y)}l=m,f=y,g+=a}return v}var bA=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),mW=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new bA},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&ro(i[o*2-2],i[o*2-1]);o--);for(;a<o&&ro(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=dm(r,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=ui.CMD,s,u,l=n==="x",f=[],c=0;c<a.length;){var h=a[c++],d=void 0,p=void 0,g=void 0,v=void 0,m=void 0,y=void 0,b=void 0;switch(h){case o.M:s=a[c++],u=a[c++];break;case o.L:if(d=a[c++],p=a[c++],b=l?(r-s)/(d-s):(r-u)/(p-u),b<=1&&b>=0){var w=l?(p-u)*b+u:(d-s)*b+s;return l?[r,w]:[w,r]}s=d,u=p;break;case o.C:d=a[c++],p=a[c++],g=a[c++],v=a[c++],m=a[c++],y=a[c++];var C=l?Rf(s,d,g,m,r,f):Rf(u,p,v,y,r,f);if(C>0)for(var _=0;_<C;_++){var D=f[_];if(D<=1&&D>=0){var w=l?Bt(u,p,v,y,D):Bt(s,d,g,m,D);return l?[r,w]:[w,r]}}s=m,u=y;break}}},e}(Ve),yW=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(bA),bW=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new yW},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,u=n.smoothMonotone;if(n.connectNulls){for(;s>0&&ro(i[s*2-2],i[s*2-1]);s--);for(;o<s&&ro(i[o*2],i[o*2+1]);o++);}for(;o<s;){var l=dm(r,i,o,s,s,1,n.smooth,u,n.connectNulls);dm(r,a,o+l-1,l,s,-1,n.stackedOnSmooth,u,n.connectNulls),o+=l+1,r.closePath()}},e}(Ve);function CA(t,e,r,n,i){var a=t.getArea(),o=a.x,s=a.y,u=a.width,l=a.height,f=r.get(["lineStyle","width"])||2;o-=f/2,s-=f/2,u+=f,l+=f,u=Math.ceil(u),o!==Math.floor(o)&&(o=Math.floor(o),u++);var c=new St({shape:{x:o,y:s,width:u,height:l}});if(e){var h=t.getBaseAxis(),d=h.isHorizontal(),p=h.inverse;d?(p&&(c.shape.x+=u),c.shape.width=0):(p||(c.shape.y+=l),c.shape.height=0);var g=De(i)?function(v){i(v,c)}:null;qt(c,{shape:{width:u,height:l,x:o,y:s}},r,null,n,g)}return c}function wA(t,e,r){var n=t.getArea(),i=Tt(n.r0,1),a=Tt(n.r,1),o=new In({shape:{cx:Tt(t.cx,1),cy:Tt(t.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=t.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,qt(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function CW(t,e,r,n,i){if(t){if(t.type==="polar")return wA(t,e,r);if(t.type==="cartesian2d")return CA(t,e,r,n,i)}else return null;return null}function vm(t,e){return t.type===e}function _A(t,e){if(t.length===e.length){for(var r=0;r<t.length;r++)if(t[r]!==e[r])return;return!0}}function DA(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(r=Math.min(s,r),i=Math.max(s,i))}return[[e,r],[n,i]]}function xA(t,e){var r=DA(t),n=r[0],i=r[1],a=DA(e),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function SA(t){return nt(t)?t:t?.5:0}function wW(t,e,r){if(!r.valueDim)return[];for(var n=e.count(),i=vi(n*2),a=0;a<n;a++){var o=yA(r,t,e,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Ui(t,e,r,n){var i=e.getBaseAxis(),a=i.dim==="x"||i.dim==="radius"?0:1,o=[],s=0,u=[],l=[],f=[],c=[];if(n){for(s=0;s<t.length;s+=2)!isNaN(t[s])&&!isNaN(t[s+1])&&c.push(t[s],t[s+1]);t=c}for(s=0;s<t.length-2;s+=2)switch(f[0]=t[s+2],f[1]=t[s+3],l[0]=t[s],l[1]=t[s+1],o.push(l[0],l[1]),r){case"end":u[a]=f[a],u[1-a]=l[1-a],o.push(u[0],u[1]);break;case"middle":var h=(l[a]+f[a])/2,d=[];u[a]=d[a]=h,u[1-a]=l[1-a],d[1-a]=f[1-a],o.push(u[0],u[1]),o.push(d[0],d[1]);break;default:u[a]=l[a],u[1-a]=f[1-a],o.push(u[0],u[1])}return o.push(t[s++],t[s++]),o}function _W(t,e){var r=[],n=t.length,i,a;function o(f,c,h){var d=f.coord,p=(h-d)/(c.coord-d),g=yk(p,[f.color,c.color]);return{coord:h,color:g}}for(var s=0;s<n;s++){var u=t[s],l=u.coord;if(l<0)i=u;else if(l>e){a?r.push(o(a,u,e)):i&&r.push(o(i,u,0),o(i,u,e));break}else i&&(r.push(o(i,u,0)),i=null),r.push(u),a=u}return r}function DW(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())){if(e.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!a){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var u=e.getAxis(i),l=ye(a.stops,function(b){return{coord:u.toGlobalCoord(u.dataToCoord(b.value)),color:b.color}}),f=l.length,c=a.outerColors.slice();f&&l[0].coord>l[f-1].coord&&(l.reverse(),c.reverse());var h=_W(l,i==="x"?r.getWidth():r.getHeight()),d=h.length;if(!d&&f)return l[0].coord<0?c[1]?c[1]:l[f-1].color:c[0]?c[0]:l[0].color;var p=10,g=h[0].coord-p,v=h[d-1].coord+p,m=v-g;if(m<.001)return"transparent";N(h,function(b){b.offset=(b.coord-g)/m}),h.push({offset:d?h[d-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:d?h[0].offset:.5,color:c[0]||"transparent"});var y=new Ox(0,0,0,0,h,!0);return y[i]=g,y[i+"2"]=v,y}}function xW(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&SW(a,e))){var o=e.mapDimension(a.dim),s={};return N(a.getViewLabels(),function(u){var l=a.scale.getRawOrdinalNumber(u.tickValue);s[l]=1}),function(u){return!s.hasOwnProperty(e.get(o,u))}}}}function SW(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(cm.getSymbolSize(e,o)[t.isHorizontal()?1:0]*1.5>n)return!1;return!0}function EW(t,e){return isNaN(t)||isNaN(e)}function AW(t){for(var e=t.length/2;e>0&&EW(t[e*2-2],t[e*2-1]);e--);return e-1}function EA(t,e){return[t[e*2],t[e*2+1]]}function TW(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,u=-1,l=0;l<n;l++)if(o=t[l*2+i],!(isNaN(o)||isNaN(t[l*2+1-i]))){if(l===0){a=o;continue}if(a<=e&&o>=e||a>=e&&o<=e){u=l;break}s=l,a=o}return{range:[s,u],t:(e-a)/(o-a)}}function AA(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<Gr.length;e++)if(t.get([Gr[e],"endLabel","show"]))return!0;return!1}function pm(t,e,r,n){if(vm(e,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},u=AA(n)?function(d,p){t._endLabelOnDuring(d,p,o,s,a,i,e)}:null,l=e.getBaseAxis().isHorizontal(),f=CA(e,r,n,function(){var d=t._endLabel;d&&r&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},u);if(!n.get("clip",!0)){var c=f.shape,h=Math.max(c.width,c.height);l?(c.y-=h,c.height+=h*2):(c.x-=h,c.width+=h*2)}return u&&u(1,f),f}else return process.env.NODE_ENV!=="production"&&n.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),wA(e,r,n)}function OW(t,e){var r=e.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:t.get("align")||a,verticalAlign:t.get("verticalAlign")||o}}}var PW=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(){var r=new It,n=new dW;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r},e.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=this.group,u=r.getData(),l=r.getModel("lineStyle"),f=r.getModel("areaStyle"),c=u.getLayout("points")||[],h=o.type==="polar",d=this._coordSys,p=this._symbolDraw,g=this._polyline,v=this._polygon,m=this._lineGroup,y=!n.ssr&&r.get("animation"),b=!f.isEmpty(),w=f.get("origin"),C=mA(o,u,w),_=b&&wW(o,u,C),D=r.get("showSymbol"),x=r.get("connectNulls"),S=D&&!h&&xW(r,u,o),O=this._data;O&&O.eachItemGraphicEl(function(L,X){L.__temp&&(s.remove(L),O.setItemGraphicEl(X,null))}),D||p.remove(),s.add(m);var E=h?!1:r.get("step"),P;o&&o.getArea&&r.get("clip",!0)&&(P=o.getArea(),P.width!=null?(P.x-=.1,P.y-=.1,P.width+=.2,P.height+=.2):P.r0&&(P.r0-=.5,P.r+=.5)),this._clipShapeForSymbol=P;var F=DW(u,o,i)||u.getVisual("style")[u.getVisual("drawType")];if(!(g&&d.type===o.type&&E===this._step))D&&p.updateData(u,{isIgnore:S,clipShape:P,disableAnimation:!0,getSymbolPoint:function(L){return[c[L*2],c[L*2+1]]}}),y&&this._initSymbolLabelAnimation(u,o,P),E&&(c=Ui(c,o,E,x),_&&(_=Ui(_,o,E,x))),g=this._newPolyline(c),b?v=this._newPolygon(c,_):v&&(m.remove(v),v=this._polygon=null),h||this._initOrUpdateEndLabel(r,o,Ga(F)),m.setClipPath(pm(this,o,!0,r));else{b&&!v?v=this._newPolygon(c,_):v&&!b&&(m.remove(v),v=this._polygon=null),h||this._initOrUpdateEndLabel(r,o,Ga(F));var B=m.getClipPath();if(B){var M=pm(this,o,!1,r);qt(B,{shape:M.shape},r)}else m.setClipPath(pm(this,o,!0,r));D&&p.updateData(u,{isIgnore:S,clipShape:P,disableAnimation:!0,getSymbolPoint:function(L){return[c[L*2],c[L*2+1]]}}),(!_A(this._stackedOnPoints,_)||!_A(this._points,c))&&(y?this._doUpdateAnimation(u,_,o,i,E,w,x):(E&&(c=Ui(c,o,E,x),_&&(_=Ui(_,o,E,x))),g.setShape({points:c}),v&&v.setShape({points:c,stackedOnPoints:_})))}var I=r.getModel("emphasis"),j=I.get("focus"),z=I.get("blurScope"),W=I.get("disabled");if(g.useStyle(je(l.getLineStyle(),{fill:"none",stroke:F,lineJoin:"bevel"})),pc(g,r,"lineStyle"),g.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var R=g.getState("emphasis").style;R.lineWidth=+g.style.lineWidth+1}He(g).seriesIndex=r.seriesIndex,Eu(g,j,z,W);var U=SA(r.get("smooth")),Z=r.get("smoothMonotone");if(g.setShape({smooth:U,smoothMonotone:Z,connectNulls:x}),v){var ee=u.getCalculationInfo("stackedOnSeries"),ne=0;v.useStyle(je(f.getAreaStyle(),{fill:F,opacity:.7,lineJoin:"bevel",decal:u.getVisual("style").decal})),ee&&(ne=SA(ee.get("smooth"))),v.setShape({smooth:U,stackedOnSmooth:ne,smoothMonotone:Z,connectNulls:x}),pc(v,r,"areaStyle"),He(v).seriesIndex=r.seriesIndex,Eu(v,j,z,W)}var q=function(L){a._changePolyState(L)};u.eachItemGraphicEl(function(L){L&&(L.onHoverStateChange=q)}),this._polyline.onHoverStateChange=q,this._data=u,this._coordSys=o,this._stackedOnPoints=_,this._points=c,this._step=E,this._valueOrigin=w,r.get("triggerLineEvent")&&(this.packEventData(r,g),v&&this.packEventData(r,v))},e.prototype.packEventData=function(r,n){He(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Pa(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],c=u[s*2+1];if(isNaN(f)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,c))return;var h=r.get("zlevel")||0,d=r.get("z")||0;l=new cm(o,s),l.x=f,l.y=c,l.setZ(h,d);var p=l.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=d,p.z2=this._polyline.z2+1),l.__temp=!0,o.setItemGraphicEl(s,l),l.stopSymbolAnimation(!0),this.group.add(l)}l.highlight()}else Zr.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Pa(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 Zr.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;nx(this._polyline,r),n&&nx(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new mW({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new bW({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,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=r.hostModel,f=l.get("animationDuration");De(f)&&(f=f(null));var c=l.get("animationDelay")||0,h=De(c)?c(null):c;r.eachItemGraphicEl(function(d,p){var g=d;if(g){var v=[d.x,d.y],m=void 0,y=void 0,b=void 0;if(i)if(o){var w=i,C=n.pointToCoord(v);a?(m=w.startAngle,y=w.endAngle,b=-C[1]/180*Math.PI):(m=w.r0,y=w.r,b=C[0])}else{var _=i;a?(m=_.x,y=_.x+_.width,b=d.x):(m=_.y+_.height,y=_.y,b=d.y)}var D=y===m?0:(b-m)/(y-m);u&&(D=1-D);var x=De(c)?c(p):f*D+h,S=g.getSymbolPath(),O=S.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),O&&O.animateFrom({style:{opacity:0}},{duration:300,delay:x}),S.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(AA(r)){var o=r.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 Ot({z2:200}),l.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=AW(u);f>=0&&(Mu(s,Fu(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:f,defaultText:function(c,h,d){return d!=null?vA(o,d):fm(o,c)},enableTextSetter:!0},OW(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,u){var l=this._endLabel,f=this._polyline;if(l){r<1&&a.originalX==null&&(a.originalX=l.x,a.originalY=l.y);var c=i.getLayout("points"),h=i.hostModel,d=h.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,v=u.getBaseAxis(),m=v.isHorizontal(),y=v.inverse,b=n.shape,w=y?m?b.x:b.y+b.height:m?b.x+b.width:b.y,C=(m?g:0)*(y?-1:1),_=(m?0:-g)*(y?-1:1),D=m?"x":"y",x=TW(c,w,D),S=x.range,O=S[1]-S[0],E=void 0;if(O>=1){if(O>1&&!d){var P=EA(c,S[0]);l.attr({x:P[0]+C,y:P[1]+_}),o&&(E=h.getRawValue(S[0]))}else{var P=f.getPointOn(w,D);P&&l.attr({x:P[0]+C,y:P[1]+_});var F=h.getRawValue(S[0]),B=h.getRawValue(S[1]);o&&(E=wD(i,p,F,B,x.t))}a.lastFrameIndex=S[0]}else{var M=r===1||a.lastFrameIndex>0?S[0]:0,P=EA(c,M);o&&(E=h.getRawValue(M)),l.attr({x:P[0]+C,y:P[1]+_})}if(o){var I=ns(l);typeof I.setLabelText=="function"&&I.setLabelText(E)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,u){var l=this._polyline,f=this._polygon,c=r.hostModel,h=gW(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=h.current,p=h.stackedOnCurrent,g=h.next,v=h.stackedOnNext;if(o&&(d=Ui(h.current,i,o,u),p=Ui(h.stackedOnCurrent,i,o,u),g=Ui(h.next,i,o,u),v=Ui(h.stackedOnNext,i,o,u)),xA(d,g)>3e3||f&&xA(p,v)>3e3){l.stopAnimation(),l.setShape({points:g}),f&&(f.stopAnimation(),f.setShape({points:g,stackedOnPoints:v}));return}l.shape.__points=h.current,l.shape.points=d;var m={shape:{points:g}};h.current!==d&&(m.shape.__points=h.next),l.stopAnimation(),Ft(l,m,c),f&&(f.setShape({points:d,stackedOnPoints:p}),f.stopAnimation(),Ft(f,{shape:{stackedOnPoints:v}},c),l.shape.points!==f.shape.points&&(f.shape.points=l.shape.points));for(var y=[],b=h.status,w=0;w<b.length;w++){var C=b[w].cmd;if(C==="="){var _=r.getItemGraphicEl(b[w].idx1);_&&y.push({el:_,ptIdx:w})}}l.animators&&l.animators.length&&l.animators[0].during(function(){f&&f.dirtyShape();for(var D=l.shape.__points,x=0;x<y.length;x++){var S=y[x].el,O=y[x].ptIdx*2;S.x=D[O],S.y=D[O+1],S.markRedraw()}})},e.prototype.remove=function(r){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(Zr);function BW(t,e){return{seriesType:t,plan:D0(),reset:function(r){var n=r.getData(),i=r.coordinateSystem;if(r.pipelineContext,!!i){var a=ye(i.dimensions,function(c){return n.mapDimension(c)}).slice(0,2),o=a.length,s=n.getCalculationInfo("stackResultDimension");ms(n,a[0])&&(a[0]=s),ms(n,a[1])&&(a[1]=s);var u=n.getStore(),l=n.getDimensionIndex(a[0]),f=n.getDimensionIndex(a[1]);return o&&{progress:function(c,h){for(var d=c.end-c.start,p=vi(d*o),g=[],v=[],m=c.start,y=0;m<c.end;m++){var b=void 0;if(o===1){var w=u.get(l,m);b=i.dataToPoint(w,null,v)}else g[0]=u.get(l,m),g[1]=u.get(f,m),b=i.dataToPoint(g,null,v);p[y++]=b[0],p[y++]=b[1]}h.setLayout("points",p)}}}}}}var MW={average:function(t){for(var e=0,r=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],r++);return r===0?NaN:e/r},sum:function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r]||0;return e},max:function(t){for(var e=-1/0,r=0;r<t.length;r++)t[r]>e&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r<t.length;r++)t[r]<e&&(e=t[r]);return isFinite(e)?e:NaN},minmax:function(t){for(var e=-1/0,r=-1/0,n=0;n<t.length;n++){var i=t[n],a=Math.abs(i);a>e&&(e=a,r=i)}return isFinite(r)?r:NaN},nearest:function(t){return t[0]}},FW=function(t){return Math.round(t.length/2)};function TA(t){return{seriesType:t,reset:function(e,r,n){var i=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var u=o.getBaseAxis(),l=o.getOtherAxis(u),f=u.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(f[1]-f[0])*(c||1),d=Math.round(s/h);if(isFinite(d)&&d>1){a==="lttb"&&e.setData(i.lttbDownSample(i.mapDimension(l.dim),1/d));var p=void 0;be(a)?p=MW[a]:De(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(l.dim),1/d,p,FW))}}}}}function LW(t){t.registerChartView(PW),t.registerSeriesModel(cW),t.registerLayout(BW("line")),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,TA("line"))}var gm=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return Z0(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)N(a.getAxes(),function(h,d){if(h.type==="category"&&n!=null){var p=h.getTicksCoords(),g=h.getTickModel().get("alignWithLabel"),v=o[d],m=n[d]==="x1"||n[d]==="y1";if(m&&!g&&(v+=1),p.length<2)return;if(p.length===2){s[d]=h.toGlobalCoord(h.getExtent()[m?1:0]);return}for(var y=void 0,b=void 0,w=1,C=0;C<p.length;C++){var _=p[C].coord,D=C===p.length-1?p[C-1].tickValue+w:p[C].tickValue;if(D===v){b=_;break}else if(D<v)y=_;else if(y!=null&&D>v){b=(_+y)/2;break}C===1&&(w=D-p[0].tickValue)}b==null&&(y?y&&(b=p[p.length-1].coord):b=p[0].coord),s[d]=h.toGlobalCoord(b)}});else{var u=this.getData(),l=u.getLayout("offset"),f=u.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;s[c]+=l+f/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(fn);fn.registerClass(gm);var IW=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return Z0(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Yx(gm.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(gm),RW=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),OA=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new RW},e.prototype.buildPath=function(r,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,c=n.endAngle,h=n.clockwise,d=Math.PI*2,p=h?c-f<d:f-c<d;p||(f=c-(h?d:-d));var g=Math.cos(f),v=Math.sin(f),m=Math.cos(c),y=Math.sin(c);p?(r.moveTo(g*o+i,v*o+a),r.arc(g*l+i,v*l+a,u,-Math.PI+f,f,!h)):r.moveTo(g*s+i,v*s+a),r.arc(i,a,s,f,c,!h),r.arc(m*l+i,y*l+a,u,c-Math.PI*2,c-Math.PI,!h),o!==0&&r.arc(i,a,o,c,f,h)},e}(Ve);function NW(t,e){e=e||{};var r=e.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return Xf(n,i,a);var s=t(o),u=i.distance!=null?i.distance:5,l=this.shape,f=l.cx,c=l.cy,h=l.r,d=l.r0,p=(h+d)/2,g=l.startAngle,v=l.endAngle,m=(g+v)/2,y=r?Math.abs(h-d)/2:0,b=Math.cos,w=Math.sin,C=f+h*b(g),_=c+h*w(g),D="left",x="top";switch(s){case"startArc":C=f+(d-u)*b(m),_=c+(d-u)*w(m),D="center",x="top";break;case"insideStartArc":C=f+(d+u)*b(m),_=c+(d+u)*w(m),D="center",x="bottom";break;case"startAngle":C=f+p*b(g)+Eh(g,u+y,!1),_=c+p*w(g)+Ah(g,u+y,!1),D="right",x="middle";break;case"insideStartAngle":C=f+p*b(g)+Eh(g,-u+y,!1),_=c+p*w(g)+Ah(g,-u+y,!1),D="left",x="middle";break;case"middle":C=f+p*b(m),_=c+p*w(m),D="center",x="middle";break;case"endArc":C=f+(h+u)*b(m),_=c+(h+u)*w(m),D="center",x="bottom";break;case"insideEndArc":C=f+(h-u)*b(m),_=c+(h-u)*w(m),D="center",x="top";break;case"endAngle":C=f+p*b(v)+Eh(v,u+y,!0),_=c+p*w(v)+Ah(v,u+y,!0),D="left",x="middle";break;case"insideEndAngle":C=f+p*b(v)+Eh(v,-u+y,!0),_=c+p*w(v)+Ah(v,-u+y,!0),D="right",x="middle";break;default:return Xf(n,i,a)}return n=n||{},n.x=C,n.y=_,n.align=D,n.verticalAlign=x,n}}function kW(t,e,r,n){if(nt(n)){t.setTextConfig({rotation:n});return}else if(he(e)){t.setTextConfig({rotation:0});return}var i=t.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,u,l=r(e);switch(l){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":u=s;break;case"startAngle":case"insideStartAngle":u=a;break;case"endAngle":case"insideEndAngle":u=o;break;default:t.setTextConfig({rotation:0});return}var f=Math.PI*1.5-u;l==="middle"&&f>Math.PI/2&&f<Math.PI*1.5&&(f-=Math.PI),t.setTextConfig({rotation:f})}function Eh(t,e,r){return e*Math.sin(t)*(r?-1:1)}function Ah(t,e,r){return e*Math.cos(t)*(r?1:-1)}function sl(t,e,r){var n=t.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;he(n)||(n=[n,n,n,n]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:ye(n,function(a){return Bi(a,i)})}}var mm=Math.max,ym=Math.min;function zW(t,e){var r=t.getArea&&t.getArea();if(vm(t,"cartesian2d")){var n=t.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=e.getLayout("bandWidth");n.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}var jW=function(t){ce(e,t);function e(){var r=t.call(this)||this;return r.type=e.type,r._isFirstFrame=!0,r}return e.prototype.render=function(r,n,i,a){this._model=r,this._removeOnRenderedListener(i),this._updateDrawMode(r);var o=r.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,i):this._renderNormal(r,n,i,a)):process.env.NODE_ENV!=="production"&&xt("Only cartesian2d and polar supported for bar.")},e.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},e.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},e.prototype.eachRendered=function(r){Pc(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r,n,i,a){var o=this.group,s=r.getData(),u=this._data,l=r.coordinateSystem,f=l.getBaseAxis(),c;l.type==="cartesian2d"?c=f.isHorizontal():l.type==="polar"&&(c=f.dim==="angle");var h=r.isAnimationEnabled()?r:null,d=VW(r,l);d&&this._enableRealtimeSort(d,s,i);var p=r.get("clip",!0)||d,g=zW(l,s);o.removeClipPath();var v=r.get("roundCap",!0),m=r.get("showBackground",!0),y=r.getModel("backgroundStyle"),b=y.get("borderRadius")||0,w=[],C=this._backgroundEls,_=a&&a.isInitSort,D=a&&a.type==="changeAxisOrder";function x(E){var P=Th[l.type](s,E),F=YW(l,c,P);return F.useStyle(y.getItemStyle()),l.type==="cartesian2d"?F.setShape("r",b):F.setShape("cornerRadius",b),w[E]=F,F}s.diff(u).add(function(E){var P=s.getItemModel(E),F=Th[l.type](s,E,P);if(m&&x(E),!(!s.hasValue(E)||!LA[l.type](F))){var B=!1;p&&(B=PA[l.type](g,F));var M=BA[l.type](r,s,E,F,c,h,f.model,!1,v);d&&(M.forceLabelAnimation=!0),RA(M,s,E,P,F,r,c,l.type==="polar"),_?M.attr({shape:F}):d?MA(d,h,M,F,E,c,!1,!1):qt(M,{shape:F},r,E),s.setItemGraphicEl(E,M),o.add(M),M.ignore=B}}).update(function(E,P){var F=s.getItemModel(E),B=Th[l.type](s,E,F);if(m){var M=void 0;C.length===0?M=x(P):(M=C[P],M.useStyle(y.getItemStyle()),l.type==="cartesian2d"?M.setShape("r",b):M.setShape("cornerRadius",b),w[E]=M);var I=Th[l.type](s,E),j=jA(c,I,l);Ft(M,{shape:j},h,E)}var z=u.getItemGraphicEl(P);if(!s.hasValue(E)||!LA[l.type](B)){o.remove(z);return}var W=!1;if(p&&(W=PA[l.type](g,B),W&&o.remove(z)),z?zg(z):z=BA[l.type](r,s,E,B,c,h,f.model,!!z,v),d&&(z.forceLabelAnimation=!0),D){var R=z.getTextContent();if(R){var U=ns(R);U.prevValue!=null&&(U.prevValue=U.value)}}else RA(z,s,E,F,B,r,c,l.type==="polar");_?z.attr({shape:B}):d?MA(d,h,z,B,E,c,!0,D):Ft(z,{shape:B},r,E,null),s.setItemGraphicEl(E,z),z.ignore=W,o.add(z)}).remove(function(E){var P=u.getItemGraphicEl(E);P&&Ec(P,r,E)}).execute();var S=this._backgroundGroup||(this._backgroundGroup=new It);S.removeAll();for(var O=0;O<w.length;++O)S.add(w[O]);o.add(S),this._backgroundEls=w,this._data=s},e.prototype._renderLarge=function(r,n,i){this._clear(),kA(r,this.group),this._updateLargeClip(r)},e.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),kA(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&CW(r.coordinateSystem,!1,r),i=this.group;n?i.setClipPath(n):i.removeClipPath()},e.prototype._enableRealtimeSort=function(r,n,i){var a=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,i),this._isFirstFrame=!1;else{var s=function(u){var l=n.getItemGraphicEl(u),f=l&&l.shape;return f&&Math.abs(o.isHorizontal()?f.height:f.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(r,n,i){var a=[];return r.each(r.mapDimension(n.dim),function(o,s){var u=i(s);u=u??NaN,a.push({dataIndex:s,mappedValue:u,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:ye(a,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(r,n,i){for(var a=i.scale,o=r.mapDimension(i.dim),s=Number.MAX_VALUE,u=0,l=a.getOrdinalMeta().categories.length;u<l;++u){var f=r.rawIndexOf(o,a.getRawOrdinalNumber(u)),c=f<0?Number.MIN_VALUE:n(r.indexOfRawIndex(f));if(c>s)return!0;s=c}return!1},e.prototype._isOrderDifferentInView=function(r,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(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Ec(a,r,He(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Zr),PA={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=mm(e.x,t.x),s=ym(e.x+e.width,i),u=mm(e.y,t.y),l=ym(e.y+e.height,a),f=s<o,c=l<u;return e.x=f&&o>i?s:o,e.y=c&&u>a?l:u,e.width=f?0:s-o,e.height=c?0:l-u,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),f||c},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=ym(e.r,t.r),a=mm(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},BA={cartesian2d:function(t,e,r,n,i,a,o,s,u){var l=new St({shape:oe({},n),z2:1});if(l.__dataIndex=r,l.name="item",a){var f=l.shape,c=i?"height":"width";f[c]=0}return l},polar:function(t,e,r,n,i,a,o,s,u){var l=!i&&u?OA:In,f=new l({shape:n,z2:1});f.name="item";var c=IA(i);if(f.calculateTextPosition=NW(c,{isRoundCap:l===OA}),a){var h=f.shape,d=i?"r":"endAngle",p={};h[d]=i?n.r0:n.startAngle,p[d]=n[d],(s?Ft:qt)(f,{shape:p},a)}return f}};function VW(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(process.env.NODE_ENV!=="production"&&r&&(n.type!=="category"&&xt("`realtimeSort` will not work because this bar series is not based on a category axis."),e.type!=="cartesian2d"&&xt("`realtimeSort` will not work because this bar series is not on cartesian2d.")),r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function MA(t,e,r,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?Ft:qt)(r,{shape:u},e,i,null);var f=e?t.baseAxis.model:null;(o?Ft:qt)(r,{shape:l},f,i)}function FA(t,e){for(var r=0;r<e.length;r++)if(!isFinite(t[e[r]]))return!0;return!1}var HW=["x","y","width","height"],WW=["cx","cy","r","startAngle","endAngle"],LA={cartesian2d:function(t){return!FA(t,HW)},polar:function(t){return!FA(t,WW)}},Th={cartesian2d:function(t,e,r){var n=t.getItemLayout(e),i=r?GW(r,n):0,a=n.width>0?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(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function $W(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function IA(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function RA(t,e,r,n,i,a,o,s){var u=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var f=t.shape,c=sl(n.getModel("itemStyle"),f,!0);oe(f,c),t.setShape(f)}}else{var l=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",l)}t.useStyle(u);var h=n.getShallow("cursor");h&&t.attr("cursor",h);var d=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",p=Fu(n);Mu(t,p,{labelFetcher:a,labelDataIndex:r,defaultText:fm(a.getData(),r),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:d});var g=t.getTextContent();if(s&&g){var v=n.get(["label","position"]);t.textConfig.inside=v==="middle"?!0:null,kW(t,v==="outside"?d:v,IA(o),n.get(["label","rotate"]))}D7(g,p,a.getRawValue(r),function(y){return vA(e,y)});var m=n.getModel(["emphasis"]);Eu(t,m.get("focus"),m.get("blurScope"),m.get("disabled")),pc(t,n),$W(i)&&(t.style.fill="none",t.style.stroke="none",N(t.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function GW(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var UW=function(){function t(){}return t}(),NA=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new UW},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],u=[],l=this.barWidth,f=0;f<i.length;f+=3)u[a]=l,u[o]=i[f+2],s[a]=i[f+a],s[o]=i[f+o],r.rect(s[0],s[1],u[0],u[1])},e}(Ve);function kA(t,e,r,n){var i=t.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),u=t.getModel("backgroundStyle"),l=i.getLayout("largeBackgroundPoints");if(l){var f=new NA({shape:{points:l},incremental:!!n,silent:!0,z2:0});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,f.useStyle(u.getItemStyle()),e.add(f),r&&r.push(f)}var c=new NA({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,e.add(c),c.useStyle(i.getVisual("style")),He(c).seriesIndex=t.seriesIndex,t.get("silent")||(c.on("mousedown",zA),c.on("mousemove",zA)),r&&r.push(c)}var zA=x0(function(t){var e=this,r=qW(e,t.offsetX,t.offsetY);He(e).dataIndex=r>=0?r:null},30,!1);function qW(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],u=[],l=t.barWidth,f=0,c=a.length/3;f<c;f++){var h=f*3;if(u[n]=l,u[i]=a[h+2],s[n]=a[h+n],s[i]=a[h+i],u[i]<0&&(s[i]+=u[i],u[i]=-u[i]),e>=s[0]&&e<=s[0]+u[0]&&r>=s[1]&&r<=s[1]+u[1])return o[f]}return-1}function jA(t,e,r){if(vm(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function YW(t,e,r){var n=t.type==="polar"?In:St;return new n({shape:jA(e,r,t),silent:!0,z2:0})}function XW(t){t.registerChartView(jW),t.registerSeriesModel(IW),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Dt(gH,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,mH("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,TA("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var VA=Math.PI*2,Oh=Math.PI/180;function HA(t,e){return Ua(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function WA(t,e){var r=HA(t,e),n=t.get("center"),i=t.get("radius");he(i)||(i=[0,i]);var a=ut(r.width,e.getWidth()),o=ut(r.height,e.getHeight()),s=Math.min(a,o),u=ut(i[0],s/2),l=ut(i[1],s/2),f,c,h=t.coordinateSystem;if(h){var d=h.dataToPoint(n);f=d[0]||0,c=d[1]||0}else he(n)||(n=[n,n]),f=ut(n[0],a)+r.x,c=ut(n[1],o)+r.y;return{cx:f,cy:c,r0:u,r:l}}function KW(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=HA(n,r),s=WA(n,r),u=s.cx,l=s.cy,f=s.r,c=s.r0,h=-n.get("startAngle")*Oh,d=n.get("endAngle"),p=n.get("padAngle")*Oh;d=d==="auto"?h-VA:-d*Oh;var g=n.get("minAngle")*Oh,v=g+p,m=0;i.each(a,function(j){!isNaN(j)&&m++});var y=i.getSum(a),b=Math.PI/(y||m)*2,w=n.get("clockwise"),C=n.get("roseType"),_=n.get("stillShowZeroSum"),D=i.getDataExtent(a);D[0]=0;var x=w?1:-1,S=[h,d],O=x*p/2;ID(S,!w),h=S[0],d=S[1];var E=$A(n);E.startAngle=h,E.endAngle=d,E.clockwise=w;var P=Math.abs(d-h),F=P,B=0,M=h;if(i.setLayout({viewRect:o,r:f}),i.each(a,function(j,z){var W;if(isNaN(j)){i.setItemLayout(z,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:w,cx:u,cy:l,r0:c,r:C?NaN:f});return}C!=="area"?W=y===0&&_?b:j*b:W=P/m,W<v?(W=v,F-=v):B+=j;var R=M+x*W,U=0,Z=0;p>W?(U=M+x*W/2,Z=U):(U=M+O,Z=R-O),i.setItemLayout(z,{angle:W,startAngle:U,endAngle:Z,clockwise:w,cx:u,cy:l,r0:c,r:C?eg(j,D,[c,f]):f}),M=R}),F<VA&&m)if(F<=.001){var I=P/m;i.each(a,function(j,z){if(!isNaN(j)){var W=i.getItemLayout(z);W.angle=I;var R=0,U=0;I<p?(R=h+x*(z+1/2)*I,U=R):(R=h+x*z*I+O,U=h+x*(z+1)*I-O),W.startAngle=R,W.endAngle=U}})}else b=F/B,M=h,i.each(a,function(j,z){if(!isNaN(j)){var W=i.getItemLayout(z),R=W.angle===v?v:j*b,U=0,Z=0;R<p?(U=M+x*R/2,Z=U):(U=M+O,Z=M+x*R-O),W.startAngle=U,W.endAngle=Z,M+=x*R}})})}var $A=lt();function ZW(t){return{seriesType:t,reset:function(e,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=e.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var JW=Math.PI/180;function GA(t,e,r,n,i,a,o,s,u,l){if(t.length<2)return;function f(g){for(var v=g.rB,m=v*v,y=0;y<g.list.length;y++){var b=g.list[y],w=Math.abs(b.label.y-r),C=n+b.len,_=C*C,D=Math.sqrt((1-Math.abs(w*w/m))*_),x=e+(D+b.len2)*i,S=x-b.label.x,O=b.targetTextWidth-S*i;UA(b,O,!0),b.label.x=x}}function c(g){for(var v={list:[],maxY:0},m={list:[],maxY:0},y=0;y<g.length;y++)if(g[y].labelAlignTo==="none"){var b=g[y],w=b.label.y>r?m:v,C=Math.abs(b.label.y-r);if(C>=w.maxY){var _=b.label.x-e-b.len2*i,D=n+b.len,x=Math.abs(_)<D?Math.sqrt(C*C/(1-_*_/D/D)):D;w.rB=x,w.maxY=C}w.list.push(b)}f(v),f(m)}for(var h=t.length,d=0;d<h;d++)if(t[d].position==="outer"&&t[d].labelAlignTo==="labelLine"){var p=t[d].label.x-l;t[d].linePoints[1][0]+=p,t[d].label.x=l}cA(t,u,u+o)&&c(t)}function QW(t,e,r,n,i,a,o,s){for(var u=[],l=[],f=Number.MAX_VALUE,c=-Number.MAX_VALUE,h=0;h<t.length;h++){var d=t[h].label;bm(t[h])||(d.x<e?(f=Math.min(f,d.x),u.push(t[h])):(c=Math.max(c,d.x),l.push(t[h])))}for(var h=0;h<t.length;h++){var p=t[h];if(!bm(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var d=p.label,g=p.linePoints,v=void 0;p.labelAlignTo==="edge"?d.x<e?v=g[2][0]-p.labelDistance-o-p.edgeDistance:v=o+i-p.edgeDistance-g[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?d.x<e?v=f-o-p.bleedMargin:v=o+i-c-p.bleedMargin:d.x<e?v=d.x-o-p.bleedMargin:v=o+i-d.x-p.bleedMargin,p.targetTextWidth=v,UA(p,v)}}GA(l,e,r,n,1,i,a,o,s,c),GA(u,e,r,n,-1,i,a,o,s,f);for(var h=0;h<t.length;h++){var p=t[h];if(!bm(p)&&p.linePoints){var d=p.label,g=p.linePoints,m=p.labelAlignTo==="edge",y=d.style.padding,b=y?y[1]+y[3]:0,w=d.style.backgroundColor?0:b,C=p.rect.width+w,_=g[1][0]-g[2][0];m?d.x<e?g[2][0]=o+p.edgeDistance+C+p.labelDistance:g[2][0]=o+i-p.edgeDistance-C-p.labelDistance:(d.x<e?g[2][0]=d.x+p.labelDistance:g[2][0]=d.x-p.labelDistance,g[1][0]=g[2][0]+_),g[1][1]=g[2][1]=d.y}}}function UA(t,e,r){if(r===void 0&&(r=!1),t.labelStyleWidth==null){var n=t.label,i=n.style,a=t.rect,o=i.backgroundColor,s=i.padding,u=s?s[1]+s[3]:0,l=i.overflow,f=a.width+(o?0:u);if(e<f||r){var c=a.height;if(l&&l.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-u);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var d=e-u,p=e<f?d:r?d>t.unconstrainedWidth?null:d:null;n.setStyle("width",p)}var g=n.getBoundingRect();a.width=g.width;var v=(n.style.margin||0)+2.1;a.height=g.height+v,a.y-=(a.height-c)/2}}}function bm(t){return t.position==="center"}function e$(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*JW,s=e.getLayout("viewRect"),u=e.getLayout("r"),l=s.width,f=s.x,c=s.y,h=s.height;function d(_){_.ignore=!0}function p(_){if(!_.ignore)return!0;for(var D in _.states)if(_.states[D].ignore===!1)return!0;return!1}e.each(function(_){var D=e.getItemGraphicEl(_),x=D.shape,S=D.getTextContent(),O=D.getTextGuideLine(),E=e.getItemModel(_),P=E.getModel("label"),F=P.get("position")||E.get(["emphasis","label","position"]),B=P.get("distanceToLabelLine"),M=P.get("alignTo"),I=ut(P.get("edgeDistance"),l),j=P.get("bleedMargin"),z=E.getModel("labelLine"),W=z.get("length");W=ut(W,l);var R=z.get("length2");if(R=ut(R,l),Math.abs(x.endAngle-x.startAngle)<o){N(S.states,d),S.ignore=!0,O&&(N(O.states,d),O.ignore=!0);return}if(p(S)){var U=(x.startAngle+x.endAngle)/2,Z=Math.cos(U),ee=Math.sin(U),ne,q,L,X;n=x.cx,i=x.cy;var V=F==="inside"||F==="inner";if(F==="center")ne=x.cx,q=x.cy,X="center";else{var G=(V?(x.r+x.r0)/2*Z:x.r*Z)+n,J=(V?(x.r+x.r0)/2*ee:x.r*ee)+i;if(ne=G+Z*3,q=J+ee*3,!V){var K=G+Z*(W+u-x.r),Y=J+ee*(W+u-x.r),fe=K+(Z<0?-1:1)*R,ue=Y;M==="edge"?ne=Z<0?f+I:f+l-I:ne=fe+(Z<0?-B:B),q=ue,L=[[G,J],[K,Y],[fe,ue]]}X=V?"center":M==="edge"?Z>0?"right":"left":Z>0?"left":"right"}var Ce=Math.PI,me=0,Fe=P.get("rotate");if(nt(Fe))me=Fe*(Ce/180);else if(F==="center")me=0;else if(Fe==="radial"||Fe===!0){var ae=Z<0?-U+Ce:-U;me=ae}else if(Fe==="tangential"&&F!=="outside"&&F!=="outer"){var ve=Math.atan2(Z,ee);ve<0&&(ve=Ce*2+ve);var Le=ee>0;Le&&(ve=Ce+ve),me=ve-Ce}if(a=!!me,S.x=ne,S.y=q,S.rotation=me,S.setStyle({verticalAlign:"middle"}),V){S.setStyle({align:X});var at=S.states.select;at&&(at.x+=S.x,at.y+=S.y)}else{var ft=S.getBoundingRect().clone();ft.applyTransform(S.getComputedTransform());var Ie=(S.style.margin||0)+2.1;ft.y-=Ie/2,ft.height+=Ie,r.push({label:S,labelLine:O,position:F,len:W,len2:R,minTurnAngle:z.get("minTurnAngle"),maxSurfaceAngle:z.get("maxSurfaceAngle"),surfaceNormal:new _e(Z,ee),linePoints:L,textAlign:X,labelDistance:B,labelAlignTo:M,edgeDistance:I,bleedMargin:j,rect:ft,unconstrainedWidth:ft.width,labelStyleWidth:S.style.width})}D.setTextConfig({inside:V})}}),!a&&t.get("avoidLabelOverlap")&&QW(r,n,i,u,l,h,f,c);for(var g=0;g<r.length;g++){var v=r[g],m=v.label,y=v.labelLine,b=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:v.textAlign}),b&&(N(m.states,d),m.ignore=!0);var w=m.states.select;w&&(w.x+=m.x,w.y+=m.y)}if(y){var C=v.linePoints;b||!C?(N(y.states,d),y.ignore=!0):(oA(C,v.minTurnAngle),nW(C,v.surfaceNormal,v.maxSurfaceAngle),y.setShape({points:C}),m.__hostTarget.textGuideLineConfig={anchor:new _e(C[0][0],C[0][1])})}}}var t$=function(t){ce(e,t);function e(r,n,i){var a=t.call(this)||this;a.z2=2;var o=new Ot;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return e.prototype.updateData=function(r,n,i,a){var o=this,s=r.hostModel,u=r.getItemModel(n),l=u.getModel("emphasis"),f=r.getItemLayout(n),c=oe(sl(u.getModel("itemStyle"),f,!0),f);if(isNaN(c.startAngle)){o.setShape(c);return}if(a){o.setShape(c);var h=s.getShallow("animationType");s.ecModel.ssr?(qt(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=c.cx,o.originY=c.cy):h==="scale"?(o.shape.r=f.r0,qt(o,{shape:{r:f.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),qt(o,{shape:{startAngle:f.startAngle,endAngle:f.endAngle}},s,n)):(o.shape.endAngle=f.startAngle,Ft(o,{shape:{endAngle:f.endAngle}},s,n))}else zg(o),Ft(o,{shape:c},s,n);o.useStyle(r.getItemVisual(n,"style")),pc(o,u);var d=(f.startAngle+f.endAngle)/2,p=s.get("selectedOffset"),g=Math.cos(d)*p,v=Math.sin(d)*p,m=u.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=oe({r:f.r+(l.get("scale")&&l.get("scaleSize")||0)},sl(l.getModel("itemStyle"),f)),oe(o.ensureState("select"),{x:g,y:v,shape:sl(u.getModel(["select","itemStyle"]),f)}),oe(o.ensureState("blur"),{shape:sl(u.getModel(["blur","itemStyle"]),f)});var y=o.getTextGuideLine(),b=o.getTextContent();y&&oe(y.ensureState("select"),{x:g,y:v}),oe(b.ensureState("select"),{x:g,y:v}),Eu(this,l.get("focus"),l.get("blurScope"),l.get("disabled"))},e.prototype._updateLabel=function(r,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),u=n.getItemVisual(i,"style"),l=u&&u.fill,f=u&&u.opacity;Mu(a,Fu(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:l,defaultOpacity:f,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var c=a.getTextContent();a.setTextConfig({position:null,rotation:null}),c.attr({z2:10});var h=r.get(["label","position"]);if(h!=="outside"&&h!=="outer")a.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Pu,this.setTextGuideLine(d)),sA(this,uA(o),{stroke:l,opacity:Da(s.get(["lineStyle","opacity"]),f,1)})}},e}(In),r$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i,a){var o=r.getData(),s=this._data,u=this.group,l;if(!s&&o.count()>0){for(var f=o.getItemLayout(0),c=1;isNaN(f&&f.startAngle)&&c<o.count();++c)f=o.getItemLayout(c);f&&(l=f.startAngle)}if(this._emptyCircleSector&&u.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var h=$A(r),d=new In({shape:oe(WA(r,i),h)});d.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,u.add(d)}o.diff(s).add(function(p){var g=new t$(o,p,l);o.setItemGraphicEl(p,g),u.add(g)}).update(function(p,g){var v=s.getItemGraphicEl(g);v.updateData(o,p,l),v.off("click"),u.add(v),o.setItemGraphicEl(p,v)}).remove(function(p){var g=s.getItemGraphicEl(p);Ec(g,r,p)}).execute(),e$(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,u=Math.sqrt(o*o+s*s);return u<=a.r&&u>=a.r0}},e.type="pie",e}(Zr);function n$(t,e,r){e=he(e)&&{coordDimensions:e}||oe({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=F2(n,e).dimensions,a=new M2(i,t);return a.initData(n,r),a}var i$=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),a$=lt(),o$=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new i$(dt(this.getData,this),dt(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return n$(this,{coordDimensions:["value"],encodeDefaulter:Dt(K7,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=a$(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(u){o.push(u)}),a=i.seats=Yk(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){rg(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(fn);function s$(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(nt(o)&&!isNaN(o)&&o<0)})}}}function u$(t){t.registerChartView(r$),t.registerSeriesModel(o$),Ij("pie",t.registerAction),t.registerLayout(Dt(KW,"pie")),t.registerProcessor(ZW("pie")),t.registerProcessor(s$("pie"))}var l$=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Ze),Cm=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",sn).models[0]},e.type="cartesian2dAxis",e}(Ze);xn(Cm,jH);var qA={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,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},f$=Qe({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},qA),wm=Qe({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}}},qA),c$=Qe({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},wm),h$=je({logBase:10},wm);const d$={category:f$,value:wm,time:c$,log:h$};var v$={value:1,category:1,time:1,log:1};function YA(t,e,r,n){N(v$,function(i,a){var o=Qe(Qe({},d$[a],!0),n,!0),s=function(u){ce(l,u);function l(){var f=u!==null&&u.apply(this,arguments)||this;return f.type=e+"Axis."+a,f}return l.prototype.mergeDefaultAndTheme=function(f,c){var h=ku(this),d=h?$c(f):{},p=c.getTheme();Qe(f,p.get(a+"Axis")),Qe(f,this.getDefaultOption()),f.type=XA(f),h&&qa(f,d,h)},l.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=J0.createByAxisModel(this))},l.prototype.getCategories=function(f){var c=this.option;if(c.type==="category")return f?c.data:this.__ordinalMeta.categories},l.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},l.type=e+"Axis."+a,l.defaultOption=o,l}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",XA)}function XA(t){return t.type||(t.data?"category":"value")}var p$=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return ye(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),bt(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),_m=["x","y"];function KA(t){return t.type==="interval"||t.type==="time"}var g$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=_m,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!KA(r)||!KA(n))){var i=r.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,c=(s[1]-o[1])/l,h=o[0]-i[0]*f,d=o[1]-a[0]*c,p=this._transform=[f,0,0,c,h,d];this._invTransform=Tf([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Ue(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return jr(i,r,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},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),u=i.parse(r[0]),l=a.parse(r[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},e.prototype.pointToData=function(r,n){var i=[];if(this._invTransform)return jr(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,u=Math.max(i[0],i[1])-o+r;return new Ue(a,o,s,u)},e}(p$),m$=function(t){ce(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(KH);function Dm(t,e,r){r=r||{};var n=t.coordinateSystem,i=e.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,u=o?"onZero":s,l=i.dim,f=n.getRect(),c=[f.x,f.x+f.width,f.y,f.y+f.height],h={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,p=l==="x"?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[h.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=[l==="y"?p[h[u]]:c[0],l==="x"?p[h[u]]:c[3]],a.rotation=Math.PI/2*(l==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=v[s],a.labelOffset=o?p[h[s]]-p[h.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),_a(r.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=e.get(["axisLabel","rotate"]);return a.labelRotate=u==="top"?-m:m,a.z2=1,a}function ZA(t){return t.get("coordinateSystem")==="cartesian2d"}function JA(t){var e={xAxisModel:null,yAxisModel:null};return N(e,function(r,n){var i=n.replace(/Model$/,""),a=t.getReferringComponents(i,sn).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error(i+' "'+Da(t.get(i+"Index"),t.get(i+"Id"),0)+'" not found');e[n]=a}),e}var xm=Math.log;function y$(t,e,r){var n=ys.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,!0),o=i.length-1,s=n.getInterval.call(r),u=G2(t,e),l=u.extent,f=u.fixMin,c=u.fixMax;if(t.type==="log"){var h=xm(t.base);l=[xm(l[0])/h,xm(l[1])/h]}t.setExtent(l[0],l[1]),t.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:c});var d=n.getExtent.call(t);f&&(l[0]=d[0]),c&&(l[1]=d[1]);var p=n.getInterval.call(t),g=l[0],v=l[1];if(f&&c)p=(v-g)/o;else if(f)for(v=l[0]+p*o;v<l[1]&&isFinite(v)&&isFinite(l[1]);)p=em(p),v=l[0]+p*o;else if(c)for(g=l[1]-p*o;g>l[0]&&isFinite(g)&&isFinite(l[0]);)p=em(p),g=l[1]-p*o;else{var m=t.getTicks().length-1;m>o&&(p=em(p));var y=p*o;v=Math.ceil(l[1]/p)*p,g=Tt(v-y),g<0&&l[0]>=0?(g=0,v=Tt(y)):v>0&&l[1]<=0&&(v=0,g=-Tt(y))}var b=(i[0].value-a[0].value)/s,w=(i[o].value-a[o].value)/s;if(n.setExtent.call(t,g+p*b,v+p*w),n.setInterval.call(t,p),(b||w)&&n.setNiceExtent.call(t,g+p,v-p),process.env.NODE_ENV!=="production"){var C=n.getTicks.call(t);C[1]&&(!uH(p)||tg(C[1].value)>tg(p))&&xt("The ticks may be not readable when set min: "+e.get("min")+", max: "+e.get("max")+" and alignTicks: true")}}var b$=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=_m,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,u=Ke(o),l=u.length;if(l){for(var f=[],c=l-1;c>=0;c--){var h=+u[c],d=o[h],p=d.model,g=d.scale;Q0(g)&&p.get("alignTicks")&&p.get("interval")==null?f.push(d):(U2(g,p),Q0(g)&&(s=d))}f.length&&(s||(s=f.pop(),U2(s.scale,s.model)),N(f,function(v){y$(v.scale,v.model,s.scale)}))}}i(n.x),i(n.y);var a={};N(n.x,function(o){QA(n,"y",o,a)}),N(n.y,function(o){QA(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=e.getBoxLayoutParams(),a=!n&&e.get("containLabel"),o=Ua(i,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;u(),a&&(N(s,function(l){if(!l.model.get(["axisLabel","inside"])){var f=NH(l);if(f){var c=l.isHorizontal()?"height":"width",h=l.model.get(["axisLabel","margin"]);o[c]-=f[c]+h,l.position==="top"?o.y+=f.height+h:l.position==="left"&&(o.x+=f.width+h)}}}),u()),N(this._coordsList,function(l){l.calcAffineTransform()});function u(){N(s,function(l){var f=l.isHorizontal(),c=f?[0,o.width]:[0,o.height],h=l.inverse?1:0;l.setExtent(c[h],c[1-h]),C$(l,f?o.x:o.y)})}},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}we(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===e||a[i].getAxis("y").index===r)return a[i]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},t.prototype.convertFromPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},t.prototype._findConvertTarget=function(e){var r=e.seriesModel,n=e.xAxisModel||r&&r.getReferringComponents("xAxis",sn).models[0],i=e.yAxisModel||r&&r.getReferringComponents("yAxis",sn).models[0],a=e.gridModel,o=this._coordsList,s,u;if(r)s=r.coordinateSystem,Ge(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)u=this.getAxis("x",n.componentIndex);else if(i)u=this.getAxis("y",i.componentIndex);else if(a){var l=a.coordinateSystem;l===this&&(s=this._coordsList[0])}return{cartesian:s,axis:u}},t.prototype.containPoint=function(e){var r=this._coordsList[0];if(r)return r.containPoint(e)},t.prototype._initCartesian=function(e,r,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},u={x:0,y:0};if(r.eachComponent("xAxis",l("x"),this),r.eachComponent("yAxis",l("y"),this),!u.x||!u.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,N(s.x,function(f,c){N(s.y,function(h,d){var p="x"+c+"y"+d,g=new g$(p);g.master=i,g.model=e,i._coordsMap[p]=g,i._coordsList.push(g),g.addAxis(f),g.addAxis(h)})});function l(f){return function(c,h){if(Sm(c,e)){var d=c.get("position");f==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var p=new m$(f,IH(c),[0,0],c.get("type"),d),g=p.type==="category";p.onBand=g&&c.get("boundaryGap"),p.inverse=c.get("inverse"),c.axis=p,p.model=c,p.grid=a,p.index=h,a._axesList.push(p),s[f][h]=p,u[f]++}}}},t.prototype._updateScale=function(e,r){N(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),e.eachSeries(function(i){if(ZA(i)){var a=JA(i),o=a.xAxisModel,s=a.yAxisModel;if(!Sm(o,r)||!Sm(s,r))return;var u=this.getCartesian(o.componentIndex,s.componentIndex),l=i.getData(),f=u.getAxis("x"),c=u.getAxis("y");n(l,f),n(l,c)}},this);function n(i,a){N(zH(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},t.prototype.getTooltipAxes=function(e){var r=[],n=[];return N(this.getCartesians(),function(i){var a=e!=null&&e!=="auto"?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(a);Ge(r,a)<0&&r.push(a),Ge(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},t.create=function(e,r){var n=[];return e.eachComponent("grid",function(i,a){var o=new t(i,e,r);o.name="grid_"+a,o.resize(i,r,!0),i.coordinateSystem=o,n.push(o)}),e.eachSeries(function(i){if(ZA(i)){var a=JA(i),o=a.xAxisModel,s=a.yAxisModel,u=o.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!u)throw new Error('Grid "'+Da(o.get("gridIndex"),o.get("gridId"),0)+'" not found');if(o.getCoordSysModel()!==s.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var l=u.coordinateSystem;i.coordinateSystem=l.getCartesian(o.componentIndex,s.componentIndex)}}),n},t.dimensions=_m,t}();function Sm(t,e){return t.getCoordSysModel()===e}function QA(t,e,r,n){r.getAxesOnZeroOf=function(){return a?[a]:[]};var i=t[e],a,o=r.model,s=o.get(["axisLine","onZero"]),u=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(u!=null)eT(i[u])&&(a=i[u]);else for(var l in i)if(i.hasOwnProperty(l)&&eT(i[l])&&!n[f(i[l])]){a=i[l];break}a&&(n[f(a)]=!0);function f(c){return c.dim+"_"+c.index}}function eT(t){return t&&t.type!=="category"&&t.type!=="time"&&RH(t)}function C$(t,e){var r=t.getExtent(),n=r[0]+r[1];t.toGlobalCoord=t.dim==="x"?function(i){return i+e}:function(i){return n-i+e},t.toLocalCoord=t.dim==="x"?function(i){return i-e}:function(i){return n-i+e}}var qi=Math.PI,Yi=function(){function t(e,r){this.group=new It,this.opt=r,this.axisModel=e,je(r,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new It({x:r.position[0],y:r.position[1],rotation:r.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(e){return!!tT[e]},t.prototype.add=function(e){tT[e](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(e,r,n){var i=oD(r-e),a,o;return Zf(i)?(o=n>0?"top":"bottom",a="center"):Zf(i-qi)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<qi?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),tT={axisLine:function(t,e,r,n){var i=e.get(["axisLine","show"]);if(i==="auto"&&t.handleAutoShown&&(i=t.handleAutoShown("axisLine")),!!i){var a=e.axis.getExtent(),o=n.transform,s=[a[0],0],u=[a[1],0],l=s[0]>u[0];o&&(jr(s,s,o),jr(u,u,o));var f=oe({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new Ni({shape:{x1:s[0],y1:s[1],x2:u[0],y2:u[1]},style:f,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});Bu(c.shape,c.style.lineWidth),c.anid="line",r.add(c);var h=e.get(["axisLine","symbol"]);if(h!=null){var d=e.get(["axisLine","symbolSize"]);be(h)&&(h=[h,h]),(be(d)||nt(d))&&(d=[d,d]);var p=LE(e.get(["axisLine","symbolOffset"])||0,d),g=d[0],v=d[1];N([{rotate:t.rotation+Math.PI/2,offset:p[0],r:0},{rotate:t.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-u[0])*(s[0]-u[0])+(s[1]-u[1])*(s[1]-u[1]))}],function(m,y){if(h[y]!=="none"&&h[y]!=null){var b=hs(h[y],-g/2,-v/2,g,v,f.stroke,!0),w=m.r+m.offset,C=l?u:s;b.attr({rotation:m.rotate,x:C[0]+w*Math.cos(t.rotation),y:C[1]-w*Math.sin(t.rotation),silent:!0,z2:11}),r.add(b)}})}}},axisTickLabel:function(t,e,r,n){var i=D$(r,n,e,t),a=S$(r,n,e,t);if(_$(e,a,i),x$(r,n,e,t.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=lA(ye(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));hA(o)}},axisName:function(t,e,r,n){var i=_a(t.axisName,e.get("name"));if(i){var a=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),u=e.get("nameGap")||0,l=e.axis.getExtent(),f=l[0]>l[1]?-1:1,c=[a==="start"?l[0]-f*u:a==="end"?l[1]+f*u:(l[0]+l[1])/2,nT(a)?t.labelOffset+o*u:0],h,d=e.get("nameRotate");d!=null&&(d=d*qi/180);var p;nT(a)?h=Yi.innerTextLayout(t.rotation,d??t.rotation,o):(h=w$(t.rotation,a,d||0,l),p=t.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(h.rotation)),!isFinite(p)&&(p=null)));var g=s.getFont(),v=e.get("nameTruncate",!0)||{},m=v.ellipsis,y=_a(t.nameTruncateMaxWidth,v.maxWidth,p),b=new Ot({x:c[0],y:c[1],rotation:h.rotation,silent:Yi.isLabelSilent(e),style:ki(s,{text:i,font:g,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Oc({el:b,componentModel:e,itemName:i}),b.__fullText=i,b.anid="name",e.get("triggerEvent")){var w=Yi.makeAxisEventDataBase(e);w.targetType="axisName",w.name=i,He(b).eventData=w}n.add(b),b.updateTransform(),r.add(b),b.decomposeTransform()}}};function w$(t,e,r,n){var i=oD(r-t),a,o,s=n[0]>n[1],u=e==="start"&&!s||e!=="start"&&s;return Zf(i-qi/2)?(o=u?"bottom":"top",a="center"):Zf(i-qi*1.5)?(o=u?"top":"bottom",a="center"):(o="middle",i<qi*1.5&&i>qi/2?a=u?"left":"right":a=u?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function _$(t,e,r){if(!q2(t.axis)){var n=t.get(["axisLabel","showMinLabel"]),i=t.get(["axisLabel","showMaxLabel"]);e=e||[],r=r||[];var a=e[0],o=e[1],s=e[e.length-1],u=e[e.length-2],l=r[0],f=r[1],c=r[r.length-1],h=r[r.length-2];n===!1?(Qr(a),Qr(l)):rT(a,o)&&(n?(Qr(o),Qr(f)):(Qr(a),Qr(l))),i===!1?(Qr(s),Qr(c)):rT(u,s)&&(i?(Qr(u),Qr(h)):(Qr(s),Qr(c)))}}function Qr(t){t&&(t.ignore=!0)}function rT(t,e){var r=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!r||!n)){var i=wp([]);return Dp(i,i,-t.rotation),r.applyTransform(jo([],i,t.getLocalTransform())),n.applyTransform(jo([],i,e.getLocalTransform())),r.intersect(n)}}function nT(t){return t==="middle"||t==="center"}function iT(t,e,r,n,i){for(var a=[],o=[],s=[],u=0;u<t.length;u++){var l=t[u].coord;o[0]=l,o[1]=0,s[0]=l,s[1]=r,e&&(jr(o,o,e),jr(s,s,e));var f=new Ni({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Bu(f.shape,f.style.lineWidth),f.anid=i+"_"+t[u].tickValue,a.push(f)}return a}function D$(t,e,r,n){var i=r.axis,a=r.getModel("axisTick"),o=a.get("show");if(o==="auto"&&n.handleAutoShown&&(o=n.handleAutoShown("axisTick")),!(!o||i.scale.isBlank())){for(var s=a.getModel("lineStyle"),u=n.tickDirection*a.get("length"),l=i.getTicksCoords(),f=iT(l,e.transform,u,je(s.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<f.length;c++)t.add(f[c]);return f}}function x$(t,e,r,n){var i=r.axis,a=r.getModel("minorTick");if(!(!a.get("show")||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(o.length)for(var s=a.getModel("lineStyle"),u=n*a.get("length"),l=je(s.getLineStyle(),je(r.getModel("axisTick").getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])})),f=0;f<o.length;f++)for(var c=iT(o[f],e.transform,u,l,"minorticks_"+f),h=0;h<c.length;h++)t.add(c[h])}}function S$(t,e,r,n){var i=r.axis,a=_a(n.axisLabelShow,r.get(["axisLabel","show"]));if(!(!a||i.scale.isBlank())){var o=r.getModel("axisLabel"),s=o.get("margin"),u=i.getViewLabels(),l=(_a(n.labelRotate,o.get("rotate"))||0)*qi/180,f=Yi.innerTextLayout(n.rotation,l,n.labelDirection),c=r.getCategories&&r.getCategories(!0),h=[],d=Yi.isLabelSilent(r),p=r.get("triggerEvent");return N(u,function(g,v){var m=i.scale.type==="ordinal"?i.scale.getRawOrdinalNumber(g.tickValue):g.tickValue,y=g.formattedLabel,b=g.rawLabel,w=o;if(c&&c[m]){var C=c[m];we(C)&&C.textStyle&&(w=new Ct(C.textStyle,o,r.ecModel))}var _=w.getTextColor()||r.get(["axisLine","lineStyle","color"]),D=i.dataToCoord(m),x=w.getShallow("align",!0)||f.textAlign,S=Be(w.getShallow("alignMinLabel",!0),x),O=Be(w.getShallow("alignMaxLabel",!0),x),E=w.getShallow("verticalAlign",!0)||w.getShallow("baseline",!0)||f.textVerticalAlign,P=Be(w.getShallow("verticalAlignMinLabel",!0),E),F=Be(w.getShallow("verticalAlignMaxLabel",!0),E),B=new Ot({x:D,y:n.labelOffset+n.labelDirection*s,rotation:f.rotation,silent:d,z2:10+(g.level||0),style:ki(w,{text:y,align:v===0?S:v===u.length-1?O:x,verticalAlign:v===0?P:v===u.length-1?F:E,fill:De(_)?_(i.type==="category"?b:i.type==="value"?m+"":m,v):_})});if(B.anid="label_"+m,p){var M=Yi.makeAxisEventDataBase(r);M.targetType="axisLabel",M.value=b,M.tickIndex=v,i.type==="category"&&(M.dataIndex=m),He(B).eventData=M}e.add(B),B.updateTransform(),h.push(B),t.add(B),B.decomposeTransform()}),h}}function E$(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return A$(r,t,e),r.seriesInvolved&&O$(r,t),r}function A$(t,e,r){var n=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];N(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var u=ul(s.model),l=t.coordSysAxesInfo[u]={};t.coordSysMap[u]=s;var f=s.model,c=f.getModel("tooltip",n);if(N(s.getAxes(),Dt(g,!1,null)),s.getTooltipAxes&&n&&c.get("show")){var h=c.get("trigger")==="axis",d=c.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(c.get(["axisPointer","axis"]));(h||d)&&N(p.baseAxes,Dt(g,d?"cross":!0,h)),d&&N(p.otherAxes,Dt(g,"cross",!1))}function g(v,m,y){var b=y.model.getModel("axisPointer",i),w=b.get("show");if(!(!w||w==="auto"&&!v&&!Tm(b))){m==null&&(m=b.get("triggerTooltip")),b=v?T$(y,c,i,e,v,m):b;var C=b.get("snap"),_=b.get("triggerEmphasis"),D=ul(y.model),x=m||C||y.type==="category",S=t.axesInfo[D]={key:D,axis:y,coordSys:s,axisPointerModel:b,triggerTooltip:m,triggerEmphasis:_,involveSeries:x,snap:C,useHandle:Tm(b),seriesModels:[],linkGroup:null};l[D]=S,t.seriesInvolved=t.seriesInvolved||x;var O=P$(a,y);if(O!=null){var E=o[O]||(o[O]={axesInfo:{}});E.axesInfo[D]=S,E.mapper=a[O].mapper,S.linkGroup=E}}}})}function T$(t,e,r,n,i,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],u={};N(s,function(h){u[h]=$e(o.get(h))}),u.snap=t.type!=="category"&&!!a,o.get("type")==="cross"&&(u.type="line");var l=u.label||(u.label={});if(l.show==null&&(l.show=!1),i==="cross"){var f=o.get(["label","show"]);if(l.show=f??!0,!a){var c=u.lineStyle=o.get("crossStyle");c&&je(l,c.textStyle)}}return t.model.getModel("axisPointer",new Ct(u,r,n))}function O$(t,e){e.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||N(t.coordSysAxesInfo[ul(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function P$(t,e){for(var r=e.model,n=e.dim,i=0;i<t.length;i++){var a=t[i]||{};if(Em(a[n+"AxisId"],r.id)||Em(a[n+"AxisIndex"],r.componentIndex)||Em(a[n+"AxisName"],r.name))return i}}function Em(t,e){return t==="all"||he(t)&&Ge(t,e)>=0||t===e}function B$(t){var e=Am(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=Tm(r);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]),o<u[0]&&(o=u[0]),i.value=o,s&&(i.status=e.axis.scale.isBlank()?"hide":"show")}}function Am(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[ul(t)]}function M$(t){var e=Am(t);return e&&e.axisPointerModel}function Tm(t){return!!t.get(["handle","show"])}function ul(t){return t.type+"||"+t.id}var Om={},aT=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i,a){this.axisPointerClass&&B$(r),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,i,!0)},e.prototype.updateAxisPointer=function(r,n,i,a){this._doUpdateAxisPointerClass(r,i,!1)},e.prototype.remove=function(r,n){var i=this._axisPointer;i&&i.remove(n)},e.prototype.dispose=function(r,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(r,n,i){var a=e.getAxisPointerClass(this.axisPointerClass);if(a){var o=M$(r);o?(this._axisPointer||(this._axisPointer=new a)).render(r,o,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},e.registerAxisPointerClass=function(r,n){if(process.env.NODE_ENV!=="production"&&Om[r])throw new Error("axisPointer "+r+" exists");Om[r]=n},e.getAxisPointerClass=function(r){return r&&Om[r]},e.type="axis",e}(Br),Pm=lt();function F$(t,e,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),u=n.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:a,clamp:!0});if(l.length){var f=s.length,c=Pm(t).splitAreaColors,h=Ae(),d=0;if(c)for(var p=0;p<l.length;p++){var g=c.get(l[p].tickValue);if(g!=null){d=(g+(f-1)*p)%f;break}}var v=i.toGlobalCoord(l[0].coord),m=o.getAreaStyle();s=he(s)?s:[s];for(var p=1;p<l.length;p++){var y=i.toGlobalCoord(l[p].coord),b=void 0,w=void 0,C=void 0,_=void 0;i.isHorizontal()?(b=v,w=u.y,C=y-b,_=u.height,v=b+C):(b=u.x,w=v,C=u.width,_=y-w,v=w+_);var D=l[p-1].tickValue;D!=null&&h.set(D,d),e.add(new St({anid:D!=null?"area_"+D:null,shape:{x:b,y:w,width:C,height:_},style:je({fill:s[d]},m),autoBatch:!0,silent:!0})),d=(d+1)%f}Pm(t).splitAreaColors=h}}}function L$(t){Pm(t).splitAreaColors=null}var I$=["axisLine","axisTickLabel","axisName"],R$=["splitArea","splitLine","minorSplitLine"],oT=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="CartesianAxisPointer",r}return e.prototype.render=function(r,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new It,this.group.add(this._axisGroup),!!r.get("show")){var s=r.getCoordSysModel(),u=Dm(s,r),l=new Yi(r,oe({handleAutoShown:function(c){for(var h=s.coordinateSystem.getCartesians(),d=0;d<h.length;d++)if(Q0(h[d].getOtherAxis(r.axis).scale))return!0;return!1}},u));N(I$,l.add,l),this._axisGroup.add(l.getGroup()),N(R$,function(c){r.get([c,"show"])&&N$[c](this,this._axisGroup,r,s)},this);var f=a&&a.type==="changeAxisOrder"&&a.isInitSort;f||Nx(o,this._axisGroup,r),t.prototype.render.call(this,r,n,i,a)}},e.prototype.remove=function(){L$(this)},e.type="cartesianAxis",e}(aT),N$={splitLine:function(t,e,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=he(s)?s:[s];for(var u=n.coordinateSystem.getRect(),l=i.isHorizontal(),f=0,c=i.getTicksCoords({tickModel:a}),h=[],d=[],p=o.getLineStyle(),g=0;g<c.length;g++){var v=i.toGlobalCoord(c[g].coord);l?(h[0]=v,h[1]=u.y,d[0]=v,d[1]=u.y+u.height):(h[0]=u.x,h[1]=v,d[0]=u.x+u.width,d[1]=v);var m=f++%s.length,y=c[g].tickValue,b=new Ni({anid:y!=null?"line_"+c[g].tickValue:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:d[0],y2:d[1]},style:je({stroke:s[m]},p),silent:!0});Bu(b.shape,p.lineWidth),e.add(b)}}},minorSplitLine:function(t,e,r,n){var i=r.axis,a=r.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=n.coordinateSystem.getRect(),u=i.isHorizontal(),l=i.getMinorTicksCoords();if(l.length)for(var f=[],c=[],h=o.getLineStyle(),d=0;d<l.length;d++)for(var p=0;p<l[d].length;p++){var g=i.toGlobalCoord(l[d][p].coord);u?(f[0]=g,f[1]=s.y,c[0]=g,c[1]=s.y+s.height):(f[0]=s.x,f[1]=g,c[0]=s.x+s.width,c[1]=g);var v=new Ni({anid:"minor_line_"+l[d][p].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]},style:h,silent:!0});Bu(v.shape,h.lineWidth),e.add(v)}},splitArea:function(t,e,r,n){F$(t,e,r,n)}},sT=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="xAxis",e}(oT),k$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=sT.type,r}return e.type="yAxis",e}(oT),z$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="grid",r}return e.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new St({shape:r.coordinateSystem.getRect(),style:je({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(Br),uT={offset:0};function j$(t){t.registerComponentView(z$),t.registerComponentModel(l$),t.registerCoordinateSystem("cartesian2d",b$),YA(t,"x",Cm,uT),YA(t,"y",Cm,uT),t.registerComponentView(sT),t.registerComponentView(k$),t.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function V$(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||xe(t,"text")))}function H$(t,e,r){var n=t,i,a,o;if(e==="text")o=n;else{o={},xe(n,"text")&&(o.text=n.text),xe(n,"rich")&&(o.rich=n.rich),xe(n,"textFill")&&(o.fill=n.textFill),xe(n,"textStroke")&&(o.stroke=n.textStroke),xe(n,"fontFamily")&&(o.fontFamily=n.fontFamily),xe(n,"fontSize")&&(o.fontSize=n.fontSize),xe(n,"fontStyle")&&(o.fontStyle=n.fontStyle),xe(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=xe(n,"textPosition");i.position=s?n.textPosition:"inside",xe(n,"textPosition")&&(i.position=n.textPosition),xe(n,"textOffset")&&(i.offset=n.textOffset),xe(n,"textRotation")&&(i.rotation=n.textRotation),xe(n,"textDistance")&&(i.distance=n.textDistance)}return lT(o,t),N(o.rich,function(u){lT(u,u)}),{textConfig:i,textContent:a}}function lT(t,e){e&&(e.font=e.textFont||e.font,xe(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),xe(e,"textAlign")&&(t.align=e.textAlign),xe(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),xe(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),xe(e,"textWidth")&&(t.width=e.textWidth),xe(e,"textHeight")&&(t.height=e.textHeight),xe(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),xe(e,"textPadding")&&(t.padding=e.textPadding),xe(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),xe(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),xe(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),xe(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),xe(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),xe(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),xe(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}var fT={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},cT=Ke(fT),Ph=ri(Tn,function(t,e){return t[e]=1,t},{}),hT=Tn.join(", "),Bh=["","style","shape","extra"],Cs=lt();function Bm(t,e,r,n,i){var a=t+"Animation",o=ts(t,n,i)||{},s=Cs(e).userDuring;return o.duration>0&&(o.during=s?dt(Y$,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),oe(o,r[a]),o}function Mm(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),u=Cs(t),l=e.style;u.userDuring=e.during;var f={},c={};if(K$(t,e,c),pT("shape",e,c),pT("extra",e,c),!a&&s&&(X$(t,e,f),vT("shape",t,e,f),vT("extra",t,e,f),Z$(t,e,l,f)),c.style=l,$$(t,c,o),U$(t,e),s)if(a){var h={};N(Bh,function(p){var g=p?e[p]:e;g&&g.enterFrom&&(p&&(h[p]=h[p]||{}),oe(p?h[p]:h,g.enterFrom))});var d=Bm("enter",t,e,r,i);d.duration>0&&t.animateFrom(h,d)}else G$(t,e,i||0,r,f);dT(t,e),l?t.dirty():t.markRedraw()}function dT(t,e){for(var r=Cs(t).leaveToProps,n=0;n<Bh.length;n++){var i=Bh[n],a=i?e[i]:e;a&&a.leaveTo&&(r||(r=Cs(t).leaveToProps={}),i&&(r[i]=r[i]||{}),oe(i?r[i]:r,a.leaveTo))}}function W$(t,e,r,n){if(t){var i=t.parent,a=Cs(t).leaveToProps;if(a){var o=Bm("update",t,e,r,0);o.done=function(){i.remove(t)},t.animateTo(a,o)}else i.remove(t)}}function no(t){return t==="all"}function $$(t,e,r){var n=e.style;if(!t.isGroup&&n){if(r){t.useStyle({});for(var i=t.animators,a=0;a<i.length;a++){var o=i[a];o.targetName==="style"&&o.changeTarget(t.style)}}t.setStyle(n)}e&&(e.style=null,e&&t.attr(e),e.style=n)}function G$(t,e,r,n,i){if(i){var a=Bm("update",t,e,n,r);a.duration>0&&t.animateFrom(i,a)}}function U$(t,e){xe(e,"silent")&&(t.silent=e.silent),xe(e,"ignore")&&(t.ignore=e.ignore),t instanceof Fi&&xe(e,"invisible")&&(t.invisible=e.invisible),t instanceof Ve&&xe(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var Vn={},q$={setTransform:function(t,e){return process.env.NODE_ENV!=="production"&&Ee(xe(Ph,t),"Only "+hT+" available in `setTransform`."),Vn.el[t]=e,this},getTransform:function(t){return process.env.NODE_ENV!=="production"&&Ee(xe(Ph,t),"Only "+hT+" available in `getTransform`."),Vn.el[t]},setShape:function(t,e){process.env.NODE_ENV!=="production"&&ws(t);var r=Vn.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){process.env.NODE_ENV!=="production"&&ws(t);var e=Vn.el.shape;if(e)return e[t]},setStyle:function(t,e){process.env.NODE_ENV!=="production"&&ws(t);var r=Vn.el,n=r.style;return n&&(process.env.NODE_ENV!=="production"&&Fo(e)&&xt("style."+t+" must not be assigned with NaN."),n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){process.env.NODE_ENV!=="production"&&ws(t);var e=Vn.el.style;if(e)return e[t]},setExtra:function(t,e){process.env.NODE_ENV!=="production"&&ws(t);var r=Vn.el.extra||(Vn.el.extra={});return r[t]=e,this},getExtra:function(t){process.env.NODE_ENV!=="production"&&ws(t);var e=Vn.el.extra;if(e)return e[t]}};function ws(t){if(process.env.NODE_ENV!=="production"&&(t==="transition"||t==="enterFrom"||t==="leaveTo"))throw new Error('key must not be "'+t+'"')}function Y$(){var t=this,e=t.el;if(e){var r=Cs(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}Vn.el=e,n(q$)}}function vT(t,e,r,n){var i=r[t];if(i){var a=e[t],o;if(a){var s=r.transition,u=i.transition;if(u)if(!o&&(o=n[t]={}),no(u))oe(o,a);else for(var l=gt(u),f=0;f<l.length;f++){var c=l[f],h=a[c];o[c]=h}else if(no(s)||Ge(s,t)>=0){!o&&(o=n[t]={});for(var d=Ke(a),f=0;f<d.length;f++){var c=d[f],h=a[c];J$(i[c],h)&&(o[c]=h)}}}}}function pT(t,e,r){var n=e[t];if(n)for(var i=r[t]={},a=Ke(n),o=0;o<a.length;o++){var s=a[o];i[s]=hu(n[s])}}function X$(t,e,r){for(var n=e.transition,i=no(n)?Tn:gt(n||[]),a=0;a<i.length;a++){var o=i[a];if(!(o==="style"||o==="shape"||o==="extra")){var s=t[o];process.env.NODE_ENV!=="production"&&gT(o,"el.transition"),r[o]=s}}}function K$(t,e,r){for(var n=0;n<cT.length;n++){var i=cT[n],a=fT[i],o=e[i];o&&(r[a[0]]=o[0],r[a[1]]=o[1])}for(var n=0;n<Tn.length;n++){var s=Tn[n];e[s]!=null&&(r[s]=e[s])}}function Z$(t,e,r,n){if(r){var i=t.style,a;if(i){var o=r.transition,s=e.transition;if(o&&!no(o)){var u=gt(o);!a&&(a=n.style={});for(var l=0;l<u.length;l++){var f=u[l],c=i[f];a[f]=c}}else if(t.getAnimationStyleProps&&(no(s)||no(o)||Ge(s,"style")>=0)){var h=t.getAnimationStyleProps(),d=h?h.style:null;if(d){!a&&(a=n.style={});for(var p=Ke(r),l=0;l<p.length;l++){var f=p[l];if(d[f]){var c=i[f];a[f]=c}}}}}}}function J$(t,e){return Wt(t)?t!==e:t!=null&&isFinite(t)}var gT;process.env.NODE_ENV!=="production"&&(gT=function(t,e){xe(Ph,t)||xt("Prop `"+t+"` is not a permitted in `"+e+"`. Only `"+Ke(Ph).join("`, `")+"` are permitted.")});var mT=lt(),Q$=["percent","easing","shape","style","extra"];function eG(t){t.stopAnimation("keyframe"),t.attr(mT(t))}function Fm(t,e,r){if(!(!r.isAnimationEnabled()||!e)){if(he(e)){N(e,function(s){Fm(t,s,r)});return}var n=e.keyframes,i=e.duration;if(r&&i==null){var a=ts("enter",r,0);i=a&&a.duration}if(!(!n||!i)){var o=mT(t);N(Bh,function(s){if(!(s&&!t[s])){var u,l=!1;n.sort(function(f,c){return f.percent-c.percent}),N(n,function(f){var c=t.animators,h=s?f[s]:f;if(process.env.NODE_ENV!=="production"&&f.percent>=1&&(l=!0),!!h){var d=Ke(h);if(s||(d=bt(d,function(v){return Ge(Q$,v)<0})),!!d.length){u||(u=t.animate(s,e.loop,!0),u.scope="keyframe");for(var p=0;p<c.length;p++)c[p]!==u&&c[p].targetName===u.targetName&&c[p].stopTracks(d);s&&(o[s]=o[s]||{});var g=s?o[s]:o;N(d,function(v){g[v]=((s?t[s]:t)||{})[v]}),u.whenWithKeys(i*f.percent,h,d,f.easing)}}}),u&&(process.env.NODE_ENV!=="production"&&(l||xt("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),u.delay(e.delay||0).duration(i).start(e.easing))}})}}}var io=lt(),yT=$e,Lm=dt,tG=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,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,e,r,n);var f=l.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var c=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new It,this.createPointerEl(s,l,e,r),this.createLabelEl(s,l,e,r),n.getZr().add(s);else{var h=Dt(bT,r,c);this.updatePointerEl(s,l,h),this.updateLabelEl(s,l,h,r)}_T(s,r,!0),this._renderHandle(a)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var n=r.get("animation"),i=e.axis,a=i.type==="category",o=r.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=Am(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/u>s}return!1}return n===!0},t.prototype.makeElOption=function(e,r,n,i,a){},t.prototype.createPointerEl=function(e,r,n,i){var a=r.pointer;if(a){var o=io(e).pointerEl=new b7[a.type](yT(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=io(e).labelEl=new Ot(yT(r.label));e.add(a),wT(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=io(e).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,n,i){var a=io(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),wT(a,i))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.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=Wg(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(l){v_(l.event)},onmousedown:Lm(this._onHandleDragMove,this,0,0),drift:Lm(this._onHandleDragMove,this),ondragend:Lm(this._onHandleDragEnd,this)}),n.add(i)),_T(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var u=a.get("size");he(u)||(u=[u,u]),i.scaleX=u[0]/2,i.scaleY=u[1]/2,CE(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){bT(this._axisPointerModel,!r&&this._moveAnimation,this._handle,Im(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(Im(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Im(i)),io(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),S0(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,n){return n=n||0,{x:e[n],y:e[1-n],width:r[n],height:r[1-n]}},t}();function bT(t,e,r,n){CT(io(r).lastProp,n)||(io(r).lastProp=n,e?Ft(r,n,t):(r.stopAnimation(),r.attr(n)))}function CT(t,e){if(we(t)&&we(e)){var r=!0;return N(e,function(n,i){r=r&&CT(t[i],n)}),!!r}else return t===e}function wT(t,e){t[e.get(["label","show"])?"show":"hide"]()}function Im(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function _T(t,e,r){var n=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function rG(t){var e=t.get("type"),r=t.getModel(e+"Style"),n;return e==="line"?(n=r.getLineStyle(),n.fill=null):e==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function nG(t,e,r,n,i){var a=r.get("value"),o=DT(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),u=Vc(s.get("padding")||0),l=s.getFont(),f=Yp(o,l),c=i.position,h=f.width+u[1]+u[3],d=f.height+u[0]+u[2],p=i.align;p==="right"&&(c[0]-=h),p==="center"&&(c[0]-=h/2);var g=i.verticalAlign;g==="bottom"&&(c[1]-=d),g==="middle"&&(c[1]-=d/2),iG(c,h,d,n);var v=s.get("backgroundColor");(!v||v==="auto")&&(v=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:ki(s,{text:o,font:l,fill:s.getTextColor(),padding:u,backgroundColor:v}),z2:10}}function iG(t,e,r,n){var i=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,a)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function DT(t,e,r,n,i){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:i.precision}),o=i.formatter;if(o){var s={value:am(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};N(n,function(u){var l=r.getSeriesByIndex(u.seriesIndex),f=u.dataIndexInside,c=l&&l.getDataParams(f);c&&s.seriesData.push(c)}),be(o)?a=o.replace("{value}",a):De(o)&&(a=o(s))}return a}function xT(t,e,r){var n=zo();return Dp(n,n,r.rotation),_p(n,n,r.position),Hg([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function aG(t,e,r,n,i,a){var o=Yi.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),nG(e,n,i,a,{position:xT(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function oG(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function sG(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}var uG=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,u=s.grid,l=a.get("type"),f=ST(u,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(n,!0));if(l&&l!=="none"){var h=rG(a),d=lG[l](s,c,f);d.style=h,r.graphicKey=d.type,r.pointer=d}var p=Dm(u.model,i);aG(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=Dm(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=xT(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,u=o.getGlobalExtent(!0),l=ST(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,c=[r.x,r.y];c[f]+=n[f],c[f]=Math.min(u[1],c[f]),c[f]=Math.max(u[0],c[f]);var h=(l[1]+l[0])/2,d=[h,h];d[f]=c[f];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:p[f]}},e}(tG);function ST(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var lG={line:function(t,e,r){var n=oG([e,r[0]],[e,r[1]],ET(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:sG([e-n/2,r[0]],[n,i],ET(t))}}};function ET(t){return t.dim==="x"?0:1}var fG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Ze),pi=lt(),cG=N;function AT(t,e,r){if(!Pe.node){var n=e.getZr();pi(n).records||(pi(n).records={}),hG(n,e);var i=pi(n).records[t]||(pi(n).records[t]={});i.handler=r}}function hG(t,e){if(pi(t).initialized)return;pi(t).initialized=!0,r("click",Dt(TT,"click")),r("mousemove",Dt(TT,"mousemove")),r("globalout",vG);function r(n,i){t.on(n,function(a){var o=pG(e);cG(pi(t).records,function(s){s&&i(s,a,o.dispatchAction)}),dG(o.pendings,e)})}}function dG(t,e){var r=t.showTip.length,n=t.hideTip.length,i;r?i=t.showTip[r-1]:n&&(i=t.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function vG(t,e,r){t.handler("leave",null,r)}function TT(t,e,r,n){e.handler(t,r,n)}function pG(t){var e={showTip:[],hideTip:[]},r=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=r,t.dispatchAction(n))};return{dispatchAction:r,pendings:e}}function Rm(t,e){if(!Pe.node){var r=e.getZr(),n=(pi(r).records||{})[t];n&&(pi(r).records[t]=null)}}var gG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";AT("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})})},e.prototype.remove=function(r,n){Rm("axisPointer",n)},e.prototype.dispose=function(r,n){Rm("axisPointer",n)},e.type="axisPointer",e}(Br);function OT(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Pa(a,t);if(o==null||o<0||he(o))return{point:[]};var s=a.getItemGraphicEl(o),u=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(u&&u.dataToPoint)if(t.isStacked){var l=u.getBaseAxis(),f=u.getOtherAxis(l),c=f.dim,h=l.dim,d=c==="x"||c==="radius"?1:0,p=a.mapDimension(h),g=[];g[d]=a.get(p,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=u.dataToPoint(g)||[]}else r=u.dataToPoint(a.getValues(ye(u.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var v=s.getBoundingRect().clone();v.applyTransform(s.transform),r=[v.x+v.width/2,v.y+v.height/2]}return{point:r,el:s}}var PT=lt();function mG(t,e,r){var n=t.currTrigger,i=[t.x,t.y],a=t,o=t.dispatchAction||dt(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Mh(i)&&(i=OT({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var u=Mh(i),l=a.axesInfo,f=s.axesInfo,c=n==="leave"||Mh(i),h={},d={},p={list:[],map:{}},g={showPointer:Dt(bG,d),showTooltip:Dt(CG,p)};N(s.coordSysMap,function(m,y){var b=u||m.containPoint(i);N(s.coordSysAxesInfo[y],function(w,C){var _=w.axis,D=xG(l,w);if(!c&&b&&(!l||D)){var x=D&&D.value;x==null&&!u&&(x=_.pointToData(i)),x!=null&&BT(w,x,g,!1,h)}})});var v={};return N(f,function(m,y){var b=m.linkGroup;b&&!d[y]&&N(b.axesInfo,function(w,C){var _=d[C];if(w!==m&&_){var D=_.value;b.mapper&&(D=m.axis.scale.parse(b.mapper(D,MT(w),MT(m)))),v[m.key]=D}})}),N(v,function(m,y){BT(f[y],m,g,!0,h)}),wG(d,f,h),_G(p,i,t,o),DG(f,o,r),h}}function BT(t,e,r,n,i){var a=t.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=yG(e,t),s=o.payloadBatch,u=o.snapToValue;s[0]&&i.seriesIndex==null&&oe(i,s[0]),!n&&t.snap&&a.containData(u)&&u!=null&&(e=u),r.showPointer(t,e,s),r.showTooltip(t,o,u)}}function yG(t,e){var r=e.axis,n=r.dim,i=t,a=[],o=Number.MAX_VALUE,s=-1;return N(e.seriesModels,function(u,l){var f=u.getData().mapDimensionsAll(n),c,h;if(u.getAxisTooltipData){var d=u.getAxisTooltipData(f,t,r);h=d.dataIndices,c=d.nestestValue}else{if(h=u.getData().indicesOfNearest(f[0],t,r.type==="category"?.5:null),!h.length)return;c=u.getData().get(f[0],h[0])}if(!(c==null||!isFinite(c))){var p=t-c,g=Math.abs(p);g<=o&&((g<o||p>=0&&s<0)&&(o=g,s=p,i=c,a.length=0),N(h,function(v){a.push({seriesIndex:u.seriesIndex,dataIndexInside:v,dataIndex:u.getData().getRawIndex(v)})}))}}),{payloadBatch:a,snapToValue:i}}function bG(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function CG(t,e,r,n){var i=r.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var u=e.coordSys.model,l=ul(u),f=t.map[l];f||(f=t.map[l]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},t.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 wG(t,e,r){var n=r.axesInfo=[];N(e,function(i,a){var o=i.axisPointerModel.option,s=t[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 _G(t,e,r,n){if(Mh(e)||!t.list.length){n({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function DG(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=PT(n)[i]||{},o=PT(n)[i]={};N(t,function(l,f){var c=l.axisPointerModel.option;c.status==="show"&&l.triggerEmphasis&&N(c.seriesDataIndices,function(h){var d=h.seriesIndex+" | "+h.dataIndex;o[d]=h})});var s=[],u=[];N(a,function(l,f){!o[f]&&u.push(l)}),N(o,function(l,f){!a[f]&&s.push(l)}),u.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:u}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function xG(t,e){for(var r=0;r<(t||[]).length;r++){var n=t[r];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function MT(t){var e=t.axis.model,r={},n=r.axisDim=t.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=e.componentIndex,r.axisName=r[n+"AxisName"]=e.name,r.axisId=r[n+"AxisId"]=e.id,r}function Mh(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function FT(t){aT.registerAxisPointerClass("CartesianAxisPointer",uG),t.registerComponentModel(fG),t.registerComponentView(gG),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!he(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=E$(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},mG)}function SG(t){Wi(j$),Wi(FT)}function EG(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function LT(t,e){var r;return N(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function AG(t,e,r){var n=oe({},r),i=t[e],a=r.$action||"merge";if(a==="merge")if(i){if(process.env.NODE_ENV!=="production"){var o=r.type;Ee(!o||i.type===o,'Please set $action: "replace" to change `type`')}Qe(i,n,!0),qa(i,n,{ignoreSize:!0}),vS(r,i),Fh(r,i),Fh(r,i,"shape"),Fh(r,i,"style"),Fh(r,i,"extra"),r.clipPath=i.clipPath}else t[e]=n;else a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var IT=["transition","enterFrom","leaveTo"],TG=IT.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Fh(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?IT:TG,i=0;i<n.length;i++){var a=n[i];t[a]==null&&e[a]!=null&&(t[a]=e[a])}}function OG(t,e){if(t&&(t.hv=e.hv=[LT(e,["left","right"]),LT(e,["top","bottom"])],t.type==="group")){var r=t,n=e;r.width==null&&(r.width=n.width=0),r.height==null&&(r.height=n.height=0)}}var PG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventAutoZ=!0,r}return e.prototype.mergeOption=function(r,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,r,n),this.option.elements=i},e.prototype.optionUpdated=function(r,n){var i=this.option,a=(n?i:r).elements,o=i.elements=n?[]:i.elements,s=[];this._flatten(a,s,null);var u=gD(o,s,"normalMerge"),l=this._elOptionsToUpdate=[];N(u,function(f,c){var h=f.newOption;process.env.NODE_ENV!=="production"&&Ee(we(h)||f.existing,"Empty graphic option definition"),h&&(l.push(h),EG(f,h),AG(o,c,h),OG(o[c],h))},this),i.elements=bt(o,function(f){return f&&delete f.$action,f!=null})},e.prototype._flatten=function(r,n,i){N(r,function(a){if(a){i&&(a.parentOption=i),n.push(a);var o=a.children;o&&o.length&&this._flatten(o,n,a),delete a.children}},this)},e.prototype.useElOptionsToUpdate=function(){var r=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,r},e.type="graphic",e.defaultOption={elements:[]},e}(Ze),RT={path:null,compoundPath:null,group:It,image:fi,text:Ot},en=lt(),BG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this._elMap=Ae()},e.prototype.render=function(r,n,i){r!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=r,this._updateElements(r),this._relocate(r,i)},e.prototype._updateElements=function(r){var n=r.useElOptionsToUpdate();if(n){var i=this._elMap,a=this.group,o=r.get("z"),s=r.get("zlevel");N(n,function(u){var l=pr(u.id,null),f=l!=null?i.get(l):null,c=pr(u.parentId,null),h=c!=null?i.get(c):a,d=u.type,p=u.style;d==="text"&&p&&u.hv&&u.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var g=u.textContent,v=u.textConfig;if(p&&V$(p,d,!!v,!!g)){var m=H$(p,d);!v&&m.textConfig&&(v=u.textConfig=m.textConfig),!g&&m.textContent&&(g=m.textContent)}var y=MG(u);process.env.NODE_ENV!=="production"&&f&&Ee(h===f.parent,"Changing parent is not supported.");var b=u.$action||"merge",w=b==="merge",C=b==="replace";if(w){var _=!f,D=f;_?D=NT(l,h,u.type,i):(D&&(en(D).isNew=!1),eG(D)),D&&(Mm(D,y,r,{isInit:_}),kT(D,u,o,s))}else if(C){Lh(f,u,i,r);var x=NT(l,h,u.type,i);x&&(Mm(x,y,r,{isInit:!0}),kT(x,u,o,s))}else b==="remove"&&(dT(f,u),Lh(f,u,i,r));var S=i.get(l);if(S&&g)if(w){var O=S.getTextContent();O?O.attr(g):S.setTextContent(new Ot(g))}else C&&S.setTextContent(new Ot(g));if(S){var E=u.clipPath;if(E){var P=E.type,F=void 0,_=!1;if(w){var B=S.getClipPath();_=!B||en(B).type!==P,F=_?Nm(P):B}else C&&(_=!0,F=Nm(P));S.setClipPath(F),Mm(F,E,r,{isInit:_}),Fm(F,E.keyframeAnimation,r)}var M=en(S);S.setTextConfig(v),M.option=u,FG(S,r,u),Oc({el:S,componentModel:r,itemName:S.name,itemTooltipOption:u.tooltip}),Fm(S,u.keyframeAnimation,r)}})}},e.prototype._relocate=function(r,n){for(var i=r.option.elements,a=this.group,o=this._elMap,s=n.getWidth(),u=n.getHeight(),l=["x","y"],f=0;f<i.length;f++){var c=i[f],h=pr(c.id,null),d=h!=null?o.get(h):null;if(!(!d||!d.isGroup)){var p=d.parent,g=p===a,v=en(d),m=en(p);v.width=ut(v.option.width,g?s:m.width)||0,v.height=ut(v.option.height,g?u:m.height)||0}}for(var f=i.length-1;f>=0;f--){var c=i[f],h=pr(c.id,null),d=h!=null?o.get(h):null;if(d){var p=d.parent,m=en(p),y=p===a?{width:s,height:u}:{width:m.width,height:m.height},b={},w=$7(d,c,y,null,{hv:c.hv,boundingMode:c.bounding},b);if(!en(d).isNew&&w){for(var C=c.transition,_={},D=0;D<l.length;D++){var x=l[D],S=b[x];C&&(no(C)||Ge(C,x)>=0)?_[x]=S:d[x]=S}Ft(d,_,r,0)}else d.attr(b)}}},e.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){Lh(i,en(i).option,n,r._lastGraphicModel)}),this._elMap=Ae()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Br);function Nm(t){process.env.NODE_ENV!=="production"&&Ee(t,"graphic type MUST be set");var e=xe(RT,t)?RT[t]:Mx(t);process.env.NODE_ENV!=="production"&&Ee(e,"graphic type "+t+" can not be found");var r=new e({});return en(r).type=t,r}function NT(t,e,r,n){var i=Nm(r);return e.add(i),n.set(t,i),en(i).id=t,en(i).isNew=!0,i}function Lh(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){Lh(a,e,r,n)}),W$(t,e,n),r.removeKey(en(t).id))}function kT(t,e,r,n){t.isGroup||N([["cursor",Fi.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];xe(e,a)?t[a]=Be(e[a],i[1]):t[a]==null&&(t[a]=i[1])}),N(Ke(e),function(i){if(i.indexOf("on")===0){var a=e[i];t[i]=De(a)?a:null}}),xe(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function MG(t){return t=oe({},t),N(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(dS),function(e){delete t[e]}),t}function FG(t,e,r){var n=He(t).eventData;!t.silent&&!t.ignore&&!n&&(n=He(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=r.info)}function LG(t){t.registerComponentModel(PG),t.registerComponentView(BG),t.registerPreprocessor(function(e){var r=e.graphic;he(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}function IG(t,e){var r=Vc(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new St({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}),t}var RG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Ze);function zT(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function jT(t){if(Pe.domSupported){for(var e=document.documentElement.style,r=0,n=t.length;r<n;r++)if(t[r]in e)return t[r]}}var VT=jT(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),NG=jT(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function HT(t,e){if(!t)return e;e=lS(e,!0);var r=t.indexOf(e);return t=r===-1?e:"-"+t.slice(0,r)+"-"+e,t.toLowerCase()}function kG(t,e){var r=t.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t);return r?r[e]:null}var zG=HT(NG,"transition"),km=HT(VT,"transform"),jG="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Pe.transform3dSupported?"will-change:transform;":"");function VG(t){return t=t==="left"?"right":t==="right"?"left":t==="top"?"bottom":"top",t}function HG(t,e,r){if(!be(r)||r==="inside")return"";var n=t.get("backgroundColor"),i=t.get("borderWidth");e=Ga(e);var a=VG(r),o=Math.max(Math.round(i)*1.5,6),s="",u=km+":",l;Ge(["left","right"],a)>-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,c=o+i,h=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),d=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-c)/2)*100)/100;s+=";"+a+":-"+d+"px";var p=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+u+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'<div style="'+g.join("")+'"></div>'}function WG(t,e){var r="cubic-bezier(0.23,1,0.32,1)",n=" "+t/2+"s "+r,i="opacity"+n+",visibility"+n;return e||(n=" "+t+"s "+r,i+=Pe.transformSupported?","+km+n:",left"+n+",top"+n),zG+":"+i}function WT(t,e,r){var n=t.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Pe.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Pe.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+km+":"+o+";":[["top",0],["left",0],[VT,o]]}function $G(t){var e=[],r=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont()),r&&e.push("line-height:"+Math.round(r*3/2)+"px");var i=t.get("textShadowColor"),a=t.get("textShadowBlur")||0,o=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return i&&a&&e.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),N(["decoration","align"],function(u){var l=t.get(u);l&&e.push("text-"+u+":"+l)}),e.join(";")}function GG(t,e,r){var n=[],i=t.get("transitionDuration"),a=t.get("backgroundColor"),o=t.get("shadowBlur"),s=t.get("shadowColor"),u=t.get("shadowOffsetX"),l=t.get("shadowOffsetY"),f=t.getModel("textStyle"),c=hE(t,"html"),h=u+"px "+l+"px "+o+"px "+s;return n.push("box-shadow:"+h),e&&i&&n.push(WG(i,r)),a&&n.push("background-color:"+a),N(["width","color","radius"],function(d){var p="border-"+d,g=lS(p),v=t.get(g);v!=null&&n.push(p+":"+v+(d==="color"?"":"px"))}),n.push($G(f)),c!=null&&n.push("padding:"+Vc(c).join("px ")+"px"),n.join(";")+";"}function $T(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&WN(t,o,r,n,i)}else{t[0]=n,t[1]=i;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var UG=function(){function t(e,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Pe.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=r.appendTo,o=a&&(be(a)?document.querySelector(a):Mo(a)?a:De(a)&&a(e.getDom()));$T(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,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();Vr(f,u,!0),l.dispatch("mousemove",u)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){if(!this._container){var r=this._api.getDom(),n=kG(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=jG+GG(e,!this._firstShow,this._longHide)+WT(a[0],a[1],!0)+("border-color:"+Ga(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(be(a)&&n.get("trigger")==="item"&&!zT(n)&&(s=HG(n,i,a)),be(e))o.innerHTML=e+s;else if(e){o.innerHTML="",he(e)||(e=[e]);for(var u=0;u<e.length;u++)Mo(e[u])&&e[u].parentNode!==o&&o.appendChild(e[u]);if(s&&o.childNodes.length){var l=document.createElement("div");l.innerHTML=s,o.appendChild(l)}}},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},t.prototype.moveTo=function(e,r){var n=this._styleCoord;if($T(n,this._zr,this._container,e,r),n[0]!=null&&n[1]!=null){var i=this.el.style,a=WT(n[0],n[1]);N(a,function(o){i[o[0]]=o[1]})}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){var e=this,r=this.el.style;r.visibility="hidden",r.opacity="0",Pe.transform3dSupported&&(r.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(dt(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},t}(),qG=function(){function t(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),UT(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return t.prototype.update=function(e){var r=e.get("alwaysShowContent");r&&this._moveIfResized(),this._alwaysShowContent=r},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(e,r,n,i,a){var o=this;we(e)&&qe(process.env.NODE_ENV!=="production"?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new Ot({style:{rich:r.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:hE(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),N(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(l){o.el.style[l]=n.get(l)}),N(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(l){o.el.style[l]=s.get(l)||0}),this._zr.add(this.el);var u=this;this.el.on("mouseover",function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0}),this.el.on("mouseout",function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1})},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el,r=this.el.getBoundingRect(),n=GT(e.style);return[r.width+n.left+n.right,r.height+n.top+n.bottom]},t.prototype.moveTo=function(e,r){var n=this.el;if(n){var i=this._styleCoord;UT(i,this._zr,e,r),e=i[0],r=i[1];var a=n.style,o=Xi(a.borderWidth||0),s=GT(a);n.x=e+o+s.left,n.y=r+o+s.top,n.markRedraw()}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(dt(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();function Xi(t){return Math.max(0,t)}function GT(t){var e=Xi(t.shadowBlur||0),r=Xi(t.shadowOffsetX||0),n=Xi(t.shadowOffsetY||0);return{left:Xi(e-r),right:Xi(e+r),top:Xi(e-n),bottom:Xi(e+n)}}function UT(t,e,r,n){t[0]=r,t[1]=n,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var YG=new St({shape:{x:-1,y:-1,width:2,height:2}}),XG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){if(!(Pe.node||!n.getDom())){var i=r.getComponent("tooltip"),a=this._renderMode=d6(i.get("renderMode"));this._tooltipContent=a==="richText"?new qG(n):new UG(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},e.prototype.render=function(r,n,i){if(!(Pe.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=r,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(r),a.setEnterable(r.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&r.get("transitionDuration")?CE(this,"_updatePosition",50,"fixRate"):S0(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var r=this._tooltipModel,n=r.get("triggerOn");AT("itemTooltip",this._api,dt(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.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(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Pe.node||!i.getDom())){var o=qT(a,i);this._ticket="";var s=a.dataByCoordSys,u=QG(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=YG;f.x=a.x,f.y=a.y,f.update(),He(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(r,n,i,a))return;var c=OT(a,n),h=c.point[0],d=c.point[1];h!=null&&d!=null&&this._tryShow({offsetX:h,offsetY:d,target:c.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))}},e.prototype.manuallyHideTip=function(r,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(qT(a,i))},e.prototype._manuallyAxisShowTip=function(r,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(),c=ll([f.getItemModel(s),l,(l.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=He(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var u,l;Xu(i,function(f){if(He(f).dataIndex!=null)return u=f,!0;if(He(f).tooltipConfig!=null)return l=f,!0},!0),u?this._showSeriesItemTooltip(r,u,n):l?this._showComponentItemTooltip(r,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=dt(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=ll([n.tooltipOption],a),u=this._renderMode,l=[],f=Uu("section",{blocks:[],noHeader:!0}),c=[],h=new w0;N(r,function(y){N(y.dataByAxis,function(b){var w=i.getComponent(b.axisDim+"Axis",b.axisIndex),C=b.value;if(!(!w||C==null)){var _=DT(C,w.axis,i,b.seriesDataIndices,b.valueLabelOpt),D=Uu("section",{header:_,noHeader:!Sn(_),sortBlocks:!0,blocks:[]});f.blocks.push(D),N(b.seriesDataIndices,function(x){var S=i.getSeriesByIndex(x.seriesIndex),O=x.dataIndexInside,E=S.getDataParams(O);if(!(E.dataIndex<0)){E.axisDim=b.axisDim,E.axisIndex=b.axisIndex,E.axisType=b.axisType,E.axisId=b.axisId,E.axisValue=am(w.axis,{value:C}),E.axisValueLabel=_,E.marker=h.makeTooltipMarker("item",Ga(E.color),u);var P=qS(S.formatTooltip(O,!0,null)),F=P.frag;if(F){var B=ll([S],a).get("valueFormatter");D.blocks.push(B?oe({valueFormatter:B},F):F)}P.text&&c.push(P.text),l.push(E)}})}})}),f.blocks.reverse(),c.reverse();var d=n.position,p=s.get("order"),g=fE(f,h,u,p,i.get("useUTC"),s.get("textStyle"));g&&c.unshift(g);var v=u==="richText"?`
167
167
 
168
- `:"<br/>",m=c.join(v);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,l)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,l):this._showTooltipContent(s,m,l,Math.random()+"",o[0],o[1],d,null,h)})},e.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=He(n),s=o.seriesIndex,u=a.getSeriesByIndex(s),l=o.dataModel||u,f=o.dataIndex,c=o.dataType,h=l.getData(c),d=this._renderMode,p=r.positionDefault,g=ll([h.getItemModel(f),l,u&&(u.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),v=g.get("trigger");if(!(v!=null&&v!=="item")){var m=l.getDataParams(f,c),y=new wm;m.marker=y.makeTooltipMarker("item",Ga(m.color),d);var b=qS(l.formatTooltip(f,!1,c)),w=g.get("order"),C=g.get("valueFormatter"),_=b.frag,D=_?fE(C?oe({valueFormatter:C},_):_,y,d,w,a.get("useUTC"),g.get("textStyle")):b.text,x="item_"+l.name+"_"+f;this._showOrMove(g,function(){this._showTooltipContent(g,D,m,x,r.offsetX,r.offsetY,r.position,r.target,y)}),i({type:"showTip",dataIndexInside:f,dataIndex:h.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=He(n),s=o.tooltipConfig,u=s.option||{},l=u.encodeHTMLContent;if(be(u)){var f=u;u={content:f,formatter:f},l=!0}l&&a&&u.content&&(u=$e(u),u.content=Tr(u.content));var c=[u],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&c.push(h),c.push({formatter:u.content});var d=r.positionDefault,p=ll(c,this._tooltipModel,d?{position:d}:null),g=p.get("content"),v=Math.random()+"",m=new wm;this._showOrMove(p,function(){var y=$e(p.get("formatterParams")||{});this._showTooltipContent(p,g,y,v,r.offsetX,r.offsetY,r.position,n,m)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,n,i,a,o,s,u,l,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var c=this._tooltipContent;c.setEnterable(r.get("enterable"));var h=r.get("formatter");u=u||r.get("position");var d=n,p=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),g=p.color;if(h)if(be(h)){var v=r.ecModel.get("useUTC"),m=he(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;d=h,y&&(d=Rc(m.axisValue,d,v)),d=cS(d,i,!0)}else if(De(h)){var b=dt(function(w,C){w===this._ticket&&(c.setContent(C,f,r,g,u),this._updatePosition(r,u,o,s,c,i,l))},this);this._ticket=a,d=h(i,a,b)}else d=h;c.setContent(d,f,r,g,u),c.show(r,g),this._updatePosition(r,u,o,s,c,i,l)}},e.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||he(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!he(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(r,n,i,a,o,s,u){var l=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var c=o.getSize(),h=r.get("align"),d=r.get("verticalAlign"),p=u&&u.getBoundingRect().clone();if(u&&p.applyTransform(u.transform),De(n)&&(n=n([i,a],s,o.el,p,{viewSize:[l,f],contentSize:c.slice()})),he(n))i=ut(n[0],l),a=ut(n[1],f);else if(we(n)){var g=n;g.width=c[0],g.height=c[1];var v=Ua(g,{width:l,height:f});i=v.x,a=v.y,h=null,d=null}else if(be(n)&&u){var m=JG(n,p,c,r.get("borderWidth"));i=m[0],a=m[1]}else{var m=KG(i,a,o,l,f,h?null:20,d?null:20);i=m[0],a=m[1]}if(h&&(i-=YT(h)?c[0]/2:h==="right"?c[0]:0),d&&(a-=YT(d)?c[1]/2:d==="bottom"?c[1]:0),zT(r)){var m=ZG(i,a,o,l,f);i=m[0],a=m[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&N(i,function(s,u){var l=s.dataByAxis||[],f=r[u]||{},c=f.dataByAxis||[];o=o&&l.length===c.length,o&&N(l,function(h,d){var p=c[d]||{},g=h.seriesDataIndices||[],v=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&g.length===v.length,o&&N(g,function(m,y){var b=v[y];o=o&&m.seriesIndex===b.seriesIndex&&m.dataIndex===b.dataIndex}),a&&N(h.seriesDataIndices,function(m){var y=m.seriesIndex,b=n[y],w=a[y];b&&w&&w.data!==b.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,n){Pe.node||!n.getDom()||(Sm(this,"_updatePosition"),this._tooltipContent.dispose(),R0("itemTooltip",n))},e.type="tooltip",e}(Br);function ll(t,e,r){var n=e.ecModel,i;r?(i=new Ct(r,n,n),i=new Ct(e.option,i,n)):i=e;for(var a=t.length-1;a>=0;a--){var o=t[a];o&&(o instanceof Ct&&(o=o.get("tooltip",!0)),be(o)&&(o={formatter:o}),o&&(i=new Ct(o,i,n)))}return i}function qT(t,e){return t.dispatchAction||dt(e.dispatchAction,e)}function KG(t,e,r,n,i,a,o){var s=r.getSize(),u=s[0],l=s[1];return a!=null&&(t+u+a+2>n?t-=u+a:t+=a),o!=null&&(e+l+o>i?e-=l+o:e+=o),[t,e]}function ZG(t,e,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return t=Math.min(t+o,n)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function JG(t,e,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,u=0,l=e.width,f=e.height;switch(t){case"inside":s=e.x+l/2-i/2,u=e.y+f/2-a/2;break;case"top":s=e.x+l/2-i/2,u=e.y-a-o;break;case"bottom":s=e.x+l/2-i/2,u=e.y+f+o;break;case"left":s=e.x-i-o,u=e.y+f/2-a/2;break;case"right":s=e.x+l+o,u=e.y+f/2-a/2}return[s,u]}function YT(t){return t==="center"||t==="middle"}function QG(t,e,r){var n=ag(t).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=Cu(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),u;if(s.group.traverse(function(l){var f=He(l).tooltipConfig;if(f&&f.name===t.name)return u=l,!0}),u)return{componentMainType:i,componentIndex:o.componentIndex,el:u}}}}function eU(t){Wi(FT),t.registerComponentModel(RG),t.registerComponentView(XG),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},dr),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},dr)}var tU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Ze),rU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),u=r.get("textAlign"),l=Be(r.get("textBaseline"),r.get("textVerticalAlign")),f=new Ot({style:ki(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),h=r.get("subtext"),d=new Ot({style:ki(s,{text:h,fill:s.getTextColor(),y:c.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=r.get("link"),g=r.get("sublink"),v=r.get("triggerEvent",!0);f.silent=!p&&!v,d.silent=!g&&!v,p&&f.on("click",function(){hS(p,"_"+r.get("target"))}),g&&d.on("click",function(){hS(g,"_"+r.get("subtarget"))}),He(f).eventData=He(d).eventData=v?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(f),h&&a.add(d);var m=a.getBoundingRect(),y=r.getBoxLayoutParams();y.width=m.width,y.height=m.height;var b=Ua(y,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));u||(u=r.get("left")||r.get("right"),u==="middle"&&(u="center"),u==="right"?b.x+=b.width:u==="center"&&(b.x+=b.width/2)),l||(l=r.get("top")||r.get("bottom"),l==="center"&&(l="middle"),l==="bottom"?b.y+=b.height:l==="middle"&&(b.y+=b.height/2),l=l||"top"),a.x=b.x,a.y=b.y,a.markRedraw();var w={align:u,verticalAlign:l};f.setStyle(w),d.setStyle(w),m=a.getBoundingRect();var C=b.margin,_=r.getItemStyle(["color","opacity"]);_.fill=r.get("backgroundColor");var D=new St({shape:{x:m.x-C[3],y:m.y-C[0],width:m.width+C[1]+C[3],height:m.height+C[0]+C[2],r:r.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});a.add(D)}},e.type="title",e}(Br);function nU(t){t.registerComponentModel(tU),t.registerComponentView(rU)}var iU=function(t,e){if(e==="all")return{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}},z0=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},e.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),he(n)&&N(n,function(a,o){be(a)&&(a={type:a}),n[o]=Qe(a,iU(i,a.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},e.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(u){var l=u.name;i.push(l);var f;if(u.legendVisualProvider){var c=u.legendVisualProvider,h=c.getAllNames();r.isSeriesFiltered(u)||(i=i.concat(h)),h.length?n=n.concat(h):f=!0}else f=!0;f&&ng(u)&&n.push(u.name)}),this._availableNames=i;var a=this.get("data")||n,o=Ae(),s=ye(a,function(u){return(be(u)||nt(u))&&(u={name:u}),o.get(u.name)?null:(o.set(u.name,!0),new Ct(u,this,this.ecModel))},this);this._data=bt(s,function(u){return!!u})},e.prototype.getData=function(){return this._data},e.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;N(a,function(o){n[o.get("name")]=!1})}n[r]=!0},e.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},e.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},e.prototype.allSelect=function(){var r=this._data,n=this.option.selected;N(r,function(i){n[i.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;N(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},e.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&Ge(this._availableNames,r)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Ze),_s=Dt,j0=N,Ih=It,XT=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new Ih),this.group.add(this._selectorGroup=new Ih),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var u=r.get("selector",!0),l=r.get("selectorPosition",!0);u&&(!l||l==="auto")&&(l=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,u,s,l);var f=r.getBoxLayoutParams(),c={width:i.getWidth(),height:i.getHeight()},h=r.get("padding"),d=Ua(f,c,h),p=this.layoutInner(r,o,d,a,u,l),g=Ua(je({width:p.width,height:p.height},f),c,h);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=IG(p,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,u){var l=this.getContentGroup(),f=Ae(),c=n.get("selectedMode"),h=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),j0(n.getData(),function(d,p){var g=d.get("name");if(!this.newlineDisabled&&(g===""||g===`
169
- `)){var v=new Ih;v.newline=!0,l.add(v);return}var m=i.getSeriesByName(g)[0];if(!f.get(g)){if(m){var y=m.getData(),b=y.getVisual("legendLineStyle")||{},w=y.getVisual("legendIcon"),C=y.getVisual("style"),_=this._createItem(m,g,p,d,n,r,b,C,w,c,a);_.on("click",_s(KT,g,null,a,h)).on("mouseover",_s(V0,m.name,null,a,h)).on("mouseout",_s(H0,m.name,null,a,h)),i.ssr&&_.eachChild(function(D){var x=He(D);x.seriesIndex=m.seriesIndex,x.dataIndex=p,x.ssrType="legend"}),f.set(g,!0)}else i.eachRawSeries(function(D){if(!f.get(g)&&D.legendVisualProvider){var x=D.legendVisualProvider;if(!x.containName(g))return;var S=x.indexOfName(g),O=x.getItemVisual(S,"style"),E=x.getItemVisual(S,"legendIcon"),P=ni(O.fill);P&&P[3]===0&&(P[3]=.2,O=oe(oe({},O),{fill:jf(P,"rgba")}));var F=this._createItem(D,g,p,d,n,r,{},O,E,c,a);F.on("click",_s(KT,null,g,a,h)).on("mouseover",_s(V0,null,g,a,h)).on("mouseout",_s(H0,null,g,a,h)),i.ssr&&F.eachChild(function(B){var M=He(B);M.seriesIndex=D.seriesIndex,M.dataIndex=p,M.ssrType="legend"}),f.set(g,!0)}},this);process.env.NODE_ENV!=="production"&&(f.get(g)||console.warn(g+" series not exists. Legend data should be same with series name or data name."))}},this),o&&this._createSelector(o,n,a,s,u)},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();j0(r,function(l){var f=l.type,c=new Ot({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);Mu(c,{normal:h,emphasis:d},{defaultText:l.title}),Og(c)})},e.prototype._createItem=function(r,n,i,a,o,s,u,l,f,c,h){var d=r.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),v=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),b=a.get("icon");f=b||f||"roundRect";var w=aU(f,a,u,l,d,v,h),C=new Ih,_=a.getModel("textStyle");if(De(r.getLegendIcon)&&(!b||b==="inherit"))C.add(r.getLegendIcon({itemWidth:p,itemHeight:g,icon:f,iconRotate:m,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:y}));else{var D=b==="inherit"&&r.getData().getVisual("symbol")?m==="inherit"?r.getData().getVisual("symbolRotate"):m:0;C.add(oU({itemWidth:p,itemHeight:g,icon:f,iconRotate:D,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:y}))}var x=s==="left"?p+5:-5,S=s,O=o.get("formatter"),E=n;be(O)&&O?E=O.replace("{name}",n??""):De(O)&&(E=O(n));var P=v?_.getTextColor():a.get("inactiveColor");C.add(new Ot({style:ki(_,{text:E,x,y:g/2,fill:P,align:S,verticalAlign:"middle"},{inheritColor:P})}));var F=new St({shape:C.getBoundingRect(),style:{fill:"transparent"}}),B=a.getModel("tooltip");return B.get("show")&&Oc({el:F,componentModel:o,itemName:n,itemTooltipOption:B.option}),C.add(F),C.eachChild(function(M){M.silent=!0}),F.silent=!c,this.getContentGroup().add(C),Og(C),C.__legendDataIndex=i,C},e.prototype.layoutInner=function(r,n,i,a,o,s){var u=this.getContentGroup(),l=this.getSelectorGroup();Nu(r.get("orient"),u,r.get("itemGap"),i.width,i.height);var f=u.getBoundingRect(),c=[-f.x,-f.y];if(l.markRedraw(),u.markRedraw(),o){Nu("horizontal",l,r.get("selectorItemGap",!0));var h=l.getBoundingRect(),d=[-h.x,-h.y],p=r.get("selectorButtonGap",!0),g=r.getOrient().index,v=g===0?"width":"height",m=g===0?"height":"width",y=g===0?"y":"x";s==="end"?d[g]+=f[v]+p:c[g]+=h[v]+p,d[1-g]+=f[m]/2-h[m]/2,l.x=d[0],l.y=d[1],u.x=c[0],u.y=c[1];var b={x:0,y:0};return b[v]=f[v]+p+h[v],b[m]=Math.max(f[m],h[m]),b[y]=Math.min(0,h[y]+d[1-g]),b}else return u.x=c[0],u.y=c[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Br);function aU(t,e,r,n,i,a,o){function s(v,m){v.lineWidth==="auto"&&(v.lineWidth=m.lineWidth>0?2:0),j0(v,function(y,b){v[b]==="inherit"&&(v[b]=m[b])})}var u=e.getModel("itemStyle"),l=u.getItemStyle(),f=t.lastIndexOf("empty",0)===0?"fill":"stroke",c=u.getShallow("decal");l.decal=!c||c==="inherit"?n.decal:Bm(c,o),l.fill==="inherit"&&(l.fill=n[i]),l.stroke==="inherit"&&(l.stroke=n[f]),l.opacity==="inherit"&&(l.opacity=(i==="fill"?n:r).opacity),s(l,n);var h=e.getModel("lineStyle"),d=h.getLineStyle();if(s(d,r),l.fill==="auto"&&(l.fill=n.fill),l.stroke==="auto"&&(l.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var p=e.get("inactiveBorderWidth"),g=l[f];l.lineWidth=p==="auto"?n.lineWidth>0&&g?2:0:l.lineWidth,l.fill=e.get("inactiveColor"),l.stroke=e.get("inactiveBorderColor"),d.stroke=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:l,lineStyle:d}}function oU(t){var e=t.icon||"roundRect",r=hs(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function KT(t,e,r,n){H0(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),V0(t,e,r,n)}function ZT(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,i=e.length;n<i&&!(r=e[n].states.emphasis);)n++;return r&&r.hoverLayer}function V0(t,e,r,n){ZT(r)||r.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function H0(t,e,r,n){ZT(r)||r.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function sU(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(r){for(var n=0;n<e.length;n++)if(!e[n].isSelected(r.name))return!1;return!0})}function fl(t,e,r){var n={},i=t==="toggleSelected",a;return r.eachComponent("legend",function(o){i&&a!=null?o[a?"select":"unSelect"](e.name):t==="allSelect"||t==="inverseSelect"?o[t]():(o[t](e.name),a=o.isSelected(e.name));var s=o.getData();N(s,function(u){var l=u.get("name");if(!(l===`
170
- `||l==="")){var f=o.isSelected(l);n.hasOwnProperty(l)?n[l]=n[l]&&f:n[l]=f}})}),t==="allSelect"||t==="inverseSelect"?{selected:n}:{name:e.name,selected:n}}function uU(t){t.registerAction("legendToggleSelect","legendselectchanged",Dt(fl,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",Dt(fl,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",Dt(fl,"inverseSelect")),t.registerAction("legendSelect","legendselected",Dt(fl,"select")),t.registerAction("legendUnSelect","legendunselected",Dt(fl,"unSelect"))}function JT(t){t.registerComponentModel(z0),t.registerComponentView(XT),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,sU),t.registerSubTypeDefaulter("legend",function(){return"plain"}),uU(t)}var lU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},e.prototype.init=function(r,n,i){var a=$c(r);t.prototype.init.call(this,r,n,i),QT(this,r,a)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),QT(this,this.option,r)},e.type="legend.scroll",e.defaultOption=Yx(z0.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(z0);function QT(t,e,r){var n=t.getOrient(),i=[1,1];i[n.index]=0,qa(e,r,{type:"box",ignoreSize:!!i})}var eO=It,W0=["width","height"],$0=["x","y"],fU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!0,r._currentIndex=0,r}return e.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containerGroup=new eO),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new eO)},e.prototype.resetInner=function(){t.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(r,n,i,a,o,s,u){var l=this;t.prototype.renderInner.call(this,r,n,i,a,o,s,u);var f=this._controllerGroup,c=n.get("pageIconSize",!0),h=he(c)?c:[c,c];p("pagePrev",0);var d=n.getModel("pageTextStyle");f.add(new Ot({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(g,v){var m=g+"DataIndex",y=Wg(n.get("pageIcons",!0)[n.getOrient().name][v],{onclick:dt(l._pageGo,l,m,n,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});y.name=g,f.add(y)}},e.prototype.layoutInner=function(r,n,i,a,o,s){var u=this.getSelectorGroup(),l=r.getOrient().index,f=W0[l],c=$0[l],h=W0[1-l],d=$0[1-l];o&&Nu("horizontal",u,r.get("selectorItemGap",!0));var p=r.get("selectorButtonGap",!0),g=u.getBoundingRect(),v=[-g.x,-g.y],m=$e(i);o&&(m[f]=i[f]-g[f]-p);var y=this._layoutContentAndController(r,a,m,l,f,h,d,c);if(o){if(s==="end")v[l]+=y[f]+p;else{var b=g[f]+p;v[l]-=b,y[c]-=b}y[f]+=g[f]+p,v[1-l]+=y[d]+y[h]/2-g[h]/2,y[h]=Math.max(y[h],g[h]),y[d]=Math.min(y[d],g[d]+v[1-l]),u.x=v[0],u.y=v[1],u.markRedraw()}return y},e.prototype._layoutContentAndController=function(r,n,i,a,o,s,u,l){var f=this.getContentGroup(),c=this._containerGroup,h=this._controllerGroup;Nu(r.get("orient"),f,r.get("itemGap"),a?i.width:null,a?null:i.height),Nu("horizontal",h,r.get("pageButtonItemGap",!0));var d=f.getBoundingRect(),p=h.getBoundingRect(),g=this._showController=d[o]>i[o],v=[-d.x,-d.y];n||(v[a]=f[l]);var m=[0,0],y=[-p.x,-p.y],b=Be(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var w=r.get("pageButtonPosition",!0);w==="end"?y[a]+=i[o]-p[o]:m[a]+=p[o]+b}y[1-a]+=d[s]/2-p[s]/2,f.setPosition(v),c.setPosition(m),h.setPosition(y);var C={x:0,y:0};if(C[o]=g?i[o]:d[o],C[s]=Math.max(d[s],p[s]),C[u]=Math.min(0,p[u]+y[1-a]),c.__rectSize=i[o],g){var _={x:0,y:0};_[o]=Math.max(i[o]-p[o]-b,0),_[s]=C[s],c.setClipPath(new St({shape:_})),c.__rectSize=_[o]}else h.eachChild(function(x){x.attr({invisible:!0,silent:!0})});var D=this._getPageInfo(r);return D.pageIndex!=null&&Ft(f,{x:D.contentPosition[0],y:D.contentPosition[1]},g?r:null),this._updatePageInfoView(r,D),C},e.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;N(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",h=n[c]!=null,d=i.childOfName(f);d&&(d.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,u=s!=null?s+1:0,l=n.pageCount;a&&o&&a.setStyle("text",be(o)?o.replace("{current}",u==null?"":u+"").replace("{total}",l==null?"":l+""):o({current:u,total:l}))},e.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=W0[o],u=$0[o],l=this._findTargetItemIndex(n),f=i.children(),c=f[l],h=f.length,d=h?1:0,p={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=w(c);p.contentPosition[o]=-g.s;for(var v=l+1,m=g,y=g,b=null;v<=h;++v)b=w(f[v]),(!b&&y.e>m.s+a||b&&!C(b,m.s))&&(y.i>m.i?m=y:m=b,m&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=b;for(var v=l-1,m=g,y=g,b=null;v>=-1;--v)b=w(f[v]),(!b||!C(y,b.s))&&m.i<y.i&&(y=m,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=m.i),++p.pageCount,++p.pageIndex),m=b;return p;function w(_){if(_){var D=_.getBoundingRect(),x=D[u]+_[u];return{s:x,e:x+D[s],i:_.__legendDataIndex}}}function C(_,D){return _.e>=D&&_.s<=D+a}},e.prototype._findTargetItemIndex=function(r){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===r&&(n=s)}),n??a},e.type="legend.scroll",e}(XT);function cU(t){t.registerAction("legendScroll","legendscroll",function(e,r){var n=e.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function hU(t){Wi(JT),t.registerComponentModel(lU),t.registerComponentView(fU),cU(t)}function dU(t){Wi(JT),Wi(hU)}var tO={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},vU=function(){function t(e){var r=this._condVal=be(e)?new RegExp(e):i_(e)?e:null;if(r==null){var n="";process.env.NODE_ENV!=="production"&&(n=vr("Illegal regexp",e,"in")),qe(n)}}return t.prototype.evaluate=function(e){var r=typeof e;return be(r)?this._condVal.test(e):nt(r)?this._condVal.test(e+""):!1},t}(),pU=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),gU=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r<e.length;r++)if(!e[r].evaluate())return!1;return!0},t}(),mU=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r<e.length;r++)if(e[r].evaluate())return!0;return!1},t}(),yU=function(){function t(){}return t.prototype.evaluate=function(){return!this.child.evaluate()},t}(),bU=function(){function t(){}return t.prototype.evaluate=function(){for(var e=!!this.valueParser,r=this.getValue,n=r(this.valueGetterParam),i=e?this.valueParser(n):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(e?i:n))return!1;return!0},t}();function G0(t,e){if(t===!0||t===!1){var r=new pU;return r.value=t,r}var n="";return nO(t)||(process.env.NODE_ENV!=="production"&&(n=vr("Illegal config. Expect a plain object but actually",t)),qe(n)),t.and?rO("and",t,e):t.or?rO("or",t,e):t.not?CU(t,e):wU(t,e)}function rO(t,e,r){var n=e[t],i="";process.env.NODE_ENV!=="production"&&(i=vr('"and"/"or" condition should only be `'+t+": [...]` and must not be empty array.","Illegal condition:",e)),he(n)||qe(i),n.length||qe(i);var a=t==="and"?new gU:new mU;return a.children=ye(n,function(o){return G0(o,r)}),a.children.length||qe(i),a}function CU(t,e){var r=t.not,n="";process.env.NODE_ENV!=="production"&&(n=vr('"not" condition should only be `not: {}`.',"Illegal condition:",t)),nO(r)||qe(n);var i=new yU;return i.child=G0(r,e),i.child||qe(n),i}function wU(t,e){for(var r="",n=e.prepareGetValue(t),i=[],a=Ke(t),o=t.parser,s=o?XS(o):null,u=0;u<a.length;u++){var l=a[u];if(!(l==="parser"||e.valueGetterAttrMap.get(l))){var f=xe(tO,l)?tO[l]:l,c=t[l],h=s?s(c):c,d=Rz(f,h)||f==="reg"&&new vU(h);d||(process.env.NODE_ENV!=="production"&&(r=vr('Illegal relational operation: "'+l+'" in condition:',t)),qe(r)),i.push(d)}}i.length||(process.env.NODE_ENV!=="production"&&(r=vr("Relational condition must have at least one operator.","Illegal condition:",t)),qe(r));var p=new bU;return p.valueGetterParam=n,p.valueParser=s,p.getValue=e.getValue,p.subCondList=i,p}function nO(t){return we(t)&&!Wt(t)}var _U=function(){function t(e,r){this._cond=G0(e,r)}return t.prototype.evaluate=function(){return this._cond.evaluate()},t}();function DU(t,e){return new _U(t,e)}var xU={type:"echarts:filter",transform:function(t){for(var e=t.upstream,r,n=DU(t.config,{valueGetterAttrMap:Ae({dimension:!0}),prepareGetValue:function(s){var u="",l=s.dimension;xe(s,"dimension")||(process.env.NODE_ENV!=="production"&&(u=vr('Relation condition must has prop "dimension" specified.',"Illegal condition:",s)),qe(u));var f=e.getDimensionInfo(l);return f||(process.env.NODE_ENV!=="production"&&(u=vr("Can not find dimension info via: "+l+`.
168
+ `:"<br/>",m=c.join(v);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,l)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,l):this._showTooltipContent(s,m,l,Math.random()+"",o[0],o[1],d,null,h)})},e.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=He(n),s=o.seriesIndex,u=a.getSeriesByIndex(s),l=o.dataModel||u,f=o.dataIndex,c=o.dataType,h=l.getData(c),d=this._renderMode,p=r.positionDefault,g=ll([h.getItemModel(f),l,u&&(u.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),v=g.get("trigger");if(!(v!=null&&v!=="item")){var m=l.getDataParams(f,c),y=new w0;m.marker=y.makeTooltipMarker("item",Ga(m.color),d);var b=qS(l.formatTooltip(f,!1,c)),w=g.get("order"),C=g.get("valueFormatter"),_=b.frag,D=_?fE(C?oe({valueFormatter:C},_):_,y,d,w,a.get("useUTC"),g.get("textStyle")):b.text,x="item_"+l.name+"_"+f;this._showOrMove(g,function(){this._showTooltipContent(g,D,m,x,r.offsetX,r.offsetY,r.position,r.target,y)}),i({type:"showTip",dataIndexInside:f,dataIndex:h.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=He(n),s=o.tooltipConfig,u=s.option||{},l=u.encodeHTMLContent;if(be(u)){var f=u;u={content:f,formatter:f},l=!0}l&&a&&u.content&&(u=$e(u),u.content=Tr(u.content));var c=[u],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&c.push(h),c.push({formatter:u.content});var d=r.positionDefault,p=ll(c,this._tooltipModel,d?{position:d}:null),g=p.get("content"),v=Math.random()+"",m=new w0;this._showOrMove(p,function(){var y=$e(p.get("formatterParams")||{});this._showTooltipContent(p,g,y,v,r.offsetX,r.offsetY,r.position,n,m)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,n,i,a,o,s,u,l,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var c=this._tooltipContent;c.setEnterable(r.get("enterable"));var h=r.get("formatter");u=u||r.get("position");var d=n,p=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),g=p.color;if(h)if(be(h)){var v=r.ecModel.get("useUTC"),m=he(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;d=h,y&&(d=Rc(m.axisValue,d,v)),d=cS(d,i,!0)}else if(De(h)){var b=dt(function(w,C){w===this._ticket&&(c.setContent(C,f,r,g,u),this._updatePosition(r,u,o,s,c,i,l))},this);this._ticket=a,d=h(i,a,b)}else d=h;c.setContent(d,f,r,g,u),c.show(r,g),this._updatePosition(r,u,o,s,c,i,l)}},e.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||he(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!he(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(r,n,i,a,o,s,u){var l=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var c=o.getSize(),h=r.get("align"),d=r.get("verticalAlign"),p=u&&u.getBoundingRect().clone();if(u&&p.applyTransform(u.transform),De(n)&&(n=n([i,a],s,o.el,p,{viewSize:[l,f],contentSize:c.slice()})),he(n))i=ut(n[0],l),a=ut(n[1],f);else if(we(n)){var g=n;g.width=c[0],g.height=c[1];var v=Ua(g,{width:l,height:f});i=v.x,a=v.y,h=null,d=null}else if(be(n)&&u){var m=JG(n,p,c,r.get("borderWidth"));i=m[0],a=m[1]}else{var m=KG(i,a,o,l,f,h?null:20,d?null:20);i=m[0],a=m[1]}if(h&&(i-=YT(h)?c[0]/2:h==="right"?c[0]:0),d&&(a-=YT(d)?c[1]/2:d==="bottom"?c[1]:0),zT(r)){var m=ZG(i,a,o,l,f);i=m[0],a=m[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&N(i,function(s,u){var l=s.dataByAxis||[],f=r[u]||{},c=f.dataByAxis||[];o=o&&l.length===c.length,o&&N(l,function(h,d){var p=c[d]||{},g=h.seriesDataIndices||[],v=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&g.length===v.length,o&&N(g,function(m,y){var b=v[y];o=o&&m.seriesIndex===b.seriesIndex&&m.dataIndex===b.dataIndex}),a&&N(h.seriesDataIndices,function(m){var y=m.seriesIndex,b=n[y],w=a[y];b&&w&&w.data!==b.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,n){Pe.node||!n.getDom()||(S0(this,"_updatePosition"),this._tooltipContent.dispose(),Rm("itemTooltip",n))},e.type="tooltip",e}(Br);function ll(t,e,r){var n=e.ecModel,i;r?(i=new Ct(r,n,n),i=new Ct(e.option,i,n)):i=e;for(var a=t.length-1;a>=0;a--){var o=t[a];o&&(o instanceof Ct&&(o=o.get("tooltip",!0)),be(o)&&(o={formatter:o}),o&&(i=new Ct(o,i,n)))}return i}function qT(t,e){return t.dispatchAction||dt(e.dispatchAction,e)}function KG(t,e,r,n,i,a,o){var s=r.getSize(),u=s[0],l=s[1];return a!=null&&(t+u+a+2>n?t-=u+a:t+=a),o!=null&&(e+l+o>i?e-=l+o:e+=o),[t,e]}function ZG(t,e,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return t=Math.min(t+o,n)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function JG(t,e,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,u=0,l=e.width,f=e.height;switch(t){case"inside":s=e.x+l/2-i/2,u=e.y+f/2-a/2;break;case"top":s=e.x+l/2-i/2,u=e.y-a-o;break;case"bottom":s=e.x+l/2-i/2,u=e.y+f+o;break;case"left":s=e.x-i-o,u=e.y+f/2-a/2;break;case"right":s=e.x+l+o,u=e.y+f/2-a/2}return[s,u]}function YT(t){return t==="center"||t==="middle"}function QG(t,e,r){var n=ag(t).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=Cu(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),u;if(s.group.traverse(function(l){var f=He(l).tooltipConfig;if(f&&f.name===t.name)return u=l,!0}),u)return{componentMainType:i,componentIndex:o.componentIndex,el:u}}}}function eU(t){Wi(FT),t.registerComponentModel(RG),t.registerComponentView(XG),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},dr),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},dr)}var tU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Ze),rU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),u=r.get("textAlign"),l=Be(r.get("textBaseline"),r.get("textVerticalAlign")),f=new Ot({style:ki(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),h=r.get("subtext"),d=new Ot({style:ki(s,{text:h,fill:s.getTextColor(),y:c.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=r.get("link"),g=r.get("sublink"),v=r.get("triggerEvent",!0);f.silent=!p&&!v,d.silent=!g&&!v,p&&f.on("click",function(){hS(p,"_"+r.get("target"))}),g&&d.on("click",function(){hS(g,"_"+r.get("subtarget"))}),He(f).eventData=He(d).eventData=v?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(f),h&&a.add(d);var m=a.getBoundingRect(),y=r.getBoxLayoutParams();y.width=m.width,y.height=m.height;var b=Ua(y,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));u||(u=r.get("left")||r.get("right"),u==="middle"&&(u="center"),u==="right"?b.x+=b.width:u==="center"&&(b.x+=b.width/2)),l||(l=r.get("top")||r.get("bottom"),l==="center"&&(l="middle"),l==="bottom"?b.y+=b.height:l==="middle"&&(b.y+=b.height/2),l=l||"top"),a.x=b.x,a.y=b.y,a.markRedraw();var w={align:u,verticalAlign:l};f.setStyle(w),d.setStyle(w),m=a.getBoundingRect();var C=b.margin,_=r.getItemStyle(["color","opacity"]);_.fill=r.get("backgroundColor");var D=new St({shape:{x:m.x-C[3],y:m.y-C[0],width:m.width+C[1]+C[3],height:m.height+C[0]+C[2],r:r.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});a.add(D)}},e.type="title",e}(Br);function nU(t){t.registerComponentModel(tU),t.registerComponentView(rU)}var iU=function(t,e){if(e==="all")return{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}},zm=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},e.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),he(n)&&N(n,function(a,o){be(a)&&(a={type:a}),n[o]=Qe(a,iU(i,a.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},e.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(u){var l=u.name;i.push(l);var f;if(u.legendVisualProvider){var c=u.legendVisualProvider,h=c.getAllNames();r.isSeriesFiltered(u)||(i=i.concat(h)),h.length?n=n.concat(h):f=!0}else f=!0;f&&ng(u)&&n.push(u.name)}),this._availableNames=i;var a=this.get("data")||n,o=Ae(),s=ye(a,function(u){return(be(u)||nt(u))&&(u={name:u}),o.get(u.name)?null:(o.set(u.name,!0),new Ct(u,this,this.ecModel))},this);this._data=bt(s,function(u){return!!u})},e.prototype.getData=function(){return this._data},e.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;N(a,function(o){n[o.get("name")]=!1})}n[r]=!0},e.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},e.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},e.prototype.allSelect=function(){var r=this._data,n=this.option.selected;N(r,function(i){n[i.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;N(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},e.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&Ge(this._availableNames,r)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Ze),_s=Dt,jm=N,Ih=It,XT=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new Ih),this.group.add(this._selectorGroup=new Ih),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var u=r.get("selector",!0),l=r.get("selectorPosition",!0);u&&(!l||l==="auto")&&(l=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,u,s,l);var f=r.getBoxLayoutParams(),c={width:i.getWidth(),height:i.getHeight()},h=r.get("padding"),d=Ua(f,c,h),p=this.layoutInner(r,o,d,a,u,l),g=Ua(je({width:p.width,height:p.height},f),c,h);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=IG(p,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,u){var l=this.getContentGroup(),f=Ae(),c=n.get("selectedMode"),h=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),jm(n.getData(),function(d,p){var g=d.get("name");if(!this.newlineDisabled&&(g===""||g===`
169
+ `)){var v=new Ih;v.newline=!0,l.add(v);return}var m=i.getSeriesByName(g)[0];if(!f.get(g)){if(m){var y=m.getData(),b=y.getVisual("legendLineStyle")||{},w=y.getVisual("legendIcon"),C=y.getVisual("style"),_=this._createItem(m,g,p,d,n,r,b,C,w,c,a);_.on("click",_s(KT,g,null,a,h)).on("mouseover",_s(Vm,m.name,null,a,h)).on("mouseout",_s(Hm,m.name,null,a,h)),i.ssr&&_.eachChild(function(D){var x=He(D);x.seriesIndex=m.seriesIndex,x.dataIndex=p,x.ssrType="legend"}),f.set(g,!0)}else i.eachRawSeries(function(D){if(!f.get(g)&&D.legendVisualProvider){var x=D.legendVisualProvider;if(!x.containName(g))return;var S=x.indexOfName(g),O=x.getItemVisual(S,"style"),E=x.getItemVisual(S,"legendIcon"),P=ni(O.fill);P&&P[3]===0&&(P[3]=.2,O=oe(oe({},O),{fill:jf(P,"rgba")}));var F=this._createItem(D,g,p,d,n,r,{},O,E,c,a);F.on("click",_s(KT,null,g,a,h)).on("mouseover",_s(Vm,null,g,a,h)).on("mouseout",_s(Hm,null,g,a,h)),i.ssr&&F.eachChild(function(B){var M=He(B);M.seriesIndex=D.seriesIndex,M.dataIndex=p,M.ssrType="legend"}),f.set(g,!0)}},this);process.env.NODE_ENV!=="production"&&(f.get(g)||console.warn(g+" series not exists. Legend data should be same with series name or data name."))}},this),o&&this._createSelector(o,n,a,s,u)},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();jm(r,function(l){var f=l.type,c=new Ot({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);Mu(c,{normal:h,emphasis:d},{defaultText:l.title}),Og(c)})},e.prototype._createItem=function(r,n,i,a,o,s,u,l,f,c,h){var d=r.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),v=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),b=a.get("icon");f=b||f||"roundRect";var w=aU(f,a,u,l,d,v,h),C=new Ih,_=a.getModel("textStyle");if(De(r.getLegendIcon)&&(!b||b==="inherit"))C.add(r.getLegendIcon({itemWidth:p,itemHeight:g,icon:f,iconRotate:m,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:y}));else{var D=b==="inherit"&&r.getData().getVisual("symbol")?m==="inherit"?r.getData().getVisual("symbolRotate"):m:0;C.add(oU({itemWidth:p,itemHeight:g,icon:f,iconRotate:D,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:y}))}var x=s==="left"?p+5:-5,S=s,O=o.get("formatter"),E=n;be(O)&&O?E=O.replace("{name}",n??""):De(O)&&(E=O(n));var P=v?_.getTextColor():a.get("inactiveColor");C.add(new Ot({style:ki(_,{text:E,x,y:g/2,fill:P,align:S,verticalAlign:"middle"},{inheritColor:P})}));var F=new St({shape:C.getBoundingRect(),style:{fill:"transparent"}}),B=a.getModel("tooltip");return B.get("show")&&Oc({el:F,componentModel:o,itemName:n,itemTooltipOption:B.option}),C.add(F),C.eachChild(function(M){M.silent=!0}),F.silent=!c,this.getContentGroup().add(C),Og(C),C.__legendDataIndex=i,C},e.prototype.layoutInner=function(r,n,i,a,o,s){var u=this.getContentGroup(),l=this.getSelectorGroup();Nu(r.get("orient"),u,r.get("itemGap"),i.width,i.height);var f=u.getBoundingRect(),c=[-f.x,-f.y];if(l.markRedraw(),u.markRedraw(),o){Nu("horizontal",l,r.get("selectorItemGap",!0));var h=l.getBoundingRect(),d=[-h.x,-h.y],p=r.get("selectorButtonGap",!0),g=r.getOrient().index,v=g===0?"width":"height",m=g===0?"height":"width",y=g===0?"y":"x";s==="end"?d[g]+=f[v]+p:c[g]+=h[v]+p,d[1-g]+=f[m]/2-h[m]/2,l.x=d[0],l.y=d[1],u.x=c[0],u.y=c[1];var b={x:0,y:0};return b[v]=f[v]+p+h[v],b[m]=Math.max(f[m],h[m]),b[y]=Math.min(0,h[y]+d[1-g]),b}else return u.x=c[0],u.y=c[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Br);function aU(t,e,r,n,i,a,o){function s(v,m){v.lineWidth==="auto"&&(v.lineWidth=m.lineWidth>0?2:0),jm(v,function(y,b){v[b]==="inherit"&&(v[b]=m[b])})}var u=e.getModel("itemStyle"),l=u.getItemStyle(),f=t.lastIndexOf("empty",0)===0?"fill":"stroke",c=u.getShallow("decal");l.decal=!c||c==="inherit"?n.decal:B0(c,o),l.fill==="inherit"&&(l.fill=n[i]),l.stroke==="inherit"&&(l.stroke=n[f]),l.opacity==="inherit"&&(l.opacity=(i==="fill"?n:r).opacity),s(l,n);var h=e.getModel("lineStyle"),d=h.getLineStyle();if(s(d,r),l.fill==="auto"&&(l.fill=n.fill),l.stroke==="auto"&&(l.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var p=e.get("inactiveBorderWidth"),g=l[f];l.lineWidth=p==="auto"?n.lineWidth>0&&g?2:0:l.lineWidth,l.fill=e.get("inactiveColor"),l.stroke=e.get("inactiveBorderColor"),d.stroke=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:l,lineStyle:d}}function oU(t){var e=t.icon||"roundRect",r=hs(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function KT(t,e,r,n){Hm(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),Vm(t,e,r,n)}function ZT(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,i=e.length;n<i&&!(r=e[n].states.emphasis);)n++;return r&&r.hoverLayer}function Vm(t,e,r,n){ZT(r)||r.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function Hm(t,e,r,n){ZT(r)||r.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function sU(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(r){for(var n=0;n<e.length;n++)if(!e[n].isSelected(r.name))return!1;return!0})}function fl(t,e,r){var n={},i=t==="toggleSelected",a;return r.eachComponent("legend",function(o){i&&a!=null?o[a?"select":"unSelect"](e.name):t==="allSelect"||t==="inverseSelect"?o[t]():(o[t](e.name),a=o.isSelected(e.name));var s=o.getData();N(s,function(u){var l=u.get("name");if(!(l===`
170
+ `||l==="")){var f=o.isSelected(l);n.hasOwnProperty(l)?n[l]=n[l]&&f:n[l]=f}})}),t==="allSelect"||t==="inverseSelect"?{selected:n}:{name:e.name,selected:n}}function uU(t){t.registerAction("legendToggleSelect","legendselectchanged",Dt(fl,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",Dt(fl,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",Dt(fl,"inverseSelect")),t.registerAction("legendSelect","legendselected",Dt(fl,"select")),t.registerAction("legendUnSelect","legendunselected",Dt(fl,"unSelect"))}function JT(t){t.registerComponentModel(zm),t.registerComponentView(XT),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,sU),t.registerSubTypeDefaulter("legend",function(){return"plain"}),uU(t)}var lU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},e.prototype.init=function(r,n,i){var a=$c(r);t.prototype.init.call(this,r,n,i),QT(this,r,a)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),QT(this,this.option,r)},e.type="legend.scroll",e.defaultOption=Yx(zm.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(zm);function QT(t,e,r){var n=t.getOrient(),i=[1,1];i[n.index]=0,qa(e,r,{type:"box",ignoreSize:!!i})}var eO=It,Wm=["width","height"],$m=["x","y"],fU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!0,r._currentIndex=0,r}return e.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containerGroup=new eO),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new eO)},e.prototype.resetInner=function(){t.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(r,n,i,a,o,s,u){var l=this;t.prototype.renderInner.call(this,r,n,i,a,o,s,u);var f=this._controllerGroup,c=n.get("pageIconSize",!0),h=he(c)?c:[c,c];p("pagePrev",0);var d=n.getModel("pageTextStyle");f.add(new Ot({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(g,v){var m=g+"DataIndex",y=Wg(n.get("pageIcons",!0)[n.getOrient().name][v],{onclick:dt(l._pageGo,l,m,n,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});y.name=g,f.add(y)}},e.prototype.layoutInner=function(r,n,i,a,o,s){var u=this.getSelectorGroup(),l=r.getOrient().index,f=Wm[l],c=$m[l],h=Wm[1-l],d=$m[1-l];o&&Nu("horizontal",u,r.get("selectorItemGap",!0));var p=r.get("selectorButtonGap",!0),g=u.getBoundingRect(),v=[-g.x,-g.y],m=$e(i);o&&(m[f]=i[f]-g[f]-p);var y=this._layoutContentAndController(r,a,m,l,f,h,d,c);if(o){if(s==="end")v[l]+=y[f]+p;else{var b=g[f]+p;v[l]-=b,y[c]-=b}y[f]+=g[f]+p,v[1-l]+=y[d]+y[h]/2-g[h]/2,y[h]=Math.max(y[h],g[h]),y[d]=Math.min(y[d],g[d]+v[1-l]),u.x=v[0],u.y=v[1],u.markRedraw()}return y},e.prototype._layoutContentAndController=function(r,n,i,a,o,s,u,l){var f=this.getContentGroup(),c=this._containerGroup,h=this._controllerGroup;Nu(r.get("orient"),f,r.get("itemGap"),a?i.width:null,a?null:i.height),Nu("horizontal",h,r.get("pageButtonItemGap",!0));var d=f.getBoundingRect(),p=h.getBoundingRect(),g=this._showController=d[o]>i[o],v=[-d.x,-d.y];n||(v[a]=f[l]);var m=[0,0],y=[-p.x,-p.y],b=Be(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var w=r.get("pageButtonPosition",!0);w==="end"?y[a]+=i[o]-p[o]:m[a]+=p[o]+b}y[1-a]+=d[s]/2-p[s]/2,f.setPosition(v),c.setPosition(m),h.setPosition(y);var C={x:0,y:0};if(C[o]=g?i[o]:d[o],C[s]=Math.max(d[s],p[s]),C[u]=Math.min(0,p[u]+y[1-a]),c.__rectSize=i[o],g){var _={x:0,y:0};_[o]=Math.max(i[o]-p[o]-b,0),_[s]=C[s],c.setClipPath(new St({shape:_})),c.__rectSize=_[o]}else h.eachChild(function(x){x.attr({invisible:!0,silent:!0})});var D=this._getPageInfo(r);return D.pageIndex!=null&&Ft(f,{x:D.contentPosition[0],y:D.contentPosition[1]},g?r:null),this._updatePageInfoView(r,D),C},e.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;N(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",h=n[c]!=null,d=i.childOfName(f);d&&(d.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,u=s!=null?s+1:0,l=n.pageCount;a&&o&&a.setStyle("text",be(o)?o.replace("{current}",u==null?"":u+"").replace("{total}",l==null?"":l+""):o({current:u,total:l}))},e.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=Wm[o],u=$m[o],l=this._findTargetItemIndex(n),f=i.children(),c=f[l],h=f.length,d=h?1:0,p={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=w(c);p.contentPosition[o]=-g.s;for(var v=l+1,m=g,y=g,b=null;v<=h;++v)b=w(f[v]),(!b&&y.e>m.s+a||b&&!C(b,m.s))&&(y.i>m.i?m=y:m=b,m&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=b;for(var v=l-1,m=g,y=g,b=null;v>=-1;--v)b=w(f[v]),(!b||!C(y,b.s))&&m.i<y.i&&(y=m,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=m.i),++p.pageCount,++p.pageIndex),m=b;return p;function w(_){if(_){var D=_.getBoundingRect(),x=D[u]+_[u];return{s:x,e:x+D[s],i:_.__legendDataIndex}}}function C(_,D){return _.e>=D&&_.s<=D+a}},e.prototype._findTargetItemIndex=function(r){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===r&&(n=s)}),n??a},e.type="legend.scroll",e}(XT);function cU(t){t.registerAction("legendScroll","legendscroll",function(e,r){var n=e.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function hU(t){Wi(JT),t.registerComponentModel(lU),t.registerComponentView(fU),cU(t)}function dU(t){Wi(JT),Wi(hU)}var tO={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},vU=function(){function t(e){var r=this._condVal=be(e)?new RegExp(e):i_(e)?e:null;if(r==null){var n="";process.env.NODE_ENV!=="production"&&(n=vr("Illegal regexp",e,"in")),qe(n)}}return t.prototype.evaluate=function(e){var r=typeof e;return be(r)?this._condVal.test(e):nt(r)?this._condVal.test(e+""):!1},t}(),pU=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),gU=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r<e.length;r++)if(!e[r].evaluate())return!1;return!0},t}(),mU=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r<e.length;r++)if(e[r].evaluate())return!0;return!1},t}(),yU=function(){function t(){}return t.prototype.evaluate=function(){return!this.child.evaluate()},t}(),bU=function(){function t(){}return t.prototype.evaluate=function(){for(var e=!!this.valueParser,r=this.getValue,n=r(this.valueGetterParam),i=e?this.valueParser(n):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(e?i:n))return!1;return!0},t}();function Gm(t,e){if(t===!0||t===!1){var r=new pU;return r.value=t,r}var n="";return nO(t)||(process.env.NODE_ENV!=="production"&&(n=vr("Illegal config. Expect a plain object but actually",t)),qe(n)),t.and?rO("and",t,e):t.or?rO("or",t,e):t.not?CU(t,e):wU(t,e)}function rO(t,e,r){var n=e[t],i="";process.env.NODE_ENV!=="production"&&(i=vr('"and"/"or" condition should only be `'+t+": [...]` and must not be empty array.","Illegal condition:",e)),he(n)||qe(i),n.length||qe(i);var a=t==="and"?new gU:new mU;return a.children=ye(n,function(o){return Gm(o,r)}),a.children.length||qe(i),a}function CU(t,e){var r=t.not,n="";process.env.NODE_ENV!=="production"&&(n=vr('"not" condition should only be `not: {}`.',"Illegal condition:",t)),nO(r)||qe(n);var i=new yU;return i.child=Gm(r,e),i.child||qe(n),i}function wU(t,e){for(var r="",n=e.prepareGetValue(t),i=[],a=Ke(t),o=t.parser,s=o?XS(o):null,u=0;u<a.length;u++){var l=a[u];if(!(l==="parser"||e.valueGetterAttrMap.get(l))){var f=xe(tO,l)?tO[l]:l,c=t[l],h=s?s(c):c,d=Rz(f,h)||f==="reg"&&new vU(h);d||(process.env.NODE_ENV!=="production"&&(r=vr('Illegal relational operation: "'+l+'" in condition:',t)),qe(r)),i.push(d)}}i.length||(process.env.NODE_ENV!=="production"&&(r=vr("Relational condition must have at least one operator.","Illegal condition:",t)),qe(r));var p=new bU;return p.valueGetterParam=n,p.valueParser=s,p.getValue=e.getValue,p.subCondList=i,p}function nO(t){return we(t)&&!Wt(t)}var _U=function(){function t(e,r){this._cond=Gm(e,r)}return t.prototype.evaluate=function(){return this._cond.evaluate()},t}();function DU(t,e){return new _U(t,e)}var xU={type:"echarts:filter",transform:function(t){for(var e=t.upstream,r,n=DU(t.config,{valueGetterAttrMap:Ae({dimension:!0}),prepareGetValue:function(s){var u="",l=s.dimension;xe(s,"dimension")||(process.env.NODE_ENV!=="production"&&(u=vr('Relation condition must has prop "dimension" specified.',"Illegal condition:",s)),qe(u));var f=e.getDimensionInfo(l);return f||(process.env.NODE_ENV!=="production"&&(u=vr("Can not find dimension info via: "+l+`.
171
171
  `,"Existing dimensions: ",e.cloneAllDimensionInfo(),`.
172
172
  `,"Illegal condition:",s,`.
173
- `)),qe(u)),{dimIdx:f.index}},getValue:function(s){return e.retrieveValueFromItem(r,s.dimIdx)}}),i=[],a=0,o=e.count();a<o;a++)r=e.getRawDataItem(a),n.evaluate()&&i.push(r);return{data:i}}},U0="";process.env.NODE_ENV!=="production"&&(U0=["Valid config is like:",'{ dimension: "age", order: "asc" }','or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));var SU={type:"echarts:sort",transform:function(t){var e=t.upstream,r=t.config,n="",i=gt(r);i.length||(process.env.NODE_ENV!=="production"&&(n="Empty `config` in sort transform."),qe(n));var a=[];N(i,function(f){var c=f.dimension,h=f.order,d=f.parser,p=f.incomparable;if(c==null&&(process.env.NODE_ENV!=="production"&&(n='Sort transform config must has "dimension" specified.'+U0),qe(n)),h!=="asc"&&h!=="desc"&&(process.env.NODE_ENV!=="production"&&(n='Sort transform config must has "order" specified.'+U0),qe(n)),p&&p!=="min"&&p!=="max"){var g="";process.env.NODE_ENV!=="production"&&(g='incomparable must be "min" or "max" rather than "'+p+'".'),qe(g)}if(h!=="asc"&&h!=="desc"){var v="";process.env.NODE_ENV!=="production"&&(v='order must be "asc" or "desc" rather than "'+h+'".'),qe(v)}var m=e.getDimensionInfo(c);m||(process.env.NODE_ENV!=="production"&&(n=vr("Can not find dimension info via: "+c+`.
173
+ `)),qe(u)),{dimIdx:f.index}},getValue:function(s){return e.retrieveValueFromItem(r,s.dimIdx)}}),i=[],a=0,o=e.count();a<o;a++)r=e.getRawDataItem(a),n.evaluate()&&i.push(r);return{data:i}}},Um="";process.env.NODE_ENV!=="production"&&(Um=["Valid config is like:",'{ dimension: "age", order: "asc" }','or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));var SU={type:"echarts:sort",transform:function(t){var e=t.upstream,r=t.config,n="",i=gt(r);i.length||(process.env.NODE_ENV!=="production"&&(n="Empty `config` in sort transform."),qe(n));var a=[];N(i,function(f){var c=f.dimension,h=f.order,d=f.parser,p=f.incomparable;if(c==null&&(process.env.NODE_ENV!=="production"&&(n='Sort transform config must has "dimension" specified.'+Um),qe(n)),h!=="asc"&&h!=="desc"&&(process.env.NODE_ENV!=="production"&&(n='Sort transform config must has "order" specified.'+Um),qe(n)),p&&p!=="min"&&p!=="max"){var g="";process.env.NODE_ENV!=="production"&&(g='incomparable must be "min" or "max" rather than "'+p+'".'),qe(g)}if(h!=="asc"&&h!=="desc"){var v="";process.env.NODE_ENV!=="production"&&(v='order must be "asc" or "desc" rather than "'+h+'".'),qe(v)}var m=e.getDimensionInfo(c);m||(process.env.NODE_ENV!=="production"&&(n=vr("Can not find dimension info via: "+c+`.
174
174
  `,"Existing dimensions: ",e.cloneAllDimensionInfo(),`.
175
175
  `,"Illegal config:",f,`.
176
176
  `)),qe(n));var y=d?XS(d):null;d&&!y&&(process.env.NODE_ENV!=="production"&&(n=vr("Invalid parser name "+d+`.
177
177
  `,"Illegal config:",f,`.
178
- `)),qe(n)),a.push({dimIdx:m.index,parser:y,comparator:new ZS(h,p)})});var o=e.sourceFormat;o!==ir&&o!==Yr&&(process.env.NODE_ENV!=="production"&&(n='sourceFormat "'+o+'" is not supported yet'),qe(n));for(var s=[],u=0,l=e.count();u<l;u++)s.push(e.getRawDataItem(u));return s.sort(function(f,c){for(var h=0;h<a.length;h++){var d=a[h],p=e.retrieveValueFromItem(f,d.dimIdx),g=e.retrieveValueFromItem(c,d.dimIdx);d.parser&&(p=d.parser(p),g=d.parser(g));var v=d.comparator.evaluate(p,g);if(v!==0)return v}return 0}),{data:s}}};function EU(t){t.registerTransform(xU),t.registerTransform(SU)}var AU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.prototype.init=function(r,n,i){t.prototype.init.call(this,r,n,i),this._sourceManager=new nE(this),iE(this)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),iE(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Nn},e}(Ze),TU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.type="dataset",e}(Br);function OU(t){t.registerComponentModel(AU),t.registerComponentView(TU)}var Hn=ui.CMD;function Ds(t,e){return Math.abs(t-e)<1e-5}function q0(t){var e=t.data,r=t.len(),n=[],i,a=0,o=0,s=0,u=0;function l(F,B){i&&i.length>2&&n.push(i),i=[F,B]}function f(F,B,M,I){Ds(F,M)&&Ds(B,I)||i.push(F,B,M,I,M,I)}function c(F,B,M,I,j,z){var W=Math.abs(B-F),R=Math.tan(W/4)*4/3,U=B<F?-1:1,Z=Math.cos(F),ee=Math.sin(F),ne=Math.cos(B),q=Math.sin(B),L=Z*j+M,X=ee*z+I,V=ne*j+M,G=q*z+I,J=j*R*U,K=z*R*U;i.push(L-J*ee,X+K*Z,V+J*q,G-K*ne,V,G)}for(var h,d,p,g,v=0;v<r;){var m=e[v++],y=v===1;switch(y&&(a=e[v],o=e[v+1],s=a,u=o,(m===Hn.L||m===Hn.C||m===Hn.Q)&&(i=[s,u])),m){case Hn.M:a=s=e[v++],o=u=e[v++],l(s,u);break;case Hn.L:h=e[v++],d=e[v++],f(a,o,h,d),a=h,o=d;break;case Hn.C:i.push(e[v++],e[v++],e[v++],e[v++],a=e[v++],o=e[v++]);break;case Hn.Q:h=e[v++],d=e[v++],p=e[v++],g=e[v++],i.push(a+2/3*(h-a),o+2/3*(d-o),p+2/3*(h-p),g+2/3*(d-g),p,g),a=p,o=g;break;case Hn.A:var b=e[v++],w=e[v++],C=e[v++],_=e[v++],D=e[v++],x=e[v++]+D;v+=1;var S=!e[v++];h=Math.cos(D)*C+b,d=Math.sin(D)*_+w,y?(s=h,u=d,l(s,u)):f(a,o,h,d),a=Math.cos(x)*C+b,o=Math.sin(x)*_+w;for(var O=(S?-1:1)*Math.PI/2,E=D;S?E>x:E<x;E+=O){var P=S?Math.max(E+O,x):Math.min(E+O,x);c(E,P,b,w,C,_)}break;case Hn.R:s=a=e[v++],u=o=e[v++],h=s+e[v++],d=u+e[v++],l(h,u),f(h,u,h,d),f(h,d,s,d),f(s,d,s,u),f(s,u,h,u);break;case Hn.Z:i&&f(a,o,s,u),a=s,o=u;break}}return i&&i.length>2&&n.push(i),n}function Y0(t,e,r,n,i,a,o,s,u,l){if(Ds(t,r)&&Ds(e,n)&&Ds(i,o)&&Ds(a,s)){u.push(o,s);return}var f=2/l,c=f*f,h=o-t,d=s-e,p=Math.sqrt(h*h+d*d);h/=p,d/=p;var g=r-t,v=n-e,m=i-o,y=a-s,b=g*g+v*v,w=m*m+y*y;if(b<c&&w<c){u.push(o,s);return}var C=h*g+d*v,_=-h*m-d*y,D=b-C*C,x=w-_*_;if(D<c&&C>=0&&x<c&&_>=0){u.push(o,s);return}var S=[],O=[];Oi(t,r,i,o,.5,S),Oi(e,n,a,s,.5,O),Y0(S[0],O[0],S[1],O[1],S[2],O[2],S[3],O[3],u,l),Y0(S[4],O[4],S[5],O[5],S[6],O[6],S[7],O[7],u,l)}function PU(t,e){var r=q0(t),n=[];e=e||1;for(var i=0;i<r.length;i++){var a=r[i],o=[],s=a[0],u=a[1];o.push(s,u);for(var l=2;l<a.length;){var f=a[l++],c=a[l++],h=a[l++],d=a[l++],p=a[l++],g=a[l++];Y0(s,u,f,c,h,d,p,g,o,e),s=p,u=g}n.push(o)}return n}function iO(t,e,r){var n=t[e],i=t[1-e],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var u=[],l=0;l<o;l++)u.push(s);var f=o*s,c=r-f;if(c>0)for(var l=0;l<c;l++)u[l%o]+=1;return u}function aO(t,e,r){for(var n=t.r0,i=t.r,a=t.startAngle,o=t.endAngle,s=Math.abs(o-a),u=s*i,l=i-n,f=u>Math.abs(l),c=iO([u,l],f?0:1,e),h=(f?s:l)/c.length,d=0;d<c.length;d++)for(var p=(f?l:s)/c[d],g=0;g<c[d];g++){var v={};f?(v.startAngle=a+h*d,v.endAngle=a+h*(d+1),v.r0=n+p*g,v.r=n+p*(g+1)):(v.startAngle=a+p*g,v.endAngle=a+p*(g+1),v.r0=n+h*d,v.r=n+h*(d+1)),v.clockwise=t.clockwise,v.cx=t.cx,v.cy=t.cy,r.push(v)}}function BU(t,e,r){for(var n=t.width,i=t.height,a=n>i,o=iO([n,i],a?0:1,e),s=a?"width":"height",u=a?"height":"width",l=a?"x":"y",f=a?"y":"x",c=t[s]/o.length,h=0;h<o.length;h++)for(var d=t[u]/o[h],p=0;p<o[h];p++){var g={};g[l]=h*c,g[f]=p*d,g[s]=c,g[u]=d,g.x+=t.x,g.y+=t.y,r.push(g)}}function oO(t,e,r,n){return t*n-r*e}function MU(t,e,r,n,i,a,o,s){var u=r-t,l=n-e,f=o-i,c=s-a,h=oO(f,c,u,l);if(Math.abs(h)<1e-6)return null;var d=t-i,p=e-a,g=oO(d,p,f,c)/h;return g<0||g>1?null:new _e(g*u+t,g*l+e)}function FU(t,e,r){var n=new _e;_e.sub(n,r,e),n.normalize();var i=new _e;_e.sub(i,t,e);var a=i.dot(n);return a}function xs(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function LU(t,e,r){for(var n=t.length,i=[],a=0;a<n;a++){var o=t[a],s=t[(a+1)%n],u=MU(o[0],o[1],s[0],s[1],e.x,e.y,r.x,r.y);u&&i.push({projPt:FU(u,e,r),pt:u,idx:a})}if(i.length<2)return[{points:t},{points:t}];i.sort(function(v,m){return v.projPt-m.projPt});var l=i[0],f=i[i.length-1];if(f.idx<l.idx){var c=l;l=f,f=c}for(var h=[l.pt.x,l.pt.y],d=[f.pt.x,f.pt.y],p=[h],g=[d],a=l.idx+1;a<=f.idx;a++)xs(p,t[a].slice());xs(p,d),xs(p,h);for(var a=f.idx+1;a<=l.idx+n;a++)xs(g,t[a%n].slice());return xs(g,h),xs(g,d),[{points:p},{points:g}]}function sO(t){var e=t.points,r=[],n=[];BD(e,r,n);var i=new Ue(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,o=i.height,s=i.x,u=i.y,l=new _e,f=new _e;return a>o?(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),LU(e,l,f)}function Rh(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);Rh(t,a[0],i,n),Rh(t,a[1],r-i,n)}return n}function IU(t,e){for(var r=[],n=0;n<e;n++)r.push(Fg(t));return r}function RU(t,e){e.setStyle(t.style),e.z=t.z,e.z2=t.z2,e.zlevel=t.zlevel}function NU(t){for(var e=[],r=0;r<t.length;)e.push([t[r++],t[r++]]);return e}function kU(t,e){var r=[],n=t.shape,i;switch(t.type){case"rect":BU(n,e,r),i=St;break;case"sector":aO(n,e,r),i=In;break;case"circle":aO({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,r),i=In;break;default:var a=t.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=ye(PU(t.getUpdatedPathProxy(),o),function(m){return NU(m)}),u=s.length;if(u===0)Rh(sO,{points:s[0]},e,r);else if(u===e)for(var l=0;l<u;l++)r.push({points:s[l]});else{var f=0,c=ye(s,function(m){var y=[],b=[];BD(m,y,b);var w=(b[1]-y[1])*(b[0]-y[0]);return f+=w,{poly:m,area:w}});c.sort(function(m,y){return y.area-m.area});for(var h=e,l=0;l<u;l++){var d=c[l];if(h<=0)break;var p=l===u-1?h:Math.ceil(d.area/f*e);p<0||(Rh(sO,{points:d.poly},p,r),h-=p)}}i=Cc;break}if(!i)return IU(t,e);for(var g=[],l=0;l<r.length;l++){var v=new i;v.setShape(r[l]),RU(t,v),g.push(v)}return g}function zU(t,e){var r=t.length,n=e.length;if(r===n)return[t,e];for(var i=[],a=[],o=r<n?t:e,s=Math.min(r,n),u=Math.abs(n-r)/6,l=(s-2)/6,f=Math.ceil(u/l)+1,c=[o[0],o[1]],h=u,d=2;d<s;){var p=o[d-2],g=o[d-1],v=o[d++],m=o[d++],y=o[d++],b=o[d++],w=o[d++],C=o[d++];if(h<=0){c.push(v,m,y,b,w,C);continue}for(var _=Math.min(h,f-1)+1,D=1;D<=_;D++){var x=D/_;Oi(p,v,y,w,x,i),Oi(g,m,b,C,x,a),p=i[3],g=a[3],c.push(i[1],a[1],i[2],a[2],p,g),v=i[5],m=a[5],y=i[6],b=a[6]}h-=_-1}return o===t?[c,e]:[t,c]}function uO(t,e){for(var r=t.length,n=t[r-2],i=t[r-1],a=[],o=0;o<e.length;)a[o++]=n,a[o++]=i;return a}function jU(t,e){for(var r,n,i,a=[],o=[],s=0;s<Math.max(t.length,e.length);s++){var u=t[s],l=e[s],f=void 0,c=void 0;u?l?(r=zU(u,l),f=r[0],c=r[1],n=f,i=c):(c=uO(i||u,u),f=u):(f=uO(n||l,l),c=l),a.push(f),o.push(c)}return[a,o]}function lO(t){for(var e=0,r=0,n=0,i=t.length,a=0,o=i-2;a<i;o=a,a+=2){var s=t[o],u=t[o+1],l=t[a],f=t[a+1],c=s*f-l*u;e+=c,r+=(s+l)*c,n+=(u+f)*c}return e===0?[t[0]||0,t[1]||0]:[r/e/3,n/e/3,e]}function VU(t,e,r,n){for(var i=(t.length-2)/6,a=1/0,o=0,s=t.length,u=s-2,l=0;l<i;l++){for(var f=l*6,c=0,h=0;h<s;h+=2){var d=h===0?f:(f+h-2)%u+2,p=t[d]-r[0],g=t[d+1]-r[1],v=e[h]-n[0],m=e[h+1]-n[1],y=v-p,b=m-g;c+=y*y+b*b}c<a&&(a=c,o=l)}return o}function HU(t){for(var e=[],r=t.length,n=0;n<r;n+=2)e[n]=t[r-n-2],e[n+1]=t[r-n-1];return e}function WU(t,e,r,n){for(var i=[],a,o=0;o<t.length;o++){var s=t[o],u=e[o],l=lO(s),f=lO(u);a==null&&(a=l[2]<0!=f[2]<0);var c=[],h=[],d=0,p=1/0,g=[],v=s.length;a&&(s=HU(s));for(var m=VU(s,u,l,f)*6,y=v-2,b=0;b<y;b+=2){var w=(m+b)%y+2;c[b+2]=s[w]-l[0],c[b+3]=s[w+1]-l[1]}c[0]=s[m]-l[0],c[1]=s[m+1]-l[1];for(var C=n/r,_=-n/2;_<=n/2;_+=C){for(var D=Math.sin(_),x=Math.cos(_),S=0,b=0;b<s.length;b+=2){var O=c[b],E=c[b+1],P=u[b]-f[0],F=u[b+1]-f[1],B=P*x-F*D,M=P*D+F*x;g[b]=B,g[b+1]=M;var I=B-O,j=M-E;S+=I*I+j*j}if(S<p){p=S,d=_;for(var z=0;z<g.length;z++)h[z]=g[z]}}i.push({from:c,to:h,fromCp:l,toCp:f,rotation:-d})}return i}function Nh(t){return t.__isCombineMorphing}var fO="__mOriginal_";function kh(t,e,r){var n=fO+e,i=t[n]||t[e];t[n]||(t[n]=t[e]);var a=r.replace,o=r.after,s=r.before;t[e]=function(){var u=arguments,l;return s&&s.apply(this,u),a?l=a.apply(this,u):l=i.apply(this,u),o&&o.apply(this,u),l}}function cl(t,e){var r=fO+e;t[r]&&(t[e]=t[r],t[r]=null)}function cO(t,e){for(var r=0;r<t.length;r++)for(var n=t[r],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=e[0]*a+e[2]*o+e[4],n[i++]=e[1]*a+e[3]*o+e[5]}}function hO(t,e){var r=t.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),i=jU(q0(r),q0(n)),a=i[0],o=i[1],s=t.getComputedTransform(),u=e.getComputedTransform();function l(){this.transform=null}s&&cO(a,s),u&&cO(o,u),kh(e,"updateTransform",{replace:l}),e.transform=null;var f=WU(a,o,10,Math.PI),c=[];kh(e,"buildPath",{replace:function(h){for(var d=e.__morphT,p=1-d,g=[],v=0;v<f.length;v++){var m=f[v],y=m.from,b=m.to,w=m.rotation*d,C=m.fromCp,_=m.toCp,D=Math.sin(w),x=Math.cos(w);Af(g,C,_,d);for(var S=0;S<y.length;S+=2){var O=y[S],E=y[S+1],P=b[S],F=b[S+1],B=O*p+P*d,M=E*p+F*d;c[S]=B*x-M*D+g[0],c[S+1]=B*D+M*x+g[1]}var I=c[0],j=c[1];h.moveTo(I,j);for(var S=2;S<y.length;){var P=c[S++],F=c[S++],z=c[S++],W=c[S++],R=c[S++],U=c[S++];I===P&&j===F&&z===R&&W===U?h.lineTo(R,U):h.bezierCurveTo(P,F,z,W,R,U),I=R,j=U}}}})}function X0(t,e,r){if(!t||!e)return e;var n=r.done,i=r.during;hO(t,e),e.__morphT=0;function a(){cl(e,"buildPath"),cl(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},je({during:function(o){e.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},r)),e}function $U(t,e,r,n,i,a){var o=16;t=i===r?0:Math.round(32767*(t-r)/(i-r)),e=a===n?0:Math.round(32767*(e-n)/(a-n));for(var s=0,u,l=(1<<o)/2;l>0;l/=2){var f=0,c=0;(t&l)>0&&(f=1),(e&l)>0&&(c=1),s+=l*l*(3*f^c),c===0&&(f===1&&(t=l-1-t,e=l-1-e),u=t,t=e,e=u)}return s}function zh(t){var e=1/0,r=1/0,n=-1/0,i=-1/0,a=ye(t,function(s){var u=s.getBoundingRect(),l=s.getComputedTransform(),f=u.x+u.width/2+(l?l[4]:0),c=u.y+u.height/2+(l?l[5]:0);return e=Math.min(f,e),r=Math.min(c,r),n=Math.max(f,n),i=Math.max(c,i),[f,c]}),o=ye(a,function(s,u){return{cp:s,z:$U(s[0],s[1],e,r,n,i),path:t[u]}});return o.sort(function(s,u){return s.z-u.z}).map(function(s){return s.path})}function dO(t){return kU(t.path,t.count)}function K0(){return{fromIndividuals:[],toIndividuals:[],count:0}}function GU(t,e,r){var n=[];function i(C){for(var _=0;_<C.length;_++){var D=C[_];Nh(D)?i(D.childrenRef()):D instanceof Ve&&n.push(D)}}i(t);var a=n.length;if(!a)return K0();var o=r.dividePath||dO,s=o({path:e,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),K0();n=zh(n),s=zh(s);for(var u=r.done,l=r.during,f=r.individualDelay,c=new pu,h=0;h<a;h++){var d=n[h],p=s[h];p.parent=e,p.copyTransform(c),f||hO(d,p)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function g(C){for(var _=0;_<s.length;_++)s[_].addSelfToZr(C)}kh(e,"addSelfToZr",{after:function(C){g(C)}}),kh(e,"removeSelfFromZr",{after:function(C){for(var _=0;_<s.length;_++)s[_].removeSelfFromZr(C)}});function v(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,cl(e,"addSelfToZr"),cl(e,"removeSelfFromZr")}var m=s.length;if(f)for(var y=m,b=function(){y--,y===0&&(v(),u&&u())},h=0;h<m;h++){var w=f?je({delay:(r.delay||0)+f(h,m,n[h],s[h]),done:b},r):r;X0(n[h],s[h],w)}else e.__morphT=0,e.animateTo({__morphT:1},je({during:function(C){for(var _=0;_<m;_++){var D=s[_];D.__morphT=e.__morphT,D.dirtyShape()}l&&l(C)},done:function(){v();for(var C=0;C<t.length;C++)cl(t[C],"updateTransform");u&&u()}},r));return e.__zr&&g(e.__zr),{fromIndividuals:n,toIndividuals:s,count:m}}function UU(t,e,r){var n=e.length,i=[],a=r.dividePath||dO;function o(d){for(var p=0;p<d.length;p++){var g=d[p];Nh(g)?o(g.childrenRef()):g instanceof Ve&&i.push(g)}}if(Nh(t)){o(t.childrenRef());var s=i.length;if(s<n)for(var u=0,l=s;l<n;l++)i.push(Fg(i[u++%s]));i.length=n}else{i=a({path:t,count:n});for(var f=t.getComputedTransform(),l=0;l<i.length;l++)i[l].setLocalTransform(f);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),K0()}i=zh(i),e=zh(e);for(var c=r.individualDelay,l=0;l<n;l++){var h=c?je({delay:(r.delay||0)+c(l,n,i[l],e[l])},r):r;X0(i[l],e[l],h)}return{fromIndividuals:i,toIndividuals:e,count:e.length}}function vO(t){return he(t[0])}function pO(t,e){for(var r=[],n=t.length,i=0;i<n;i++)r.push({one:t[i],many:[]});for(var i=0;i<e.length;i++){var a=e[i].length,o=void 0;for(o=0;o<a;o++)r[o%n].many.push(e[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!r[i].many.length){var u=r[s].many;if(u.length<=1)if(s)s=0;else return r;var a=u.length,l=Math.ceil(a/2);r[i].many=u.slice(l,a),r[s].many=u.slice(0,l),s++}return r}var qU={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n<t.count;n++){var i=Fg(t.path);i.setStyle("opacity",r),e.push(i)}return e},split:null};function Z0(t,e,r,n,i,a){if(!t.length||!e.length)return;var o=ts("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),u=Object.assign({setToFinal:!0},o),l,f;vO(t)&&(l=t,f=e),vO(e)&&(l=e,f=t);function c(m,y,b,w,C){var _=m.many,D=m.one;if(_.length===1&&!C){var x=y?_[0]:D,S=y?D:_[0];if(Nh(x))c({many:[x],one:S},!0,b,w,!0);else{var O=s?je({delay:s(b,w)},u):u;X0(x,S,O),a(x,S,x,S,O)}}else for(var E=je({dividePath:qU[r],individualDelay:s&&function(j,z,W,R){return s(j+b,w)}},u),P=y?GU(_,D,E):UU(D,_,E),F=P.fromIndividuals,B=P.toIndividuals,M=F.length,I=0;I<M;I++){var O=s?je({delay:s(I,M)},u):u;a(F[I],B[I],y?_[I]:m.one,y?m.one:_[I],O)}}for(var h=l?l===t:t.length>e.length,d=l?pO(f,l):pO(h?e:t,[h?t:e]),p=0,g=0;g<d.length;g++)p+=d[g].many.length;for(var v=0,g=0;g<d.length;g++)c(d[g],h,v,p),v+=d[g].many.length}function ao(t){if(!t)return[];if(he(t)){for(var e=[],r=0;r<t.length;r++)e.push(ao(t[r]));return e}var n=[];return t.traverse(function(i){i instanceof Ve&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var gO=1e4,YU=0,mO=1,yO=2,XU=lt();function KU(t,e){for(var r=t.dimensions,n=0;n<r.length;n++){var i=t.getDimensionInfo(r[n]);if(i&&i.otherDims[e]===0)return r[n]}}function ZU(t,e,r){var n=t.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=t.get(n.name,e);return i&&i.categories[a]||a+""}}function bO(t,e,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=KU(t,i);if(a){var o=ZU(t,e,a);return o}var s=t.getRawDataItem(e),u=n?"childGroupId":"groupId";if(s&&s[u])return s[u]+"";if(!n)return r||t.getId(e)}function CO(t){var e=[];return N(t,function(r){var n=r.data,i=r.dataGroupId;if(n.count()>gO){process.env.NODE_ENV!=="production"&&xt("Universal transition is disabled on large data > 10k.");return}for(var a=n.getIndices(),o=0;o<a.length;o++)e.push({data:n,groupId:bO(n,o,i,!1),childGroupId:bO(n,o,i,!0),divide:r.divide,dataIndex:o})}),e}function J0(t,e,r){t.traverse(function(n){n instanceof Ve&&qt(n,{style:{opacity:0}},e,{dataIndex:r,isFrom:!0})})}function Q0(t){if(t.parent){var e=t.getComputedTransform();t.setLocalTransform(e),t.parent.remove(t)}}function Ss(t){t.stopAnimation(),t.isGroup&&t.traverse(function(e){e.stopAnimation()})}function JU(t,e,r){var n=ts("update",r,e);n&&t.traverse(function(i){if(i instanceof Fi){var a=a7(i);a&&i.animateFrom({style:a},n)}})}function QU(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++){var i=t[n],a=e[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function wO(t,e,r){var n=CO(t),i=CO(e);function a(b,w,C,_,D){(C||b)&&w.animateFrom({style:C&&C!==b?oe(oe({},C.style),b.style):b.style},D)}var o=!1,s=YU,u=Ae(),l=Ae();n.forEach(function(b){b.groupId&&u.set(b.groupId,!0),b.childGroupId&&l.set(b.childGroupId,!0)});for(var f=0;f<i.length;f++){var c=i[f].groupId;if(l.get(c)){s=mO;break}var h=i[f].childGroupId;if(h&&u.get(h)){s=yO;break}}function d(b,w){return function(C){var _=C.data,D=C.dataIndex;return w?_.getId(D):b?s===mO?C.childGroupId:C.groupId:s===yO?C.childGroupId:C.groupId}}var p=QU(n,i),g={};if(!p)for(var f=0;f<i.length;f++){var v=i[f],m=v.data.getItemGraphicEl(v.dataIndex);m&&(g[m.id]=!0)}function y(b,w){var C=n[w],_=i[b],D=_.data.hostModel,x=C.data.getItemGraphicEl(C.dataIndex),S=_.data.getItemGraphicEl(_.dataIndex);if(x===S){S&&JU(S,_.dataIndex,D);return}x&&g[x.id]||S&&(Ss(S),x?(Ss(x),Q0(x),o=!0,Z0(ao(x),ao(S),_.divide,D,b,a)):J0(S,D,b))}new qm(n,i,d(!0,p),d(!1,p),null,"multiple").update(y).updateManyToOne(function(b,w){var C=i[b],_=C.data,D=_.hostModel,x=_.getItemGraphicEl(C.dataIndex),S=bt(ye(w,function(O){return n[O].data.getItemGraphicEl(n[O].dataIndex)}),function(O){return O&&O!==x&&!g[O.id]});x&&(Ss(x),S.length?(N(S,function(O){Ss(O),Q0(O)}),o=!0,Z0(ao(S),ao(x),C.divide,D,b,a)):J0(x,D,C.dataIndex))}).updateOneToMany(function(b,w){var C=n[w],_=C.data.getItemGraphicEl(C.dataIndex);if(!(_&&g[_.id])){var D=bt(ye(b,function(S){return i[S].data.getItemGraphicEl(i[S].dataIndex)}),function(S){return S&&S!==_}),x=i[b[0]].data.hostModel;D.length&&(N(D,function(S){return Ss(S)}),_?(Ss(_),Q0(_),o=!0,Z0(ao(_),ao(D),C.divide,x,b[0],a)):N(D,function(S){return J0(S,x,b[0])}))}}).updateManyToMany(function(b,w){new qm(w,b,function(C){return n[C].data.getId(n[C].dataIndex)},function(C){return i[C].data.getId(i[C].dataIndex)}).update(function(C,_){y(b[C],w[_])}).execute()}).execute(),o&&N(e,function(b){var w=b.data,C=w.hostModel,_=C&&r.getViewOfSeriesModel(C),D=ts("update",C,0);_&&C.isAnimationEnabled()&&D&&D.duration>0&&_.group.traverse(function(x){x instanceof Ve&&!x.animators.length&&x.animateFrom({style:{opacity:0}},D)})})}function _O(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function DO(t){return he(t)?t.sort().join(","):t}function Ki(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function eq(t,e){var r=Ae(),n=Ae(),i=Ae();N(t.oldSeries,function(o,s){var u=t.oldDataGroupIds[s],l=t.oldData[s],f=_O(o),c=DO(f);n.set(c,{dataGroupId:u,data:l}),he(f)&&N(f,function(h){i.set(h,{key:c,dataGroupId:u,data:l})})});function a(o){r.get(o)&&xt("Duplicated seriesKey in universalTransition "+o)}return N(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),u=o.getData(),l=_O(o),f=DO(l),c=n.get(f);if(c)process.env.NODE_ENV!=="production"&&a(f),r.set(f,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Ki(c.data),data:c.data}],newSeries:[{dataGroupId:s,divide:Ki(u),data:u}]});else if(he(l)){process.env.NODE_ENV!=="production"&&a(f);var h=[];N(l,function(g){var v=n.get(g);v.data&&h.push({dataGroupId:v.dataGroupId,divide:Ki(v.data),data:v.data})}),h.length&&r.set(f,{oldSeries:h,newSeries:[{dataGroupId:s,data:u,divide:Ki(u)}]})}else{var d=i.get(l);if(d){var p=r.get(d.key);p||(p={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:Ki(d.data)}],newSeries:[]},r.set(d.key,p)),p.newSeries.push({dataGroupId:s,data:u,divide:Ki(u)})}}}}),r}function xO(t,e){for(var r=0;r<t.length;r++){var n=e.seriesIndex!=null&&e.seriesIndex===t[r].seriesIndex||e.seriesId!=null&&e.seriesId===t[r].id;if(n)return r}}function tq(t,e,r,n){var i=[],a=[];N(gt(t.from),function(o){var s=xO(e.oldSeries,o);s>=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ki(e.oldData[s]),groupIdDim:o.dimension})}),N(gt(t.to),function(o){var s=xO(r.updatedSeries,o);if(s>=0){var u=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:u,divide:Ki(u),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&wO(i,a,n)}function rq(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){N(gt(n.seriesTransition),function(i){N(gt(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][Zc]=!0)})})}),t.registerUpdateLifecycle("series:transition",function(e,r,n){var i=XU(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)N(gt(a),function(d){tq(d,i,n,r)});else{var o=eq(i,n);N(o.keys(),function(d){var p=o.get(d);wO(p.oldSeries,p.newSeries,r)})}N(n.updatedSeries,function(d){d[Zc]&&(d[Zc]=!1)})}for(var s=e.getSeries(),u=i.oldSeries=[],l=i.oldDataGroupIds=[],f=i.oldData=[],c=0;c<s.length;c++){var h=s[c].getData();h.count()<gO&&(u.push(s[c]),l.push(s[c].get("dataGroupId")),f.push(h))}})}function SO(t,e,r){var n=Po.createCanvas(),i=e.getWidth(),a=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=i*r,n.height=a*r,n}var ey=function(t){ce(e,t);function e(r,n,i){var a=t.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||Yf,typeof r=="string"?o=SO(r,n,i):we(r)&&(o=r,r=o.id),a.id=r,a.dom=o;var s=o.style;return s&&(u_(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=SO("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},e.prototype.createRepaintRects=function(r,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,u=!1,l=new Ue(0,0,0,0);function f(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var b=new Ue(0,0,0,0);b.copy(y),o.push(b)}else{for(var w=!1,C=1/0,_=0,D=0;D<o.length;++D){var x=o[D];if(x.intersect(y)){var S=new Ue(0,0,0,0);S.copy(x),S.union(y),o[D]=S,w=!0;break}else if(u){l.copy(y),l.union(x);var O=y.width*y.height,E=x.width*x.height,P=l.width*l.height,F=P-O-E;F<C&&(C=F,_=D)}}if(u&&(o[_].union(y),w=!0),!w){var b=new Ue(0,0,0,0);b.copy(y),o.push(b)}u||(u=o.length>=s)}}for(var c=this.__startIndex;c<this.__endIndex;++c){var h=r[c];if(h){var d=h.shouldBePainted(i,a,!0,!0),p=h.__isRendered&&(h.__dirty&Or||!d)?h.getPrevPaintRect():null;p&&f(p);var g=d&&(h.__dirty&Or||!h.__isRendered)?h.getPaintRect():null;g&&f(g)}}for(var c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var h=n[c],d=h&&h.shouldBePainted(i,a,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered){var p=h.getPrevPaintRect();p&&f(p)}}var v;do{v=!1;for(var c=0;c<o.length;){if(o[c].isZero()){o.splice(c,1);continue}for(var m=c+1;m<o.length;)o[c].intersect(o[m])?(v=!0,o[c].union(o[m]),o.splice(m,1)):m++;c++}}while(v);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(r,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=r+"px",o.height=n+"px"),a.width=r*i,a.height=n*i,s&&(s.width=r*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},e.prototype.clear=function(r,n,i){var a=this.dom,o=this.ctx,s=a.width,u=a.height;n=n||this.clearColor;var l=this.motionBlur&&!r,f=this.lastFrameAlpha,c=this.dpr,h=this;l&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/c,u/c));var d=this.domBack;function p(g,v,m,y){if(o.clearRect(g,v,m,y),n&&n!=="transparent"){var b=void 0;if(xf(n)){var w=n.global||n.__width===m&&n.__height===y;b=w&&n.__canvasGradient||Tm(o,n,{x:0,y:0,width:m,height:y}),n.__canvasGradient=b,n.__width=m,n.__height=y}else ON(n)&&(n.scaleX=n.scaleX||c,n.scaleY=n.scaleY||c,b=Om(o,n,{dirty:function(){h.setUnpainted(),h.painter.refresh()}}));o.save(),o.fillStyle=b||n,o.fillRect(g,v,m,y),o.restore()}l&&(o.save(),o.globalAlpha=f,o.drawImage(d,g,v,m,y),o.restore())}!i||l?p(0,0,s,u):i.length&&N(i,function(g){p(g.x*c,g.y*c,g.width*c,g.height*c)})},e}(En),EO=1e5,oo=314159,jh=.01,nq=.001;function iq(t){return t?t.__builtin__?!0:!(typeof t.resize!="function"||typeof t.refresh!="function"):!1}function aq(t,e){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var oq=function(){function t(e,r,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=n=oe({},n||{}),this.dpr=n.devicePixelRatio||Yf,this._singleCanvas=a,this.root=e;var o=e.style;o&&(u_(e),e.innerHTML=""),this.storage=r;var s=this._zlevelList;this._prevDisplayList=[];var u=this._layers;if(a){var f=e,c=f.width,h=f.height;n.width!=null&&(c=n.width),n.height!=null&&(h=n.height),this.dpr=n.devicePixelRatio||1,f.width=c*this.dpr,f.height=h*this.dpr,this._width=c,this._height=h;var d=new ey(f,this,this.dpr);d.__builtin__=!0,d.initContext(),u[oo]=d,d.zlevel=oo,s.push(oo),this._domRoot=e}else{this._width=nh(e,0,n),this._height=nh(e,1,n);var l=this._domRoot=aq(this._width,this._height);e.appendChild(l)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.refresh=function(e){var r=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,n,e,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var u=a===0?this._backgroundColor:null;s.refresh(u)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(e){var r=e.length,n=this._hoverlayer;if(n&&n.clear(),!!r){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<r;o++){var s=e[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(EO)),a||(a=n.ctx,a.save()),Ja(a,s,i,o===r-1))}a&&a.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(EO)},t.prototype.paintOne=function(e,r){YE(e,r)},t.prototype._paintList=function(e,r,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(e);var a=this._doPaintList(e,r,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(l){l.afterBrush&&l.afterBrush()});else{var u=this;Mf(function(){u._paintList(e,r,n,i)})}}},t.prototype._compositeManually=function(){var e=this.getLayer(oo).ctx,r=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,r,n),this.eachBuiltinLayer(function(i){i.virtual&&e.drawImage(i.dom,0,0,r,n)})},t.prototype._doPaintList=function(e,r,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var u=this._zlevelList[s],l=this._layers[u];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&a.push(l)}for(var f=!0,c=!1,h=function(g){var v=a[g],m=v.ctx,y=o&&v.createRepaintRects(e,r,d._width,d._height),b=n?v.__startIndex:v.__drawIndex,w=!n&&v.incremental&&Date.now,C=w&&Date.now(),_=v.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(v.__startIndex===v.__endIndex)v.clear(!1,_,y);else if(b===v.__startIndex){var D=e[b];(!D.incremental||!D.notClear||n)&&v.clear(!1,_,y)}b===-1&&(console.error("For some unknown reason. drawIndex is -1"),b=v.__startIndex);var x,S=function(F){var B={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(x=b;x<v.__endIndex;x++){var M=e[x];if(M.__inHover&&(c=!0),i._doPaintEl(M,v,o,F,B,x===v.__endIndex-1),w){var I=Date.now()-C;if(I>15)break}}B.prevElClipPaths&&m.restore()};if(y)if(y.length===0)x=v.__endIndex;else for(var O=d.dpr,E=0;E<y.length;++E){var P=y[E];m.save(),m.beginPath(),m.rect(P.x*O,P.y*O,P.width*O,P.height*O),m.clip(),S(P),m.restore()}else m.save(),S(),m.restore();v.__drawIndex=x,v.__drawIndex<v.__endIndex&&(f=!1)},d=this,p=0;p<a.length;p++)h(p);return Pe.wxa&&N(this._layers,function(g){g&&g.ctx&&g.ctx.draw&&g.ctx.draw()}),{finished:f,needsRefreshHover:c}},t.prototype._doPaintEl=function(e,r,n,i,a,o){var s=r.ctx;if(n){var u=e.getPaintRect();(!i||u&&u.intersect(i))&&(Ja(s,e,a,o),e.setPrevPaintRect(u))}else Ja(s,e,a,o)},t.prototype.getLayer=function(e,r){this._singleCanvas&&!this._needsManuallyCompositing&&(e=oo);var n=this._layers[e];return n||(n=new ey("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Qe(n,this._layerConfig[e],!0):this._layerConfig[e-jh]&&Qe(n,this._layerConfig[e-jh],!0),r&&(n.virtual=r),this.insertLayer(e,n),n.initContext()),n},t.prototype.insertLayer=function(e,r){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,u=-1;if(n[e]){process.env.NODE_ENV!=="production"&&wa("ZLevel "+e+" has been used already");return}if(!iq(r)){process.env.NODE_ENV!=="production"&&wa("Layer of zlevel "+e+" is not valid");return}if(a>0&&e>i[0]){for(u=0;u<a-1&&!(i[u]<e&&i[u+1]>e);u++);s=n[i[u]]}if(i.splice(u+1,0,e),n[e]=r,!r.virtual)if(s){var l=s.dom;l.nextSibling?o.insertBefore(r.dom,l.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)},t.prototype.eachLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];e.call(r,this._layers[a],a)}},t.prototype.eachBuiltinLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&e.call(r,o,a)}},t.prototype.eachOtherLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||e.call(r,o,a)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(c,h){c.__dirty=c.__used=!1});function r(c){a&&(a.__endIndex!==c&&(a.__dirty=!0),a.__endIndex=c)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var i=e[n];if(i.zlevel!==e[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,u;for(u=0;u<e.length;u++){var i=e[u],l=i.zlevel,f=void 0;s!==l&&(s=l,o=0),i.incremental?(f=this.getLayer(l+nq,this._needsManuallyCompositing),f.incremental=!0,o=1):f=this.getLayer(l+(o>0?jh:0),this._needsManuallyCompositing),f.__builtin__||wa("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,r(u),a=f),i.__dirty&Or&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=u))}r(u),this.eachBuiltinLayer(function(c,h){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,N(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var n=this._layerConfig;n[e]?Qe(n[e],r,!0):n[e]=r;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===e||a===e+jh){var o=this._layers[a];Qe(o,n[e],!0)}}}},t.prototype.delLayer=function(e){var r=this._layers,n=this._zlevelList,i=r[e];i&&(i.dom.parentNode.removeChild(i.dom),delete r[e],n.splice(Ge(n,e),1))},t.prototype.resize=function(e,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(e!=null&&(i.width=e),r!=null&&(i.height=r),e=nh(a,0,i),r=nh(a,1,i),n.style.display="",this._width!==e||r!==this._height){n.style.width=e+"px",n.style.height=r+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,r);this.refresh(!0)}this._width=e,this._height=r}else{if(e==null||r==null)return;this._width=e,this._height=r,this.getLayer(oo).resize(e,r)}return this},t.prototype.clearLayer=function(e){var r=this._layers[e];r&&r.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[oo].dom;var r=new ey("image",this,e.pixelRatio||this.dpr);r.initContext(),r.clear(!1,e.backgroundColor||this._backgroundColor);var n=r.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var i=r.dom.width,a=r.dom.height;this.eachLayer(function(c){c.__builtin__?n.drawImage(c.dom,0,0,i,a):c.renderToCanvas&&(n.save(),c.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),u=0,l=s.length;u<l;u++){var f=s[u];Ja(n,f,o,u===l-1)}return r.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t}();function sq(t){t.registerPainter("canvas",oq)}Wi([LG,dU,nU,eU,SG,OU,EU,XW,LW,u$,fW,rq,sq]);const uq=k.memo(({type:t,options:e,echartRef:r})=>{const n=k.useRef(null),i=k.useRef(null);return k.useEffect(()=>(n.current&&(i.current=OV(n.current)),()=>{i.current&&i.current.dispose()}),[]),k.useEffect(()=>{i.current&&i.current.setOption({...e})},[t,e]),k.useImperativeHandle(r,()=>({resize:()=>{i.current&&i.current.resize()}})),A.jsx("div",{ref:n,style:{width:"100%",height:"100%"}})});var lq=typeof global=="object"&&global&&global.Object===Object&&global,fq=typeof self=="object"&&self&&self.Object===Object&&self,AO=lq||fq||Function("return this")(),Es=AO.Symbol,TO=Object.prototype,cq=TO.hasOwnProperty,hq=TO.toString,hl=Es?Es.toStringTag:void 0;function dq(t){var e=cq.call(t,hl),r=t[hl];try{t[hl]=void 0;var n=!0}catch{}var i=hq.call(t);return n&&(e?t[hl]=r:delete t[hl]),i}var vq=Object.prototype,pq=vq.toString;function gq(t){return pq.call(t)}var mq="[object Null]",yq="[object Undefined]",OO=Es?Es.toStringTag:void 0;function bq(t){return t==null?t===void 0?yq:mq:OO&&OO in Object(t)?dq(t):gq(t)}function Cq(t){return t!=null&&typeof t=="object"}var wq="[object Symbol]";function PO(t){return typeof t=="symbol"||Cq(t)&&bq(t)==wq}function _q(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var Dq=Array.isArray,xq=1/0,BO=Es?Es.prototype:void 0,MO=BO?BO.toString:void 0;function FO(t){if(typeof t=="string")return t;if(Dq(t))return _q(t,FO)+"";if(PO(t))return MO?MO.call(t):"";var e=t+"";return e=="0"&&1/t==-xq?"-0":e}var Sq=/\s/;function Eq(t){for(var e=t.length;e--&&Sq.test(t.charAt(e)););return e}var Aq=/^\s+/;function Tq(t){return t&&t.slice(0,Eq(t)+1).replace(Aq,"")}function LO(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var IO=NaN,Oq=/^[-+]0x[0-9a-f]+$/i,Pq=/^0b[01]+$/i,Bq=/^0o[0-7]+$/i,Mq=parseInt;function RO(t){if(typeof t=="number")return t;if(PO(t))return IO;if(LO(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=LO(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Tq(t);var r=Pq.test(t);return r||Bq.test(t)?Mq(t.slice(2),r?2:8):Oq.test(t)?IO:+t}var NO=1/0,Fq=17976931348623157e292;function Lq(t){if(!t)return t===0?t:0;if(t=RO(t),t===NO||t===-NO){var e=t<0?-1:1;return e*Fq}return t===t?t:0}function Iq(t){var e=Lq(t),r=e%1;return e===e?r?e-r:e:0}function kO(t){return t==null?"":FO(t)}var Rq=AO.isFinite,Nq=Math.min;function kq(t){var e=Math[t];return function(r,n){if(r=RO(r),n=n==null?0:Nq(Iq(n),292),n&&Rq(r)){var i=(kO(r)+"e").split("e"),a=e(i[0]+"e"+(+i[1]+n));return i=(kO(a)+"e").split("e"),+(i[0]+"e"+(+i[1]-n))}return e(r)}}var ty=kq("round");const zO=({moduleDataApi:t,customData:e,customeStyle:r,width:n=2,height:i=2})=>{const{globalData:a}=Oo(),[o,s]=k.useState(),[u,l]=k.useState(),[f,c]=k.useState(),h=k.useRef(),d=k.useCallback(async()=>{e?t==null||t({id:e==null?void 0:e.dataSourceId}).then(p=>{if(!p.success){Q.message.error(p.message);return}l(p.data)}):l([])},[e==null?void 0:e.dataSourceId,t]);return k.useEffect(()=>{e&&d()},[d,e==null?void 0:e.dataSourceId]),k.useEffect(()=>{var p,g,v,m,y,b,w,C,_,D,x,S,O,E,P;if(e&&u&&e.type){let F=[];c([]),F=u;const B={},M={};let I=0;if(e.yAxis==="recordTotal")F.forEach(ae=>{const ve=ae[e==null?void 0:e.xAxis];B[ve]=(B[ve]||0)+1,I+=1});else if(e.yAxis==="fieldValue"){F.forEach(ae=>{const ve=ae[e==null?void 0:e.xAxis],Le=ae[e==null?void 0:e.yAxisField],ft=typeof Le=="number"?Le:0;M[ve]=M[ve]||[],M[ve].push(ft),I+=1});for(const ae in M)switch(e==null?void 0:e.yAxisFieldType){case"sum":B[ae]=ty(M[ae].reduce((ve,Le)=>ve+Le,0),3);break;case"max":B[ae]=ty(Math.max(...M[ae]),3);break;case"min":B[ae]=ty(Math.min(...M[ae]),3);break;case"average":B[ae]=M[ae].length?M[ae].reduce((ve,Le)=>ve+Le,0)/M[ae].length:0;break;default:B[ae]=0}}const j={show:(p=e==null?void 0:e.chartOptions)==null?void 0:p.includes("label"),position:"top",formatter:"{c}"},z=Object.keys(B),W=Object.values(B),R={"chart-bar":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"bar",label:j}]},"chart-bar-pile":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"bar",label:j}]},"chart-bar-percentage":{xAxis:{type:"category",data:z},yAxis:{type:"value",max:100},series:[{data:z.map(ae=>B[ae]/I*100),type:"bar",label:j}]},"chart-line":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"line",label:j}]},"chart-line-smooth":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"line",smooth:!0,label:j}]},"chart-pie":{xAxis:{show:!1},yAxis:{show:!1},series:[{data:W,type:"pie",radius:"50%",label:{...j,position:"outside"},labelLine:{normal:{show:!0}}}]},"chart-pie-circular":{xAxis:{show:!1},yAxis:{show:!1},series:[{data:W,type:"pie",radius:["40%","70%"],label:{...j,position:"outside"},labelLine:{normal:{show:!0}}}]},"chart-strip-bar":{xAxis:{type:"value"},yAxis:{type:"category",data:z},series:[{data:W,type:"bar",label:j}]},"chart-strip-bar-pile":{xAxis:{type:"value"},yAxis:{type:"category",data:z},series:[{data:W,type:"bar",label:j}]},"chart-strip-bar-percentage":{xAxis:{type:"value",max:100},yAxis:{type:"category",data:z},series:[{data:z.map(ae=>B[ae]/I*100),type:"bar",label:j}]}},U=(g=e==null?void 0:e.chartOptions)==null?void 0:g.includes("legend"),Z=R[e.type]||{},ee=Z.series.map(ae=>{var ve;return{...ae,name:e.yAxis==="recordTotal"?"统计":(ve=o==null?void 0:o.find(Le=>Le.value===e.yAxisField))==null?void 0:ve.label}}),ne=ae=>{const ve=Math.max(...ae.map(Ie=>String(Ie.name).length)),Le=Math.max(...ae.flatMap(Ie=>Ie.data.map(at=>String(at).length))),ft=Math.max(...ae.flatMap(Ie=>Ie.data.length));return{maxNameLength:ve,maxValueLength:Le,maxArrLength:ft}},q=ae=>ae.reduce((ve,Le)=>{const ft=String(Le).length;return Math.max(ve,ft)},0);let L=18,X=18;const{maxNameLength:V,maxArrLength:G}=ne(ee),J=q((v=Z==null?void 0:Z.xAxis)==null?void 0:v.data);let K=0;G>3?(J>15&&(K=90),J>5&&(K=45),n<3&&(K=90)):(L=50,X=50);const Y=K===45?7:K===90?9:0,fe="50px",ue=`${(J>15?15:J)*Y+L}px`,Ce=`${(V>15?15:V)*Y+X}px`,Fe={legend:{left:"center",right:"center",top:"2px",show:U,data:ee==null?void 0:ee.map(ae=>ae==null?void 0:ae.name)},grid:{top:fe,bottom:ue,right:Ce,left:"70px"},graphic:{elements:[{type:"text",left:"center",bottom:"10px",style:{text:(r==null?void 0:r.xtitle)||"",fill:"#333",fontSize:12,fontWeight:"bold"}},{type:"text",left:"10px",top:"center",style:{text:(r==null?void 0:r.ytitle)||"",fill:"#333",fontSize:12,fontWeight:"bold"},rotation:Math.PI/2}]},xAxis:{...Z.xAxis,axisTick:{show:(m=e==null?void 0:e.chartOptions)==null?void 0:m.includes("axis")},axisLine:{show:((y=e==null?void 0:e.chartOptions)==null?void 0:y.includes("axis"))||((b=r==null?void 0:r.xchartOptions)==null?void 0:b.includes("axisLine"))},axisLabel:{show:((w=e==null?void 0:e.chartOptions)==null?void 0:w.includes("axis"))||((C=r==null?void 0:r.xchartOptions)==null?void 0:C.includes("label")),rotate:K,interval:0,formatter:ae=>ae.length>15?`${ae.slice(0,15)}...`:ae},splitLine:{show:(_=e==null?void 0:e.chartOptions)==null?void 0:_.includes("splitLine")}},yAxis:{...Z.yAxis,axisTick:{show:(D=e==null?void 0:e.chartOptions)==null?void 0:D.includes("axis")},axisLine:{show:((x=e==null?void 0:e.chartOptions)==null?void 0:x.includes("axis"))||((S=r==null?void 0:r.ychartOptions)==null?void 0:S.includes("axisLine"))},axisLabel:{show:((O=e==null?void 0:e.chartOptions)==null?void 0:O.includes("axis"))||((E=r==null?void 0:r.ychartOptions)==null?void 0:E.includes("label")),formatter:ae=>ae.length>15?`${ae.slice(0,15)}...`:ae},splitLine:{show:(P=e==null?void 0:e.chartOptions)==null?void 0:P.includes("splitLine")}},series:ee,tooltip:{trigger:"axis",axisPointer:{type:"shadow"}}};console.log("options",JSON.stringify(Fe)),c(Fe)}},[e,r,u,n,i]),k.useEffect(()=>{var p;a!=null&&a.sourceData&&(e!=null&&e.dataSourceId)&&s((p=a==null?void 0:a.sourceData.find(g=>g.value===(e==null?void 0:e.dataSourceId)))==null?void 0:p.fields)},[a,e]),k.useEffect(()=>{var p;(n||i)&&((p=h==null?void 0:h.current)==null||p.resize())},[n,i]),A.jsx("div",{style:{width:"100%",height:"100%"},children:A.jsx(uq,{echartRef:h,type:"bar",options:f})})},zq=k.memo(({module:t,onUpdate:e,moduleDataApi:r,rowWidth:n,rowHeight:i})=>{var a;return A.jsx("div",{className:"chart-content",children:A.jsxs("div",{className:"dashboard-grid-container",children:[t.type==="text"?A.jsx(v8,{defaultValue:t.customData.editor,onChange:o=>{t.id&&e(t.id,{type:"text",customData:{title:t.customData.title,editor:o}})}}):null,t.type==="statistics"?A.jsx(Hw,{customData:t.customData,customeStyle:t.customeStyle,moduleDataApi:r,width:t.w,height:t.h,rowWidth:n,rowHeight:i}):null,t.type==="calendar"?A.jsx(Jw,{customData:t.customData,moduleDataApi:r}):null,(a=t.type)!=null&&a.includes("chart")?A.jsx(zO,{width:t.w,height:t.h,customData:t.customData,customeStyle:t.customeStyle,moduleDataApi:r}):null]})})}),jO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"17",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"28",y:"24",width:"6",height:"16",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"39",y:"8",width:"6",height:"32",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"50",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"})]}),VO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M17 33.5L29.5 15L45 23L58 10",stroke:"#959bee",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),A.jsx("path",{d:"M16.5 15L30 31.5L45 28L57 33.5",stroke:"#5b65f4",strokeWidth:"1.5",strokeLinecap:"round"})]}),HO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("circle",{cx:"16",cy:"16",r:"16",transform:"matrix(-1 0 0 1 52 8)",fill:"#5b65f4"}),A.jsx("path",{d:"M36 8.5C36 8.22386 36.224 7.99918 36.5 8.00781C40.5621 8.13468 44.4312 9.80377 47.3137 12.6863C50.3143 15.6869 52 19.7565 52 24C52 28.2435 50.3143 32.3131 47.3137 35.3137C44.4312 38.1962 40.5621 39.8653 36.5 39.9922C36.224 40.0008 36 39.7761 36 39.5L36 24V8.5Z",fill:"#959bee"}),A.jsx("path",{d:"M46.9602 34.9602C47.1554 35.1554 47.1559 35.4726 46.9547 35.6617C45.5468 36.9842 43.91 38.0418 42.1229 38.7821C40.3358 39.5223 38.4306 39.9318 36.4999 39.9922C36.2239 40.0008 36 39.7761 36 39.5L36 25.2071C36 24.7617 36.5386 24.5386 36.8536 24.8536L46.9602 34.9602Z",fill:"#cdcff9"})]}),WO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"31",y:"11",width:"4",height:"15",rx:"0.5",transform:"rotate(90 31 11)",fill:"#5b65f5"}),A.jsx("rect",{x:"44",y:"18",width:"4",height:"28",rx:"0.5",transform:"rotate(90 44 18)",fill:"#5b65f5"}),A.jsx("rect",{x:"56",y:"25",width:"4",height:"40",rx:"0.5",transform:"rotate(90 56 25)",fill:"#5b65f5"}),A.jsx("rect",{x:"36",y:"32",width:"4",height:"20",rx:"0.5",transform:"rotate(90 36 32)",fill:"#5b65f5"})]}),jq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M59.3348 27.8581C59.3348 28.6621 59.0708 29.2801 58.5428 29.7121C58.0268 30.1441 57.3848 30.3601 56.6168 30.3601C55.8488 30.3601 55.2008 30.1441 54.6728 29.7121C54.1568 29.2801 53.8988 28.6621 53.8988 27.8581V26.1481C53.8988 25.3441 54.1568 24.7261 54.6728 24.2941C55.2008 23.8621 55.8488 23.6461 56.6168 23.6461C57.3848 23.6461 58.0268 23.8621 58.5428 24.2941C59.0708 24.7261 59.3348 25.3441 59.3348 26.1481V27.8581ZM50.9648 21.5401C50.9648 22.3441 50.7008 22.9621 50.1728 23.3941C49.6568 23.8261 49.0148 24.0421 48.2468 24.0421C47.4788 24.0421 46.8308 23.8261 46.3028 23.3941C45.7868 22.9621 45.5288 22.3441 45.5288 21.5401V19.8301C45.5288 19.0261 45.7868 18.4081 46.3028 17.9761C46.8308 17.5441 47.4788 17.3281 48.2468 17.3281C49.0148 17.3281 49.6568 17.5441 50.1728 17.9761C50.7008 18.4081 50.9648 19.0261 50.9648 19.8301V21.5401ZM56.6168 17.4361L50.5148 30.2521H48.2468L54.3488 17.4361H56.6168ZM48.8768 21.4681V19.9021C48.8768 19.4341 48.6668 19.2001 48.2468 19.2001C47.8268 19.2001 47.6168 19.4341 47.6168 19.9021V21.4681C47.6168 21.9361 47.8268 22.1701 48.2468 22.1701C48.6668 22.1701 48.8768 21.9361 48.8768 21.4681ZM57.2468 27.7861V26.2201C57.2468 25.7521 57.0368 25.5181 56.6168 25.5181C56.1968 25.5181 55.9868 25.7521 55.9868 26.2201V27.7861C55.9868 28.2541 56.1968 28.4881 56.6168 28.4881C57.0368 28.4881 57.2468 28.2541 57.2468 27.7861Z",fill:"#5b65f4"}),A.jsx("path",{d:"M44.0049 26.4181C44.0049 27.6901 43.5969 28.6681 42.7809 29.3521C41.9649 30.0241 40.9509 30.3601 39.7389 30.3601C38.9829 30.3601 38.2929 30.2341 37.6689 29.9821C37.0569 29.7181 36.5349 29.2741 36.1029 28.6501C35.6829 28.0261 35.4729 27.2581 35.4729 26.3461H38.4249C38.4249 26.7781 38.5449 27.1141 38.7849 27.3541C39.0369 27.5821 39.3549 27.6961 39.7389 27.6961C40.1349 27.6961 40.4529 27.5821 40.6929 27.3541C40.9329 27.1141 41.0529 26.7721 41.0529 26.3281C41.0529 25.9441 40.9209 25.6261 40.6569 25.3741C40.4049 25.1101 40.0809 24.9781 39.6849 24.9781H39.2709V22.4221H39.6849C40.0929 22.4221 40.3989 22.3021 40.6029 22.0621C40.8069 21.8221 40.9089 21.5401 40.9089 21.2161C40.9089 20.8321 40.7949 20.5321 40.5669 20.3161C40.3389 20.1001 40.0629 19.9921 39.7389 19.9921C39.4149 19.9921 39.1389 20.1001 38.9109 20.3161C38.6829 20.5321 38.5689 20.8261 38.5689 21.1981H35.6169C35.6169 20.0221 36.0069 19.0861 36.7869 18.3901C37.5789 17.6821 38.5629 17.3281 39.7389 17.3281C40.9269 17.3281 41.9109 17.6881 42.6909 18.4081C43.4709 19.1161 43.8609 20.0221 43.8609 21.1261C43.8609 22.2301 43.4169 23.0641 42.5289 23.6281C43.5129 24.3121 44.0049 25.2421 44.0049 26.4181Z",fill:"#5b65f4"}),A.jsx("path",{d:"M33.9128 30.2521H25.6688V27.5881L30.3128 22.5481C30.7448 22.0801 30.9608 21.6241 30.9608 21.1801C30.9608 20.8201 30.8588 20.5321 30.6548 20.3161C30.4628 20.1001 30.1808 19.9921 29.8088 19.9921C29.4848 19.9921 29.2028 20.0881 28.9628 20.2801C28.7348 20.4721 28.6208 20.7901 28.6208 21.2341H25.6688C25.6688 20.0221 26.0648 19.0681 26.8568 18.3721C27.6608 17.6761 28.6448 17.3281 29.8088 17.3281C31.0208 17.3281 32.0048 17.6761 32.7608 18.3721C33.5288 19.0681 33.9128 20.0101 33.9128 21.1981C33.9128 21.8221 33.7928 22.3501 33.5528 22.7821C33.3128 23.2141 32.9048 23.7361 32.3288 24.3481L29.2688 27.5881H33.9128V30.2521Z",fill:"#5b65f4"}),A.jsx("path",{d:"M22.021 30.2525H19.069V20.5865L16.333 22.9625V19.8125L19.069 17.4365H22.021V30.2525Z",fill:"#5b65f4"})]}),Vq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"58",y:"25",width:"4",height:"44",rx:"0.5",transform:"rotate(90 58 25)",fill:"#5b65f4"}),A.jsx("rect",{x:"29.5",y:"33",width:"4",height:"15.5",rx:"0.5",transform:"rotate(90 29.5 33)",fill:"#959bee"}),A.jsx("path",{d:"M14.584 19L17.085 12.2832H18.8377L21.3008 19H19.7566L19.264 17.5695H16.5829L16.0808 19H14.584ZM17.0377 16.2716H18.8093L17.9282 13.7232L17.0377 16.2716ZM22.1459 19V12.2832H24.609C25.9259 12.2832 26.6933 13.0505 26.6933 14.0832C26.6933 14.7842 26.2575 15.3432 25.708 15.5232C26.3333 15.6747 26.9017 16.2432 26.9017 17.1053C26.9017 18.2042 26.068 19 24.808 19H22.1459ZM23.529 15.0116H24.3911C24.9406 15.0116 25.3006 14.7084 25.3006 14.2347C25.3006 13.7705 24.9785 13.4674 24.3722 13.4674H23.529V15.0116ZM23.529 17.8347H24.5143C25.1206 17.8347 25.4901 17.5126 25.4901 17.0105C25.4901 16.5179 25.1396 16.1768 24.5238 16.1768H23.529V17.8347ZM31.0425 19.1421C29.1383 19.1421 27.5751 17.7684 27.5751 15.6558C27.5751 13.5432 29.1762 12.1411 31.0236 12.1411C32.9751 12.1411 33.8941 13.3726 34.1309 14.3863L32.7951 14.8126C32.672 14.2726 32.1983 13.5147 31.0236 13.5147C30.0857 13.5147 29.0436 14.1968 29.0436 15.6558C29.0436 16.9821 30.0099 17.7305 31.0425 17.7305C32.2078 17.7305 32.7004 16.9726 32.8615 16.4232L34.2067 16.8211C33.9699 17.7968 33.0509 19.1421 31.0425 19.1421Z",fill:"#5b65f4"})]}),Hq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{width:"26",height:"19",rx:"1",transform:"matrix(1 0 0 -1 23 36.5)",fill:"#E9EAFB"}),A.jsx("rect",{width:"26",height:"3",rx:"1",transform:"matrix(1 0 0 -1 23 14.5)",fill:"#5b65f4"}),A.jsx("rect",{width:"11",height:"3",rx:"0.5",transform:"matrix(1 0 0 -1 27 25.5)",fill:"#5b65f4"}),A.jsx("rect",{width:"11",height:"3",rx:"0.5",transform:"matrix(1 0 0 -1 34 31.5)",fill:"#959bee"})]}),Wq=({onOk:t})=>{const{t:e}=zr(),r=[{title:e("add.t1"),child:[{title:e("add.t2"),type:"chart-bar",icon:A.jsx(jO,{})},{title:e("add.t3"),type:"chart-line",icon:A.jsx(VO,{})},{title:e("add.t4"),type:"chart-pie",icon:A.jsx(HO,{})},{title:e("add.t5"),type:"chart-strip-bar",icon:A.jsx(WO,{})}]},{title:e("add.t6"),child:[{title:e("add.t7"),type:"statistics",icon:A.jsx(jq,{})},{title:e("add.t8"),type:"text",icon:A.jsx(Vq,{})},{title:e("add.t9"),type:"calendar",icon:A.jsx(Hq,{})}]}],[n,i]=k.useState(!1),a=o=>{i(!1),t==null||t(o)};return A.jsx(A.Fragment,{children:A.jsx(Q.Popover,{placement:"bottomRight",open:n,onOpenChange:i,content:A.jsx("div",{className:"pivot-table-modal box-widget-popover-item-container",children:r.map((o,s)=>A.jsxs("div",{className:"box-widget-popover-item-group",children:[A.jsx("p",{className:"box-widget-popover-item-group-header",children:o.title}),A.jsx("div",{className:"box-widget-popover-item-group-content",children:o.child.map((u,l)=>A.jsxs("div",{onClick:()=>{a(u.type)},className:"box-widget-popover-item",children:[A.jsx("div",{className:"img",children:u.icon}),A.jsx("div",{className:"title",children:u.title})]},l))})]},s))}),trigger:"click",children:A.jsx(Q.Button,{children:e("add.t10")})})})},$q=[{label:"等于",value:"="},{label:"早于",value:"<"},{label:"晚于",value:">"},{label:"范围内",value:"contain"},{label:"为空",value:"null"},{label:"不为空",value:"notnull"}],Gq=[{label:"等于",value:"="}],$O=[{label:"等于",value:"="},{label:"不等于",value:"!="},{label:"大于",value:">"},{label:"大于等于",value:">="},{label:"小于",value:"<"},{label:"小于等于",value:"=<"},{label:"范围内",value:"contain"},{label:"为空",value:"null"},{label:"不为空",value:"notnull"}],GO=[{label:"等于",value:"="},{label:"不等于",value:"!="},{label:"包含",value:"include"},{label:"不包含",value:"notinclude"},{label:"为空",value:"null"},{label:"不为空",value:"notnull"}],Uq={int:$O,timestamp:$q,string:GO,bool:Gq,float:$O,enum:GO};let Vh;const UO=({open:t,onClose:e,onOk:r,fieldOptions:n,value:i,getEnumDataApi:a})=>{const[o]=Q.Form.useForm(),s=k.useRef(),{t:u}=zr(),l=k.useCallback(()=>{if(i!=null&&i.conditionList){const g=JSON.parse(JSON.stringify(i==null?void 0:i.conditionList));o.setFieldsValue({conditionList:g.map(v=>(v.type==="timestamp"&&(v.val&&(v.val=ti(v.val)),v.val2&&(v.val2=ti(v.val2))),v)),conditionType:i.conditionType})}else o.setFieldsValue({conditionList:[],conditionType:"all"})},[i]),[f,c]=k.useState([]),h=({url:g,value:v,callback:m})=>{const y=JSON.stringify({q:v});a(g,y).then(b=>{m(b.data)})},d=g=>{Vh&&(clearTimeout(Vh),Vh=null),Vh=setTimeout(()=>{h(g)},300)},p=(g,v)=>{d({url:g,value:v,callback:c})};return k.useEffect(()=>{l()},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{title:u("setFilteringCriteria"),open:t,destroyOnClose:!0,width:"600px",onOk:()=>{const g=o.getFieldsValue(),v=g.conditionList?JSON.parse(JSON.stringify(g.conditionList)):"",m=g.conditionType,y={conditionList:v.map(b=>(b.type==="timestamp"&&(b.val&&(b.val=ti(b.val).format("YYYY-MM-DD")),b.val2&&(b.val2=b.val2?ti(b.val2).format("YYYY-MM-DD"):"")),b)),conditionType:m};s.current=y,e==null||e(),r==null||r(y)},onCancel:()=>{l(),e==null||e(),o.setFieldsValue(s.current)},children:A.jsxs(Q.Form,{name:"dynamicForm",form:o,initialValues:{conditionType:"all"},style:{maxWidth:600,marginTop:"30px"},children:[A.jsx(Q.Form.Item,{noStyle:!0,dependencies:["conditionList"],children:({getFieldValue:g})=>{var v;return((v=g("conditionList"))==null?void 0:v.length)>1?A.jsxs(Q.Flex,{align:"center",gap:5,style:{marginBottom:"20px"},children:[u("conformTo"),A.jsx(Q.Form.Item,{name:"conditionType",noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},options:[{label:u("all"),value:"all"},{label:u("everyone"),value:"any"}]})})," ",u("condition")]}):null}}),A.jsx(Q.Form.List,{name:"conditionList",children:(g,{add:v,remove:m})=>A.jsxs(A.Fragment,{children:[g.map(({key:y,name:b,...w})=>A.jsxs(Q.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[A.jsx(Q.Form.Item,{...w,name:[b,"field"],noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},options:n||[],onChange:C=>{const _=o.getFieldValue("conditionList"),D=n==null?void 0:n.find(S=>S.value===C);_[b].condition="=",_[b].type=D==null?void 0:D.type,_[b].val="",_[b].val2="",o.setFieldsValue({conditionList:_});const x=D==null?void 0:D.dynamic_call_enum_api;console.log("enumUrl",x),x&&h({url:x,value:"",callback:c})}})}),A.jsx(Q.Form.Item,{noStyle:!0,dependencies:[["conditionList",b,"field"]],children:({getFieldValue:C})=>{var D;const _=(D=n==null?void 0:n.find(x=>x.value===C(["conditionList",b,"field"])))==null?void 0:D.type;return A.jsx(A.Fragment,{children:A.jsx(Q.Form.Item,{...w,name:[b,"condition"],noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},options:_?Uq[_]:[]})})})}}),A.jsx(Q.Form.Item,{noStyle:!0,dependencies:[["conditionList",b,"field"],["conditionList",b,"condition"]],children:({getFieldValue:C})=>{var O,E,P;const _=(O=n==null?void 0:n.find(F=>F.value===C(["conditionList",b,"field"])))==null?void 0:O.type,D=(E=n==null?void 0:n.find(F=>F.value===C(["conditionList",b,"field"])))==null?void 0:E.enum,x=(P=n==null?void 0:n.find(F=>F.value===C(["conditionList",b,"field"])))==null?void 0:P.dynamic_call_enum_api,S=C(["conditionList",b,"condition"]);return A.jsxs(A.Fragment,{children:[["int","float"].includes(_)&&!["null","notnull"].includes(S)?A.jsxs(A.Fragment,{children:[A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.InputNumber,{style:{width:"100px"},placeholder:u("pleaseEnter")})}),S==="contain"?A.jsx(Q.Form.Item,{...w,name:[b,"val2"],noStyle:!0,children:A.jsx(Q.InputNumber,{style:{width:"100px",marginLeft:"5px"},placeholder:u("pleaseEnter")})}):null]}):null,_==="timestamp"&&!["null","notnull"].includes(S)?A.jsxs(A.Fragment,{children:[A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.DatePicker,{style:{width:"150px"}})}),S==="contain"?A.jsx(Q.Form.Item,{...w,name:[b,"val2"],noStyle:!0,children:A.jsx(Q.DatePicker,{style:{width:"150px",marginLeft:"5px"}})}):null]}):null,["string"].includes(_)&&!["null","notnull"].includes(S)?A.jsxs(A.Fragment,{children:[A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.Input,{style:{width:"150px"},placeholder:u("pleaseEnter")})}),S==="contain"?A.jsx(Q.Form.Item,{...w,name:[b,"val2"],noStyle:!0,children:A.jsx(Q.Input,{style:{width:"150px",marginLeft:"5px"},placeholder:u("pleaseEnter")})}):null]}):null,["bool"].includes(_)?A.jsx(A.Fragment,{children:A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.Switch,{})})}):null,["enum"].includes(_)&&!["null","notnull"].includes(S)?A.jsx(A.Fragment,{children:A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:(D==null?void 0:D.length)>0?A.jsx(Q.Select,{style:{width:"150px"},options:D}):x?A.jsx(Q.Select,{style:{width:"150px"},showSearch:!0,defaultActiveFirstOption:!1,suffixIcon:null,filterOption:!1,onSearch:F=>{p(x,F)},notFoundContent:null,options:(f||[]).map(F=>({value:F.value,label:F.label}))}):null})}):null]})}}),A.jsx(ww,{onClick:()=>m(b)})]},y)),A.jsx(Q.Form.Item,{children:A.jsx(Q.Button,{type:"dashed",onClick:()=>{v({field:n==null?void 0:n[0].value,condition:"=",type:n==null?void 0:n[0].type})},block:!0,icon:A.jsx(Dw,{}),children:u("addCondition")})})]})})]})})})},qq=({selectModuleData:t,onAllValuesChange:e,getEnumDataApi:r})=>{const{globalData:n}=Oo(),[i]=Q.Form.useForm(),[a,o]=k.useState(),[s,u]=k.useState(!1),l=k.useRef(),[f,c]=k.useState(),[h,d]=k.useState(0),{t:p}=zr(),g={dataSourceId:"",statisticalMethod:"recordTotal",field:""},v=()=>{setTimeout(()=>{console.log("conditionDataRef.current",l.current),e==null||e({...i.getFieldsValue(),conditionData:l.current})})},m=b=>{var C,_;const w=(_=(C=n==null?void 0:n.sourceData)==null?void 0:C.find(D=>D.value===b))==null?void 0:_.fields;o(w)},y=b=>{var w;c(b),l.current=b,d(((w=b==null?void 0:b.conditionList)==null?void 0:w.length)||0)};return k.useEffect(()=>{var b,w;if(t!=null&&t.customData){const C=t.customData;i.setFieldsValue(C),o(C==null?void 0:C.dataSourceId),m(C==null?void 0:C.dataSourceId)}else{const C=(b=n==null?void 0:n.sourceData)==null?void 0:b[0];i.setFieldsValue({...g,dataSourceId:C==null?void 0:C.value}),m(C==null?void 0:C.value),v()}y((w=t==null?void 0:t.customData)==null?void 0:w.conditionData)},[t,n]),A.jsxs(A.Fragment,{children:[A.jsxs(Q.Form,{form:i,name:"customData",layout:"vertical",initialValues:g,children:[A.jsx(Q.Form.Item,{label:p("dataSource"),name:"dataSourceId",children:A.jsx(Q.Select,{options:n==null?void 0:n.sourceData,onChange:b=>{i.setFieldsValue({statisticalMethod:"recordTotal"}),m(b),v()}})}),A.jsxs(Q.Form.Item,{label:p("dataRange"),children:[A.jsx(Q.Button,{style:{marginLeft:"-15px"},onClick:()=>{u(!0)},type:"link",children:p("filterData")}),h>0?`${p("selectNcondition",{n:h})}`:null]}),A.jsx(Q.Divider,{style:{borderColor:"#e2e2e2",marginTop:0}}),A.jsx(Q.Form.Item,{label:p("statisticstMethods"),name:"statisticalMethod",children:A.jsx(Q.Select,{onChange:b=>{i.setFieldsValue({field:b==="fieldValue"?a==null?void 0:a[0].value:"",statisticalType:"sum"}),v()},options:[{value:"recordTotal",label:p("statisticstRecordNum")},{value:"fieldValue",label:p("statisticstFieldVal")}]})}),A.jsx(Q.Form.Item,{dependencies:["statisticalMethod"],children:({getFieldValue:b})=>b("statisticalMethod")==="fieldValue"?A.jsx(Q.Form.Item,{label:p("selectField"),children:A.jsxs(Q.Space.Compact,{children:[A.jsx(Q.Form.Item,{noStyle:!0,name:"field",children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{v()},options:a})}),A.jsx(Q.Form.Item,{name:"statisticalType",noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{v()},options:[{value:"sum",label:p("sumVal")},{value:"max",label:p("maxVal")},{value:"min",label:p("minVal")},{value:"average",label:p("averageVal")}]})})]})}):null})]}),A.jsx(UO,{open:s,value:f,fieldOptions:a,getEnumDataApi:r,onClose:()=>{u(!1)},onOk:b=>{y(b),v()}})]})},Yq=({value:t,onChange:e})=>{const[r,n]=k.useState(),i=["#373c43","#3370ff","#4954e6","#34c724","#14c0ff","#ffc60a","#f80","#f76964"];return k.useEffect(()=>{n(t)},[t]),A.jsx("div",{className:"pane-item-body item-body-column",children:A.jsx("div",{className:"panel-single-color-selector",children:i.map((a,o)=>A.jsxs("div",{className:"panel-single-color-selector-color-item",onClick:()=>{n(a),e==null||e(a)},children:[A.jsx("div",{className:"panel-single-color-selector-color-item-background",style:{background:a}}),r===a?A.jsx("span",{className:"panel-icon",children:A.jsx(mw,{})}):null]},o))})})},Xq=({selectModuleData:t,onAllValuesChange:e})=>{const[r]=Q.Form.useForm(),{t:n}=zr(),i={color:"#373c43",unit:"1",precision:"",desc:""},a=()=>{setTimeout(()=>{e==null||e(r.getFieldsValue())})};return k.useEffect(()=>{t!=null&&t.customeStyle?r.setFieldsValue(t.customeStyle):r.setFieldsValue(i)},[t]),A.jsxs(Q.Form,{form:r,name:"customeStyle",layout:"vertical",initialValues:i,children:[A.jsx(Q.Form.Item,{label:n("statistics.t1"),name:"color",children:A.jsx(Yq,{onChange:()=>{a()}})}),A.jsx(Q.Form.Item,{label:n("statistics.t2"),extra:n("statistics.t3"),children:A.jsxs(Q.Space.Compact,{children:[A.jsx(Q.Form.Item,{name:"precision",noStyle:!0,children:A.jsx(Q.InputNumber,{min:1,max:10,style:{width:"60%"},placeholder:n("statistics.t4"),onChange:()=>{a()}})}),A.jsx(Q.Form.Item,{name:"unit",noStyle:!0,children:A.jsxs(Q.Select,{onChange:()=>{a()},children:[A.jsx(Q.Select.Option,{value:"1",children:n("statistics.t5")}),A.jsx(Q.Select.Option,{value:"2",children:n("statistics.t6")}),A.jsx(Q.Select.Option,{value:"3",children:n("statistics.t7")}),A.jsx(Q.Select.Option,{value:"4",children:n("statistics.t8")}),A.jsx(Q.Select.Option,{value:"5",children:n("statistics.t9")})]})})]})}),A.jsx(Q.Form.Item,{label:n("statistics.t10"),name:"desc",children:A.jsx(Q.Input,{onChange:()=>{a()}})})]})},Kq=({open:t,onClose:e,onOk:r,moduleDataApi:n,selectModuleData:i,getEnumDataApi:a})=>{const{t:o}=zr(),[s,u]=k.useState(),[l,f]=k.useState(),c=()=>{e==null||e()};return k.useEffect(()=>{i&&(u(i==null?void 0:i.customData),f(i==null?void 0:i.customeStyle))},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{width:"65%",title:o("statisticsText"),footer:null,open:t,onOk:c,onCancel:e,closeIcon:A.jsx(pf,{style:{marginTop:"10px"}}),styles:{header:{padding:"20px",borderBottom:"1px solid #dee0e3",marginBottom:0},content:{padding:0},body:{overflowY:"auto",flex:1}},children:A.jsxs("div",{className:"config-widget-dialog-container",children:[A.jsx("div",{className:"config-widget-dialog-content",children:A.jsx("div",{className:"config-widget-dialog-preview",children:A.jsx(Hw,{customData:s,customeStyle:l,moduleDataApi:n})})}),A.jsxs("div",{className:"config-widget-dialog-panel",children:[A.jsx("div",{className:"bitable-dashboard edit-panel-container",children:A.jsx(Q.Tabs,{defaultActiveKey:"1",items:[{key:"1",label:o("typeData"),children:A.jsx(qq,{selectModuleData:i,getEnumDataApi:a,onAllValuesChange:h=>{u(h)}})},{key:"2",label:o("customStyle"),children:A.jsx(Xq,{selectModuleData:i,onAllValuesChange:h=>{f(h)}})}]})}),A.jsx("div",{className:"button-container",children:A.jsx(Q.Button,{type:"primary",onClick:()=>{r==null||r({id:i==null?void 0:i.id,customData:s,customeStyle:l})},children:o("confirm")})})]})]})})})},Zq=({selectModuleData:t,onAllValuesChange:e})=>{const{globalData:r}=Oo(),[n]=Q.Form.useForm(),[i,a]=k.useState(),[o,s]=k.useState(),{t:u}=zr(),l={dataSourceId:"",startDateField:"",endDateField:"",titleField:""},f=()=>{setTimeout(()=>{e==null||e(n.getFieldsValue())})},c=h=>{var p,g;const d=(g=(p=r==null?void 0:r.sourceData)==null?void 0:p.find(v=>v.value===h))==null?void 0:g.fields;a(d),s(d==null?void 0:d.filter(v=>v.type==="timestamp"))};return k.useEffect(()=>{var h,d,p,g,v;if(t!=null&&t.customData)n.setFieldsValue(t.customData),c((h=t==null?void 0:t.customData)==null?void 0:h.dataSourceId);else{const m=(d=r==null?void 0:r.sourceData)==null?void 0:d[0],y=(p=m==null?void 0:m.fields)==null?void 0:p.filter(b=>b.type==="timestamp");n.setFieldsValue({...l,dataSourceId:m==null?void 0:m.value,titleField:(v=(g=m==null?void 0:m.fields)==null?void 0:g[0])==null?void 0:v.value,startDateField:y==null?void 0:y[0].value,endDateField:y==null?void 0:y[0].value}),c(m==null?void 0:m.value),f()}},[t,r]),A.jsxs(Q.Form,{form:n,name:"customData",labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:l,children:[A.jsx("div",{style:{fontSize:"14px",marginBottom:"5px"},children:u("data")}),A.jsx(Q.Form.Item,{label:u("dataSource"),name:"dataSourceId",children:A.jsx(Q.Select,{options:r==null?void 0:r.sourceData,onChange:h=>{c(h),f()}})}),A.jsx(Q.Divider,{orientation:"left",orientationMargin:"0",children:u("calendar.t1")}),A.jsx(Q.Form.Item,{label:u("calendar.t2"),name:"startDateField",children:A.jsx(Q.Select,{onChange:()=>{f()},options:o})}),A.jsx(Q.Form.Item,{label:u("calendar.t3"),name:"endDateField",children:A.jsx(Q.Select,{onChange:()=>{f()},options:o})}),A.jsx(Q.Form.Item,{label:u("calendar.t4"),name:"titleField",children:A.jsx(Q.Select,{onChange:()=>{f()},options:i})})]})},Jq=({open:t,onClose:e,onOk:r,moduleDataApi:n,selectModuleData:i})=>{const{t:a}=zr(),[o,s]=k.useState(),u=()=>{e==null||e()};return k.useEffect(()=>{i&&s(i==null?void 0:i.customData)},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{width:"65%",title:a("calendarText"),footer:null,open:t,onOk:u,onCancel:e,closeIcon:A.jsx(pf,{style:{marginTop:"10px"}}),styles:{header:{padding:"20px",borderBottom:"1px solid #dee0e3",marginBottom:0},content:{padding:0},body:{overflowY:"auto",flex:1}},children:A.jsxs("div",{className:"config-widget-dialog-container",children:[A.jsx("div",{className:"config-widget-dialog-content",children:A.jsx("div",{className:"config-widget-dialog-preview",style:{height:"50vh"},children:A.jsx(Jw,{customData:o,moduleDataApi:n})})}),A.jsxs("div",{className:"config-widget-dialog-panel",children:[A.jsx("div",{className:"bitable-dashboard edit-panel-container",children:A.jsx(Zq,{selectModuleData:i,onAllValuesChange:l=>{s(l)}})}),A.jsx("div",{className:"button-container",children:A.jsx(Q.Button,{type:"primary",onClick:()=>{r==null||r({id:i==null?void 0:i.id,customData:o})},children:a("confirm")})})]})]})})})},Qq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"17",y:"8",width:"6",height:"15.5",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"17",y:"24.5",width:"6",height:"15.5",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"28",y:"8",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"28",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"39",y:"8",width:"6",height:"19",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"39",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"50",y:"8",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"50",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"})]}),eY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"17",y:"21",width:"6",height:"6",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"17",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"28",y:"24",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"28",y:"34",width:"6",height:"6",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"39",y:"8",width:"6",height:"19",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"39",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"50",y:"18",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"50",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"})]}),tY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"58",y:"11",width:"4",height:"15",rx:"0.5",transform:"rotate(90 58 11)",fill:"#959bee"}),A.jsx("rect",{x:"42",y:"11",width:"4",height:"28",rx:"0.5",transform:"rotate(90 42 11)",fill:"#5b65f5"}),A.jsx("rect",{x:"58",y:"18",width:"4",height:"21.5",rx:"0.5",transform:"rotate(90 58 18)",fill:"#959bee"}),A.jsx("rect",{x:"35.5",y:"18",width:"4",height:"21.5",rx:"0.5",transform:"rotate(90 35.5 18)",fill:"#5b65f5"}),A.jsx("rect",{x:"58",y:"25",width:"4",height:"34",rx:"0.5",transform:"rotate(90 58 25)",fill:"#959bee"}),A.jsx("rect",{x:"23",y:"25",width:"4",height:"9",rx:"0.5",transform:"rotate(90 23 25)",fill:"#5b65f5"}),A.jsx("rect",{x:"58",y:"32",width:"4",height:"17",rx:"0.5",transform:"rotate(90 58 32)",fill:"#959bee"}),A.jsx("rect",{x:"40",y:"32",width:"4",height:"26",rx:"0.5",transform:"rotate(90 40 32)",fill:"#5b65f5"})]}),rY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"40",y:"11",width:"4",height:"15",rx:"0.5",transform:"rotate(90 40 11)",fill:"#959bee"}),A.jsx("rect",{x:"24",y:"11",width:"4",height:"8",rx:"0.5",transform:"rotate(90 24 11)",fill:"#5b65f5"}),A.jsx("rect",{x:"48",y:"18",width:"4",height:"15.5",rx:"0.5",transform:"rotate(90 48 18)",fill:"#959bee"}),A.jsx("rect",{x:"31.5",y:"18",width:"4",height:"15.5",rx:"0.5",transform:"rotate(90 31.5 18)",fill:"#5b65f5"}),A.jsx("rect",{x:"60",y:"25",width:"4",height:"34",rx:"0.5",transform:"rotate(90 60 25)",fill:"#959bee"}),A.jsx("rect",{x:"25",y:"25",width:"4",height:"9",rx:"0.5",transform:"rotate(90 25 25)",fill:"#5b65f5"}),A.jsx("rect",{x:"43",y:"32",width:"4",height:"13",rx:"0.5",transform:"rotate(90 43 32)",fill:"#959bee"}),A.jsx("rect",{x:"29",y:"32",width:"4",height:"13",rx:"0.5",transform:"rotate(90 29 32)",fill:"#5b65f5"})]}),nY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M15.5 33.5C20.2023 32.3804 23.5007 28.5533 25.7095 24.6682C28.3082 20.0974 34.0857 17.3668 38.758 19.7783L39.8066 20.3195C42.9001 21.9162 46.671 21.329 49.1326 18.8674L58 10",stroke:"#959bee",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),A.jsx("path",{d:"M16.5 15L26.844 27.6427C28.7759 30.0039 31.8825 31.0607 34.8535 30.3675L42.3359 28.6216C44.0629 28.2187 45.8748 28.401 47.4869 29.1398L57 33.5",stroke:"#5b65f4",strokeWidth:"1.5",strokeLinecap:"round"})]}),iY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M20 24C20 32.8366 27.1634 40 36 40C44.8366 40 52 32.8366 52 24C52 15.1634 44.8366 8 36 8C27.1634 8 20 15.1634 20 24ZM46.3944 24C46.3944 29.7407 41.7407 34.3944 36 34.3944C30.2593 34.3944 25.6056 29.7407 25.6056 24C25.6056 18.2593 30.2593 13.6056 36 13.6056C41.7407 13.6056 46.3944 18.2593 46.3944 24Z",fill:"#5b65f4"}),A.jsx("path",{d:"M52 24C52 19.7565 50.3143 15.6869 47.3137 12.6863C44.3131 9.68571 40.2435 8 36 8V13.6056C38.7568 13.6056 41.4006 14.7007 43.35 16.65C45.2993 18.5994 46.3944 21.2432 46.3944 24H52Z",fill:"#959bee"}),A.jsx("path",{d:"M52 24C52 20.9896 51.1507 18.0403 49.5497 15.4909L44.8026 18.4721C45.8427 20.1283 46.3944 22.0443 46.3944 24H52Z",fill:"#cdcff9"})]}),aY=({selectModuleData:t,onAllValuesChange:e,onValuesChange:r,getEnumDataApi:n})=>{const{globalData:i}=Oo(),[a]=Q.Form.useForm(),[o,s]=k.useState(),[u,l]=k.useState(!1),f=k.useRef(),[c,h]=k.useState(),[d,p]=k.useState(0),{t:g}=zr(),v=Q.Form.useWatch("type",a),m={dataSourceId:"",yAxis:"recordTotal",chartOptions:["legend","label","axis","splitLine"]},y=()=>{setTimeout(()=>{e==null||e({...a.getFieldsValue(),conditionData:f.current})})},b=C=>{var D,x,S;console.log(" globalData?.sourceData",i==null?void 0:i.sourceData),console.log(" globalData?.sourceData",C);const _=(x=(D=i==null?void 0:i.sourceData)==null?void 0:D.find(O=>O.value===C))==null?void 0:x.fields;console.log(" globalData?.sourceData3",_),a.setFieldsValue({xAxis:(S=_==null?void 0:_[0])==null?void 0:S.value}),s(_)},w=C=>{var _;h(C),f.current=C,p(((_=C==null?void 0:C.conditionList)==null?void 0:_.length)||0)};return k.useEffect(()=>{var C,_;if(t!=null&&t.customData){const D=t.customData;a.setFieldsValue(D),s(D==null?void 0:D.dataSourceId),b(D==null?void 0:D.dataSourceId)}else{const D=(C=i==null?void 0:i.sourceData)==null?void 0:C[0];a.setFieldsValue({...m,dataSourceId:D==null?void 0:D.value,type:t==null?void 0:t.type}),b(D==null?void 0:D.value),y()}w((_=t==null?void 0:t.customData)==null?void 0:_.conditionData)},[t,i]),A.jsxs("div",{style:{height:"50vh",overflowX:"auto"},children:[A.jsxs(Q.Form,{form:a,name:"customData",layout:"vertical",onValuesChange:r,initialValues:m,children:[A.jsx(Q.Form.Item,{label:g("dataSource"),name:"dataSourceId",children:A.jsx(Q.Select,{options:i==null?void 0:i.sourceData,onChange:C=>{a.setFieldsValue({yAxis:"recordTotal"}),b(C),y()}})}),A.jsxs(Q.Form.Item,{label:g("dataRange"),children:[A.jsx(Q.Button,{style:{marginLeft:"-15px"},onClick:()=>{l(!0)},type:"link",children:g("filterData")}),d>0?`${g("selectNcondition",{n:d})}`:null]}),A.jsx(Q.Form.Item,{label:g("chart.t1"),name:"type",children:A.jsx(Q.Select,{onChange:()=>{y()},options:[{label:g("chart.t2"),value:"chart-bar",icon:A.jsx(jO,{})},{label:g("chart.t3"),value:"chart-bar-pile",icon:A.jsx(eY,{})},{label:g("chart.t4"),value:"chart-bar-percentage",icon:A.jsx(Qq,{})},{label:g("chart.t5"),value:"chart-strip-bar",icon:A.jsx(WO,{})},{label:g("chart.t6"),value:"chart-strip-bar-pile",icon:A.jsx(rY,{})},{label:g("chart.t7"),value:"chart-strip-bar-percentage",icon:A.jsx(tY,{})},{label:g("chart.t8"),value:"chart-line",icon:A.jsx(VO,{})},{label:g("chart.t9"),value:"chart-line-smooth",icon:A.jsx(nY,{})},{label:g("chart.t10"),value:"chart-pie",icon:A.jsx(HO,{})},{label:g("chart.t11"),value:"chart-pie-circular",icon:A.jsx(iY,{})}],optionRender:C=>A.jsxs(Q.Flex,{align:"center",children:[A.jsx("span",{role:"img",style:{marginTop:"5px"},"aria-label":C.data.label,children:C.data.icon}),C.data.label]})})}),A.jsx(Q.Form.Item,{name:"chartOptions",label:g("chart.t12"),children:A.jsxs(Q.Checkbox.Group,{onChange:()=>{y()},children:[A.jsx(Q.Checkbox,{value:"legend",style:{lineHeight:"32px"},children:g("chart.t13")}),A.jsx(Q.Checkbox,{value:"label",style:{lineHeight:"32px"},children:g("chart.t14")}),["chart-pie","chart-pie-circular"].includes(v)?null:A.jsxs(A.Fragment,{children:[A.jsx(Q.Checkbox,{value:"axis",style:{lineHeight:"32px"},children:g("chart.t15")}),A.jsx(Q.Checkbox,{value:"splitLine",style:{lineHeight:"32px"},children:g("chart.t16")})]})]})}),A.jsx(Q.Divider,{style:{borderColor:"#e2e2e2",marginTop:0}}),A.jsx(Q.Form.Item,{label:v!=null&&v.includes("pie")?g("chart.t17"):g("chart.t18"),name:"xAxis",children:A.jsx(Q.Select,{onChange:()=>{y()},options:o})}),A.jsx(Q.Form.Item,{label:v!=null&&v.includes("pie")?g("chart.t19"):g("chart.t20"),name:"yAxis",children:A.jsx(Q.Select,{onChange:C=>{a.setFieldsValue({yAxisField:C==="fieldValue"?o==null?void 0:o[0].value:"",yAxisFieldType:"sum"}),y()},options:[{value:"recordTotal",label:g("statisticstRecordNum")},{value:"fieldValue",label:g("statisticstFieldVal")}]})}),A.jsx(Q.Form.Item,{dependencies:["yAxis"],children:({getFieldValue:C})=>C("yAxis")==="fieldValue"?A.jsx(Q.Form.Item,{label:g("selectField"),children:A.jsxs(Q.Space.Compact,{children:[A.jsx(Q.Form.Item,{noStyle:!0,name:"yAxisField",children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{y()},options:o})}),A.jsx(Q.Form.Item,{name:"yAxisFieldType",noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{y()},options:[{value:"sum",label:g("sumVal")},{value:"max",label:g("maxVal")},{value:"min",label:g("minVal")},{value:"average",label:g("averageVal")}]})})]})}):null})]}),A.jsx(UO,{open:u,value:c,fieldOptions:o,getEnumDataApi:n,onClose:()=>{l(!1)},onOk:C=>{w(C),y()}})]})},oY=({selectModuleData:t,onAllValuesChange:e,customeStylesRef:r})=>{const[n]=Q.Form.useForm(),{t:i}=zr(),a={xtitle:"",ytitle:"",xchartOptions:[],ychartOptions:[]},o=()=>{setTimeout(()=>{e==null||e(n.getFieldsValue())})};return k.useEffect(()=>{t!=null&&t.customeStyle?n.setFieldsValue(t.customeStyle):n.setFieldsValue(a)},[t]),k.useImperativeHandle(r,()=>({reset(){n.setFieldsValue(a),e==null||e(a)}})),A.jsx("div",{style:{height:"50vh",overflowX:"auto"},children:A.jsxs(Q.Form,{form:n,name:"customeStyle",layout:"vertical",initialValues:a,children:[A.jsx(Q.Divider,{orientation:"left",orientationMargin:"0",children:i("chart.t21")}),A.jsx(Q.Form.Item,{label:i("chart.t22"),name:"xtitle",children:A.jsx(Q.Input,{onChange:()=>{o()}})}),A.jsx(Q.Form.Item,{name:"xchartOptions",label:i("chart.t23"),children:A.jsx(Q.Checkbox.Group,{onChange:()=>{o()},children:A.jsxs(Q.Row,{children:[A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"label",style:{lineHeight:"32px"},children:i("chart.t24")})}),A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"axisLine",style:{lineHeight:"32px"},children:i("chart.t25")})})]})})}),A.jsx(Q.Divider,{orientation:"left",orientationMargin:"0",children:i("chart.t26")}),A.jsx(Q.Form.Item,{label:i("chart.t27"),name:"ytitle",children:A.jsx(Q.Input,{onChange:()=>{o()}})}),A.jsx(Q.Form.Item,{name:"ychartOptions",label:i("chart.t28"),children:A.jsx(Q.Checkbox.Group,{onChange:()=>{o()},children:A.jsxs(Q.Row,{children:[A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"label",style:{lineHeight:"32px"},children:i("chart.t29")})}),A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"axisLine",style:{lineHeight:"32px"},children:i("chart.t30")})})]})})})]})})},sY=({open:t,onClose:e,onOk:r,moduleDataApi:n,selectModuleData:i})=>{const{t:a}=zr(),[o,s]=k.useState(),[u,l]=k.useState(),f=k.useRef(),c=()=>{e==null||e()};return k.useEffect(()=>{i&&(s(i==null?void 0:i.customData),l(i==null?void 0:i.customeStyle))},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{width:"65%",title:a("chartText"),footer:null,open:t,onOk:c,onCancel:e,closeIcon:A.jsx(pf,{style:{marginTop:"10px"}}),styles:{header:{padding:"20px",borderBottom:"1px solid #dee0e3",marginBottom:0},content:{padding:0},body:{overflowY:"auto",flex:1}},children:A.jsxs("div",{className:"config-widget-dialog-container",children:[A.jsx("div",{className:"config-widget-dialog-content",children:A.jsx("div",{className:"config-widget-dialog-preview",children:A.jsx(zO,{customData:o,customeStyle:u,moduleDataApi:n})})}),A.jsxs("div",{className:"config-widget-dialog-panel",children:[A.jsx("div",{className:"bitable-dashboard edit-panel-container",children:A.jsx(Q.Tabs,{defaultActiveKey:"1",items:[{key:"1",label:a("typeData"),children:A.jsx(aY,{selectModuleData:i,onAllValuesChange:h=>{s(h)},onValuesChange:h=>{var d;Object.keys(h).includes("type")&&((d=f.current)==null||d.reset(),l({}))}})},{key:"2",label:a("customStyle"),children:A.jsx(oY,{customeStylesRef:f,selectModuleData:i,onAllValuesChange:h=>{l(h)}})}]})}),A.jsx("div",{className:"button-container",children:A.jsx(Q.Button,{type:"primary",onClick:()=>{r==null||r({id:i==null?void 0:i.id,type:i==null?void 0:i.type,customData:o,customeStyle:u})},children:a("confirm")})})]})]})})})},Me=t=>typeof t=="string",dl=()=>{let t,e;const r=new Promise((n,i)=>{t=n,e=i});return r.resolve=t,r.reject=e,r},qO=t=>t==null?"":""+t,uY=(t,e,r)=>{t.forEach(n=>{e[n]&&(r[n]=e[n])})},lY=/###/g,YO=t=>t&&t.indexOf("###")>-1?t.replace(lY,"."):t,XO=t=>!t||Me(t),vl=(t,e,r)=>{const n=Me(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(XO(t))return{};const a=YO(n[i]);!t[a]&&r&&(t[a]=new r),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++i}return XO(t)?{}:{obj:t,k:YO(n[i])}},KO=(t,e,r)=>{const{obj:n,k:i}=vl(t,e,Object);if(n!==void 0||e.length===1){n[i]=r;return}let a=e[e.length-1],o=e.slice(0,e.length-1),s=vl(t,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=vl(t,o,Object),s&&s.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=r},fY=(t,e,r,n)=>{const{obj:i,k:a}=vl(t,e,Object);i[a]=i[a]||[],i[a].push(r)},Hh=(t,e)=>{const{obj:r,k:n}=vl(t,e);if(r)return r[n]},cY=(t,e,r)=>{const n=Hh(t,r);return n!==void 0?n:Hh(e,r)},ZO=(t,e,r)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?Me(t[n])||t[n]instanceof String||Me(e[n])||e[n]instanceof String?r&&(t[n]=e[n]):ZO(t[n],e[n],r):t[n]=e[n]);return t},As=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hY={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const dY=t=>Me(t)?t.replace(/[&<>"'\/]/g,e=>hY[e]):t;class vY{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const pY=[" ",",","?","!",";"],gY=new vY(20),mY=(t,e,r)=>{e=e||"",r=r||"";const n=pY.filter(o=>e.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=gY.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(t);if(!a){const o=t.indexOf(r);o>0&&!i.test(t.substring(0,o))&&(a=!0)}return a},ry=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const n=e.split(r);let i=t;for(let a=0;a<n.length;){if(!i||typeof i!="object")return;let o,s="";for(let u=a;u<n.length;++u)if(u!==a&&(s+=r),s+=n[u],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<n.length-1)continue;a+=u-a+1;break}i=o}return i},Wh=t=>t&&t.replace("_","-"),yY={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class $h{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,r)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=e||yY,this.options=r,this.debug=r.debug}log(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}warn(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}error(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"error","")}deprecate(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(e,r,n,i){return i&&!this.debug?null:(Me(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[r](e))}create(e){return new $h(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new $h(this.logger,e)}}var Wn=new $h;class Gh{constructor(){this.observers={}}on(e,r){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[s,u]=o;for(let l=0;l<u;l++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[s,u]=o;for(let l=0;l<u;l++)s.apply(s,[e,...n])})}}class JO extends Gh{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,r],n&&(Array.isArray(n)?s.push(...n):Me(n)&&a?s.push(...n.split(a)):s.push(n)));const u=Hh(this.data,s);return!u&&!r&&!n&&e.indexOf(".")>-1&&(e=s[0],r=s[1],n=s.slice(2).join(".")),u||!o||!Me(n)?u:ry(this.data&&this.data[e]&&this.data[e][r],n,a)}addResource(e,r,n,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[e,r];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(s=e.split("."),i=r,r=s[1]),this.addNamespaces(r),KO(this.data,s,i),a.silent||this.emit("added",e,r,n,i)}addResources(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in n)(Me(n[a])||Array.isArray(n[a]))&&this.addResource(e,r,a,n[a],{silent:!0});i.silent||this.emit("added",e,r,n)}addResourceBundle(e,r,n,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[e,r];e.indexOf(".")>-1&&(s=e.split("."),i=n,n=r,r=s[1]),this.addNamespaces(r);let u=Hh(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?ZO(u,n,a):u={...u,...n},KO(this.data,s,u),o.silent||this.emit("added",e,r,n)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,r)}:this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var QO={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,n,i){return t.forEach(a=>{this.processors[a]&&(e=this.processors[a].process(e,r,n,i))}),e}};const eP={};class Uh extends Gh{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),uY(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Wn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,r);return n&&n.res!==void 0}extractFromKey(e,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!mY(e,n,i);if(o&&!s){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:a};const l=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(l[0])>-1)&&(a=l.shift()),e=l.join(i)}return Me(a)&&(a=[a]),{key:e,namespaces:a}}translate(e,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(e[e.length-1],r),u=s[s.length-1],l=r.lng||this.language,f=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&l.toLowerCase()==="cimode"){if(f){const w=r.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${w}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${w}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:o}const c=this.resolve(e,r);let h=c&&c.res;const d=c&&c.usedKey||o,p=c&&c.exactUsedKey||o,g=Object.prototype.toString.apply(h),v=["[object Number]","[object Function]","[object RegExp]"],m=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=!Me(h)&&typeof h!="boolean"&&typeof h!="number";if(y&&h&&b&&v.indexOf(g)<0&&!(Me(m)&&Array.isArray(h))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,h,{...r,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(c.res=w,c.usedParams=this.getUsedParamsDetails(r),c):w}if(a){const w=Array.isArray(h),C=w?[]:{},_=w?p:d;for(const D in h)if(Object.prototype.hasOwnProperty.call(h,D)){const x=`${_}${a}${D}`;C[D]=this.translate(x,{...r,joinArrays:!1,ns:s}),C[D]===x&&(C[D]=h[D])}h=C}}else if(y&&Me(m)&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,e,r,n));else{let w=!1,C=!1;const _=r.count!==void 0&&!Me(r.count),D=Uh.hasDefaultValue(r),x=_?this.pluralResolver.getSuffix(l,r.count,r):"",S=r.ordinal&&_?this.pluralResolver.getSuffix(l,r.count,{ordinal:!1}):"",O=_&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),E=O&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${x}`]||r[`defaultValue${S}`]||r.defaultValue;!this.isValidLookup(h)&&D&&(w=!0,h=E),this.isValidLookup(h)||(C=!0,h=o);const F=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:h,B=D&&E!==h&&this.options.updateMissing;if(C||w||B){if(this.logger.log(B?"updateKey":"missingKey",l,u,o,B?E:h),a){const z=this.resolve(o,{...r,keySeparator:!1});z&&z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let M=[];const I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&I&&I[0])for(let z=0;z<I.length;z++)M.push(I[z]);else this.options.saveMissingTo==="all"?M=this.languageUtils.toResolveHierarchy(r.lng||this.language):M.push(r.lng||this.language);const j=(z,W,R)=>{const U=D&&R!==h?R:F;this.options.missingKeyHandler?this.options.missingKeyHandler(z,u,W,U,B,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(z,u,W,U,B,r),this.emit("missingKey",z,u,W,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?M.forEach(z=>{const W=this.pluralResolver.getSuffixes(z,r);O&&r[`defaultValue${this.options.pluralSeparator}zero`]&&W.indexOf(`${this.options.pluralSeparator}zero`)<0&&W.push(`${this.options.pluralSeparator}zero`),W.forEach(R=>{j([z],o+R,r[`defaultValue${R}`]||E)})}):j(M,o,E))}h=this.extendTranslation(h,e,r,c,n),C&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${u}:${o}`),(C||w)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${o}`:o,w?h:void 0):h=this.options.parseMissingKeyHandler(h))}return i?(c.res=h,c.usedParams=this.getUsedParamsDetails(r),c):h}extendTranslation(e,r,n,i,a){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const l=Me(e)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(l){const h=e.match(this.interpolator.nestingRegexp);f=h&&h.length}let c=n.replace&&!Me(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language||i.usedLng,n),l){const h=e.match(this.interpolator.nestingRegexp),d=h&&h.length;f<d&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];return a&&a[0]===d[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${r[0]}`),null):o.translate(...d,r)},n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,u=Me(s)?[s]:s;return e!=null&&u&&u.length&&n.applyPostProcessor!==!1&&(e=QO.handle(u,e,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,a,o,s;return Me(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(u,r),f=l.key;i=f;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const h=r.count!==void 0&&!Me(r.count),d=h&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),p=r.context!==void 0&&(Me(r.context)||typeof r.context=="number")&&r.context!=="",g=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);c.forEach(v=>{this.isValidLookup(n)||(s=v,!eP[`${g[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(eP[`${g[0]}-${v}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(m=>{if(this.isValidLookup(n))return;o=m;const y=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(y,f,m,v,r);else{let w;h&&(w=this.pluralResolver.getSuffix(m,r.count,r));const C=`${this.options.pluralSeparator}zero`,_=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(y.push(f+w),r.ordinal&&w.indexOf(_)===0&&y.push(f+w.replace(_,this.options.pluralSeparator)),d&&y.push(f+C)),p){const D=`${f}${this.options.contextSeparator}${r.context}`;y.push(D),h&&(y.push(D+w),r.ordinal&&w.indexOf(_)===0&&y.push(D+w.replace(_,this.options.pluralSeparator)),d&&y.push(D+C))}}let b;for(;b=y.pop();)this.isValidLookup(n)||(a=b,n=this.getResource(m,v,b,r))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,r,n,i):this.resourceStore.getResource(e,r,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Me(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(e){const r="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r===n.substring(0,r.length)&&e[n]!==void 0)return!0;return!1}}const ny=t=>t.charAt(0).toUpperCase()+t.slice(1);class tP{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wn.create("languageUtils")}getScriptPartFromCode(e){if(e=Wh(e),!e||e.indexOf("-")<0)return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=Wh(e),!e||e.indexOf("-")<0)return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(Me(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(e)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=ny(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=ny(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=ny(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&e.forEach(n=>{if(r)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),Me(e)&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let n=e[r];return n||(n=e[this.getScriptPartFromCode(r)]),n||(n=e[this.formatLanguageCode(r)]),n||(n=e[this.getLanguagePartFromCode(r)]),n||(n=e.default),n||[]}toResolveHierarchy(e,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],e),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Me(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):Me(e)&&a(this.formatLanguageCode(e)),n.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}let bY=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],CY={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const wY=["v1","v2","v3"],_Y=["v4"],rP={zero:0,one:1,two:2,few:3,many:4,other:5},DY=()=>{const t={};return bY.forEach(e=>{e.lngs.forEach(r=>{t[r]={numbers:e.nr,plurals:CY[e.fc]}})}),t};class xY{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=r,this.logger=Wn.create("pluralResolver"),(!this.options.compatibilityJSON||_Y.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=DY(),this.pluralRulesCache={}}addRule(e,r){this.rules[e]=r}clearCache(){this.pluralRulesCache={}}getRule(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Wh(e==="dev"?"en":e),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];const o=new Intl.PluralRules(n,{type:i});return this.pluralRulesCache[a]=o,o}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${r}${i}`)}getSuffixes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,a)=>rP[i]-rP[a]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,r)):[]}getSuffix(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,r){const n=e.noAbs?e.plurals(r):e.plurals(Math.abs(r));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const a=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?a():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!wY.includes(this.options.compatibilityJSON)}}const nP=function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=cY(t,e,r);return!a&&i&&Me(r)&&(a=ry(t,r,n),a===void 0&&(a=ry(e,r,n))),a},iy=t=>t.replace(/\$/g,"$$$$");class SY{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Wn.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:s,suffixEscaped:u,formatSeparator:l,unescapeSuffix:f,unescapePrefix:c,nestingPrefix:h,nestingPrefixEscaped:d,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:v,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=r!==void 0?r:dY,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?As(a):o||"{{",this.suffix=s?As(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=h?As(h):d||As("$t("),this.nestingSuffix=p?As(p):g||As(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=m||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,r,n,i){let a,o,s;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=d=>{if(d.indexOf(this.formatSeparator)<0){const m=nP(r,u,d,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,n,{...i,...r,interpolationkey:d}):m}const p=d.split(this.formatSeparator),g=p.shift().trim(),v=p.join(this.formatSeparator).trim();return this.format(nP(r,u,g,this.options.keySeparator,this.options.ignoreJSONStructure),v,n,{...i,...r,interpolationkey:g})};this.resetRegExp();const f=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,c=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:d=>iy(d)},{regex:this.regexp,safeValue:d=>this.escapeValue?iy(this.escape(d)):iy(d)}].forEach(d=>{for(s=0;a=d.regex.exec(e);){const p=a[1].trim();if(o=l(p),o===void 0)if(typeof f=="function"){const v=f(e,a,i);o=Me(v)?v:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))o="";else if(c){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`),o="";else!Me(o)&&!this.useRawValueToEscape&&(o=qO(o));const g=d.safeValue(o);if(e=e.replace(a[0],g),c?(d.regex.lastIndex+=o.length,d.regex.lastIndex-=a[0].length):d.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,o;const s=(u,l)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const c=u.split(new RegExp(`${f}[ ]*{`));let h=`{${c[1]}`;u=c[0],h=this.interpolate(h,o);const d=h.match(/'/g),p=h.match(/"/g);(d&&d.length%2===0&&!p||p.length%2!==0)&&(h=h.replace(/'/g,'"'));try{o=JSON.parse(h),l&&(o={...l,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,g),`${u}${f}${h}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u};for(;i=this.nestingRegexp.exec(e);){let u=[];o={...n},o=o.replace&&!Me(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const f=i[1].split(this.formatSeparator).map(c=>c.trim());i[1]=f.shift(),u=f,l=!0}if(a=r(s.call(this,i[1].trim(),o),o),a&&i[0]===e&&!Me(a))return a;Me(a)||(a=qO(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),a=""),l&&(a=u.reduce((f,c)=>this.format(f,c,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),e=e.replace(i[0],a),this.regexp.lastIndex=0}return e}}const EY=t=>{let e=t.toLowerCase().trim();const r={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...u]=o.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),f=s.trim();r[f]||(r[f]=l),l==="false"&&(r[f]=!1),l==="true"&&(r[f]=!0),isNaN(l)||(r[f]=parseInt(l,10))}})}return{formatName:e,formatOptions:r}},Ts=t=>{const e={};return(r,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=n+JSON.stringify(a);let s=e[o];return s||(s=t(Wh(n),i),e[o]=s),s(r)}};class AY{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Wn.create("formatter"),this.options=e,this.formats={number:Ts((r,n)=>{const i=new Intl.NumberFormat(r,{...n});return a=>i.format(a)}),currency:Ts((r,n)=>{const i=new Intl.NumberFormat(r,{...n,style:"currency"});return a=>i.format(a)}),datetime:Ts((r,n)=>{const i=new Intl.DateTimeFormat(r,{...n});return a=>i.format(a)}),relativetime:Ts((r,n)=>{const i=new Intl.RelativeTimeFormat(r,{...n});return a=>i.format(a,n.range||"day")}),list:Ts((r,n)=>{const i=new Intl.ListFormat(r,{...n});return a=>i.format(a)})},this.init(e)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=Ts(r)}format(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(u=>u.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,u)=>{const{formatName:l,formatOptions:f}=EY(u);if(this.formats[l]){let c=s;try{const h=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},d=h.locale||h.lng||i.locale||i.lng||n;c=this.formats[l](s,d,{...f,...i,...h})}catch(h){this.logger.warn(h)}return c}else this.logger.warn(`there was no format function for ${l}`);return s},e)}}const TY=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class OY extends Gh{constructor(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=Wn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,r,n,i){const a={},o={},s={},u={};return e.forEach(l=>{let f=!0;r.forEach(c=>{const h=`${l}|${c}`;!n.reload&&this.store.hasResourceBundle(l,c)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?o[h]===void 0&&(o[h]=!0):(this.state[h]=1,f=!1,o[h]===void 0&&(o[h]=!0),a[h]===void 0&&(a[h]=!0),u[c]===void 0&&(u[c]=!0)))}),f||(s[l]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}loaded(e,r,n){const i=e.split("|"),a=i[0],o=i[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2,r&&n&&(this.state[e]=0);const s={};this.queue.forEach(u=>{fY(u.loaded,[a],o),TY(u,e),r&&u.errors.push(r),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{s[l]||(s[l]={});const f=u.loaded[l];f.length&&f.forEach(c=>{s[l][c]===void 0&&(s[l][c]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(u=>!u.done)}read(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:n,tried:i,wait:a,callback:o});return}this.readingCalls++;const s=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(l&&f&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,r,n,i+1,a*2,o)},a);return}o(l,f)},u=this.backend[n].bind(this.backend);if(u.length===2){try{const l=u(e,r);l&&typeof l.then=="function"?l.then(f=>s(null,f)).catch(s):s(null,l)}catch(l){s(l)}return}return u(e,r,s)}prepareLoading(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Me(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Me(r)&&(r=[r]);const a=this.queueLoad(e,r,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(e,r,n){this.prepareLoading(e,r,{},n)}reload(e,r,n){this.prepareLoading(e,r,{reload:!0},n)}loadOne(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,o),!o&&s&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,s),this.loaded(e,o,s)})}saveMissing(e,r,n,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const u={...o,isUpdate:a},l=this.backend.create.bind(this.backend);if(l.length<6)try{let f;l.length===5?f=l(e,r,n,i,u):f=l(e,r,n,i),f&&typeof f.then=="function"?f.then(c=>s(null,c)).catch(s):s(null,f)}catch(f){s(f)}else l(e,r,n,i,s,u)}!e||!e[0]||this.store.addResource(e[0],r,n,i)}}}const iP=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),Me(t[1])&&(e.defaultValue=t[1]),Me(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(n=>{e[n]=r[n]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),aP=t=>(Me(t.ns)&&(t.ns=[t.ns]),Me(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Me(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),qh=()=>{},PY=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})};class pl extends Gh{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=aP(e),this.services={},this.logger=Wn,this.modules={external:[]},PY(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(){var e=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(Me(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const i=iP();this.options={...i,...this.options,...aP(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const a=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?Wn.init(a(this.modules.logger),this.options):Wn.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=AY);const c=new tP(this.options);this.store=new JO(this.options.resources,this.options);const h=this.services;h.logger=Wn,h.resourceStore=this.store,h.languageUtils=c,h.pluralResolver=new xY(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(h.formatter=a(f),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new SY(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new OY(a(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(d){for(var p=arguments.length,g=new Array(p>1?p-1:0),v=1;v<p;v++)g[v-1]=arguments[v];e.emit(d,...g)}),this.modules.languageDetector&&(h.languageDetector=a(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=a(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new Uh(this.services,this.options),this.translator.on("*",function(d){for(var p=arguments.length,g=new Array(p>1?p-1:0),v=1;v<p;v++)g[v-1]=arguments[v];e.emit(d,...g)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,n||(n=qh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const u=dl(),l=()=>{const f=(c,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(h),n(c,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),u}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qh;const i=Me(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&a.indexOf(l)<0&&a.push(l)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>o(u)),this.options.preload&&this.options.preload.forEach(s=>o(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(s)})}else n(null)}reloadResources(e,r,n){const i=dl();return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r=void 0),e||(e=this.languages),r||(r=this.options.ns),n||(n=qh),this.services.backendConnector.reload(e,r,a=>{i.resolve(),n(a)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&QO.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,r){var n=this;this.isLanguageChangingTo=e;const i=dl();this.emit("languageChanging",e);const a=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,l)=>{l?(a(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),r&&r(u,function(){return n.t(...arguments)})},s=u=>{!e&&!u&&this.services.languageDetector&&(u=[]);const l=Me(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);l&&(this.language||a(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(l)),this.loadResources(l,f=>{o(f,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),i}getFixedT(e,r,n){var i=this;const a=function(o,s){let u;if(typeof s!="object"){for(var l=arguments.length,f=new Array(l>2?l-2:0),c=2;c<l;c++)f[c-2]=arguments[c];u=i.options.overloadTranslationOptionHandler([o,s].concat(f))}else u={...s};u.lng=u.lng||a.lng,u.lngs=u.lngs||a.lngs,u.ns=u.ns||a.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||a.keyPrefix);const h=i.options.keySeparator||".";let d;return u.keyPrefix&&Array.isArray(o)?d=o.map(p=>`${u.keyPrefix}${h}${p}`):d=u.keyPrefix?`${u.keyPrefix}${h}${o}`:o,i.t(d,u)};return Me(e)?a.lng=e:a.lngs=e,a.ns=r,a.keyPrefix=n,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(s,u)=>{const l=this.services.backendConnector.state[`${s}|${u}`];return l===-1||l===0||l===2};if(r.precheck){const s=r.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!i||o(a,e)))}loadNamespaces(e,r){const n=dl();return this.options.ns?(Me(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(e,r){const n=dl();Me(e)&&(e=[e]);const i=this.options.preload||[],a=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new tP(iP());return r.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new pl(e,r)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qh;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},a=new pl(i);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n&&(a.store=new JO(this.store.data,i),a.services.resourceStore=a.store),a.translator=new Uh(a.services,i),a.translator.on("*",function(s){for(var u=arguments.length,l=new Array(u>1?u-1:0),f=1;f<u;f++)l[f-1]=arguments[f];a.emit(s,...l)}),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Kt=pl.createInstance();Kt.createInstance=pl.createInstance,Kt.createInstance,Kt.dir,Kt.init,Kt.loadResources,Kt.reloadResources,Kt.use,Kt.changeLanguage,Kt.getFixedT,Kt.t,Kt.exists,Kt.setDefaultNamespace,Kt.hasLoadedNamespace,Kt.loadNamespaces,Kt.loadLanguages;const BY={...{title:"仪表盘",text:"文本",confirm:"确定",pleaseEnter:"请输入",configuration:"配置",copy:"复制",delete:"删除",calendarText:"日历",chartText:"图表",promptTitle:"提示",promptContentDeleteComponents:"确认删除组件?",unnamedRecord:"未命名记录",setFilteringCriteria:"设置筛选条件",all:"所有",everyone:"任一",condition:"条件",addCondition:"添加条件",equalto:"等于",notequalto:"不等于",contain:"包含",notcontain:"不包含",null:"为空",notnull:"不为空",conformTo:"符合以下",statisticsText:"统计文字",typeData:"类型与数据",customStyle:"自定义样式",dataSource:"数据源",dataRange:"数据范围",data:"数据",filterData:"筛选数据",selectNcondition:"已选{{n}}个条件",allData:"全部数据",statisticstMethods:"统计方式",statisticstRecordNum:"统计记录总数",statisticstFieldVal:"统计字段数值",selectField:"选择字段",sumVal:"求和",maxVal:"最大值",minVal:"最小值",averageVal:"平均值"},pb:{text:"文本"},statistics:{t1:"配色方案",t2:"数值设置",t3:"小数位数与格式",t4:"请输入小数位数",t5:"数字(千分位)",t6:"数字",t7:"百分比",t8:"人名币",t9:"美元",t10:"统计数值说明",t11:"",t12:"",t13:""},chart:{t1:"图表类型",t2:"基础柱状图",t3:"堆积柱状图",t4:"百分比柱状图",t5:"基础条形图",t6:"堆积条形图",t7:"百分比堆积条形图",t8:"折线图",t9:"平滑折线图",t10:"饼图",t11:"环形图",t12:"图标选项",t13:"图例",t14:"数据标签",t15:"坐标轴",t16:"网格线",t17:"扇形分区",t18:"横轴(类别)",t19:"扇形数值",t20:"纵轴(字段)",t21:"横轴",t22:"横轴标题",t23:"坐标轴选项",t24:"显示标签",t25:"显示轴线",t26:"纵轴",t27:"纵轴标题",t28:"坐标轴选项",t29:"显示标签",t30:"显示轴线"},calendar:{t1:"视图配置",t2:"开始日期",t3:"结束日期",t4:"标题展示"},add:{t1:"图表",t2:"柱状图",t3:"折线图",t4:"饼图",t5:"条形图",t6:"其他",t7:"统计数字",t8:"文本",t9:"日历",t10:"添加组件"}},MY={...{title:"Dashboard",text:"Text",confirm:"Confirm",pleaseEnter:"Please enter",configuration:"Configuration",copy:"Copy",delete:"Delete",calendarText:"Calendar",chartText:"Chart",promptTitle:"Prompt",promptContentDeleteComponents:"Are you sure you want to delete this component?",unnamedRecord:"Unnamed Record",setFilteringCriteria:"Set filtering criteria",all:"All",everyone:"Anyone",condition:"Condition",addCondition:"Add condition",equalto:"Equal to",notequalto:"Not equal to",contain:"Contains",notcontain:"Does not contain",null:"Is empty",notnull:"Is not empty",conformTo:"Conform to the following",statisticsText:"Statistics Text",typeData:"Type and Data",customStyle:"Custom Style",dataSource:"Data Source",dataRange:"Data Range",data:"Data",filterData:"Filter Data",selectNcondition:"Selected {{n}} conditions",allData:"All Data",statisticstMethods:"Statistical Methods",statisticstRecordNum:"Total Number of Records",statisticstFieldVal:"Statistical Field Values",selectField:"Select Field",sumVal:"Sum",maxVal:"Maximum Value",minVal:"Minimum Value",averageVal:"Average Value"},pb:{text:"Text"},statistics:{t1:"Color Scheme",t2:"Value Settings",t3:"Decimal Places and Format",t4:"Please enter decimal places",t5:"Number (Thousand Separator)",t6:"Number",t7:"Percentage",t8:"Renminbi",t9:"Dollar",t10:"Statistical Value Description",t11:"",t12:"",t13:""},chart:{t1:"Chart Type",t2:"Basic Bar Chart",t3:"Stacked Bar Chart",t4:"Percentage Bar Chart",t5:"Basic Horizontal Bar Chart",t6:"Stacked Horizontal Bar Chart",t7:"Percentage Stacked Horizontal Bar Chart",t8:"Line Chart",t9:"Smooth Line Chart",t10:"Pie Chart",t11:"Doughnut Chart",t12:"Chart Options",t13:"Legend",t14:"Data Label",t15:"Axis",t16:"Grid Line",t17:"Sector Division",t18:"Horizontal Axis (Category)",t19:"Sector Value",t20:"Vertical Axis (Field)",t21:"Horizontal Axis",t22:"Horizontal Axis Title",t23:"Axis Options",t24:"Show Labels",t25:"Show Axis Line",t26:"Vertical Axis",t27:"Vertical Axis Title",t28:"Axis Options",t29:"Show Labels",t30:"Show Axis Line"},calendar:{t1:"View Configuration",t2:"Start Date",t3:"End Date",t4:"Title Display"},add:{t1:"Chart",t2:"Bar Chart",t3:"Line Chart",t4:"Pie Chart",t5:"Horizontal Bar Chart",t6:"Other",t7:"Statistical Number",t8:"Text",t9:"Calendar",t10:"Add Component"}};Kt.use(lN).init({resources:{"zh-CN":{translation:BY},"en-US":{translation:MY}},lng:"zh-CN",fallbackLng:"zh-CN",interpolation:{escapeValue:!1}});const FY=()=>A.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"MoreVerticalOutlined",children:A.jsx("path",{d:"M12 5.5A1.75 1.75 0 1 1 12 2a1.75 1.75 0 0 1 0 3.5Zm0 8.225a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5ZM12 22a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5Z",fill:"currentColor"})}),LY=()=>A.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"DragOutlined",children:A.jsx("path",{d:"M8.25 6.5a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Zm0 7.25a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Zm1.75 5.5a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0ZM14.753 6.5a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5ZM16.5 12a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0Zm-1.747 9a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Z",fill:"#999"})}),IY=({defaultValue:t,onChange:e})=>{const[r,n]=k.useState(!1),[i,a]=k.useState(""),o=Ew(s=>{e==null||e(s)},300);return k.useEffect(()=>{a(i)},[t]),A.jsx("span",{className:"handle title",children:A.jsx("span",{className:"title-child",onDoubleClick:()=>{n(!0)},children:r?A.jsx(Q.Input,{defaultValue:t,onBlur:()=>{n(!1)},onChange:s=>{a(s.target.value),o(s.target.value)}}):t})})},RY=E1.WidthProvider(E1.Responsive),NY=({sourceData:t,moduleConfigData:e,fieldMap:r,moduleDataApi:n,getEnumDataApi:i,onCreateModule:a,onUpdateModule:o,onDeleteModule:s,lang:u,onLayoutChange:l,className:f="layout",cols:c={lg:12,md:10,sm:6,xs:4,xxs:2},rowHeight:h=79})=>{const d=[10,10],{setGlobalData:p}=Oo(),[g,v]=k.useState([]),[m,y]=k.useState(0),[b,w]=k.useState(),[C,_]=k.useState(),[D,x]=k.useState(!1),{i18n:S,t:O}=zr(),[E,P]=k.useState(!1),[F,B]=k.useState(!1),[M,I]=k.useState(!1),j={text:O("pb.text"),calendar:O("calendarText"),statistics:O("chartText")},[,z]=k.useState(c.lg),W=async q=>{const L=q.type==="calendar"?5:4,X=q.type==="calendar"?5:3;if(Array.isArray(g)&&q.type){const V={x:0,y:0,w:L,h:X,title:q.type.includes("chart")?O("chartText"):j[q.type],...q,type:q.type};await(a==null?void 0:a(V).then(G=>{var J,K;if(!G.success){Q.message.error(G.message);return}v([...g,{...V,i:(J=G.data)==null?void 0:J.id,id:(K=G.data)==null?void 0:K.id}])}))}},R=async(q,L)=>{if(g!=null&&g.length){const X={...g.find(G=>G.id===q),...L},V=g.map(G=>G.id===q?X:G);v(V),await(o==null?void 0:o(X).then(G=>{if(!G.success){Q.message.error(G.message);return}}))}},U=async q=>{g!=null&&g.length&&(v(g.filter(L=>L.id!==q)),await(s==null?void 0:s(q||"")))},Z=q=>{l==null||l(q)},ee=(q,L)=>{z(L)},ne=q=>{if(q==="text"){const L={type:q,customData:{title:O("text"),editor:[{type:"paragraph",children:[{text:O("pleaseEnter")}]}]}};W(L)}else q==="statistics"?P(!0):q==="calendar"?B(!0):q!=null&&q.includes("chart")&&I(!0);_({title:"",type:q,w:0,h:0,x:0,y:0})};return k.useEffect(()=>{console.log("modules:",JSON.stringify(g))},[g]),k.useEffect(()=>{p({fieldMap:r,sourceData:t})},[r,p,t]),k.useEffect(()=>{v(e||[])},[e]),k.useEffect(()=>{S.changeLanguage(u||"zh_CN")},[S,u]),A.jsxs("div",{className:"pivot-table",children:[A.jsxs("div",{className:"bitable-block-dashboard",children:[A.jsx("div",{className:"bitable-block-dashboard-toolbar bitable-toolbar",children:A.jsxs("div",{className:"bitable-block-dashboard-toolbar--left",children:[A.jsx("div",{className:"bitable-block-name",children:A.jsx("div",{children:O("title")})}),A.jsx(Wq,{onOk:q=>{ne(q)}})]})}),A.jsx("div",{className:"bitable-block-dashboard__mount",children:A.jsx("div",{className:"dashboard-container",children:A.jsx("div",{className:"dashboard-content-container",children:A.jsx(RY,{onLayoutChange:Z,onBreakpointChange:ee,className:f,compactType:"vertical",cols:c,margin:d,rowHeight:h,draggableHandle:".handle",onWidthChange:(q,L,X)=>{y(q/X-1)},onDragStart:()=>{x(!0)},onDragStop:(q,L,X)=>{R(X.i,{...X}),x(!1)},onResizeStart:()=>{x(!0)},onResizeStop:(q,L,X)=>{R(X.i,{...X}),x(!1)},style:{backgroundSize:`${m}px ${h+d[0]}px`,backgroundImage:D?"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHwAAABPCAYAAAAp8KG9AAAAAXNSR0IArs4c6QAAAlpJREFUeF7t3UFu01AYReGYfaBCuxDUnXVniIUArdgHrVwpJIPgPv3Skc7gMEKqfd/N/TADZ9Dt5++Xp9PBn4evd4c/P99aztGKpxO5z6rR3nD79fzn+/6X19e/P25VXg0jP9B1r/pcHtBt+/Rt3+b+y+fH439ul59uZ6jVIVeDu45fYGIXOO+CnRA4Nq0zOHCnC9YqcGxaZ3DgThesVeDYtM7gEbjzo9SKWmCjgst1LhC40wVrFTg2rTM4cKcL1ipwbFpncOBOF6xV4Ni0zuC+LXO6LLUavXiZ3LTUpovwBSZ2PeE4C3dA4Ny2yuTAlSxcqcC5bZXJgStZuFKBc9sqk0fgyk9SKWyB3rRh0zqDA3e6YK0Cx6Z1BgfudMFaBY5N6wwO3OmCtQocm9YZ3LdlTpelVqMXL5Obltp0Eb7AxK4nHGfhDgic21aZHLiShSsVOLetMjlwJQtXKnBuW2XyCFz5SSqFLdCbNmxaZ3DgThesVeDYtM7gwJ0uWKvAsWmdwYE7XbBWgWPTOoP7tszpstRq9OJlctNSmy7CF5jY9YTjLNwBgXPbKpMDV7JwpQLntlUmB65k4UoFzm2rTB6BKz9JpbAFetOGTesMDtzpgrUKHJvWGRy40wVrFTg2rTM4cKcL1ipwbFpncN+WOV2WWo1evExuWmrTRfgCE7t/T/j/2q3+Ivnz4eXcXoDcZ9Vobxb4B88hCXV99CrarT6r976D4//vdIBqgcBVHHyZwPmNVScEruLgywTOb6w6IXAVB18mcH5j1QmBqzj4MoHzG6tOCFzFwZd5Azm6fF+PNKX9AAAAAElFTkSuQmCC)":void 0,backgroundPosition:`${d[0]}px ${d[0]}px`,minHeight:"100vh"},children:g==null?void 0:g.map(q=>A.jsxs("div",{className:`box-dashboard ${b===q.id?"active":""}`,onClick:()=>{w(q.id)},"data-grid":{i:q.id,x:q.x,y:q.y,w:q.w,h:q.h,minW:2,minH:2},children:[A.jsxs("div",{className:"layout-item-head isCanDrag",children:[A.jsxs("div",{className:"head-inner",children:[A.jsx(IY,{defaultValue:q.title,onChange:L=>R(q.id,{title:L})}),A.jsx("div",{className:"menu-slot",children:A.jsx(Q.Dropdown,{trigger:["click"],menu:{items:[q.type!=="text"?{label:O("configuration"),key:"edit"}:null,{label:O("copy"),key:"copy"},{key:"delete",danger:!0,label:O("delete")}],onClick:({key:L})=>{var X;if(L==="edit")w(q.id),_(q),q.type==="statistics"&&P(!0),(X=q.type)!=null&&X.includes("chart")&&I(!0),q.type==="calendar"&&B(!0);else if(L==="delete")Q.Modal.confirm({title:O("promptTitle"),icon:A.jsx(bw,{}),content:O("promptContentDeleteComponents"),onOk(){U(q.id)}});else if(L==="copy"){const V=JSON.parse(JSON.stringify(q));delete V.id,delete V.i,W(V)}}},children:A.jsx("button",{type:"button",className:"dashboard-grid-menu-button",children:A.jsx("span",{className:"universe-icon",children:A.jsx(FY,{})})})})})]}),A.jsx("div",{className:"handle drag isCanDrag",children:A.jsx("span",{className:"universe-icon drag-icon",children:A.jsx(LY,{})})})]}),A.jsx(zq,{module:q,onUpdate:R,moduleDataApi:n,activeId:b,onClick:()=>{w(q.id)},rowWidth:m,rowHeight:h,onEdit:()=>{var L;w(q.id),_(q),q.type==="statistics"&&P(!0),(L=q.type)!=null&&L.includes("chart")&&I(!0),q.type==="calendar"&&B(!0)},onDelete:()=>{U(q.id)},onCopy:()=>{const L=JSON.parse(JSON.stringify(q));delete L.id,delete L.i,W(L)},onStartDragOrResize:()=>{x(!0)},onStopDragOrResize:()=>{x(!1)}})]},q.id))})})})})]}),A.jsx(Kq,{open:E,selectModuleData:C,onClose:()=>{P(!1)},onOk:({id:q,customData:L,customeStyle:X})=>{q?R(q,{type:"statistics",customData:L,customeStyle:X}):W({type:"statistics",customData:L,customeStyle:X}),P(!1)},moduleDataApi:n,getEnumDataApi:i}),A.jsx(Jq,{open:F,selectModuleData:C,onClose:()=>{B(!1)},onOk:({id:q,customData:L})=>{q?R(q,{type:"calendar",customData:L}):W({type:"calendar",customData:L}),B(!1)},moduleDataApi:n,getEnumDataApi:i}),A.jsx(sY,{open:M,selectModuleData:C,onClose:()=>{I(!1)},onOk:({id:q,type:L,customData:X,customeStyle:V})=>{q?R(q,{type:L,customData:X,customeStyle:V}):W({type:L,customData:X,customeStyle:V}),I(!1)},moduleDataApi:n,getEnumDataApi:i})]})},kY=t=>A.jsx(J8,{children:A.jsx(NY,{...t})});Gn.PivotTable=kY,Object.defineProperty(Gn,Symbol.toStringTag,{value:"Module"})});
178
+ `)),qe(n)),a.push({dimIdx:m.index,parser:y,comparator:new ZS(h,p)})});var o=e.sourceFormat;o!==ir&&o!==Yr&&(process.env.NODE_ENV!=="production"&&(n='sourceFormat "'+o+'" is not supported yet'),qe(n));for(var s=[],u=0,l=e.count();u<l;u++)s.push(e.getRawDataItem(u));return s.sort(function(f,c){for(var h=0;h<a.length;h++){var d=a[h],p=e.retrieveValueFromItem(f,d.dimIdx),g=e.retrieveValueFromItem(c,d.dimIdx);d.parser&&(p=d.parser(p),g=d.parser(g));var v=d.comparator.evaluate(p,g);if(v!==0)return v}return 0}),{data:s}}};function EU(t){t.registerTransform(xU),t.registerTransform(SU)}var AU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.prototype.init=function(r,n,i){t.prototype.init.call(this,r,n,i),this._sourceManager=new nE(this),iE(this)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),iE(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Nn},e}(Ze),TU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.type="dataset",e}(Br);function OU(t){t.registerComponentModel(AU),t.registerComponentView(TU)}var Hn=ui.CMD;function Ds(t,e){return Math.abs(t-e)<1e-5}function qm(t){var e=t.data,r=t.len(),n=[],i,a=0,o=0,s=0,u=0;function l(F,B){i&&i.length>2&&n.push(i),i=[F,B]}function f(F,B,M,I){Ds(F,M)&&Ds(B,I)||i.push(F,B,M,I,M,I)}function c(F,B,M,I,j,z){var W=Math.abs(B-F),R=Math.tan(W/4)*4/3,U=B<F?-1:1,Z=Math.cos(F),ee=Math.sin(F),ne=Math.cos(B),q=Math.sin(B),L=Z*j+M,X=ee*z+I,V=ne*j+M,G=q*z+I,J=j*R*U,K=z*R*U;i.push(L-J*ee,X+K*Z,V+J*q,G-K*ne,V,G)}for(var h,d,p,g,v=0;v<r;){var m=e[v++],y=v===1;switch(y&&(a=e[v],o=e[v+1],s=a,u=o,(m===Hn.L||m===Hn.C||m===Hn.Q)&&(i=[s,u])),m){case Hn.M:a=s=e[v++],o=u=e[v++],l(s,u);break;case Hn.L:h=e[v++],d=e[v++],f(a,o,h,d),a=h,o=d;break;case Hn.C:i.push(e[v++],e[v++],e[v++],e[v++],a=e[v++],o=e[v++]);break;case Hn.Q:h=e[v++],d=e[v++],p=e[v++],g=e[v++],i.push(a+2/3*(h-a),o+2/3*(d-o),p+2/3*(h-p),g+2/3*(d-g),p,g),a=p,o=g;break;case Hn.A:var b=e[v++],w=e[v++],C=e[v++],_=e[v++],D=e[v++],x=e[v++]+D;v+=1;var S=!e[v++];h=Math.cos(D)*C+b,d=Math.sin(D)*_+w,y?(s=h,u=d,l(s,u)):f(a,o,h,d),a=Math.cos(x)*C+b,o=Math.sin(x)*_+w;for(var O=(S?-1:1)*Math.PI/2,E=D;S?E>x:E<x;E+=O){var P=S?Math.max(E+O,x):Math.min(E+O,x);c(E,P,b,w,C,_)}break;case Hn.R:s=a=e[v++],u=o=e[v++],h=s+e[v++],d=u+e[v++],l(h,u),f(h,u,h,d),f(h,d,s,d),f(s,d,s,u),f(s,u,h,u);break;case Hn.Z:i&&f(a,o,s,u),a=s,o=u;break}}return i&&i.length>2&&n.push(i),n}function Ym(t,e,r,n,i,a,o,s,u,l){if(Ds(t,r)&&Ds(e,n)&&Ds(i,o)&&Ds(a,s)){u.push(o,s);return}var f=2/l,c=f*f,h=o-t,d=s-e,p=Math.sqrt(h*h+d*d);h/=p,d/=p;var g=r-t,v=n-e,m=i-o,y=a-s,b=g*g+v*v,w=m*m+y*y;if(b<c&&w<c){u.push(o,s);return}var C=h*g+d*v,_=-h*m-d*y,D=b-C*C,x=w-_*_;if(D<c&&C>=0&&x<c&&_>=0){u.push(o,s);return}var S=[],O=[];Oi(t,r,i,o,.5,S),Oi(e,n,a,s,.5,O),Ym(S[0],O[0],S[1],O[1],S[2],O[2],S[3],O[3],u,l),Ym(S[4],O[4],S[5],O[5],S[6],O[6],S[7],O[7],u,l)}function PU(t,e){var r=qm(t),n=[];e=e||1;for(var i=0;i<r.length;i++){var a=r[i],o=[],s=a[0],u=a[1];o.push(s,u);for(var l=2;l<a.length;){var f=a[l++],c=a[l++],h=a[l++],d=a[l++],p=a[l++],g=a[l++];Ym(s,u,f,c,h,d,p,g,o,e),s=p,u=g}n.push(o)}return n}function iO(t,e,r){var n=t[e],i=t[1-e],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var u=[],l=0;l<o;l++)u.push(s);var f=o*s,c=r-f;if(c>0)for(var l=0;l<c;l++)u[l%o]+=1;return u}function aO(t,e,r){for(var n=t.r0,i=t.r,a=t.startAngle,o=t.endAngle,s=Math.abs(o-a),u=s*i,l=i-n,f=u>Math.abs(l),c=iO([u,l],f?0:1,e),h=(f?s:l)/c.length,d=0;d<c.length;d++)for(var p=(f?l:s)/c[d],g=0;g<c[d];g++){var v={};f?(v.startAngle=a+h*d,v.endAngle=a+h*(d+1),v.r0=n+p*g,v.r=n+p*(g+1)):(v.startAngle=a+p*g,v.endAngle=a+p*(g+1),v.r0=n+h*d,v.r=n+h*(d+1)),v.clockwise=t.clockwise,v.cx=t.cx,v.cy=t.cy,r.push(v)}}function BU(t,e,r){for(var n=t.width,i=t.height,a=n>i,o=iO([n,i],a?0:1,e),s=a?"width":"height",u=a?"height":"width",l=a?"x":"y",f=a?"y":"x",c=t[s]/o.length,h=0;h<o.length;h++)for(var d=t[u]/o[h],p=0;p<o[h];p++){var g={};g[l]=h*c,g[f]=p*d,g[s]=c,g[u]=d,g.x+=t.x,g.y+=t.y,r.push(g)}}function oO(t,e,r,n){return t*n-r*e}function MU(t,e,r,n,i,a,o,s){var u=r-t,l=n-e,f=o-i,c=s-a,h=oO(f,c,u,l);if(Math.abs(h)<1e-6)return null;var d=t-i,p=e-a,g=oO(d,p,f,c)/h;return g<0||g>1?null:new _e(g*u+t,g*l+e)}function FU(t,e,r){var n=new _e;_e.sub(n,r,e),n.normalize();var i=new _e;_e.sub(i,t,e);var a=i.dot(n);return a}function xs(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function LU(t,e,r){for(var n=t.length,i=[],a=0;a<n;a++){var o=t[a],s=t[(a+1)%n],u=MU(o[0],o[1],s[0],s[1],e.x,e.y,r.x,r.y);u&&i.push({projPt:FU(u,e,r),pt:u,idx:a})}if(i.length<2)return[{points:t},{points:t}];i.sort(function(v,m){return v.projPt-m.projPt});var l=i[0],f=i[i.length-1];if(f.idx<l.idx){var c=l;l=f,f=c}for(var h=[l.pt.x,l.pt.y],d=[f.pt.x,f.pt.y],p=[h],g=[d],a=l.idx+1;a<=f.idx;a++)xs(p,t[a].slice());xs(p,d),xs(p,h);for(var a=f.idx+1;a<=l.idx+n;a++)xs(g,t[a%n].slice());return xs(g,h),xs(g,d),[{points:p},{points:g}]}function sO(t){var e=t.points,r=[],n=[];BD(e,r,n);var i=new Ue(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,o=i.height,s=i.x,u=i.y,l=new _e,f=new _e;return a>o?(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),LU(e,l,f)}function Rh(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);Rh(t,a[0],i,n),Rh(t,a[1],r-i,n)}return n}function IU(t,e){for(var r=[],n=0;n<e;n++)r.push(Fg(t));return r}function RU(t,e){e.setStyle(t.style),e.z=t.z,e.z2=t.z2,e.zlevel=t.zlevel}function NU(t){for(var e=[],r=0;r<t.length;)e.push([t[r++],t[r++]]);return e}function kU(t,e){var r=[],n=t.shape,i;switch(t.type){case"rect":BU(n,e,r),i=St;break;case"sector":aO(n,e,r),i=In;break;case"circle":aO({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,r),i=In;break;default:var a=t.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=ye(PU(t.getUpdatedPathProxy(),o),function(m){return NU(m)}),u=s.length;if(u===0)Rh(sO,{points:s[0]},e,r);else if(u===e)for(var l=0;l<u;l++)r.push({points:s[l]});else{var f=0,c=ye(s,function(m){var y=[],b=[];BD(m,y,b);var w=(b[1]-y[1])*(b[0]-y[0]);return f+=w,{poly:m,area:w}});c.sort(function(m,y){return y.area-m.area});for(var h=e,l=0;l<u;l++){var d=c[l];if(h<=0)break;var p=l===u-1?h:Math.ceil(d.area/f*e);p<0||(Rh(sO,{points:d.poly},p,r),h-=p)}}i=Cc;break}if(!i)return IU(t,e);for(var g=[],l=0;l<r.length;l++){var v=new i;v.setShape(r[l]),RU(t,v),g.push(v)}return g}function zU(t,e){var r=t.length,n=e.length;if(r===n)return[t,e];for(var i=[],a=[],o=r<n?t:e,s=Math.min(r,n),u=Math.abs(n-r)/6,l=(s-2)/6,f=Math.ceil(u/l)+1,c=[o[0],o[1]],h=u,d=2;d<s;){var p=o[d-2],g=o[d-1],v=o[d++],m=o[d++],y=o[d++],b=o[d++],w=o[d++],C=o[d++];if(h<=0){c.push(v,m,y,b,w,C);continue}for(var _=Math.min(h,f-1)+1,D=1;D<=_;D++){var x=D/_;Oi(p,v,y,w,x,i),Oi(g,m,b,C,x,a),p=i[3],g=a[3],c.push(i[1],a[1],i[2],a[2],p,g),v=i[5],m=a[5],y=i[6],b=a[6]}h-=_-1}return o===t?[c,e]:[t,c]}function uO(t,e){for(var r=t.length,n=t[r-2],i=t[r-1],a=[],o=0;o<e.length;)a[o++]=n,a[o++]=i;return a}function jU(t,e){for(var r,n,i,a=[],o=[],s=0;s<Math.max(t.length,e.length);s++){var u=t[s],l=e[s],f=void 0,c=void 0;u?l?(r=zU(u,l),f=r[0],c=r[1],n=f,i=c):(c=uO(i||u,u),f=u):(f=uO(n||l,l),c=l),a.push(f),o.push(c)}return[a,o]}function lO(t){for(var e=0,r=0,n=0,i=t.length,a=0,o=i-2;a<i;o=a,a+=2){var s=t[o],u=t[o+1],l=t[a],f=t[a+1],c=s*f-l*u;e+=c,r+=(s+l)*c,n+=(u+f)*c}return e===0?[t[0]||0,t[1]||0]:[r/e/3,n/e/3,e]}function VU(t,e,r,n){for(var i=(t.length-2)/6,a=1/0,o=0,s=t.length,u=s-2,l=0;l<i;l++){for(var f=l*6,c=0,h=0;h<s;h+=2){var d=h===0?f:(f+h-2)%u+2,p=t[d]-r[0],g=t[d+1]-r[1],v=e[h]-n[0],m=e[h+1]-n[1],y=v-p,b=m-g;c+=y*y+b*b}c<a&&(a=c,o=l)}return o}function HU(t){for(var e=[],r=t.length,n=0;n<r;n+=2)e[n]=t[r-n-2],e[n+1]=t[r-n-1];return e}function WU(t,e,r,n){for(var i=[],a,o=0;o<t.length;o++){var s=t[o],u=e[o],l=lO(s),f=lO(u);a==null&&(a=l[2]<0!=f[2]<0);var c=[],h=[],d=0,p=1/0,g=[],v=s.length;a&&(s=HU(s));for(var m=VU(s,u,l,f)*6,y=v-2,b=0;b<y;b+=2){var w=(m+b)%y+2;c[b+2]=s[w]-l[0],c[b+3]=s[w+1]-l[1]}c[0]=s[m]-l[0],c[1]=s[m+1]-l[1];for(var C=n/r,_=-n/2;_<=n/2;_+=C){for(var D=Math.sin(_),x=Math.cos(_),S=0,b=0;b<s.length;b+=2){var O=c[b],E=c[b+1],P=u[b]-f[0],F=u[b+1]-f[1],B=P*x-F*D,M=P*D+F*x;g[b]=B,g[b+1]=M;var I=B-O,j=M-E;S+=I*I+j*j}if(S<p){p=S,d=_;for(var z=0;z<g.length;z++)h[z]=g[z]}}i.push({from:c,to:h,fromCp:l,toCp:f,rotation:-d})}return i}function Nh(t){return t.__isCombineMorphing}var fO="__mOriginal_";function kh(t,e,r){var n=fO+e,i=t[n]||t[e];t[n]||(t[n]=t[e]);var a=r.replace,o=r.after,s=r.before;t[e]=function(){var u=arguments,l;return s&&s.apply(this,u),a?l=a.apply(this,u):l=i.apply(this,u),o&&o.apply(this,u),l}}function cl(t,e){var r=fO+e;t[r]&&(t[e]=t[r],t[r]=null)}function cO(t,e){for(var r=0;r<t.length;r++)for(var n=t[r],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=e[0]*a+e[2]*o+e[4],n[i++]=e[1]*a+e[3]*o+e[5]}}function hO(t,e){var r=t.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),i=jU(qm(r),qm(n)),a=i[0],o=i[1],s=t.getComputedTransform(),u=e.getComputedTransform();function l(){this.transform=null}s&&cO(a,s),u&&cO(o,u),kh(e,"updateTransform",{replace:l}),e.transform=null;var f=WU(a,o,10,Math.PI),c=[];kh(e,"buildPath",{replace:function(h){for(var d=e.__morphT,p=1-d,g=[],v=0;v<f.length;v++){var m=f[v],y=m.from,b=m.to,w=m.rotation*d,C=m.fromCp,_=m.toCp,D=Math.sin(w),x=Math.cos(w);Af(g,C,_,d);for(var S=0;S<y.length;S+=2){var O=y[S],E=y[S+1],P=b[S],F=b[S+1],B=O*p+P*d,M=E*p+F*d;c[S]=B*x-M*D+g[0],c[S+1]=B*D+M*x+g[1]}var I=c[0],j=c[1];h.moveTo(I,j);for(var S=2;S<y.length;){var P=c[S++],F=c[S++],z=c[S++],W=c[S++],R=c[S++],U=c[S++];I===P&&j===F&&z===R&&W===U?h.lineTo(R,U):h.bezierCurveTo(P,F,z,W,R,U),I=R,j=U}}}})}function Xm(t,e,r){if(!t||!e)return e;var n=r.done,i=r.during;hO(t,e),e.__morphT=0;function a(){cl(e,"buildPath"),cl(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},je({during:function(o){e.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},r)),e}function $U(t,e,r,n,i,a){var o=16;t=i===r?0:Math.round(32767*(t-r)/(i-r)),e=a===n?0:Math.round(32767*(e-n)/(a-n));for(var s=0,u,l=(1<<o)/2;l>0;l/=2){var f=0,c=0;(t&l)>0&&(f=1),(e&l)>0&&(c=1),s+=l*l*(3*f^c),c===0&&(f===1&&(t=l-1-t,e=l-1-e),u=t,t=e,e=u)}return s}function zh(t){var e=1/0,r=1/0,n=-1/0,i=-1/0,a=ye(t,function(s){var u=s.getBoundingRect(),l=s.getComputedTransform(),f=u.x+u.width/2+(l?l[4]:0),c=u.y+u.height/2+(l?l[5]:0);return e=Math.min(f,e),r=Math.min(c,r),n=Math.max(f,n),i=Math.max(c,i),[f,c]}),o=ye(a,function(s,u){return{cp:s,z:$U(s[0],s[1],e,r,n,i),path:t[u]}});return o.sort(function(s,u){return s.z-u.z}).map(function(s){return s.path})}function dO(t){return kU(t.path,t.count)}function Km(){return{fromIndividuals:[],toIndividuals:[],count:0}}function GU(t,e,r){var n=[];function i(C){for(var _=0;_<C.length;_++){var D=C[_];Nh(D)?i(D.childrenRef()):D instanceof Ve&&n.push(D)}}i(t);var a=n.length;if(!a)return Km();var o=r.dividePath||dO,s=o({path:e,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),Km();n=zh(n),s=zh(s);for(var u=r.done,l=r.during,f=r.individualDelay,c=new pu,h=0;h<a;h++){var d=n[h],p=s[h];p.parent=e,p.copyTransform(c),f||hO(d,p)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function g(C){for(var _=0;_<s.length;_++)s[_].addSelfToZr(C)}kh(e,"addSelfToZr",{after:function(C){g(C)}}),kh(e,"removeSelfFromZr",{after:function(C){for(var _=0;_<s.length;_++)s[_].removeSelfFromZr(C)}});function v(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,cl(e,"addSelfToZr"),cl(e,"removeSelfFromZr")}var m=s.length;if(f)for(var y=m,b=function(){y--,y===0&&(v(),u&&u())},h=0;h<m;h++){var w=f?je({delay:(r.delay||0)+f(h,m,n[h],s[h]),done:b},r):r;Xm(n[h],s[h],w)}else e.__morphT=0,e.animateTo({__morphT:1},je({during:function(C){for(var _=0;_<m;_++){var D=s[_];D.__morphT=e.__morphT,D.dirtyShape()}l&&l(C)},done:function(){v();for(var C=0;C<t.length;C++)cl(t[C],"updateTransform");u&&u()}},r));return e.__zr&&g(e.__zr),{fromIndividuals:n,toIndividuals:s,count:m}}function UU(t,e,r){var n=e.length,i=[],a=r.dividePath||dO;function o(d){for(var p=0;p<d.length;p++){var g=d[p];Nh(g)?o(g.childrenRef()):g instanceof Ve&&i.push(g)}}if(Nh(t)){o(t.childrenRef());var s=i.length;if(s<n)for(var u=0,l=s;l<n;l++)i.push(Fg(i[u++%s]));i.length=n}else{i=a({path:t,count:n});for(var f=t.getComputedTransform(),l=0;l<i.length;l++)i[l].setLocalTransform(f);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),Km()}i=zh(i),e=zh(e);for(var c=r.individualDelay,l=0;l<n;l++){var h=c?je({delay:(r.delay||0)+c(l,n,i[l],e[l])},r):r;Xm(i[l],e[l],h)}return{fromIndividuals:i,toIndividuals:e,count:e.length}}function vO(t){return he(t[0])}function pO(t,e){for(var r=[],n=t.length,i=0;i<n;i++)r.push({one:t[i],many:[]});for(var i=0;i<e.length;i++){var a=e[i].length,o=void 0;for(o=0;o<a;o++)r[o%n].many.push(e[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!r[i].many.length){var u=r[s].many;if(u.length<=1)if(s)s=0;else return r;var a=u.length,l=Math.ceil(a/2);r[i].many=u.slice(l,a),r[s].many=u.slice(0,l),s++}return r}var qU={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n<t.count;n++){var i=Fg(t.path);i.setStyle("opacity",r),e.push(i)}return e},split:null};function Zm(t,e,r,n,i,a){if(!t.length||!e.length)return;var o=ts("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),u=Object.assign({setToFinal:!0},o),l,f;vO(t)&&(l=t,f=e),vO(e)&&(l=e,f=t);function c(m,y,b,w,C){var _=m.many,D=m.one;if(_.length===1&&!C){var x=y?_[0]:D,S=y?D:_[0];if(Nh(x))c({many:[x],one:S},!0,b,w,!0);else{var O=s?je({delay:s(b,w)},u):u;Xm(x,S,O),a(x,S,x,S,O)}}else for(var E=je({dividePath:qU[r],individualDelay:s&&function(j,z,W,R){return s(j+b,w)}},u),P=y?GU(_,D,E):UU(D,_,E),F=P.fromIndividuals,B=P.toIndividuals,M=F.length,I=0;I<M;I++){var O=s?je({delay:s(I,M)},u):u;a(F[I],B[I],y?_[I]:m.one,y?m.one:_[I],O)}}for(var h=l?l===t:t.length>e.length,d=l?pO(f,l):pO(h?e:t,[h?t:e]),p=0,g=0;g<d.length;g++)p+=d[g].many.length;for(var v=0,g=0;g<d.length;g++)c(d[g],h,v,p),v+=d[g].many.length}function ao(t){if(!t)return[];if(he(t)){for(var e=[],r=0;r<t.length;r++)e.push(ao(t[r]));return e}var n=[];return t.traverse(function(i){i instanceof Ve&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var gO=1e4,YU=0,mO=1,yO=2,XU=lt();function KU(t,e){for(var r=t.dimensions,n=0;n<r.length;n++){var i=t.getDimensionInfo(r[n]);if(i&&i.otherDims[e]===0)return r[n]}}function ZU(t,e,r){var n=t.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=t.get(n.name,e);return i&&i.categories[a]||a+""}}function bO(t,e,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=KU(t,i);if(a){var o=ZU(t,e,a);return o}var s=t.getRawDataItem(e),u=n?"childGroupId":"groupId";if(s&&s[u])return s[u]+"";if(!n)return r||t.getId(e)}function CO(t){var e=[];return N(t,function(r){var n=r.data,i=r.dataGroupId;if(n.count()>gO){process.env.NODE_ENV!=="production"&&xt("Universal transition is disabled on large data > 10k.");return}for(var a=n.getIndices(),o=0;o<a.length;o++)e.push({data:n,groupId:bO(n,o,i,!1),childGroupId:bO(n,o,i,!0),divide:r.divide,dataIndex:o})}),e}function Jm(t,e,r){t.traverse(function(n){n instanceof Ve&&qt(n,{style:{opacity:0}},e,{dataIndex:r,isFrom:!0})})}function Qm(t){if(t.parent){var e=t.getComputedTransform();t.setLocalTransform(e),t.parent.remove(t)}}function Ss(t){t.stopAnimation(),t.isGroup&&t.traverse(function(e){e.stopAnimation()})}function JU(t,e,r){var n=ts("update",r,e);n&&t.traverse(function(i){if(i instanceof Fi){var a=a7(i);a&&i.animateFrom({style:a},n)}})}function QU(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++){var i=t[n],a=e[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function wO(t,e,r){var n=CO(t),i=CO(e);function a(b,w,C,_,D){(C||b)&&w.animateFrom({style:C&&C!==b?oe(oe({},C.style),b.style):b.style},D)}var o=!1,s=YU,u=Ae(),l=Ae();n.forEach(function(b){b.groupId&&u.set(b.groupId,!0),b.childGroupId&&l.set(b.childGroupId,!0)});for(var f=0;f<i.length;f++){var c=i[f].groupId;if(l.get(c)){s=mO;break}var h=i[f].childGroupId;if(h&&u.get(h)){s=yO;break}}function d(b,w){return function(C){var _=C.data,D=C.dataIndex;return w?_.getId(D):b?s===mO?C.childGroupId:C.groupId:s===yO?C.childGroupId:C.groupId}}var p=QU(n,i),g={};if(!p)for(var f=0;f<i.length;f++){var v=i[f],m=v.data.getItemGraphicEl(v.dataIndex);m&&(g[m.id]=!0)}function y(b,w){var C=n[w],_=i[b],D=_.data.hostModel,x=C.data.getItemGraphicEl(C.dataIndex),S=_.data.getItemGraphicEl(_.dataIndex);if(x===S){S&&JU(S,_.dataIndex,D);return}x&&g[x.id]||S&&(Ss(S),x?(Ss(x),Qm(x),o=!0,Zm(ao(x),ao(S),_.divide,D,b,a)):Jm(S,D,b))}new q0(n,i,d(!0,p),d(!1,p),null,"multiple").update(y).updateManyToOne(function(b,w){var C=i[b],_=C.data,D=_.hostModel,x=_.getItemGraphicEl(C.dataIndex),S=bt(ye(w,function(O){return n[O].data.getItemGraphicEl(n[O].dataIndex)}),function(O){return O&&O!==x&&!g[O.id]});x&&(Ss(x),S.length?(N(S,function(O){Ss(O),Qm(O)}),o=!0,Zm(ao(S),ao(x),C.divide,D,b,a)):Jm(x,D,C.dataIndex))}).updateOneToMany(function(b,w){var C=n[w],_=C.data.getItemGraphicEl(C.dataIndex);if(!(_&&g[_.id])){var D=bt(ye(b,function(S){return i[S].data.getItemGraphicEl(i[S].dataIndex)}),function(S){return S&&S!==_}),x=i[b[0]].data.hostModel;D.length&&(N(D,function(S){return Ss(S)}),_?(Ss(_),Qm(_),o=!0,Zm(ao(_),ao(D),C.divide,x,b[0],a)):N(D,function(S){return Jm(S,x,b[0])}))}}).updateManyToMany(function(b,w){new q0(w,b,function(C){return n[C].data.getId(n[C].dataIndex)},function(C){return i[C].data.getId(i[C].dataIndex)}).update(function(C,_){y(b[C],w[_])}).execute()}).execute(),o&&N(e,function(b){var w=b.data,C=w.hostModel,_=C&&r.getViewOfSeriesModel(C),D=ts("update",C,0);_&&C.isAnimationEnabled()&&D&&D.duration>0&&_.group.traverse(function(x){x instanceof Ve&&!x.animators.length&&x.animateFrom({style:{opacity:0}},D)})})}function _O(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function DO(t){return he(t)?t.sort().join(","):t}function Ki(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function eq(t,e){var r=Ae(),n=Ae(),i=Ae();N(t.oldSeries,function(o,s){var u=t.oldDataGroupIds[s],l=t.oldData[s],f=_O(o),c=DO(f);n.set(c,{dataGroupId:u,data:l}),he(f)&&N(f,function(h){i.set(h,{key:c,dataGroupId:u,data:l})})});function a(o){r.get(o)&&xt("Duplicated seriesKey in universalTransition "+o)}return N(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),u=o.getData(),l=_O(o),f=DO(l),c=n.get(f);if(c)process.env.NODE_ENV!=="production"&&a(f),r.set(f,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Ki(c.data),data:c.data}],newSeries:[{dataGroupId:s,divide:Ki(u),data:u}]});else if(he(l)){process.env.NODE_ENV!=="production"&&a(f);var h=[];N(l,function(g){var v=n.get(g);v.data&&h.push({dataGroupId:v.dataGroupId,divide:Ki(v.data),data:v.data})}),h.length&&r.set(f,{oldSeries:h,newSeries:[{dataGroupId:s,data:u,divide:Ki(u)}]})}else{var d=i.get(l);if(d){var p=r.get(d.key);p||(p={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:Ki(d.data)}],newSeries:[]},r.set(d.key,p)),p.newSeries.push({dataGroupId:s,data:u,divide:Ki(u)})}}}}),r}function xO(t,e){for(var r=0;r<t.length;r++){var n=e.seriesIndex!=null&&e.seriesIndex===t[r].seriesIndex||e.seriesId!=null&&e.seriesId===t[r].id;if(n)return r}}function tq(t,e,r,n){var i=[],a=[];N(gt(t.from),function(o){var s=xO(e.oldSeries,o);s>=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ki(e.oldData[s]),groupIdDim:o.dimension})}),N(gt(t.to),function(o){var s=xO(r.updatedSeries,o);if(s>=0){var u=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:u,divide:Ki(u),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&wO(i,a,n)}function rq(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){N(gt(n.seriesTransition),function(i){N(gt(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][Zc]=!0)})})}),t.registerUpdateLifecycle("series:transition",function(e,r,n){var i=XU(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)N(gt(a),function(d){tq(d,i,n,r)});else{var o=eq(i,n);N(o.keys(),function(d){var p=o.get(d);wO(p.oldSeries,p.newSeries,r)})}N(n.updatedSeries,function(d){d[Zc]&&(d[Zc]=!1)})}for(var s=e.getSeries(),u=i.oldSeries=[],l=i.oldDataGroupIds=[],f=i.oldData=[],c=0;c<s.length;c++){var h=s[c].getData();h.count()<gO&&(u.push(s[c]),l.push(s[c].get("dataGroupId")),f.push(h))}})}function SO(t,e,r){var n=Po.createCanvas(),i=e.getWidth(),a=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=i*r,n.height=a*r,n}var ey=function(t){ce(e,t);function e(r,n,i){var a=t.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||Yf,typeof r=="string"?o=SO(r,n,i):we(r)&&(o=r,r=o.id),a.id=r,a.dom=o;var s=o.style;return s&&(u_(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=SO("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},e.prototype.createRepaintRects=function(r,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,u=!1,l=new Ue(0,0,0,0);function f(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var b=new Ue(0,0,0,0);b.copy(y),o.push(b)}else{for(var w=!1,C=1/0,_=0,D=0;D<o.length;++D){var x=o[D];if(x.intersect(y)){var S=new Ue(0,0,0,0);S.copy(x),S.union(y),o[D]=S,w=!0;break}else if(u){l.copy(y),l.union(x);var O=y.width*y.height,E=x.width*x.height,P=l.width*l.height,F=P-O-E;F<C&&(C=F,_=D)}}if(u&&(o[_].union(y),w=!0),!w){var b=new Ue(0,0,0,0);b.copy(y),o.push(b)}u||(u=o.length>=s)}}for(var c=this.__startIndex;c<this.__endIndex;++c){var h=r[c];if(h){var d=h.shouldBePainted(i,a,!0,!0),p=h.__isRendered&&(h.__dirty&Or||!d)?h.getPrevPaintRect():null;p&&f(p);var g=d&&(h.__dirty&Or||!h.__isRendered)?h.getPaintRect():null;g&&f(g)}}for(var c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var h=n[c],d=h&&h.shouldBePainted(i,a,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered){var p=h.getPrevPaintRect();p&&f(p)}}var v;do{v=!1;for(var c=0;c<o.length;){if(o[c].isZero()){o.splice(c,1);continue}for(var m=c+1;m<o.length;)o[c].intersect(o[m])?(v=!0,o[c].union(o[m]),o.splice(m,1)):m++;c++}}while(v);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(r,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=r+"px",o.height=n+"px"),a.width=r*i,a.height=n*i,s&&(s.width=r*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},e.prototype.clear=function(r,n,i){var a=this.dom,o=this.ctx,s=a.width,u=a.height;n=n||this.clearColor;var l=this.motionBlur&&!r,f=this.lastFrameAlpha,c=this.dpr,h=this;l&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/c,u/c));var d=this.domBack;function p(g,v,m,y){if(o.clearRect(g,v,m,y),n&&n!=="transparent"){var b=void 0;if(xf(n)){var w=n.global||n.__width===m&&n.__height===y;b=w&&n.__canvasGradient||T0(o,n,{x:0,y:0,width:m,height:y}),n.__canvasGradient=b,n.__width=m,n.__height=y}else ON(n)&&(n.scaleX=n.scaleX||c,n.scaleY=n.scaleY||c,b=O0(o,n,{dirty:function(){h.setUnpainted(),h.painter.refresh()}}));o.save(),o.fillStyle=b||n,o.fillRect(g,v,m,y),o.restore()}l&&(o.save(),o.globalAlpha=f,o.drawImage(d,g,v,m,y),o.restore())}!i||l?p(0,0,s,u):i.length&&N(i,function(g){p(g.x*c,g.y*c,g.width*c,g.height*c)})},e}(En),EO=1e5,oo=314159,jh=.01,nq=.001;function iq(t){return t?t.__builtin__?!0:!(typeof t.resize!="function"||typeof t.refresh!="function"):!1}function aq(t,e){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var oq=function(){function t(e,r,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=n=oe({},n||{}),this.dpr=n.devicePixelRatio||Yf,this._singleCanvas=a,this.root=e;var o=e.style;o&&(u_(e),e.innerHTML=""),this.storage=r;var s=this._zlevelList;this._prevDisplayList=[];var u=this._layers;if(a){var f=e,c=f.width,h=f.height;n.width!=null&&(c=n.width),n.height!=null&&(h=n.height),this.dpr=n.devicePixelRatio||1,f.width=c*this.dpr,f.height=h*this.dpr,this._width=c,this._height=h;var d=new ey(f,this,this.dpr);d.__builtin__=!0,d.initContext(),u[oo]=d,d.zlevel=oo,s.push(oo),this._domRoot=e}else{this._width=nh(e,0,n),this._height=nh(e,1,n);var l=this._domRoot=aq(this._width,this._height);e.appendChild(l)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.refresh=function(e){var r=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,n,e,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var u=a===0?this._backgroundColor:null;s.refresh(u)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(e){var r=e.length,n=this._hoverlayer;if(n&&n.clear(),!!r){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<r;o++){var s=e[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(EO)),a||(a=n.ctx,a.save()),Ja(a,s,i,o===r-1))}a&&a.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(EO)},t.prototype.paintOne=function(e,r){YE(e,r)},t.prototype._paintList=function(e,r,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(e);var a=this._doPaintList(e,r,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(l){l.afterBrush&&l.afterBrush()});else{var u=this;Mf(function(){u._paintList(e,r,n,i)})}}},t.prototype._compositeManually=function(){var e=this.getLayer(oo).ctx,r=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,r,n),this.eachBuiltinLayer(function(i){i.virtual&&e.drawImage(i.dom,0,0,r,n)})},t.prototype._doPaintList=function(e,r,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var u=this._zlevelList[s],l=this._layers[u];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&a.push(l)}for(var f=!0,c=!1,h=function(g){var v=a[g],m=v.ctx,y=o&&v.createRepaintRects(e,r,d._width,d._height),b=n?v.__startIndex:v.__drawIndex,w=!n&&v.incremental&&Date.now,C=w&&Date.now(),_=v.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(v.__startIndex===v.__endIndex)v.clear(!1,_,y);else if(b===v.__startIndex){var D=e[b];(!D.incremental||!D.notClear||n)&&v.clear(!1,_,y)}b===-1&&(console.error("For some unknown reason. drawIndex is -1"),b=v.__startIndex);var x,S=function(F){var B={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(x=b;x<v.__endIndex;x++){var M=e[x];if(M.__inHover&&(c=!0),i._doPaintEl(M,v,o,F,B,x===v.__endIndex-1),w){var I=Date.now()-C;if(I>15)break}}B.prevElClipPaths&&m.restore()};if(y)if(y.length===0)x=v.__endIndex;else for(var O=d.dpr,E=0;E<y.length;++E){var P=y[E];m.save(),m.beginPath(),m.rect(P.x*O,P.y*O,P.width*O,P.height*O),m.clip(),S(P),m.restore()}else m.save(),S(),m.restore();v.__drawIndex=x,v.__drawIndex<v.__endIndex&&(f=!1)},d=this,p=0;p<a.length;p++)h(p);return Pe.wxa&&N(this._layers,function(g){g&&g.ctx&&g.ctx.draw&&g.ctx.draw()}),{finished:f,needsRefreshHover:c}},t.prototype._doPaintEl=function(e,r,n,i,a,o){var s=r.ctx;if(n){var u=e.getPaintRect();(!i||u&&u.intersect(i))&&(Ja(s,e,a,o),e.setPrevPaintRect(u))}else Ja(s,e,a,o)},t.prototype.getLayer=function(e,r){this._singleCanvas&&!this._needsManuallyCompositing&&(e=oo);var n=this._layers[e];return n||(n=new ey("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Qe(n,this._layerConfig[e],!0):this._layerConfig[e-jh]&&Qe(n,this._layerConfig[e-jh],!0),r&&(n.virtual=r),this.insertLayer(e,n),n.initContext()),n},t.prototype.insertLayer=function(e,r){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,u=-1;if(n[e]){process.env.NODE_ENV!=="production"&&wa("ZLevel "+e+" has been used already");return}if(!iq(r)){process.env.NODE_ENV!=="production"&&wa("Layer of zlevel "+e+" is not valid");return}if(a>0&&e>i[0]){for(u=0;u<a-1&&!(i[u]<e&&i[u+1]>e);u++);s=n[i[u]]}if(i.splice(u+1,0,e),n[e]=r,!r.virtual)if(s){var l=s.dom;l.nextSibling?o.insertBefore(r.dom,l.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)},t.prototype.eachLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];e.call(r,this._layers[a],a)}},t.prototype.eachBuiltinLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&e.call(r,o,a)}},t.prototype.eachOtherLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||e.call(r,o,a)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(c,h){c.__dirty=c.__used=!1});function r(c){a&&(a.__endIndex!==c&&(a.__dirty=!0),a.__endIndex=c)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var i=e[n];if(i.zlevel!==e[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,u;for(u=0;u<e.length;u++){var i=e[u],l=i.zlevel,f=void 0;s!==l&&(s=l,o=0),i.incremental?(f=this.getLayer(l+nq,this._needsManuallyCompositing),f.incremental=!0,o=1):f=this.getLayer(l+(o>0?jh:0),this._needsManuallyCompositing),f.__builtin__||wa("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,r(u),a=f),i.__dirty&Or&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=u))}r(u),this.eachBuiltinLayer(function(c,h){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,N(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var n=this._layerConfig;n[e]?Qe(n[e],r,!0):n[e]=r;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===e||a===e+jh){var o=this._layers[a];Qe(o,n[e],!0)}}}},t.prototype.delLayer=function(e){var r=this._layers,n=this._zlevelList,i=r[e];i&&(i.dom.parentNode.removeChild(i.dom),delete r[e],n.splice(Ge(n,e),1))},t.prototype.resize=function(e,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(e!=null&&(i.width=e),r!=null&&(i.height=r),e=nh(a,0,i),r=nh(a,1,i),n.style.display="",this._width!==e||r!==this._height){n.style.width=e+"px",n.style.height=r+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,r);this.refresh(!0)}this._width=e,this._height=r}else{if(e==null||r==null)return;this._width=e,this._height=r,this.getLayer(oo).resize(e,r)}return this},t.prototype.clearLayer=function(e){var r=this._layers[e];r&&r.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[oo].dom;var r=new ey("image",this,e.pixelRatio||this.dpr);r.initContext(),r.clear(!1,e.backgroundColor||this._backgroundColor);var n=r.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var i=r.dom.width,a=r.dom.height;this.eachLayer(function(c){c.__builtin__?n.drawImage(c.dom,0,0,i,a):c.renderToCanvas&&(n.save(),c.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),u=0,l=s.length;u<l;u++){var f=s[u];Ja(n,f,o,u===l-1)}return r.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t}();function sq(t){t.registerPainter("canvas",oq)}Wi([LG,dU,nU,eU,SG,OU,EU,XW,LW,u$,fW,rq,sq]);const uq=k.memo(({type:t,options:e,echartRef:r})=>{const n=k.useRef(null),i=k.useRef(null);return k.useEffect(()=>(n.current&&(i.current=OV(n.current)),()=>{i.current&&i.current.dispose()}),[]),k.useEffect(()=>{i.current&&i.current.setOption({...e})},[t,e]),k.useImperativeHandle(r,()=>({resize:()=>{i.current&&i.current.resize()}})),A.jsx("div",{ref:n,style:{width:"100%",height:"100%"}})});var lq=typeof global=="object"&&global&&global.Object===Object&&global,fq=typeof self=="object"&&self&&self.Object===Object&&self,AO=lq||fq||Function("return this")(),Es=AO.Symbol,TO=Object.prototype,cq=TO.hasOwnProperty,hq=TO.toString,hl=Es?Es.toStringTag:void 0;function dq(t){var e=cq.call(t,hl),r=t[hl];try{t[hl]=void 0;var n=!0}catch{}var i=hq.call(t);return n&&(e?t[hl]=r:delete t[hl]),i}var vq=Object.prototype,pq=vq.toString;function gq(t){return pq.call(t)}var mq="[object Null]",yq="[object Undefined]",OO=Es?Es.toStringTag:void 0;function bq(t){return t==null?t===void 0?yq:mq:OO&&OO in Object(t)?dq(t):gq(t)}function Cq(t){return t!=null&&typeof t=="object"}var wq="[object Symbol]";function PO(t){return typeof t=="symbol"||Cq(t)&&bq(t)==wq}function _q(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var Dq=Array.isArray,xq=1/0,BO=Es?Es.prototype:void 0,MO=BO?BO.toString:void 0;function FO(t){if(typeof t=="string")return t;if(Dq(t))return _q(t,FO)+"";if(PO(t))return MO?MO.call(t):"";var e=t+"";return e=="0"&&1/t==-xq?"-0":e}var Sq=/\s/;function Eq(t){for(var e=t.length;e--&&Sq.test(t.charAt(e)););return e}var Aq=/^\s+/;function Tq(t){return t&&t.slice(0,Eq(t)+1).replace(Aq,"")}function LO(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var IO=NaN,Oq=/^[-+]0x[0-9a-f]+$/i,Pq=/^0b[01]+$/i,Bq=/^0o[0-7]+$/i,Mq=parseInt;function RO(t){if(typeof t=="number")return t;if(PO(t))return IO;if(LO(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=LO(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Tq(t);var r=Pq.test(t);return r||Bq.test(t)?Mq(t.slice(2),r?2:8):Oq.test(t)?IO:+t}var NO=1/0,Fq=17976931348623157e292;function Lq(t){if(!t)return t===0?t:0;if(t=RO(t),t===NO||t===-NO){var e=t<0?-1:1;return e*Fq}return t===t?t:0}function Iq(t){var e=Lq(t),r=e%1;return e===e?r?e-r:e:0}function kO(t){return t==null?"":FO(t)}var Rq=AO.isFinite,Nq=Math.min;function kq(t){var e=Math[t];return function(r,n){if(r=RO(r),n=n==null?0:Nq(Iq(n),292),n&&Rq(r)){var i=(kO(r)+"e").split("e"),a=e(i[0]+"e"+(+i[1]+n));return i=(kO(a)+"e").split("e"),+(i[0]+"e"+(+i[1]-n))}return e(r)}}var ty=kq("round");const zO=({moduleDataApi:t,customData:e,customeStyle:r,width:n=2,height:i=2})=>{const{globalData:a}=Oo(),[o,s]=k.useState(),[u,l]=k.useState(),[f,c]=k.useState(),h=k.useRef(),d=k.useCallback(async()=>{e?t==null||t({id:e==null?void 0:e.dataSourceId}).then(p=>{if(!p.success){Q.message.error(p.message);return}l(p.data)}):l([])},[e==null?void 0:e.dataSourceId,t]);return k.useEffect(()=>{e&&d()},[d,e==null?void 0:e.dataSourceId]),k.useEffect(()=>{var p,g,v,m,y,b,w,C,_,D,x,S,O,E,P;if(e&&u&&e.type){let F=[];c([]),F=u;const B={},M={};let I=0;if(e.yAxis==="recordTotal")F.forEach(ae=>{const ve=ae[e==null?void 0:e.xAxis];B[ve]=(B[ve]||0)+1,I+=1});else if(e.yAxis==="fieldValue"){F.forEach(ae=>{const ve=ae[e==null?void 0:e.xAxis],Le=ae[e==null?void 0:e.yAxisField],ft=typeof Le=="number"?Le:0;M[ve]=M[ve]||[],M[ve].push(ft),I+=1});for(const ae in M)switch(e==null?void 0:e.yAxisFieldType){case"sum":B[ae]=ty(M[ae].reduce((ve,Le)=>ve+Le,0),3);break;case"max":B[ae]=ty(Math.max(...M[ae]),3);break;case"min":B[ae]=ty(Math.min(...M[ae]),3);break;case"average":B[ae]=M[ae].length?M[ae].reduce((ve,Le)=>ve+Le,0)/M[ae].length:0;break;default:B[ae]=0}}const j={show:(p=e==null?void 0:e.chartOptions)==null?void 0:p.includes("label"),position:"top",formatter:"{c}"},z=Object.keys(B),W=Object.values(B),R={"chart-bar":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"bar",label:j}]},"chart-bar-pile":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"bar",label:j}]},"chart-bar-percentage":{xAxis:{type:"category",data:z},yAxis:{type:"value",max:100},series:[{data:z.map(ae=>B[ae]/I*100),type:"bar",label:j}]},"chart-line":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"line",label:j}]},"chart-line-smooth":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"line",smooth:!0,label:j}]},"chart-pie":{xAxis:{show:!1},yAxis:{show:!1},series:[{data:W,type:"pie",radius:"50%",label:{...j,position:"outside"},labelLine:{normal:{show:!0}}}]},"chart-pie-circular":{xAxis:{show:!1},yAxis:{show:!1},series:[{data:W,type:"pie",radius:["40%","70%"],label:{...j,position:"outside"},labelLine:{normal:{show:!0}}}]},"chart-strip-bar":{xAxis:{type:"value"},yAxis:{type:"category",data:z},series:[{data:W,type:"bar",label:j}]},"chart-strip-bar-pile":{xAxis:{type:"value"},yAxis:{type:"category",data:z},series:[{data:W,type:"bar",label:j}]},"chart-strip-bar-percentage":{xAxis:{type:"value",max:100},yAxis:{type:"category",data:z},series:[{data:z.map(ae=>B[ae]/I*100),type:"bar",label:j}]}},U=(g=e==null?void 0:e.chartOptions)==null?void 0:g.includes("legend"),Z=R[e.type]||{},ee=Z.series.map(ae=>{var ve;return{...ae,name:e.yAxis==="recordTotal"?"统计":(ve=o==null?void 0:o.find(Le=>Le.value===e.yAxisField))==null?void 0:ve.label}}),ne=ae=>{const ve=Math.max(...ae.map(Ie=>String(Ie.name).length)),Le=Math.max(...ae.flatMap(Ie=>Ie.data.map(at=>String(at).length))),ft=Math.max(...ae.flatMap(Ie=>Ie.data.length));return{maxNameLength:ve,maxValueLength:Le,maxArrLength:ft}},q=ae=>ae.reduce((ve,Le)=>{const ft=String(Le).length;return Math.max(ve,ft)},0);let L=18,X=18;const{maxNameLength:V,maxArrLength:G}=ne(ee),J=q((v=Z==null?void 0:Z.xAxis)==null?void 0:v.data);let K=0;G>3?(J>15&&(K=90),J>5&&(K=45),n<3&&(K=90)):(L=50,X=50);const Y=K===45?7:K===90?9:0,fe="50px",ue=`${(J>15?15:J)*Y+L}px`,Ce=`${(V>15?15:V)*Y+X}px`,Fe={legend:{left:"center",right:"center",top:"2px",show:U,data:ee==null?void 0:ee.map(ae=>ae==null?void 0:ae.name)},grid:{top:fe,bottom:ue,right:Ce,left:"70px"},graphic:{elements:[{type:"text",left:"center",bottom:"10px",style:{text:(r==null?void 0:r.xtitle)||"",fill:"#333",fontSize:12,fontWeight:"bold"}},{type:"text",left:"10px",top:"center",style:{text:(r==null?void 0:r.ytitle)||"",fill:"#333",fontSize:12,fontWeight:"bold"},rotation:Math.PI/2}]},xAxis:{...Z.xAxis,axisTick:{show:(m=e==null?void 0:e.chartOptions)==null?void 0:m.includes("axis")},axisLine:{show:((y=e==null?void 0:e.chartOptions)==null?void 0:y.includes("axis"))||((b=r==null?void 0:r.xchartOptions)==null?void 0:b.includes("axisLine"))},axisLabel:{show:((w=e==null?void 0:e.chartOptions)==null?void 0:w.includes("axis"))||((C=r==null?void 0:r.xchartOptions)==null?void 0:C.includes("label")),rotate:K,interval:0,formatter:ae=>ae.length>15?`${ae.slice(0,15)}...`:ae},splitLine:{show:(_=e==null?void 0:e.chartOptions)==null?void 0:_.includes("splitLine")}},yAxis:{...Z.yAxis,axisTick:{show:(D=e==null?void 0:e.chartOptions)==null?void 0:D.includes("axis")},axisLine:{show:((x=e==null?void 0:e.chartOptions)==null?void 0:x.includes("axis"))||((S=r==null?void 0:r.ychartOptions)==null?void 0:S.includes("axisLine"))},axisLabel:{show:((O=e==null?void 0:e.chartOptions)==null?void 0:O.includes("axis"))||((E=r==null?void 0:r.ychartOptions)==null?void 0:E.includes("label")),formatter:ae=>ae.length>15?`${ae.slice(0,15)}...`:ae},splitLine:{show:(P=e==null?void 0:e.chartOptions)==null?void 0:P.includes("splitLine")}},series:ee,tooltip:{trigger:"axis",axisPointer:{type:"shadow"}}};console.log("options",JSON.stringify(Fe)),c(Fe)}},[e,r,u,n,i]),k.useEffect(()=>{var p;a!=null&&a.sourceData&&(e!=null&&e.dataSourceId)&&s((p=a==null?void 0:a.sourceData.find(g=>g.value===(e==null?void 0:e.dataSourceId)))==null?void 0:p.fields)},[a,e]),k.useEffect(()=>{var p;(n||i)&&((p=h==null?void 0:h.current)==null||p.resize())},[n,i]),A.jsx("div",{style:{width:"100%",height:"100%"},children:A.jsx(uq,{echartRef:h,type:"bar",options:f})})},zq=k.memo(({module:t,onUpdate:e,moduleDataApi:r,rowWidth:n,rowHeight:i})=>{var a;return A.jsx("div",{className:"chart-content",children:A.jsxs("div",{className:"dashboard-grid-container",children:[t.type==="text"?A.jsx(v8,{defaultValue:t.customData.editor,onChange:o=>{t.id&&e(t.id,{type:"text",customData:{title:t.customData.title,editor:o}})}}):null,t.type==="statistics"?A.jsx(Hw,{customData:t.customData,customeStyle:t.customeStyle,moduleDataApi:r,width:t.w,height:t.h,rowWidth:n,rowHeight:i}):null,t.type==="calendar"?A.jsx(Jw,{customData:t.customData,moduleDataApi:r}):null,(a=t.type)!=null&&a.includes("chart")?A.jsx(zO,{width:t.w,height:t.h,customData:t.customData,customeStyle:t.customeStyle,moduleDataApi:r}):null]})})}),jO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"17",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"28",y:"24",width:"6",height:"16",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"39",y:"8",width:"6",height:"32",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"50",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"})]}),VO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M17 33.5L29.5 15L45 23L58 10",stroke:"#959bee",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),A.jsx("path",{d:"M16.5 15L30 31.5L45 28L57 33.5",stroke:"#5b65f4",strokeWidth:"1.5",strokeLinecap:"round"})]}),HO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("circle",{cx:"16",cy:"16",r:"16",transform:"matrix(-1 0 0 1 52 8)",fill:"#5b65f4"}),A.jsx("path",{d:"M36 8.5C36 8.22386 36.224 7.99918 36.5 8.00781C40.5621 8.13468 44.4312 9.80377 47.3137 12.6863C50.3143 15.6869 52 19.7565 52 24C52 28.2435 50.3143 32.3131 47.3137 35.3137C44.4312 38.1962 40.5621 39.8653 36.5 39.9922C36.224 40.0008 36 39.7761 36 39.5L36 24V8.5Z",fill:"#959bee"}),A.jsx("path",{d:"M46.9602 34.9602C47.1554 35.1554 47.1559 35.4726 46.9547 35.6617C45.5468 36.9842 43.91 38.0418 42.1229 38.7821C40.3358 39.5223 38.4306 39.9318 36.4999 39.9922C36.2239 40.0008 36 39.7761 36 39.5L36 25.2071C36 24.7617 36.5386 24.5386 36.8536 24.8536L46.9602 34.9602Z",fill:"#cdcff9"})]}),WO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"31",y:"11",width:"4",height:"15",rx:"0.5",transform:"rotate(90 31 11)",fill:"#5b65f5"}),A.jsx("rect",{x:"44",y:"18",width:"4",height:"28",rx:"0.5",transform:"rotate(90 44 18)",fill:"#5b65f5"}),A.jsx("rect",{x:"56",y:"25",width:"4",height:"40",rx:"0.5",transform:"rotate(90 56 25)",fill:"#5b65f5"}),A.jsx("rect",{x:"36",y:"32",width:"4",height:"20",rx:"0.5",transform:"rotate(90 36 32)",fill:"#5b65f5"})]}),jq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M59.3348 27.8581C59.3348 28.6621 59.0708 29.2801 58.5428 29.7121C58.0268 30.1441 57.3848 30.3601 56.6168 30.3601C55.8488 30.3601 55.2008 30.1441 54.6728 29.7121C54.1568 29.2801 53.8988 28.6621 53.8988 27.8581V26.1481C53.8988 25.3441 54.1568 24.7261 54.6728 24.2941C55.2008 23.8621 55.8488 23.6461 56.6168 23.6461C57.3848 23.6461 58.0268 23.8621 58.5428 24.2941C59.0708 24.7261 59.3348 25.3441 59.3348 26.1481V27.8581ZM50.9648 21.5401C50.9648 22.3441 50.7008 22.9621 50.1728 23.3941C49.6568 23.8261 49.0148 24.0421 48.2468 24.0421C47.4788 24.0421 46.8308 23.8261 46.3028 23.3941C45.7868 22.9621 45.5288 22.3441 45.5288 21.5401V19.8301C45.5288 19.0261 45.7868 18.4081 46.3028 17.9761C46.8308 17.5441 47.4788 17.3281 48.2468 17.3281C49.0148 17.3281 49.6568 17.5441 50.1728 17.9761C50.7008 18.4081 50.9648 19.0261 50.9648 19.8301V21.5401ZM56.6168 17.4361L50.5148 30.2521H48.2468L54.3488 17.4361H56.6168ZM48.8768 21.4681V19.9021C48.8768 19.4341 48.6668 19.2001 48.2468 19.2001C47.8268 19.2001 47.6168 19.4341 47.6168 19.9021V21.4681C47.6168 21.9361 47.8268 22.1701 48.2468 22.1701C48.6668 22.1701 48.8768 21.9361 48.8768 21.4681ZM57.2468 27.7861V26.2201C57.2468 25.7521 57.0368 25.5181 56.6168 25.5181C56.1968 25.5181 55.9868 25.7521 55.9868 26.2201V27.7861C55.9868 28.2541 56.1968 28.4881 56.6168 28.4881C57.0368 28.4881 57.2468 28.2541 57.2468 27.7861Z",fill:"#5b65f4"}),A.jsx("path",{d:"M44.0049 26.4181C44.0049 27.6901 43.5969 28.6681 42.7809 29.3521C41.9649 30.0241 40.9509 30.3601 39.7389 30.3601C38.9829 30.3601 38.2929 30.2341 37.6689 29.9821C37.0569 29.7181 36.5349 29.2741 36.1029 28.6501C35.6829 28.0261 35.4729 27.2581 35.4729 26.3461H38.4249C38.4249 26.7781 38.5449 27.1141 38.7849 27.3541C39.0369 27.5821 39.3549 27.6961 39.7389 27.6961C40.1349 27.6961 40.4529 27.5821 40.6929 27.3541C40.9329 27.1141 41.0529 26.7721 41.0529 26.3281C41.0529 25.9441 40.9209 25.6261 40.6569 25.3741C40.4049 25.1101 40.0809 24.9781 39.6849 24.9781H39.2709V22.4221H39.6849C40.0929 22.4221 40.3989 22.3021 40.6029 22.0621C40.8069 21.8221 40.9089 21.5401 40.9089 21.2161C40.9089 20.8321 40.7949 20.5321 40.5669 20.3161C40.3389 20.1001 40.0629 19.9921 39.7389 19.9921C39.4149 19.9921 39.1389 20.1001 38.9109 20.3161C38.6829 20.5321 38.5689 20.8261 38.5689 21.1981H35.6169C35.6169 20.0221 36.0069 19.0861 36.7869 18.3901C37.5789 17.6821 38.5629 17.3281 39.7389 17.3281C40.9269 17.3281 41.9109 17.6881 42.6909 18.4081C43.4709 19.1161 43.8609 20.0221 43.8609 21.1261C43.8609 22.2301 43.4169 23.0641 42.5289 23.6281C43.5129 24.3121 44.0049 25.2421 44.0049 26.4181Z",fill:"#5b65f4"}),A.jsx("path",{d:"M33.9128 30.2521H25.6688V27.5881L30.3128 22.5481C30.7448 22.0801 30.9608 21.6241 30.9608 21.1801C30.9608 20.8201 30.8588 20.5321 30.6548 20.3161C30.4628 20.1001 30.1808 19.9921 29.8088 19.9921C29.4848 19.9921 29.2028 20.0881 28.9628 20.2801C28.7348 20.4721 28.6208 20.7901 28.6208 21.2341H25.6688C25.6688 20.0221 26.0648 19.0681 26.8568 18.3721C27.6608 17.6761 28.6448 17.3281 29.8088 17.3281C31.0208 17.3281 32.0048 17.6761 32.7608 18.3721C33.5288 19.0681 33.9128 20.0101 33.9128 21.1981C33.9128 21.8221 33.7928 22.3501 33.5528 22.7821C33.3128 23.2141 32.9048 23.7361 32.3288 24.3481L29.2688 27.5881H33.9128V30.2521Z",fill:"#5b65f4"}),A.jsx("path",{d:"M22.021 30.2525H19.069V20.5865L16.333 22.9625V19.8125L19.069 17.4365H22.021V30.2525Z",fill:"#5b65f4"})]}),Vq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"58",y:"25",width:"4",height:"44",rx:"0.5",transform:"rotate(90 58 25)",fill:"#5b65f4"}),A.jsx("rect",{x:"29.5",y:"33",width:"4",height:"15.5",rx:"0.5",transform:"rotate(90 29.5 33)",fill:"#959bee"}),A.jsx("path",{d:"M14.584 19L17.085 12.2832H18.8377L21.3008 19H19.7566L19.264 17.5695H16.5829L16.0808 19H14.584ZM17.0377 16.2716H18.8093L17.9282 13.7232L17.0377 16.2716ZM22.1459 19V12.2832H24.609C25.9259 12.2832 26.6933 13.0505 26.6933 14.0832C26.6933 14.7842 26.2575 15.3432 25.708 15.5232C26.3333 15.6747 26.9017 16.2432 26.9017 17.1053C26.9017 18.2042 26.068 19 24.808 19H22.1459ZM23.529 15.0116H24.3911C24.9406 15.0116 25.3006 14.7084 25.3006 14.2347C25.3006 13.7705 24.9785 13.4674 24.3722 13.4674H23.529V15.0116ZM23.529 17.8347H24.5143C25.1206 17.8347 25.4901 17.5126 25.4901 17.0105C25.4901 16.5179 25.1396 16.1768 24.5238 16.1768H23.529V17.8347ZM31.0425 19.1421C29.1383 19.1421 27.5751 17.7684 27.5751 15.6558C27.5751 13.5432 29.1762 12.1411 31.0236 12.1411C32.9751 12.1411 33.8941 13.3726 34.1309 14.3863L32.7951 14.8126C32.672 14.2726 32.1983 13.5147 31.0236 13.5147C30.0857 13.5147 29.0436 14.1968 29.0436 15.6558C29.0436 16.9821 30.0099 17.7305 31.0425 17.7305C32.2078 17.7305 32.7004 16.9726 32.8615 16.4232L34.2067 16.8211C33.9699 17.7968 33.0509 19.1421 31.0425 19.1421Z",fill:"#5b65f4"})]}),Hq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{width:"26",height:"19",rx:"1",transform:"matrix(1 0 0 -1 23 36.5)",fill:"#E9EAFB"}),A.jsx("rect",{width:"26",height:"3",rx:"1",transform:"matrix(1 0 0 -1 23 14.5)",fill:"#5b65f4"}),A.jsx("rect",{width:"11",height:"3",rx:"0.5",transform:"matrix(1 0 0 -1 27 25.5)",fill:"#5b65f4"}),A.jsx("rect",{width:"11",height:"3",rx:"0.5",transform:"matrix(1 0 0 -1 34 31.5)",fill:"#959bee"})]}),Wq=({onOk:t})=>{const{t:e}=zr(),r=[{title:e("add.t1"),child:[{title:e("add.t2"),type:"chart-bar",icon:A.jsx(jO,{})},{title:e("add.t3"),type:"chart-line",icon:A.jsx(VO,{})},{title:e("add.t4"),type:"chart-pie",icon:A.jsx(HO,{})},{title:e("add.t5"),type:"chart-strip-bar",icon:A.jsx(WO,{})}]},{title:e("add.t6"),child:[{title:e("add.t7"),type:"statistics",icon:A.jsx(jq,{})},{title:e("add.t8"),type:"text",icon:A.jsx(Vq,{})},{title:e("add.t9"),type:"calendar",icon:A.jsx(Hq,{})}]}],[n,i]=k.useState(!1),a=o=>{i(!1),t==null||t(o)};return A.jsx(A.Fragment,{children:A.jsx(Q.Popover,{placement:"bottomRight",open:n,onOpenChange:i,content:A.jsx("div",{className:"pivot-table-modal box-widget-popover-item-container",children:r.map((o,s)=>A.jsxs("div",{className:"box-widget-popover-item-group",children:[A.jsx("p",{className:"box-widget-popover-item-group-header",children:o.title}),A.jsx("div",{className:"box-widget-popover-item-group-content",children:o.child.map((u,l)=>A.jsxs("div",{onClick:()=>{a(u.type)},className:"box-widget-popover-item",children:[A.jsx("div",{className:"img",children:u.icon}),A.jsx("div",{className:"title",children:u.title})]},l))})]},s))}),trigger:"click",children:A.jsx(Q.Button,{children:e("add.t10")})})})},$q=[{label:"等于",value:"="},{label:"早于",value:"<"},{label:"晚于",value:">"},{label:"范围内",value:"contain"},{label:"为空",value:"null"},{label:"不为空",value:"notnull"}],Gq=[{label:"等于",value:"="}],$O=[{label:"等于",value:"="},{label:"不等于",value:"!="},{label:"大于",value:">"},{label:"大于等于",value:">="},{label:"小于",value:"<"},{label:"小于等于",value:"=<"},{label:"范围内",value:"contain"},{label:"为空",value:"null"},{label:"不为空",value:"notnull"}],GO=[{label:"等于",value:"="},{label:"不等于",value:"!="},{label:"包含",value:"include"},{label:"不包含",value:"notinclude"},{label:"为空",value:"null"},{label:"不为空",value:"notnull"}],Uq={int:$O,timestamp:$q,string:GO,bool:Gq,float:$O,enum:GO};let Vh;const UO=({open:t,onClose:e,onOk:r,fieldOptions:n,value:i,enumDataApi:a})=>{const[o]=Q.Form.useForm(),s=k.useRef(),{t:u}=zr(),l=k.useCallback(()=>{if(i!=null&&i.conditionList){const g=JSON.parse(JSON.stringify(i==null?void 0:i.conditionList));o.setFieldsValue({conditionList:g.map(v=>(v.type==="timestamp"&&(v.val&&(v.val=ti(v.val)),v.val2&&(v.val2=ti(v.val2))),(v.val===void 0||v.val==="")&&(v.val=""),(v.val2===void 0||v.val2==="")&&(v.val2=""),v)),conditionType:i.conditionType})}else o.setFieldsValue({conditionList:[],conditionType:"all"})},[i]),[f,c]=k.useState([]),h=({url:g,callback:v})=>{var m;(m=a==null?void 0:a(g))==null||m.then(y=>{v(y.data)})},d=g=>{Vh&&(clearTimeout(Vh),Vh=null),Vh=setTimeout(()=>{h(g)},300)},p=(g,v)=>{d({url:g,value:v,callback:c})};return k.useEffect(()=>{l()},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{title:u("setFilteringCriteria"),open:t,destroyOnClose:!0,width:"600px",onOk:()=>{const g=o.getFieldsValue(),v=g.conditionList?JSON.parse(JSON.stringify(g.conditionList)):"",m=g.conditionType,y={conditionList:v.map(b=>(b.type==="timestamp"&&(b.val&&(b.val=ti(b.val).format("YYYY-MM-DD")),b.val2&&(b.val2=b.val2?ti(b.val2).format("YYYY-MM-DD"):"")),b)),conditionType:m};s.current=y,e==null||e(),r==null||r(y)},onCancel:()=>{l(),e==null||e(),o.setFieldsValue(s.current)},children:A.jsxs(Q.Form,{name:"dynamicForm",form:o,initialValues:{conditionType:"all"},style:{maxWidth:600,marginTop:"30px"},children:[A.jsx(Q.Form.Item,{noStyle:!0,dependencies:["conditionList"],children:({getFieldValue:g})=>{var v;return((v=g("conditionList"))==null?void 0:v.length)>1?A.jsxs(Q.Flex,{align:"center",gap:5,style:{marginBottom:"20px"},children:[u("conformTo"),A.jsx(Q.Form.Item,{name:"conditionType",noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},options:[{label:u("all"),value:"all"},{label:u("everyone"),value:"any"}]})})," ",u("condition")]}):null}}),A.jsx(Q.Form.List,{name:"conditionList",children:(g,{add:v,remove:m})=>A.jsxs(A.Fragment,{children:[g.map(({key:y,name:b,...w})=>A.jsxs(Q.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[A.jsx(Q.Form.Item,{...w,name:[b,"field"],noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},options:n||[],onChange:C=>{const _=o.getFieldValue("conditionList"),D=n==null?void 0:n.find(S=>S.value===C);_[b].condition="=",_[b].type=D==null?void 0:D.type,_[b].val="",_[b].val2="",o.setFieldsValue({conditionList:_});const x=D==null?void 0:D.dynamic_call_enum_api;console.log("enumUrl",x),x&&h({url:x,value:"",callback:c})}})}),A.jsx(Q.Form.Item,{noStyle:!0,dependencies:[["conditionList",b,"field"]],children:({getFieldValue:C})=>{var D;const _=(D=n==null?void 0:n.find(x=>x.value===C(["conditionList",b,"field"])))==null?void 0:D.type;return A.jsx(A.Fragment,{children:A.jsx(Q.Form.Item,{...w,name:[b,"condition"],noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},options:_?Uq[_]:[]})})})}}),A.jsx(Q.Form.Item,{noStyle:!0,dependencies:[["conditionList",b,"field"],["conditionList",b,"condition"]],children:({getFieldValue:C})=>{var O,E,P;const _=(O=n==null?void 0:n.find(F=>F.value===C(["conditionList",b,"field"])))==null?void 0:O.type,D=(E=n==null?void 0:n.find(F=>F.value===C(["conditionList",b,"field"])))==null?void 0:E.enum,x=(P=n==null?void 0:n.find(F=>F.value===C(["conditionList",b,"field"])))==null?void 0:P.dynamic_call_enum_api,S=C(["conditionList",b,"condition"]);return A.jsxs(A.Fragment,{children:[["int","float"].includes(_)&&!["null","notnull"].includes(S)?A.jsxs(A.Fragment,{children:[A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.InputNumber,{style:{width:"100px"},placeholder:u("pleaseEnter")})}),S==="contain"?A.jsx(Q.Form.Item,{...w,name:[b,"val2"],noStyle:!0,children:A.jsx(Q.InputNumber,{style:{width:"100px",marginLeft:"5px"},placeholder:u("pleaseEnter")})}):null]}):null,_==="timestamp"&&!["null","notnull"].includes(S)?A.jsxs(A.Fragment,{children:[A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.DatePicker,{style:{width:"150px"}})}),S==="contain"?A.jsx(Q.Form.Item,{...w,name:[b,"val2"],noStyle:!0,children:A.jsx(Q.DatePicker,{style:{width:"150px",marginLeft:"5px"}})}):null]}):null,["string"].includes(_)&&!["null","notnull"].includes(S)?A.jsxs(A.Fragment,{children:[A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.Input,{style:{width:"150px"},placeholder:u("pleaseEnter")})}),S==="contain"?A.jsx(Q.Form.Item,{...w,name:[b,"val2"],noStyle:!0,children:A.jsx(Q.Input,{style:{width:"150px",marginLeft:"5px"},placeholder:u("pleaseEnter")})}):null]}):null,["bool"].includes(_)?A.jsx(A.Fragment,{children:A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.Switch,{})})}):null,["enum"].includes(_)&&!["null","notnull"].includes(S)?A.jsx(A.Fragment,{children:A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:(D==null?void 0:D.length)>0?A.jsx(Q.Select,{style:{width:"150px"},options:D}):x?A.jsx(Q.Select,{style:{width:"150px"},showSearch:!0,defaultActiveFirstOption:!1,suffixIcon:null,filterOption:!1,onSearch:F=>{p(x,F)},notFoundContent:null,options:(f||[]).map(F=>({value:F.value,label:F.label}))}):null})}):null]})}}),A.jsx(ww,{onClick:()=>m(b)})]},y)),A.jsx(Q.Form.Item,{children:A.jsx(Q.Button,{type:"dashed",onClick:()=>{v({field:n==null?void 0:n[0].value,condition:"=",type:n==null?void 0:n[0].type})},block:!0,icon:A.jsx(Dw,{}),children:u("addCondition")})})]})})]})})})},qq=({selectModuleData:t,onAllValuesChange:e,enumDataApi:r})=>{const{globalData:n}=Oo(),[i]=Q.Form.useForm(),[a,o]=k.useState(),[s,u]=k.useState(!1),l=k.useRef(),[f,c]=k.useState(),[h,d]=k.useState(0),{t:p}=zr(),g={dataSourceId:"",statisticalMethod:"recordTotal",field:""},v=()=>{setTimeout(()=>{console.log("conditionDataRef.current",l.current),e==null||e({...i.getFieldsValue(),conditionData:l.current})})},m=b=>{var C,_;const w=(_=(C=n==null?void 0:n.sourceData)==null?void 0:C.find(D=>D.value===b))==null?void 0:_.fields;o(w)},y=b=>{var w;c(b),l.current=b,d(((w=b==null?void 0:b.conditionList)==null?void 0:w.length)||0)};return k.useEffect(()=>{var b,w;if(t!=null&&t.customData){const C=t.customData;i.setFieldsValue(C),o(C==null?void 0:C.dataSourceId),m(C==null?void 0:C.dataSourceId)}else{const C=(b=n==null?void 0:n.sourceData)==null?void 0:b[0];i.setFieldsValue({...g,dataSourceId:C==null?void 0:C.value}),m(C==null?void 0:C.value),v()}y((w=t==null?void 0:t.customData)==null?void 0:w.conditionData)},[t,n]),A.jsxs(A.Fragment,{children:[A.jsxs(Q.Form,{form:i,name:"customData",layout:"vertical",initialValues:g,children:[A.jsx(Q.Form.Item,{label:p("dataSource"),name:"dataSourceId",children:A.jsx(Q.Select,{options:n==null?void 0:n.sourceData,onChange:b=>{i.setFieldsValue({statisticalMethod:"recordTotal"}),m(b),v()}})}),A.jsxs(Q.Form.Item,{label:p("dataRange"),children:[A.jsx(Q.Button,{style:{marginLeft:"-15px"},onClick:()=>{u(!0)},type:"link",children:p("filterData")}),h>0?`${p("selectNcondition",{n:h})}`:null]}),A.jsx(Q.Divider,{style:{borderColor:"#e2e2e2",marginTop:0}}),A.jsx(Q.Form.Item,{label:p("statisticstMethods"),name:"statisticalMethod",children:A.jsx(Q.Select,{onChange:b=>{i.setFieldsValue({field:b==="fieldValue"?a==null?void 0:a[0].value:"",statisticalType:"sum"}),v()},options:[{value:"recordTotal",label:p("statisticstRecordNum")},{value:"fieldValue",label:p("statisticstFieldVal")}]})}),A.jsx(Q.Form.Item,{dependencies:["statisticalMethod"],children:({getFieldValue:b})=>b("statisticalMethod")==="fieldValue"?A.jsx(Q.Form.Item,{label:p("selectField"),children:A.jsxs(Q.Space.Compact,{children:[A.jsx(Q.Form.Item,{noStyle:!0,name:"field",children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{v()},options:a})}),A.jsx(Q.Form.Item,{name:"statisticalType",noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{v()},options:[{value:"sum",label:p("sumVal")},{value:"max",label:p("maxVal")},{value:"min",label:p("minVal")},{value:"average",label:p("averageVal")}]})})]})}):null})]}),A.jsx(UO,{open:s,value:f,fieldOptions:a,enumDataApi:r,onClose:()=>{u(!1)},onOk:b=>{y(b),v()}})]})},Yq=({value:t,onChange:e})=>{const[r,n]=k.useState(),i=["#373c43","#3370ff","#4954e6","#34c724","#14c0ff","#ffc60a","#f80","#f76964"];return k.useEffect(()=>{n(t)},[t]),A.jsx("div",{className:"pane-item-body item-body-column",children:A.jsx("div",{className:"panel-single-color-selector",children:i.map((a,o)=>A.jsxs("div",{className:"panel-single-color-selector-color-item",onClick:()=>{n(a),e==null||e(a)},children:[A.jsx("div",{className:"panel-single-color-selector-color-item-background",style:{background:a}}),r===a?A.jsx("span",{className:"panel-icon",children:A.jsx(mw,{})}):null]},o))})})},Xq=({selectModuleData:t,onAllValuesChange:e})=>{const[r]=Q.Form.useForm(),{t:n}=zr(),i={color:"#373c43",unit:"1",precision:"",desc:""},a=()=>{setTimeout(()=>{e==null||e(r.getFieldsValue())})};return k.useEffect(()=>{t!=null&&t.customeStyle?r.setFieldsValue(t.customeStyle):r.setFieldsValue(i)},[t]),A.jsxs(Q.Form,{form:r,name:"customeStyle",layout:"vertical",initialValues:i,children:[A.jsx(Q.Form.Item,{label:n("statistics.t1"),name:"color",children:A.jsx(Yq,{onChange:()=>{a()}})}),A.jsx(Q.Form.Item,{label:n("statistics.t2"),extra:n("statistics.t3"),children:A.jsxs(Q.Space.Compact,{children:[A.jsx(Q.Form.Item,{name:"precision",noStyle:!0,children:A.jsx(Q.InputNumber,{min:1,max:10,style:{width:"60%"},placeholder:n("statistics.t4"),onChange:()=>{a()}})}),A.jsx(Q.Form.Item,{name:"unit",noStyle:!0,children:A.jsxs(Q.Select,{onChange:()=>{a()},children:[A.jsx(Q.Select.Option,{value:"1",children:n("statistics.t5")}),A.jsx(Q.Select.Option,{value:"2",children:n("statistics.t6")}),A.jsx(Q.Select.Option,{value:"3",children:n("statistics.t7")}),A.jsx(Q.Select.Option,{value:"4",children:n("statistics.t8")}),A.jsx(Q.Select.Option,{value:"5",children:n("statistics.t9")})]})})]})}),A.jsx(Q.Form.Item,{label:n("statistics.t10"),name:"desc",children:A.jsx(Q.Input,{onChange:()=>{a()}})})]})},Kq=({open:t,onClose:e,onOk:r,moduleDataApi:n,selectModuleData:i,enumDataApi:a})=>{const{t:o}=zr(),[s,u]=k.useState(),[l,f]=k.useState(),c=()=>{e==null||e()};return k.useEffect(()=>{i&&(u(i==null?void 0:i.customData),f(i==null?void 0:i.customeStyle))},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{width:"65%",title:o("statisticsText"),footer:null,open:t,onOk:c,onCancel:e,closeIcon:A.jsx(pf,{style:{marginTop:"10px"}}),styles:{header:{padding:"20px",borderBottom:"1px solid #dee0e3",marginBottom:0},content:{padding:0},body:{overflowY:"auto",flex:1}},children:A.jsxs("div",{className:"config-widget-dialog-container",children:[A.jsx("div",{className:"config-widget-dialog-content",children:A.jsx("div",{className:"config-widget-dialog-preview",children:A.jsx(Hw,{customData:s,customeStyle:l,moduleDataApi:n})})}),A.jsxs("div",{className:"config-widget-dialog-panel",children:[A.jsx("div",{className:"bitable-dashboard edit-panel-container",children:A.jsx(Q.Tabs,{defaultActiveKey:"1",items:[{key:"1",label:o("typeData"),children:A.jsx(qq,{selectModuleData:i,enumDataApi:a,onAllValuesChange:h=>{u(h)}})},{key:"2",label:o("customStyle"),children:A.jsx(Xq,{selectModuleData:i,onAllValuesChange:h=>{f(h)}})}]})}),A.jsx("div",{className:"button-container",children:A.jsx(Q.Button,{type:"primary",onClick:()=>{r==null||r({id:i==null?void 0:i.id,customData:s,customeStyle:l})},children:o("confirm")})})]})]})})})},Zq=({selectModuleData:t,onAllValuesChange:e})=>{const{globalData:r}=Oo(),[n]=Q.Form.useForm(),[i,a]=k.useState(),[o,s]=k.useState(),{t:u}=zr(),l={dataSourceId:"",startDateField:"",endDateField:"",titleField:""},f=()=>{setTimeout(()=>{e==null||e(n.getFieldsValue())})},c=h=>{var p,g;const d=(g=(p=r==null?void 0:r.sourceData)==null?void 0:p.find(v=>v.value===h))==null?void 0:g.fields;a(d),s(d==null?void 0:d.filter(v=>v.type==="timestamp"))};return k.useEffect(()=>{var h,d,p,g,v;if(t!=null&&t.customData)n.setFieldsValue(t.customData),c((h=t==null?void 0:t.customData)==null?void 0:h.dataSourceId);else{const m=(d=r==null?void 0:r.sourceData)==null?void 0:d[0],y=(p=m==null?void 0:m.fields)==null?void 0:p.filter(b=>b.type==="timestamp");n.setFieldsValue({...l,dataSourceId:m==null?void 0:m.value,titleField:(v=(g=m==null?void 0:m.fields)==null?void 0:g[0])==null?void 0:v.value,startDateField:y==null?void 0:y[0].value,endDateField:y==null?void 0:y[0].value}),c(m==null?void 0:m.value),f()}},[t,r]),A.jsxs(Q.Form,{form:n,name:"customData",labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:l,children:[A.jsx("div",{style:{fontSize:"14px",marginBottom:"5px"},children:u("data")}),A.jsx(Q.Form.Item,{label:u("dataSource"),name:"dataSourceId",children:A.jsx(Q.Select,{options:r==null?void 0:r.sourceData,onChange:h=>{c(h),f()}})}),A.jsx(Q.Divider,{orientation:"left",orientationMargin:"0",children:u("calendar.t1")}),A.jsx(Q.Form.Item,{label:u("calendar.t2"),name:"startDateField",children:A.jsx(Q.Select,{onChange:()=>{f()},options:o})}),A.jsx(Q.Form.Item,{label:u("calendar.t3"),name:"endDateField",children:A.jsx(Q.Select,{onChange:()=>{f()},options:o})}),A.jsx(Q.Form.Item,{label:u("calendar.t4"),name:"titleField",children:A.jsx(Q.Select,{onChange:()=>{f()},options:i})})]})},Jq=({open:t,onClose:e,onOk:r,moduleDataApi:n,selectModuleData:i})=>{const{t:a}=zr(),[o,s]=k.useState(),u=()=>{e==null||e()};return k.useEffect(()=>{i&&s(i==null?void 0:i.customData)},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{width:"65%",title:a("calendarText"),footer:null,open:t,onOk:u,onCancel:e,closeIcon:A.jsx(pf,{style:{marginTop:"10px"}}),styles:{header:{padding:"20px",borderBottom:"1px solid #dee0e3",marginBottom:0},content:{padding:0},body:{overflowY:"auto",flex:1}},children:A.jsxs("div",{className:"config-widget-dialog-container",children:[A.jsx("div",{className:"config-widget-dialog-content",children:A.jsx("div",{className:"config-widget-dialog-preview",style:{borderRight:"1px solid #e0e0e0"},children:A.jsx(Jw,{customData:o,moduleDataApi:n})})}),A.jsxs("div",{className:"config-widget-dialog-panel",style:{borderLeft:"none"},children:[A.jsx("div",{className:"bitable-dashboard edit-panel-container",style:{paddingTop:"20px"},children:A.jsx(Zq,{selectModuleData:i,onAllValuesChange:l=>{s(l)}})}),A.jsx("div",{className:"button-container",children:A.jsx(Q.Button,{type:"primary",onClick:()=>{r==null||r({id:i==null?void 0:i.id,customData:o})},children:a("confirm")})})]})]})})})},Qq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"17",y:"8",width:"6",height:"15.5",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"17",y:"24.5",width:"6",height:"15.5",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"28",y:"8",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"28",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"39",y:"8",width:"6",height:"19",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"39",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"50",y:"8",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"50",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"})]}),eY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"17",y:"21",width:"6",height:"6",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"17",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"28",y:"24",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"28",y:"34",width:"6",height:"6",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"39",y:"8",width:"6",height:"19",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"39",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"50",y:"18",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"50",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"})]}),tY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"58",y:"11",width:"4",height:"15",rx:"0.5",transform:"rotate(90 58 11)",fill:"#959bee"}),A.jsx("rect",{x:"42",y:"11",width:"4",height:"28",rx:"0.5",transform:"rotate(90 42 11)",fill:"#5b65f5"}),A.jsx("rect",{x:"58",y:"18",width:"4",height:"21.5",rx:"0.5",transform:"rotate(90 58 18)",fill:"#959bee"}),A.jsx("rect",{x:"35.5",y:"18",width:"4",height:"21.5",rx:"0.5",transform:"rotate(90 35.5 18)",fill:"#5b65f5"}),A.jsx("rect",{x:"58",y:"25",width:"4",height:"34",rx:"0.5",transform:"rotate(90 58 25)",fill:"#959bee"}),A.jsx("rect",{x:"23",y:"25",width:"4",height:"9",rx:"0.5",transform:"rotate(90 23 25)",fill:"#5b65f5"}),A.jsx("rect",{x:"58",y:"32",width:"4",height:"17",rx:"0.5",transform:"rotate(90 58 32)",fill:"#959bee"}),A.jsx("rect",{x:"40",y:"32",width:"4",height:"26",rx:"0.5",transform:"rotate(90 40 32)",fill:"#5b65f5"})]}),rY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"40",y:"11",width:"4",height:"15",rx:"0.5",transform:"rotate(90 40 11)",fill:"#959bee"}),A.jsx("rect",{x:"24",y:"11",width:"4",height:"8",rx:"0.5",transform:"rotate(90 24 11)",fill:"#5b65f5"}),A.jsx("rect",{x:"48",y:"18",width:"4",height:"15.5",rx:"0.5",transform:"rotate(90 48 18)",fill:"#959bee"}),A.jsx("rect",{x:"31.5",y:"18",width:"4",height:"15.5",rx:"0.5",transform:"rotate(90 31.5 18)",fill:"#5b65f5"}),A.jsx("rect",{x:"60",y:"25",width:"4",height:"34",rx:"0.5",transform:"rotate(90 60 25)",fill:"#959bee"}),A.jsx("rect",{x:"25",y:"25",width:"4",height:"9",rx:"0.5",transform:"rotate(90 25 25)",fill:"#5b65f5"}),A.jsx("rect",{x:"43",y:"32",width:"4",height:"13",rx:"0.5",transform:"rotate(90 43 32)",fill:"#959bee"}),A.jsx("rect",{x:"29",y:"32",width:"4",height:"13",rx:"0.5",transform:"rotate(90 29 32)",fill:"#5b65f5"})]}),nY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M15.5 33.5C20.2023 32.3804 23.5007 28.5533 25.7095 24.6682C28.3082 20.0974 34.0857 17.3668 38.758 19.7783L39.8066 20.3195C42.9001 21.9162 46.671 21.329 49.1326 18.8674L58 10",stroke:"#959bee",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),A.jsx("path",{d:"M16.5 15L26.844 27.6427C28.7759 30.0039 31.8825 31.0607 34.8535 30.3675L42.3359 28.6216C44.0629 28.2187 45.8748 28.401 47.4869 29.1398L57 33.5",stroke:"#5b65f4",strokeWidth:"1.5",strokeLinecap:"round"})]}),iY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M20 24C20 32.8366 27.1634 40 36 40C44.8366 40 52 32.8366 52 24C52 15.1634 44.8366 8 36 8C27.1634 8 20 15.1634 20 24ZM46.3944 24C46.3944 29.7407 41.7407 34.3944 36 34.3944C30.2593 34.3944 25.6056 29.7407 25.6056 24C25.6056 18.2593 30.2593 13.6056 36 13.6056C41.7407 13.6056 46.3944 18.2593 46.3944 24Z",fill:"#5b65f4"}),A.jsx("path",{d:"M52 24C52 19.7565 50.3143 15.6869 47.3137 12.6863C44.3131 9.68571 40.2435 8 36 8V13.6056C38.7568 13.6056 41.4006 14.7007 43.35 16.65C45.2993 18.5994 46.3944 21.2432 46.3944 24H52Z",fill:"#959bee"}),A.jsx("path",{d:"M52 24C52 20.9896 51.1507 18.0403 49.5497 15.4909L44.8026 18.4721C45.8427 20.1283 46.3944 22.0443 46.3944 24H52Z",fill:"#cdcff9"})]}),aY=({selectModuleData:t,onAllValuesChange:e,onValuesChange:r,enumDataApi:n})=>{const{globalData:i}=Oo(),[a]=Q.Form.useForm(),[o,s]=k.useState(),[u,l]=k.useState(!1),f=k.useRef(),[c,h]=k.useState(),[d,p]=k.useState(0),{t:g}=zr(),v=Q.Form.useWatch("type",a),m={dataSourceId:"",yAxis:"recordTotal",chartOptions:["legend","label","axis","splitLine"]},y=()=>{setTimeout(()=>{e==null||e({...a.getFieldsValue(),conditionData:f.current})})},b=C=>{var D,x,S;console.log(" globalData?.sourceData",i==null?void 0:i.sourceData),console.log(" globalData?.sourceData",C);const _=(x=(D=i==null?void 0:i.sourceData)==null?void 0:D.find(O=>O.value===C))==null?void 0:x.fields;console.log(" globalData?.sourceData3",_),a.setFieldsValue({xAxis:(S=_==null?void 0:_[0])==null?void 0:S.value}),s(_)},w=C=>{var _;h(C),f.current=C,p(((_=C==null?void 0:C.conditionList)==null?void 0:_.length)||0)};return k.useEffect(()=>{var C,_;if(t!=null&&t.customData){const D=t.customData;a.setFieldsValue(D),s(D==null?void 0:D.dataSourceId),b(D==null?void 0:D.dataSourceId)}else{const D=(C=i==null?void 0:i.sourceData)==null?void 0:C[0];a.setFieldsValue({...m,dataSourceId:D==null?void 0:D.value,type:t==null?void 0:t.type}),b(D==null?void 0:D.value),y()}w((_=t==null?void 0:t.customData)==null?void 0:_.conditionData)},[t,i]),A.jsxs("div",{style:{height:"50vh",overflowX:"auto"},children:[A.jsxs(Q.Form,{form:a,name:"customData",layout:"vertical",onValuesChange:r,initialValues:m,children:[A.jsx(Q.Form.Item,{label:g("dataSource"),name:"dataSourceId",children:A.jsx(Q.Select,{options:i==null?void 0:i.sourceData,onChange:C=>{a.setFieldsValue({yAxis:"recordTotal"}),b(C),y()}})}),A.jsxs(Q.Form.Item,{label:g("dataRange"),children:[A.jsx(Q.Button,{style:{marginLeft:"-15px"},onClick:()=>{l(!0)},type:"link",children:g("filterData")}),d>0?`${g("selectNcondition",{n:d})}`:null]}),A.jsx(Q.Form.Item,{label:g("chart.t1"),name:"type",children:A.jsx(Q.Select,{onChange:()=>{y()},options:[{label:g("chart.t2"),value:"chart-bar",icon:A.jsx(jO,{})},{label:g("chart.t3"),value:"chart-bar-pile",icon:A.jsx(eY,{})},{label:g("chart.t4"),value:"chart-bar-percentage",icon:A.jsx(Qq,{})},{label:g("chart.t5"),value:"chart-strip-bar",icon:A.jsx(WO,{})},{label:g("chart.t6"),value:"chart-strip-bar-pile",icon:A.jsx(rY,{})},{label:g("chart.t7"),value:"chart-strip-bar-percentage",icon:A.jsx(tY,{})},{label:g("chart.t8"),value:"chart-line",icon:A.jsx(VO,{})},{label:g("chart.t9"),value:"chart-line-smooth",icon:A.jsx(nY,{})},{label:g("chart.t10"),value:"chart-pie",icon:A.jsx(HO,{})},{label:g("chart.t11"),value:"chart-pie-circular",icon:A.jsx(iY,{})}],optionRender:C=>A.jsxs(Q.Flex,{align:"center",children:[A.jsx("span",{role:"img",style:{marginTop:"5px"},"aria-label":C.data.label,children:C.data.icon}),C.data.label]})})}),A.jsx(Q.Form.Item,{name:"chartOptions",label:g("chart.t12"),children:A.jsxs(Q.Checkbox.Group,{onChange:()=>{y()},children:[A.jsx(Q.Checkbox,{value:"legend",style:{lineHeight:"32px"},children:g("chart.t13")}),A.jsx(Q.Checkbox,{value:"label",style:{lineHeight:"32px"},children:g("chart.t14")}),["chart-pie","chart-pie-circular"].includes(v)?null:A.jsxs(A.Fragment,{children:[A.jsx(Q.Checkbox,{value:"axis",style:{lineHeight:"32px"},children:g("chart.t15")}),A.jsx(Q.Checkbox,{value:"splitLine",style:{lineHeight:"32px"},children:g("chart.t16")})]})]})}),A.jsx(Q.Divider,{style:{borderColor:"#e2e2e2",marginTop:0}}),A.jsx(Q.Form.Item,{label:v!=null&&v.includes("pie")?g("chart.t17"):g("chart.t18"),name:"xAxis",children:A.jsx(Q.Select,{onChange:()=>{y()},options:o})}),A.jsx(Q.Form.Item,{label:v!=null&&v.includes("pie")?g("chart.t19"):g("chart.t20"),name:"yAxis",children:A.jsx(Q.Select,{onChange:C=>{a.setFieldsValue({yAxisField:C==="fieldValue"?o==null?void 0:o[0].value:"",yAxisFieldType:"sum"}),y()},options:[{value:"recordTotal",label:g("statisticstRecordNum")},{value:"fieldValue",label:g("statisticstFieldVal")}]})}),A.jsx(Q.Form.Item,{dependencies:["yAxis"],children:({getFieldValue:C})=>C("yAxis")==="fieldValue"?A.jsx(Q.Form.Item,{label:g("selectField"),children:A.jsxs(Q.Space.Compact,{children:[A.jsx(Q.Form.Item,{noStyle:!0,name:"yAxisField",children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{y()},options:o})}),A.jsx(Q.Form.Item,{name:"yAxisFieldType",noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{y()},options:[{value:"sum",label:g("sumVal")},{value:"max",label:g("maxVal")},{value:"min",label:g("minVal")},{value:"average",label:g("averageVal")}]})})]})}):null})]}),A.jsx(UO,{open:u,value:c,fieldOptions:o,enumDataApi:n,onClose:()=>{l(!1)},onOk:C=>{w(C),y()}})]})},oY=({selectModuleData:t,onAllValuesChange:e,customeStylesRef:r})=>{const[n]=Q.Form.useForm(),{t:i}=zr(),a={xtitle:"",ytitle:"",xchartOptions:[],ychartOptions:[]},o=()=>{setTimeout(()=>{e==null||e(n.getFieldsValue())})};return k.useEffect(()=>{t!=null&&t.customeStyle?n.setFieldsValue(t.customeStyle):n.setFieldsValue(a)},[t]),k.useImperativeHandle(r,()=>({reset(){n.setFieldsValue(a),e==null||e(a)}})),A.jsx("div",{style:{height:"50vh",overflowX:"auto"},children:A.jsxs(Q.Form,{form:n,name:"customeStyle",layout:"vertical",initialValues:a,children:[A.jsx(Q.Divider,{orientation:"left",orientationMargin:"0",children:i("chart.t21")}),A.jsx(Q.Form.Item,{label:i("chart.t22"),name:"xtitle",children:A.jsx(Q.Input,{onChange:()=>{o()}})}),A.jsx(Q.Form.Item,{name:"xchartOptions",label:i("chart.t23"),children:A.jsx(Q.Checkbox.Group,{onChange:()=>{o()},children:A.jsxs(Q.Row,{children:[A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"label",style:{lineHeight:"32px"},children:i("chart.t24")})}),A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"axisLine",style:{lineHeight:"32px"},children:i("chart.t25")})})]})})}),A.jsx(Q.Divider,{orientation:"left",orientationMargin:"0",children:i("chart.t26")}),A.jsx(Q.Form.Item,{label:i("chart.t27"),name:"ytitle",children:A.jsx(Q.Input,{onChange:()=>{o()}})}),A.jsx(Q.Form.Item,{name:"ychartOptions",label:i("chart.t28"),children:A.jsx(Q.Checkbox.Group,{onChange:()=>{o()},children:A.jsxs(Q.Row,{children:[A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"label",style:{lineHeight:"32px"},children:i("chart.t29")})}),A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"axisLine",style:{lineHeight:"32px"},children:i("chart.t30")})})]})})})]})})},sY=({open:t,onClose:e,onOk:r,moduleDataApi:n,selectModuleData:i})=>{const{t:a}=zr(),[o,s]=k.useState(),[u,l]=k.useState(),f=k.useRef(),c=()=>{e==null||e()};return k.useEffect(()=>{i&&(s(i==null?void 0:i.customData),l(i==null?void 0:i.customeStyle))},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{width:"65%",title:a("chartText"),footer:null,open:t,onOk:c,onCancel:e,closeIcon:A.jsx(pf,{style:{marginTop:"10px"}}),styles:{header:{padding:"20px",borderBottom:"1px solid #dee0e3",marginBottom:0},content:{padding:0},body:{overflowY:"auto",flex:1}},children:A.jsxs("div",{className:"config-widget-dialog-container",children:[A.jsx("div",{className:"config-widget-dialog-content",children:A.jsx("div",{className:"config-widget-dialog-preview",children:A.jsx(zO,{customData:o,customeStyle:u,moduleDataApi:n})})}),A.jsxs("div",{className:"config-widget-dialog-panel",children:[A.jsx("div",{className:"bitable-dashboard edit-panel-container",children:A.jsx(Q.Tabs,{defaultActiveKey:"1",items:[{key:"1",label:a("typeData"),children:A.jsx(aY,{selectModuleData:i,onAllValuesChange:h=>{s(h)},onValuesChange:h=>{var d;Object.keys(h).includes("type")&&((d=f.current)==null||d.reset(),l({}))}})},{key:"2",label:a("customStyle"),children:A.jsx(oY,{customeStylesRef:f,selectModuleData:i,onAllValuesChange:h=>{l(h)}})}]})}),A.jsx("div",{className:"button-container",children:A.jsx(Q.Button,{type:"primary",onClick:()=>{r==null||r({id:i==null?void 0:i.id,type:i==null?void 0:i.type,customData:o,customeStyle:u})},children:a("confirm")})})]})]})})})},Me=t=>typeof t=="string",dl=()=>{let t,e;const r=new Promise((n,i)=>{t=n,e=i});return r.resolve=t,r.reject=e,r},qO=t=>t==null?"":""+t,uY=(t,e,r)=>{t.forEach(n=>{e[n]&&(r[n]=e[n])})},lY=/###/g,YO=t=>t&&t.indexOf("###")>-1?t.replace(lY,"."):t,XO=t=>!t||Me(t),vl=(t,e,r)=>{const n=Me(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(XO(t))return{};const a=YO(n[i]);!t[a]&&r&&(t[a]=new r),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++i}return XO(t)?{}:{obj:t,k:YO(n[i])}},KO=(t,e,r)=>{const{obj:n,k:i}=vl(t,e,Object);if(n!==void 0||e.length===1){n[i]=r;return}let a=e[e.length-1],o=e.slice(0,e.length-1),s=vl(t,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=vl(t,o,Object),s&&s.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=r},fY=(t,e,r,n)=>{const{obj:i,k:a}=vl(t,e,Object);i[a]=i[a]||[],i[a].push(r)},Hh=(t,e)=>{const{obj:r,k:n}=vl(t,e);if(r)return r[n]},cY=(t,e,r)=>{const n=Hh(t,r);return n!==void 0?n:Hh(e,r)},ZO=(t,e,r)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?Me(t[n])||t[n]instanceof String||Me(e[n])||e[n]instanceof String?r&&(t[n]=e[n]):ZO(t[n],e[n],r):t[n]=e[n]);return t},As=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hY={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const dY=t=>Me(t)?t.replace(/[&<>"'\/]/g,e=>hY[e]):t;class vY{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const pY=[" ",",","?","!",";"],gY=new vY(20),mY=(t,e,r)=>{e=e||"",r=r||"";const n=pY.filter(o=>e.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=gY.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(t);if(!a){const o=t.indexOf(r);o>0&&!i.test(t.substring(0,o))&&(a=!0)}return a},ry=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const n=e.split(r);let i=t;for(let a=0;a<n.length;){if(!i||typeof i!="object")return;let o,s="";for(let u=a;u<n.length;++u)if(u!==a&&(s+=r),s+=n[u],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<n.length-1)continue;a+=u-a+1;break}i=o}return i},Wh=t=>t&&t.replace("_","-"),yY={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class $h{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,r)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=e||yY,this.options=r,this.debug=r.debug}log(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}warn(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}error(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"error","")}deprecate(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(e,r,n,i){return i&&!this.debug?null:(Me(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[r](e))}create(e){return new $h(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new $h(this.logger,e)}}var Wn=new $h;class Gh{constructor(){this.observers={}}on(e,r){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[s,u]=o;for(let l=0;l<u;l++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[s,u]=o;for(let l=0;l<u;l++)s.apply(s,[e,...n])})}}class JO extends Gh{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,r],n&&(Array.isArray(n)?s.push(...n):Me(n)&&a?s.push(...n.split(a)):s.push(n)));const u=Hh(this.data,s);return!u&&!r&&!n&&e.indexOf(".")>-1&&(e=s[0],r=s[1],n=s.slice(2).join(".")),u||!o||!Me(n)?u:ry(this.data&&this.data[e]&&this.data[e][r],n,a)}addResource(e,r,n,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[e,r];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(s=e.split("."),i=r,r=s[1]),this.addNamespaces(r),KO(this.data,s,i),a.silent||this.emit("added",e,r,n,i)}addResources(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in n)(Me(n[a])||Array.isArray(n[a]))&&this.addResource(e,r,a,n[a],{silent:!0});i.silent||this.emit("added",e,r,n)}addResourceBundle(e,r,n,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[e,r];e.indexOf(".")>-1&&(s=e.split("."),i=n,n=r,r=s[1]),this.addNamespaces(r);let u=Hh(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?ZO(u,n,a):u={...u,...n},KO(this.data,s,u),o.silent||this.emit("added",e,r,n)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,r)}:this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var QO={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,n,i){return t.forEach(a=>{this.processors[a]&&(e=this.processors[a].process(e,r,n,i))}),e}};const eP={};class Uh extends Gh{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),uY(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Wn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,r);return n&&n.res!==void 0}extractFromKey(e,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!mY(e,n,i);if(o&&!s){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:a};const l=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(l[0])>-1)&&(a=l.shift()),e=l.join(i)}return Me(a)&&(a=[a]),{key:e,namespaces:a}}translate(e,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(e[e.length-1],r),u=s[s.length-1],l=r.lng||this.language,f=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&l.toLowerCase()==="cimode"){if(f){const w=r.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${w}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${w}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:o}const c=this.resolve(e,r);let h=c&&c.res;const d=c&&c.usedKey||o,p=c&&c.exactUsedKey||o,g=Object.prototype.toString.apply(h),v=["[object Number]","[object Function]","[object RegExp]"],m=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=!Me(h)&&typeof h!="boolean"&&typeof h!="number";if(y&&h&&b&&v.indexOf(g)<0&&!(Me(m)&&Array.isArray(h))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,h,{...r,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(c.res=w,c.usedParams=this.getUsedParamsDetails(r),c):w}if(a){const w=Array.isArray(h),C=w?[]:{},_=w?p:d;for(const D in h)if(Object.prototype.hasOwnProperty.call(h,D)){const x=`${_}${a}${D}`;C[D]=this.translate(x,{...r,joinArrays:!1,ns:s}),C[D]===x&&(C[D]=h[D])}h=C}}else if(y&&Me(m)&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,e,r,n));else{let w=!1,C=!1;const _=r.count!==void 0&&!Me(r.count),D=Uh.hasDefaultValue(r),x=_?this.pluralResolver.getSuffix(l,r.count,r):"",S=r.ordinal&&_?this.pluralResolver.getSuffix(l,r.count,{ordinal:!1}):"",O=_&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),E=O&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${x}`]||r[`defaultValue${S}`]||r.defaultValue;!this.isValidLookup(h)&&D&&(w=!0,h=E),this.isValidLookup(h)||(C=!0,h=o);const F=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:h,B=D&&E!==h&&this.options.updateMissing;if(C||w||B){if(this.logger.log(B?"updateKey":"missingKey",l,u,o,B?E:h),a){const z=this.resolve(o,{...r,keySeparator:!1});z&&z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let M=[];const I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&I&&I[0])for(let z=0;z<I.length;z++)M.push(I[z]);else this.options.saveMissingTo==="all"?M=this.languageUtils.toResolveHierarchy(r.lng||this.language):M.push(r.lng||this.language);const j=(z,W,R)=>{const U=D&&R!==h?R:F;this.options.missingKeyHandler?this.options.missingKeyHandler(z,u,W,U,B,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(z,u,W,U,B,r),this.emit("missingKey",z,u,W,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?M.forEach(z=>{const W=this.pluralResolver.getSuffixes(z,r);O&&r[`defaultValue${this.options.pluralSeparator}zero`]&&W.indexOf(`${this.options.pluralSeparator}zero`)<0&&W.push(`${this.options.pluralSeparator}zero`),W.forEach(R=>{j([z],o+R,r[`defaultValue${R}`]||E)})}):j(M,o,E))}h=this.extendTranslation(h,e,r,c,n),C&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${u}:${o}`),(C||w)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${o}`:o,w?h:void 0):h=this.options.parseMissingKeyHandler(h))}return i?(c.res=h,c.usedParams=this.getUsedParamsDetails(r),c):h}extendTranslation(e,r,n,i,a){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const l=Me(e)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(l){const h=e.match(this.interpolator.nestingRegexp);f=h&&h.length}let c=n.replace&&!Me(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language||i.usedLng,n),l){const h=e.match(this.interpolator.nestingRegexp),d=h&&h.length;f<d&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];return a&&a[0]===d[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${r[0]}`),null):o.translate(...d,r)},n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,u=Me(s)?[s]:s;return e!=null&&u&&u.length&&n.applyPostProcessor!==!1&&(e=QO.handle(u,e,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,a,o,s;return Me(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(u,r),f=l.key;i=f;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const h=r.count!==void 0&&!Me(r.count),d=h&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),p=r.context!==void 0&&(Me(r.context)||typeof r.context=="number")&&r.context!=="",g=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);c.forEach(v=>{this.isValidLookup(n)||(s=v,!eP[`${g[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(eP[`${g[0]}-${v}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(m=>{if(this.isValidLookup(n))return;o=m;const y=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(y,f,m,v,r);else{let w;h&&(w=this.pluralResolver.getSuffix(m,r.count,r));const C=`${this.options.pluralSeparator}zero`,_=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(y.push(f+w),r.ordinal&&w.indexOf(_)===0&&y.push(f+w.replace(_,this.options.pluralSeparator)),d&&y.push(f+C)),p){const D=`${f}${this.options.contextSeparator}${r.context}`;y.push(D),h&&(y.push(D+w),r.ordinal&&w.indexOf(_)===0&&y.push(D+w.replace(_,this.options.pluralSeparator)),d&&y.push(D+C))}}let b;for(;b=y.pop();)this.isValidLookup(n)||(a=b,n=this.getResource(m,v,b,r))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,r,n,i):this.resourceStore.getResource(e,r,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Me(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(e){const r="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r===n.substring(0,r.length)&&e[n]!==void 0)return!0;return!1}}const ny=t=>t.charAt(0).toUpperCase()+t.slice(1);class tP{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wn.create("languageUtils")}getScriptPartFromCode(e){if(e=Wh(e),!e||e.indexOf("-")<0)return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=Wh(e),!e||e.indexOf("-")<0)return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(Me(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(e)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=ny(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=ny(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=ny(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&e.forEach(n=>{if(r)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),Me(e)&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let n=e[r];return n||(n=e[this.getScriptPartFromCode(r)]),n||(n=e[this.formatLanguageCode(r)]),n||(n=e[this.getLanguagePartFromCode(r)]),n||(n=e.default),n||[]}toResolveHierarchy(e,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],e),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Me(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):Me(e)&&a(this.formatLanguageCode(e)),n.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}let bY=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],CY={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const wY=["v1","v2","v3"],_Y=["v4"],rP={zero:0,one:1,two:2,few:3,many:4,other:5},DY=()=>{const t={};return bY.forEach(e=>{e.lngs.forEach(r=>{t[r]={numbers:e.nr,plurals:CY[e.fc]}})}),t};class xY{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=r,this.logger=Wn.create("pluralResolver"),(!this.options.compatibilityJSON||_Y.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=DY(),this.pluralRulesCache={}}addRule(e,r){this.rules[e]=r}clearCache(){this.pluralRulesCache={}}getRule(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Wh(e==="dev"?"en":e),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];const o=new Intl.PluralRules(n,{type:i});return this.pluralRulesCache[a]=o,o}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${r}${i}`)}getSuffixes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,a)=>rP[i]-rP[a]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,r)):[]}getSuffix(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,r){const n=e.noAbs?e.plurals(r):e.plurals(Math.abs(r));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const a=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?a():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!wY.includes(this.options.compatibilityJSON)}}const nP=function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=cY(t,e,r);return!a&&i&&Me(r)&&(a=ry(t,r,n),a===void 0&&(a=ry(e,r,n))),a},iy=t=>t.replace(/\$/g,"$$$$");class SY{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Wn.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:s,suffixEscaped:u,formatSeparator:l,unescapeSuffix:f,unescapePrefix:c,nestingPrefix:h,nestingPrefixEscaped:d,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:v,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=r!==void 0?r:dY,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?As(a):o||"{{",this.suffix=s?As(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=h?As(h):d||As("$t("),this.nestingSuffix=p?As(p):g||As(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=m||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,r,n,i){let a,o,s;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=d=>{if(d.indexOf(this.formatSeparator)<0){const m=nP(r,u,d,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,n,{...i,...r,interpolationkey:d}):m}const p=d.split(this.formatSeparator),g=p.shift().trim(),v=p.join(this.formatSeparator).trim();return this.format(nP(r,u,g,this.options.keySeparator,this.options.ignoreJSONStructure),v,n,{...i,...r,interpolationkey:g})};this.resetRegExp();const f=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,c=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:d=>iy(d)},{regex:this.regexp,safeValue:d=>this.escapeValue?iy(this.escape(d)):iy(d)}].forEach(d=>{for(s=0;a=d.regex.exec(e);){const p=a[1].trim();if(o=l(p),o===void 0)if(typeof f=="function"){const v=f(e,a,i);o=Me(v)?v:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))o="";else if(c){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`),o="";else!Me(o)&&!this.useRawValueToEscape&&(o=qO(o));const g=d.safeValue(o);if(e=e.replace(a[0],g),c?(d.regex.lastIndex+=o.length,d.regex.lastIndex-=a[0].length):d.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,o;const s=(u,l)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const c=u.split(new RegExp(`${f}[ ]*{`));let h=`{${c[1]}`;u=c[0],h=this.interpolate(h,o);const d=h.match(/'/g),p=h.match(/"/g);(d&&d.length%2===0&&!p||p.length%2!==0)&&(h=h.replace(/'/g,'"'));try{o=JSON.parse(h),l&&(o={...l,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,g),`${u}${f}${h}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u};for(;i=this.nestingRegexp.exec(e);){let u=[];o={...n},o=o.replace&&!Me(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const f=i[1].split(this.formatSeparator).map(c=>c.trim());i[1]=f.shift(),u=f,l=!0}if(a=r(s.call(this,i[1].trim(),o),o),a&&i[0]===e&&!Me(a))return a;Me(a)||(a=qO(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),a=""),l&&(a=u.reduce((f,c)=>this.format(f,c,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),e=e.replace(i[0],a),this.regexp.lastIndex=0}return e}}const EY=t=>{let e=t.toLowerCase().trim();const r={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...u]=o.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),f=s.trim();r[f]||(r[f]=l),l==="false"&&(r[f]=!1),l==="true"&&(r[f]=!0),isNaN(l)||(r[f]=parseInt(l,10))}})}return{formatName:e,formatOptions:r}},Ts=t=>{const e={};return(r,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=n+JSON.stringify(a);let s=e[o];return s||(s=t(Wh(n),i),e[o]=s),s(r)}};class AY{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Wn.create("formatter"),this.options=e,this.formats={number:Ts((r,n)=>{const i=new Intl.NumberFormat(r,{...n});return a=>i.format(a)}),currency:Ts((r,n)=>{const i=new Intl.NumberFormat(r,{...n,style:"currency"});return a=>i.format(a)}),datetime:Ts((r,n)=>{const i=new Intl.DateTimeFormat(r,{...n});return a=>i.format(a)}),relativetime:Ts((r,n)=>{const i=new Intl.RelativeTimeFormat(r,{...n});return a=>i.format(a,n.range||"day")}),list:Ts((r,n)=>{const i=new Intl.ListFormat(r,{...n});return a=>i.format(a)})},this.init(e)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=Ts(r)}format(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(u=>u.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,u)=>{const{formatName:l,formatOptions:f}=EY(u);if(this.formats[l]){let c=s;try{const h=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},d=h.locale||h.lng||i.locale||i.lng||n;c=this.formats[l](s,d,{...f,...i,...h})}catch(h){this.logger.warn(h)}return c}else this.logger.warn(`there was no format function for ${l}`);return s},e)}}const TY=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class OY extends Gh{constructor(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=Wn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,r,n,i){const a={},o={},s={},u={};return e.forEach(l=>{let f=!0;r.forEach(c=>{const h=`${l}|${c}`;!n.reload&&this.store.hasResourceBundle(l,c)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?o[h]===void 0&&(o[h]=!0):(this.state[h]=1,f=!1,o[h]===void 0&&(o[h]=!0),a[h]===void 0&&(a[h]=!0),u[c]===void 0&&(u[c]=!0)))}),f||(s[l]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}loaded(e,r,n){const i=e.split("|"),a=i[0],o=i[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2,r&&n&&(this.state[e]=0);const s={};this.queue.forEach(u=>{fY(u.loaded,[a],o),TY(u,e),r&&u.errors.push(r),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{s[l]||(s[l]={});const f=u.loaded[l];f.length&&f.forEach(c=>{s[l][c]===void 0&&(s[l][c]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(u=>!u.done)}read(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:n,tried:i,wait:a,callback:o});return}this.readingCalls++;const s=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(l&&f&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,r,n,i+1,a*2,o)},a);return}o(l,f)},u=this.backend[n].bind(this.backend);if(u.length===2){try{const l=u(e,r);l&&typeof l.then=="function"?l.then(f=>s(null,f)).catch(s):s(null,l)}catch(l){s(l)}return}return u(e,r,s)}prepareLoading(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Me(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Me(r)&&(r=[r]);const a=this.queueLoad(e,r,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(e,r,n){this.prepareLoading(e,r,{},n)}reload(e,r,n){this.prepareLoading(e,r,{reload:!0},n)}loadOne(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,o),!o&&s&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,s),this.loaded(e,o,s)})}saveMissing(e,r,n,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const u={...o,isUpdate:a},l=this.backend.create.bind(this.backend);if(l.length<6)try{let f;l.length===5?f=l(e,r,n,i,u):f=l(e,r,n,i),f&&typeof f.then=="function"?f.then(c=>s(null,c)).catch(s):s(null,f)}catch(f){s(f)}else l(e,r,n,i,s,u)}!e||!e[0]||this.store.addResource(e[0],r,n,i)}}}const iP=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),Me(t[1])&&(e.defaultValue=t[1]),Me(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(n=>{e[n]=r[n]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),aP=t=>(Me(t.ns)&&(t.ns=[t.ns]),Me(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Me(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),qh=()=>{},PY=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})};class pl extends Gh{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=aP(e),this.services={},this.logger=Wn,this.modules={external:[]},PY(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(){var e=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(Me(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const i=iP();this.options={...i,...this.options,...aP(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const a=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?Wn.init(a(this.modules.logger),this.options):Wn.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=AY);const c=new tP(this.options);this.store=new JO(this.options.resources,this.options);const h=this.services;h.logger=Wn,h.resourceStore=this.store,h.languageUtils=c,h.pluralResolver=new xY(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(h.formatter=a(f),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new SY(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new OY(a(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(d){for(var p=arguments.length,g=new Array(p>1?p-1:0),v=1;v<p;v++)g[v-1]=arguments[v];e.emit(d,...g)}),this.modules.languageDetector&&(h.languageDetector=a(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=a(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new Uh(this.services,this.options),this.translator.on("*",function(d){for(var p=arguments.length,g=new Array(p>1?p-1:0),v=1;v<p;v++)g[v-1]=arguments[v];e.emit(d,...g)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,n||(n=qh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const u=dl(),l=()=>{const f=(c,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(h),n(c,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),u}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qh;const i=Me(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&a.indexOf(l)<0&&a.push(l)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>o(u)),this.options.preload&&this.options.preload.forEach(s=>o(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(s)})}else n(null)}reloadResources(e,r,n){const i=dl();return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r=void 0),e||(e=this.languages),r||(r=this.options.ns),n||(n=qh),this.services.backendConnector.reload(e,r,a=>{i.resolve(),n(a)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&QO.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,r){var n=this;this.isLanguageChangingTo=e;const i=dl();this.emit("languageChanging",e);const a=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,l)=>{l?(a(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),r&&r(u,function(){return n.t(...arguments)})},s=u=>{!e&&!u&&this.services.languageDetector&&(u=[]);const l=Me(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);l&&(this.language||a(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(l)),this.loadResources(l,f=>{o(f,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),i}getFixedT(e,r,n){var i=this;const a=function(o,s){let u;if(typeof s!="object"){for(var l=arguments.length,f=new Array(l>2?l-2:0),c=2;c<l;c++)f[c-2]=arguments[c];u=i.options.overloadTranslationOptionHandler([o,s].concat(f))}else u={...s};u.lng=u.lng||a.lng,u.lngs=u.lngs||a.lngs,u.ns=u.ns||a.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||a.keyPrefix);const h=i.options.keySeparator||".";let d;return u.keyPrefix&&Array.isArray(o)?d=o.map(p=>`${u.keyPrefix}${h}${p}`):d=u.keyPrefix?`${u.keyPrefix}${h}${o}`:o,i.t(d,u)};return Me(e)?a.lng=e:a.lngs=e,a.ns=r,a.keyPrefix=n,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(s,u)=>{const l=this.services.backendConnector.state[`${s}|${u}`];return l===-1||l===0||l===2};if(r.precheck){const s=r.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!i||o(a,e)))}loadNamespaces(e,r){const n=dl();return this.options.ns?(Me(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(e,r){const n=dl();Me(e)&&(e=[e]);const i=this.options.preload||[],a=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new tP(iP());return r.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new pl(e,r)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qh;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},a=new pl(i);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n&&(a.store=new JO(this.store.data,i),a.services.resourceStore=a.store),a.translator=new Uh(a.services,i),a.translator.on("*",function(s){for(var u=arguments.length,l=new Array(u>1?u-1:0),f=1;f<u;f++)l[f-1]=arguments[f];a.emit(s,...l)}),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Kt=pl.createInstance();Kt.createInstance=pl.createInstance,Kt.createInstance,Kt.dir,Kt.init,Kt.loadResources,Kt.reloadResources,Kt.use,Kt.changeLanguage,Kt.getFixedT,Kt.t,Kt.exists,Kt.setDefaultNamespace,Kt.hasLoadedNamespace,Kt.loadNamespaces,Kt.loadLanguages;const BY={...{title:"仪表盘",text:"文本",confirm:"确定",pleaseEnter:"请输入",configuration:"配置",copy:"复制",delete:"删除",calendarText:"日历",chartText:"图表",promptTitle:"提示",promptContentDeleteComponents:"确认删除组件?",unnamedRecord:"未命名记录",setFilteringCriteria:"设置筛选条件",all:"所有",everyone:"任一",condition:"条件",addCondition:"添加条件",equalto:"等于",notequalto:"不等于",contain:"包含",notcontain:"不包含",null:"为空",notnull:"不为空",conformTo:"符合以下",statisticsText:"统计文字",typeData:"类型与数据",customStyle:"自定义样式",dataSource:"数据源",dataRange:"数据范围",data:"数据",filterData:"筛选数据",selectNcondition:"已选{{n}}个条件",allData:"全部数据",statisticstMethods:"统计方式",statisticstRecordNum:"统计记录总数",statisticstFieldVal:"统计字段数值",selectField:"选择字段",sumVal:"求和",maxVal:"最大值",minVal:"最小值",averageVal:"平均值"},pb:{text:"文本"},statistics:{t1:"配色方案",t2:"数值设置",t3:"小数位数与格式",t4:"请输入小数位数",t5:"数字(千分位)",t6:"数字",t7:"百分比",t8:"人名币",t9:"美元",t10:"统计数值说明",t11:"",t12:"",t13:""},chart:{t1:"图表类型",t2:"基础柱状图",t3:"堆积柱状图",t4:"百分比柱状图",t5:"基础条形图",t6:"堆积条形图",t7:"百分比堆积条形图",t8:"折线图",t9:"平滑折线图",t10:"饼图",t11:"环形图",t12:"图标选项",t13:"图例",t14:"数据标签",t15:"坐标轴",t16:"网格线",t17:"扇形分区",t18:"横轴(类别)",t19:"扇形数值",t20:"纵轴(字段)",t21:"横轴",t22:"横轴标题",t23:"坐标轴选项",t24:"显示标签",t25:"显示轴线",t26:"纵轴",t27:"纵轴标题",t28:"坐标轴选项",t29:"显示标签",t30:"显示轴线"},calendar:{t1:"视图配置",t2:"开始日期",t3:"结束日期",t4:"标题展示"},add:{t1:"图表",t2:"柱状图",t3:"折线图",t4:"饼图",t5:"条形图",t6:"其他",t7:"统计数字",t8:"文本",t9:"日历",t10:"添加组件"}},MY={...{title:"Dashboard",text:"Text",confirm:"Confirm",pleaseEnter:"Please enter",configuration:"Configuration",copy:"Copy",delete:"Delete",calendarText:"Calendar",chartText:"Chart",promptTitle:"Prompt",promptContentDeleteComponents:"Are you sure you want to delete this component?",unnamedRecord:"Unnamed Record",setFilteringCriteria:"Set filtering criteria",all:"All",everyone:"Anyone",condition:"Condition",addCondition:"Add condition",equalto:"Equal to",notequalto:"Not equal to",contain:"Contains",notcontain:"Does not contain",null:"Is empty",notnull:"Is not empty",conformTo:"Conform to the following",statisticsText:"Statistics Text",typeData:"Type and Data",customStyle:"Custom Style",dataSource:"Data Source",dataRange:"Data Range",data:"Data",filterData:"Filter Data",selectNcondition:"Selected {{n}} conditions",allData:"All Data",statisticstMethods:"Statistical Methods",statisticstRecordNum:"Total Number of Records",statisticstFieldVal:"Statistical Field Values",selectField:"Select Field",sumVal:"Sum",maxVal:"Maximum Value",minVal:"Minimum Value",averageVal:"Average Value"},pb:{text:"Text"},statistics:{t1:"Color Scheme",t2:"Value Settings",t3:"Decimal Places and Format",t4:"Please enter decimal places",t5:"Number (Thousand Separator)",t6:"Number",t7:"Percentage",t8:"Renminbi",t9:"Dollar",t10:"Statistical Value Description",t11:"",t12:"",t13:""},chart:{t1:"Chart Type",t2:"Basic Bar Chart",t3:"Stacked Bar Chart",t4:"Percentage Bar Chart",t5:"Basic Horizontal Bar Chart",t6:"Stacked Horizontal Bar Chart",t7:"Percentage Stacked Horizontal Bar Chart",t8:"Line Chart",t9:"Smooth Line Chart",t10:"Pie Chart",t11:"Doughnut Chart",t12:"Chart Options",t13:"Legend",t14:"Data Label",t15:"Axis",t16:"Grid Line",t17:"Sector Division",t18:"Horizontal Axis (Category)",t19:"Sector Value",t20:"Vertical Axis (Field)",t21:"Horizontal Axis",t22:"Horizontal Axis Title",t23:"Axis Options",t24:"Show Labels",t25:"Show Axis Line",t26:"Vertical Axis",t27:"Vertical Axis Title",t28:"Axis Options",t29:"Show Labels",t30:"Show Axis Line"},calendar:{t1:"View Configuration",t2:"Start Date",t3:"End Date",t4:"Title Display"},add:{t1:"Chart",t2:"Bar Chart",t3:"Line Chart",t4:"Pie Chart",t5:"Horizontal Bar Chart",t6:"Other",t7:"Statistical Number",t8:"Text",t9:"Calendar",t10:"Add Component"}};Kt.use(lN).init({resources:{"zh-CN":{translation:BY},"en-US":{translation:MY}},lng:"zh-CN",fallbackLng:"zh-CN",interpolation:{escapeValue:!1}});const FY=()=>A.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"MoreVerticalOutlined",children:A.jsx("path",{d:"M12 5.5A1.75 1.75 0 1 1 12 2a1.75 1.75 0 0 1 0 3.5Zm0 8.225a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5ZM12 22a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5Z",fill:"currentColor"})}),LY=()=>A.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"DragOutlined",children:A.jsx("path",{d:"M8.25 6.5a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Zm0 7.25a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Zm1.75 5.5a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0ZM14.753 6.5a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5ZM16.5 12a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0Zm-1.747 9a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Z",fill:"#999"})}),IY=({defaultValue:t,onChange:e})=>{const[r,n]=k.useState(!1),[i,a]=k.useState(""),o=Ew(s=>{e==null||e(s)},300);return k.useEffect(()=>{a(i)},[t]),A.jsx("span",{className:"handle title",children:A.jsx("span",{className:"title-child",onDoubleClick:()=>{n(!0)},children:r?A.jsx(Q.Input,{defaultValue:t,onBlur:()=>{n(!1)},onChange:s=>{a(s.target.value),o(s.target.value)}}):t})})},RY=E1.WidthProvider(E1.Responsive),NY=({sourceData:t,moduleConfigData:e,fieldMap:r,moduleDataApi:n,enumDataApi:i,onCreateModule:a,onUpdateModule:o,onDeleteModule:s,lang:u,onLayoutChange:l,className:f="layout",cols:c={lg:12,md:10,sm:6,xs:4,xxs:2},rowHeight:h=79})=>{const d=[10,10],{setGlobalData:p}=Oo(),[g,v]=k.useState([]),[m,y]=k.useState(0),[b,w]=k.useState(),[C,_]=k.useState(),[D,x]=k.useState(!1),{i18n:S,t:O}=zr(),[E,P]=k.useState(!1),[F,B]=k.useState(!1),[M,I]=k.useState(!1),j={text:O("pb.text"),calendar:O("calendarText"),statistics:O("chartText")},[,z]=k.useState(c.lg),W=async q=>{const L=q.type==="calendar"?5:4,X=q.type==="calendar"?5:3;if(Array.isArray(g)&&q.type){const V={x:0,y:0,w:L,h:X,title:q.type.includes("chart")?O("chartText"):j[q.type],...q,type:q.type};await(a==null?void 0:a(V).then(G=>{var J,K;if(!G.success){Q.message.error(G.message);return}v([...g,{...V,i:(J=G.data)==null?void 0:J.id,id:(K=G.data)==null?void 0:K.id}])}))}},R=async(q,L)=>{if(g!=null&&g.length){const X={...g.find(G=>G.id===q),...L},V=g.map(G=>G.id===q?X:G);v(V),await(o==null?void 0:o(X).then(G=>{if(!G.success){Q.message.error(G.message);return}}))}},U=async q=>{g!=null&&g.length&&(v(g.filter(L=>L.id!==q)),await(s==null?void 0:s(q||"")))},Z=q=>{l==null||l(q)},ee=(q,L)=>{z(L)},ne=q=>{if(q==="text"){const L={type:q,customData:{title:O("text"),editor:[{type:"paragraph",children:[{text:O("pleaseEnter")}]}]}};W(L)}else q==="statistics"?P(!0):q==="calendar"?B(!0):q!=null&&q.includes("chart")&&I(!0);_({title:"",type:q,w:0,h:0,x:0,y:0})};return k.useEffect(()=>{console.log("modules:",JSON.stringify(g))},[g]),k.useEffect(()=>{p({fieldMap:r,sourceData:t})},[r,p,t]),k.useEffect(()=>{v(e||[])},[e]),k.useEffect(()=>{S.changeLanguage(u||"zh_CN")},[S,u]),A.jsxs("div",{className:"pivot-table",children:[A.jsxs("div",{className:"bitable-block-dashboard",children:[A.jsx("div",{className:"bitable-block-dashboard-toolbar bitable-toolbar",children:A.jsxs("div",{className:"bitable-block-dashboard-toolbar--left",children:[A.jsx("div",{className:"bitable-block-name",children:A.jsx("div",{children:O("title")})}),A.jsx(Wq,{onOk:q=>{ne(q)}})]})}),A.jsx("div",{className:"bitable-block-dashboard__mount",children:A.jsx("div",{className:"dashboard-container",children:A.jsx("div",{className:"dashboard-content-container",children:A.jsx(RY,{onLayoutChange:Z,onBreakpointChange:ee,className:f,compactType:"vertical",cols:c,margin:d,rowHeight:h,draggableHandle:".handle",onWidthChange:(q,L,X)=>{y(q/X-1)},onDragStart:()=>{x(!0)},onDragStop:(q,L,X)=>{R(X.i,{...X}),x(!1)},onResizeStart:()=>{x(!0)},onResizeStop:(q,L,X)=>{R(X.i,{...X}),x(!1)},style:{backgroundSize:`${m}px ${h+d[0]}px`,backgroundImage:D?"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHwAAABPCAYAAAAp8KG9AAAAAXNSR0IArs4c6QAAAlpJREFUeF7t3UFu01AYReGYfaBCuxDUnXVniIUArdgHrVwpJIPgPv3Skc7gMEKqfd/N/TADZ9Dt5++Xp9PBn4evd4c/P99aztGKpxO5z6rR3nD79fzn+/6X19e/P25VXg0jP9B1r/pcHtBt+/Rt3+b+y+fH439ul59uZ6jVIVeDu45fYGIXOO+CnRA4Nq0zOHCnC9YqcGxaZ3DgThesVeDYtM7gEbjzo9SKWmCjgst1LhC40wVrFTg2rTM4cKcL1ipwbFpncOBOF6xV4Ni0zuC+LXO6LLUavXiZ3LTUpovwBSZ2PeE4C3dA4Ny2yuTAlSxcqcC5bZXJgStZuFKBc9sqk0fgyk9SKWyB3rRh0zqDA3e6YK0Cx6Z1BgfudMFaBY5N6wwO3OmCtQocm9YZ3LdlTpelVqMXL5Obltp0Eb7AxK4nHGfhDgic21aZHLiShSsVOLetMjlwJQtXKnBuW2XyCFz5SSqFLdCbNmxaZ3DgThesVeDYtM7gwJ0uWKvAsWmdwYE7XbBWgWPTOoP7tszpstRq9OJlctNSmy7CF5jY9YTjLNwBgXPbKpMDV7JwpQLntlUmB65k4UoFzm2rTB6BKz9JpbAFetOGTesMDtzpgrUKHJvWGRy40wVrFTg2rTM4cKcL1ipwbFpncN+WOV2WWo1evExuWmrTRfgCE7t/T/j/2q3+Ivnz4eXcXoDcZ9Vobxb4B88hCXV99CrarT6r976D4//vdIBqgcBVHHyZwPmNVScEruLgywTOb6w6IXAVB18mcH5j1QmBqzj4MoHzG6tOCFzFwZd5Azm6fF+PNKX9AAAAAElFTkSuQmCC)":void 0,backgroundPosition:`${d[0]}px ${d[0]}px`,minHeight:"100vh"},children:g==null?void 0:g.map(q=>A.jsxs("div",{className:`box-dashboard ${b===q.id?"active":""}`,onClick:()=>{w(q.id)},"data-grid":{i:q.id,x:q.x,y:q.y,w:q.w,h:q.h,minW:2,minH:2},children:[A.jsxs("div",{className:"layout-item-head isCanDrag",children:[A.jsxs("div",{className:"head-inner",children:[A.jsx(IY,{defaultValue:q.title,onChange:L=>R(q.id,{title:L})}),A.jsx("div",{className:"menu-slot",children:A.jsx(Q.Dropdown,{trigger:["click"],menu:{items:[q.type!=="text"?{label:O("configuration"),key:"edit"}:null,{label:O("copy"),key:"copy"},{key:"delete",danger:!0,label:O("delete")}],onClick:({key:L})=>{var X;if(L==="edit")w(q.id),_(q),q.type==="statistics"&&P(!0),(X=q.type)!=null&&X.includes("chart")&&I(!0),q.type==="calendar"&&B(!0);else if(L==="delete")Q.Modal.confirm({title:O("promptTitle"),icon:A.jsx(bw,{}),content:O("promptContentDeleteComponents"),onOk(){U(q.id)}});else if(L==="copy"){const V=JSON.parse(JSON.stringify(q));delete V.id,delete V.i,W(V)}}},children:A.jsx("button",{type:"button",className:"dashboard-grid-menu-button",children:A.jsx("span",{className:"universe-icon",children:A.jsx(FY,{})})})})})]}),A.jsx("div",{className:"handle drag isCanDrag",children:A.jsx("span",{className:"universe-icon drag-icon",children:A.jsx(LY,{})})})]}),A.jsx(zq,{module:q,onUpdate:R,moduleDataApi:n,activeId:b,onClick:()=>{w(q.id)},rowWidth:m,rowHeight:h,onEdit:()=>{var L;w(q.id),_(q),q.type==="statistics"&&P(!0),(L=q.type)!=null&&L.includes("chart")&&I(!0),q.type==="calendar"&&B(!0)},onDelete:()=>{U(q.id)},onCopy:()=>{const L=JSON.parse(JSON.stringify(q));delete L.id,delete L.i,W(L)},onStartDragOrResize:()=>{x(!0)},onStopDragOrResize:()=>{x(!1)}})]},q.id))})})})})]}),A.jsx(Kq,{open:E,selectModuleData:C,onClose:()=>{P(!1)},onOk:({id:q,customData:L,customeStyle:X})=>{q?R(q,{type:"statistics",customData:L,customeStyle:X}):W({type:"statistics",customData:L,customeStyle:X}),P(!1)},moduleDataApi:n,enumDataApi:i}),A.jsx(Jq,{open:F,selectModuleData:C,onClose:()=>{B(!1)},onOk:({id:q,customData:L})=>{q?R(q,{type:"calendar",customData:L}):W({type:"calendar",customData:L}),B(!1)},moduleDataApi:n,enumDataApi:i}),A.jsx(sY,{open:M,selectModuleData:C,onClose:()=>{I(!1)},onOk:({id:q,type:L,customData:X,customeStyle:V})=>{q?R(q,{type:L,customData:X,customeStyle:V}):W({type:L,customData:X,customeStyle:V}),I(!1)},moduleDataApi:n,enumDataApi:i})]})},kY=t=>A.jsx(J8,{children:A.jsx(NY,{...t})});Gn.PivotTable=kY,Object.defineProperty(Gn,Symbol.toStringTag,{value:"Module"})});