(function(R,fa){typeof exports=="object"&&typeof module<"u"?module.exports=fa(require("vue")):typeof define=="function"&&define.amd?define(["vue"],fa):(R=typeof globalThis<"u"?globalThis:R||self,R["dackou-element-template"]=fa(R.Vue))})(this,function(R){"use strict";/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var fa=function(r,e){return fa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},fa(r,e)};function O(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");fa(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var LI=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),II=function(){function r(){this.browser=new LI,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),ha=new II;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(ha.wxa=!0,ha.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?ha.worker=!0:typeof navigator>"u"?(ha.node=!0,ha.svgSupported=!0):EI(navigator.userAgent,ha);function EI(r,e){var t=e.browser,n=r.match(/Firefox\/([\d.]+)/),a=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(t.firefox=!0,t.version=n[1]),a&&(t.ie=!0,t.version=a[1]),i&&(t.edge=!0,t.version=i[1],t.newEdge=+i[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}const wt=ha;var Xh=12,pm="sans-serif",Cn=Xh+"px "+pm,PI=20,RI=100,NI="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function OI(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t=0)s=o*t.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return t}function nE(r,e,t){for(var n=t?"invTrans":"trans",a=e[n],i=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),h=2*u,c=f.left,v=f.top;o.push(c,v),l=l&&i&&c===i[h]&&v===i[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&a?a:(e.srcCoords=o,e[n]=t?Dm(s,o):Dm(o,s))}function Am(r){return r.nodeName.toUpperCase()==="CANVAS"}var aE=/([&<>"'])/g,iE={"&":"&","<":"<",">":">",'"':""","'":"'"};function Pe(r){return r==null?"":(r+"").replace(aE,function(e,t){return iE[t]})}var oE=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,oc=[],sE=wt.browser.firefox&&+wt.browser.version.split(".")[0]<39;function sc(r,e,t,n){return t=t||{},n?Mm(r,e,t):sE&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):Mm(r,e,t),t}function Mm(r,e,t){if(wt.domSupported&&r.getBoundingClientRect){var n=e.clientX,a=e.clientY;if(Am(r)){var i=r.getBoundingClientRect();t.zrX=n-i.left,t.zrY=a-i.top;return}else if(ic(oc,r,n,a)){t.zrX=oc[0],t.zrY=oc[1];return}}t.zrX=t.zrY=0}function lc(r){return r||window.event}function qe(r,e,t){if(e=lc(e),e.zrX!=null)return e;var n=e.type,a=n&&n.indexOf("touch")>=0;if(a){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&sc(r,o,e,t)}else{sc(r,e,e,t);var i=lE(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&oE.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function lE(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,n=r.deltaY;if(t==null||n==null)return e;var a=Math.abs(n!==0?n:t),i=n>0?-1:n<0?1:t>0?-1:1;return 3*a*i}function uc(r,e,t,n){r.addEventListener(e,t,n)}function uE(r,e,t,n){r.removeEventListener(e,t,n)}var en=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function Lm(r){return r.which===2||r.which===3}var fE=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,n){var a=e.touches;if(a){for(var i={points:[],touches:[],target:t,event:e},o=0,s=a.length;o1&&n&&n.length>1){var i=Im(n)/Im(a);!isFinite(i)&&(i=1),e.pinchScale=i;var o=hE(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function Ke(){return[1,0,0,1,0,0]}function Ul(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function hc(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function rn(r,e,t){var n=e[0]*t[0]+e[2]*t[1],a=e[1]*t[0]+e[3]*t[1],i=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=n,r[1]=a,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function Pr(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function ga(r,e,t){var n=e[0],a=e[2],i=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(t),f=Math.cos(t);return r[0]=n*f+o*u,r[1]=-n*u+o*f,r[2]=a*f+s*u,r[3]=-a*u+f*s,r[4]=f*i+u*l,r[5]=f*l-u*i,r}function cc(r,e,t){var n=t[0],a=t[1];return r[0]=e[0]*n,r[1]=e[1]*a,r[2]=e[2]*n,r[3]=e[3]*a,r[4]=e[4]*n,r[5]=e[5]*a,r}function Ii(r,e){var t=e[0],n=e[2],a=e[4],i=e[1],o=e[3],s=e[5],l=t*o-i*n;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-n*l,r[3]=t*l,r[4]=(n*s-o*a)*l,r[5]=(i*a-t*s)*l,r):null}function cE(r){var e=Ke();return hc(e,r),e}var vE=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,n){e.x=t,e.y=n},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},r.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},r.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},r.scaleAndAdd=function(e,t,n,a){e.x=t.x+n.x*a,e.y=t.y+n.y*a},r.lerp=function(e,t,n,a){var i=1-a;e.x=i*t.x+a*n.x,e.y=i*t.y+a*n.y},r}();const ut=vE;var Yl=Math.min,Zl=Math.max,ya=new ut,ma=new ut,_a=new ut,Sa=new ut,Go=new ut,Fo=new ut,pE=function(){function r(e,t,n,a){n<0&&(e=e+n,n=-n),a<0&&(t=t+a,a=-a),this.x=e,this.y=t,this.width=n,this.height=a}return r.prototype.union=function(e){var t=Yl(e.x,this.x),n=Yl(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Zl(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Zl(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,a=e.height/t.height,i=Ke();return Pr(i,i,[-t.x,-t.y]),cc(i,i,[n,a]),Pr(i,i,[e.x,e.y]),i},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var n=this,a=n.x,i=n.x+n.width,o=n.y,s=n.y+n.height,l=e.x,u=e.x+e.width,f=e.y,h=e.y+e.height,c=!(ip&&(p=_,dp&&(p=S,y=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,n){if(!n){e!==t&&r.copy(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var a=n[0],i=n[3],o=n[4],s=n[5];e.x=t.x*a+o,e.y=t.y*i+s,e.width=t.width*a,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}ya.x=_a.x=t.x,ya.y=Sa.y=t.y,ma.x=Sa.x=t.x+t.width,ma.y=_a.y=t.y+t.height,ya.transform(n),Sa.transform(n),ma.transform(n),_a.transform(n),e.x=Yl(ya.x,ma.x,_a.x,Sa.x),e.y=Yl(ya.y,ma.y,_a.y,Sa.y);var l=Zl(ya.x,ma.x,_a.x,Sa.x),u=Zl(ya.y,ma.y,_a.y,Sa.y);e.width=l-e.x,e.height=u-e.y},r}();const ct=pE;var Em="silent";function dE(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:gE}}function gE(){en(this.event)}var yE=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Xe),Ho=function(){function r(e,t){this.x=e,this.y=t}return r}(),mE=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],vc=new ct(0,0,0,0),Pm=function(r){O(e,r);function e(t,n,a,i,o){var s=r.call(this)||this;return s._hovered=new Ho(0,0),s.storage=t,s.painter=n,s.painterRoot=i,s._pointerSize=o,a=a||new yE,s.proxy=null,s.setHandlerProxy(a),s._draggingMgr=new QI(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(D(mE,function(n){t.on&&t.on(n,this[n],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var n=t.zrX,a=t.zrY,i=Nm(this,n,a),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new Ho(n,a):this.findHover(n,a),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var n=t.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Ho(0,0)},e.prototype.dispatch=function(t,n){var a=this[t];a&&a.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var n=this.proxy;n.setCursor&&n.setCursor(t)},e.prototype.dispatchToElement=function(t,n,a){t=t||{};var i=t.target;if(!(i&&i.silent)){for(var o="on"+n,s=dE(n,t,a);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(n,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},e.prototype.findHover=function(t,n,a){var i=this.storage.getDisplayList(),o=new Ho(t,n);if(Rm(i,o,t,n,a),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new ct(t-u,n-u,l,l),h=i.length-1;h>=0;h--){var c=i[h];c!==a&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(vc.copy(c.getBoundingRect()),c.transform&&vc.applyTransform(c.transform),vc.intersect(f)&&s.push(c))}if(s.length)for(var v=4,p=Math.PI/12,d=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(i,r,e)}});function _E(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var n=r,a=void 0,i=!1;n;){if(n.ignoreClip&&(i=!0),!i){var o=n.getClipPath();if(o&&!o.contain(e,t))return!1;n.silent&&(a=!0)}var s=n.__hostTarget;n=s||n.parent}return a?Em:!0}return!1}function Rm(r,e,t,n,a){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==a&&!o.ignore&&(s=_E(o,t,n))&&(!e.topTarget&&(e.topTarget=o),s!==Em)){e.target=o;break}}}function Nm(r,e,t){var n=r.painter;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}const SE=Pm;var Om=32,$o=7;function xE(r){for(var e=0;r>=Om;)e|=r&1,r>>=1;return r+e}function km(r,e,t,n){var a=e+1;if(a===t)return 1;if(n(r[a++],r[e])<0){for(;a=0;)a++;return a-e}function wE(r,e,t){for(t--;e>>1,a(i,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=i}}function pc(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])>0){for(s=n-a;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;ls&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o>>1);i(r,e[t+f])>0?o=f+1:l=f}return l}function dc(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])<0){for(s=a+1;ls&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=n-a;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o>>1);i(r,e[t+f])<0?l=f:o=f+1}return l}function bE(r,e){var t=$o,n,a,i=0;r.length;var o=[];n=[],a=[];function s(v,p){n[i]=v,a[i]=p,i+=1}function l(){for(;i>1;){var v=i-2;if(v>=1&&a[v-1]<=a[v]+a[v+1]||v>=2&&a[v-2]<=a[v]+a[v-1])a[v-1]a[v+1])break;f(v)}}function u(){for(;i>1;){var v=i-2;v>0&&a[v-1]=$o||b>=$o);if(T)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),p===1){for(y=0;y=0;y--)r[x+y]=r[w+y];r[S]=o[_];return}for(var b=t;;){var T=0,C=0,A=!1;do if(e(o[_],r[m])<0){if(r[S--]=r[m--],T++,C=0,--p===0){A=!0;break}}else if(r[S--]=o[_--],C++,T=0,--g===1){A=!0;break}while((T|C)=0;y--)r[x+y]=r[w+y];if(p===0){A=!0;break}}if(r[S--]=o[_--],--g===1){A=!0;break}if(C=g-pc(r[m],o,0,g,g-1,e),C!==0){for(S-=C,_-=C,g-=C,x=S+1,w=_+1,y=0;y=$o||C>=$o);if(A)break;b<0&&(b=0),b+=2}if(t=b,t<1&&(t=1),g===1){for(S-=p,m-=p,x=S+1,w=m+1,y=p-1;y>=0;y--)r[x+y]=r[w+y];r[S]=o[_]}else{if(g===0)throw new Error;for(w=S-(g-1),y=0;ys&&(l=s),Vm(r,t,t+l,t+i,e),i=l}o.pushRun(t,i),o.mergeRuns(),a-=i,t+=i}while(a!==0);o.forceMergeRuns()}}var He=1,Wo=2,Ei=4,Bm=!1;function gc(){Bm||(Bm=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function zm(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var TE=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=zm}return r.prototype.traverse=function(e,t){for(var n=0;n0&&(f.__clipPaths=[]),isNaN(f.z)&&(gc(),f.z=0),isNaN(f.z2)&&(gc(),f.z2=0),isNaN(f.zlevel)&&(gc(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=e.getDecalElement&&e.getDecalElement();h&&this._updateAndAddDisplayable(h,t,n);var c=e.getTextGuideLine();c&&this._updateAndAddDisplayable(c,t,n);var v=e.getTextContent();v&&this._updateAndAddDisplayable(v,t,n)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t=0&&this._roots.splice(a,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}();const DE=TE;var Gm;Gm=wt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};const yc=Gm;var ql={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)))},elasticOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-ql.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?ql.bounceIn(r*2)*.5:ql.bounceOut(r*2-1)*.5+.5}};const Fm=ql;var Kl=Math.pow,En=Math.sqrt,jl=1e-8,Hm=1e-4,$m=En(3),Ql=1/3,Rr=va(),je=va(),Pi=va();function Pn(r){return r>-jl&&rjl||r<-jl}function ie(r,e,t,n,a){var i=1-a;return i*i*(i*r+3*a*e)+a*a*(a*n+3*i*t)}function Um(r,e,t,n,a){var i=1-a;return 3*(((e-r)*i+2*(t-e)*a)*i+(n-t)*a*a)}function Jl(r,e,t,n,a,i){var o=n+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-a,f=s*s-3*o*l,h=s*l-9*o*u,c=l*l-3*s*u,v=0;if(Pn(f)&&Pn(h))if(Pn(s))i[0]=0;else{var p=-l/s;p>=0&&p<=1&&(i[v++]=p)}else{var d=h*h-4*f*c;if(Pn(d)){var g=h/f,p=-s/o+g,y=-g/2;p>=0&&p<=1&&(i[v++]=p),y>=0&&y<=1&&(i[v++]=y)}else if(d>0){var m=En(d),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-Kl(-_,Ql):_=Kl(_,Ql),S<0?S=-Kl(-S,Ql):S=Kl(S,Ql);var p=(-s-(_+S))/(3*o);p>=0&&p<=1&&(i[v++]=p)}else{var w=(2*f*s-3*o*h)/(2*En(f*f*f)),x=Math.acos(w)/3,b=En(f),T=Math.cos(x),p=(-s-2*b*T)/(3*o),y=(-s+b*(T+$m*Math.sin(x)))/(3*o),C=(-s+b*(T-$m*Math.sin(x)))/(3*o);p>=0&&p<=1&&(i[v++]=p),y>=0&&y<=1&&(i[v++]=y),C>=0&&C<=1&&(i[v++]=C)}}return v}function Ym(r,e,t,n,a){var i=6*t-12*e+6*r,o=9*e+3*n-3*r-9*t,s=3*e-3*r,l=0;if(Pn(o)){if(Wm(i)){var u=-s/i;u>=0&&u<=1&&(a[l++]=u)}}else{var f=i*i-4*o*s;if(Pn(f))a[0]=-i/(2*o);else if(f>0){var h=En(f),u=(-i+h)/(2*o),c=(-i-h)/(2*o);u>=0&&u<=1&&(a[l++]=u),c>=0&&c<=1&&(a[l++]=c)}}return l}function Rn(r,e,t,n,a,i){var o=(e-r)*a+r,s=(t-e)*a+e,l=(n-t)*a+t,u=(s-o)*a+o,f=(l-s)*a+s,h=(f-u)*a+u;i[0]=r,i[1]=o,i[2]=u,i[3]=h,i[4]=h,i[5]=f,i[6]=l,i[7]=n}function Zm(r,e,t,n,a,i,o,s,l,u,f){var h,c=.005,v=1/0,p,d,g,y;Rr[0]=l,Rr[1]=u;for(var m=0;m<1;m+=.05)je[0]=ie(r,t,a,o,m),je[1]=ie(e,n,i,s,m),g=da(Rr,je),g=0&&g=0&&u<=1&&(a[l++]=u)}}else{var f=o*o-4*i*s;if(Pn(f)){var u=-o/(2*i);u>=0&&u<=1&&(a[l++]=u)}else if(f>0){var h=En(f),u=(-o+h)/(2*i),c=(-o-h)/(2*i);u>=0&&u<=1&&(a[l++]=u),c>=0&&c<=1&&(a[l++]=c)}}return l}function Xm(r,e,t){var n=r+t-2*e;return n===0?.5:(r-e)/n}function Uo(r,e,t,n,a){var i=(e-r)*n+r,o=(t-e)*n+e,s=(o-i)*n+i;a[0]=r,a[1]=i,a[2]=s,a[3]=s,a[4]=o,a[5]=t}function qm(r,e,t,n,a,i,o,s,l){var u,f=.005,h=1/0;Rr[0]=o,Rr[1]=s;for(var c=0;c<1;c+=.05){je[0]=ue(r,t,a,c),je[1]=ue(e,n,i,c);var v=da(Rr,je);v=0&&v=1?1:Jl(0,n,i,1,l,s)&&ie(0,a,o,1,s[0])}}}var IE=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||qt,this.ondestroy=e.ondestroy||qt,this.onrestart=e.onrestart||qt,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,a=e-this._startTime-this._pausedTime,i=a/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=a%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=q(e)?e:Fm[e]||_c(e)},r}();const EE=IE;var Km=function(){function r(e){this.value=e}return r}(),PE=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new Km(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),RE=function(){function r(e){this._list=new PE,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var n=this._list,a=this._map,i=null;if(a[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete a[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new Km(t),s.key=e,n.insertEntry(s),a[e]=s}return i},r.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}();const Yo=RE;var jm={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function mr(r){return r=Math.round(r),r<0?0:r>255?255:r}function NE(r){return r=Math.round(r),r<0?0:r>360?360:r}function Zo(r){return r<0?0:r>1?1:r}function Sc(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?mr(parseFloat(e)/100*255):mr(parseInt(e,10))}function xa(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Zo(parseFloat(e)/100):Zo(parseFloat(e))}function xc(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function Nn(r,e,t){return r+(e-r)*t}function Qe(r,e,t,n,a){return r[0]=e,r[1]=t,r[2]=n,r[3]=a,r}function wc(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var Qm=new Yo(20),tu=null;function Ri(r,e){tu&&wc(tu,e),tu=Qm.put(r,tu||e.slice())}function $e(r,e){if(r){e=e||[];var t=Qm.get(r);if(t)return wc(e,t);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in jm)return wc(e,jm[n]),Ri(r,e),e;var a=n.length;if(n.charAt(0)==="#"){if(a===4||a===5){var i=parseInt(n.slice(1,4),16);if(!(i>=0&&i<=4095)){Qe(e,0,0,0,1);return}return Qe(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,a===5?parseInt(n.slice(4),16)/15:1),Ri(r,e),e}else if(a===7||a===9){var i=parseInt(n.slice(1,7),16);if(!(i>=0&&i<=16777215)){Qe(e,0,0,0,1);return}return Qe(e,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(n.slice(7),16)/255:1),Ri(r,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===a){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Qe(e,+u[0],+u[1],+u[2],1):Qe(e,0,0,0,1);f=xa(u.pop());case"rgb":if(u.length>=3)return Qe(e,Sc(u[0]),Sc(u[1]),Sc(u[2]),u.length===3?f:xa(u[3])),Ri(r,e),e;Qe(e,0,0,0,1);return;case"hsla":if(u.length!==4){Qe(e,0,0,0,1);return}return u[3]=xa(u[3]),bc(u,e),Ri(r,e),e;case"hsl":if(u.length!==3){Qe(e,0,0,0,1);return}return bc(u,e),Ri(r,e),e;default:return}}Qe(e,0,0,0,1)}}function bc(r,e){var t=(parseFloat(r[0])%360+360)%360/360,n=xa(r[1]),a=xa(r[2]),i=a<=.5?a*(n+1):a+n-a*n,o=a*2-i;return e=e||[],Qe(e,mr(xc(o,i,t+1/3)*255),mr(xc(o,i,t)*255),mr(xc(o,i,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function OE(r){if(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,a=Math.min(e,t,n),i=Math.max(e,t,n),o=i-a,s=(i+a)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+a):u=o/(2-i-a);var f=((i-e)/6+o/2)/o,h=((i-t)/6+o/2)/o,c=((i-n)/6+o/2)/o;e===i?l=c-h:t===i?l=1/3+f-c:n===i&&(l=2/3+h-f),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return r[3]!=null&&v.push(r[3]),v}}function Tc(r,e){var t=$e(r);if(t){for(var n=0;n<3;n++)e<0?t[n]=t[n]*(1-e)|0:t[n]=(255-t[n])*e+t[n]|0,t[n]>255?t[n]=255:t[n]<0&&(t[n]=0);return nn(t,t.length===4?"rgba":"rgb")}}function Dc(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var n=r*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=e[a],s=e[i],l=n-a;return t[0]=mr(Nn(o[0],s[0],l)),t[1]=mr(Nn(o[1],s[1],l)),t[2]=mr(Nn(o[2],s[2],l)),t[3]=Zo(Nn(o[3],s[3],l)),t}}function kE(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var n=r*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=$e(e[a]),s=$e(e[i]),l=n-a,u=nn([mr(Nn(o[0],s[0],l)),mr(Nn(o[1],s[1],l)),mr(Nn(o[2],s[2],l)),Zo(Nn(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:a,rightIndex:i,value:n}:u}}function Xo(r,e,t,n){var a=$e(r);if(r)return a=OE(a),e!=null&&(a[0]=NE(e)),t!=null&&(a[1]=xa(t)),n!=null&&(a[2]=xa(n)),nn(bc(a),"rgba")}function eu(r,e){var t=$e(r);if(t&&e!=null)return t[3]=Zo(e),nn(t,"rgba")}function nn(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function ru(r,e){var t=$e(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var nu=Math.round;function qo(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=$e(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var Jm=1e-4;function On(r){return r-Jm}function au(r){return nu(r*1e3)/1e3}function Cc(r){return nu(r*1e4)/1e4}function VE(r){return"matrix("+au(r[0])+","+au(r[1])+","+au(r[2])+","+au(r[3])+","+Cc(r[4])+","+Cc(r[5])+")"}var BE={left:"start",right:"end",center:"middle",middle:"middle"};function zE(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function GE(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function FE(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function t0(r){return r&&!!r.image}function HE(r){return r&&!!r.svgElement}function Ac(r){return t0(r)||HE(r)}function e0(r){return r.type==="linear"}function r0(r){return r.type==="radial"}function n0(r){return r&&(r.type==="linear"||r.type==="radial")}function iu(r){return"url(#"+r+")"}function a0(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function i0(r){var e=r.x||0,t=r.y||0,n=(r.rotation||0)*Hl,a=lt(r.scaleX,1),i=lt(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),n&&l.push("rotate("+n+")"),(a!==1||i!==1)&&l.push("scale("+a+","+i+")"),(o||s)&&l.push("skew("+nu(o*Hl)+"deg, "+nu(s*Hl)+"deg)"),l.join(" ")}var $E=function(){return wt.hasGlobalWindow&&q(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return process.env.NODE_ENV!=="production"&&dr("Base64 isn't natively supported in the current environment."),null}}(),Mc=Array.prototype.slice;function an(r,e,t){return(e-r)*t+r}function Lc(r,e,t,n){for(var a=e.length,i=0;in?e:r,i=Math.min(t,n),o=a[i-1]||{color:[0,0,0,0],offset:0},s=i;so;if(s)n.length=o;else for(var l=i;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var a=this.keyframes,i=a.length,o=!1,s=l0,l=t;if(me(t)){var u=ZE(t);s=u,(u===1&&!Ct(t[0])||u===2&&!Ct(t[0][0]))&&(o=!0)}else if(Ct(t)&&!ca(t))s=lu;else if(U(t))if(!isNaN(+t))s=lu;else{var f=$e(t);f&&(l=f,s=jo)}else if(Bl(t)){var h=B({},l);h.colorStops=F(t.colorStops,function(v){return{offset:v.offset,color:$e(v.color)}}),e0(t)?s=Ic:r0(t)&&(s=Ec),l=h}i===0?this.valType=s:(s!==this.valType||s===l0)&&(o=!0),this.discrete=this.discrete||o;var c={time:e,value:l,rawValue:t,percent:0};return n&&(c.easing=n,c.easingFunc=q(n)?n:Fm[n]||_c(n)),a.push(c),c},r.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(d,g){return d.time-g.time});for(var a=this.valType,i=n.length,o=n[i-1],s=this.discrete,l=fu(a),u=u0(a),f=0;f=0&&!(o[f].percent<=t);f--);f=c(f,s-2)}else{for(f=h;ft);f++);f=c(f-1,s-2)}p=o[f+1],v=o[f]}if(v&&p){this._lastFr=f,this._lastFrP=t;var g=p.percent-v.percent,y=g===0?1:c((t-v.percent)/g,1);p.easingFunc&&(y=p.easingFunc(y));var m=n?this._additiveValue:u?Qo:e[l];if((fu(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)e[l]=y<1?v.rawValue:p.rawValue;else if(fu(i))i===uu?Lc(m,v[a],p[a],y):WE(m,v[a],p[a],y);else if(u0(i)){var _=v[a],S=p[a],w=i===Ic;e[l]={type:w?"linear":"radial",x:an(_.x,S.x,y),y:an(_.y,S.y,y),colorStops:F(_.colorStops,function(b,T){var C=S.colorStops[T];return{offset:an(b.offset,C.offset,y),color:su(Lc([],b.color,C.color,y))}}),global:S.global},w?(e[l].x2=an(_.x2,S.x2,y),e[l].y2=an(_.y2,S.y2,y)):e[l].r=an(_.r,S.r,y)}else if(u)Lc(m,v[a],p[a],y),n||(e[l]=su(m));else{var x=an(v[a],p[a],y);n?this._additiveValue=x:e[l]=x}n&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,a=this._additiveValue;t===lu?e[n]=e[n]+a:t===jo?($e(e[n],Qo),ou(Qo,Qo,a,1),e[n]=su(Qo)):t===uu?ou(e[n],e[n],a,1):t===s0&&o0(e[n],e[n],a,1)},r}(),Pc=function(){function r(e,t,n,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&a){dr("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,St(t),n)},r.prototype.whenWithKeys=function(e,t,n,a){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,Ko(u),a),this._trackKeys.push(s)}l.addKeyframe(e,Ko(t[s]),a)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],a=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,e[a]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r}();function Ni(){return new Date().getTime()}var qE=function(r){O(e,r);function e(t){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var n=t.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(t){if(t.animation){var n=t.prev,a=t.next;n?n.next=a:this._head=a,a?a.prev=n:this._tail=n,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var n=t.getClip();n&&this.removeClip(n),t.animation=null},e.prototype.update=function(t){for(var n=Ni()-this._pausedTime,a=n-this._time,i=this._head;i;){var o=i.next,s=i.step(n,a);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=n,t||(this.trigger("frame",a),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function n(){t._running&&(yc(n),!t._paused&&t.update())}yc(n)},e.prototype.start=function(){this._running||(this._time=Ni(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Ni(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Ni()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var n=t.next;t.prev=t.next=t.animation=null,t=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,n){n=n||{},this.start();var a=new Pc(t,n.loop);return this.addAnimator(a),a},e}(Xe);const KE=qE;var jE=300,Rc=wt.domSupported,Nc=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=F(r,function(a){var i=a.replace("mouse","pointer");return t.hasOwnProperty(i)?i:a});return{mouse:r,touch:e,pointer:n}}(),f0={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},h0=!1;function Oc(r){var e=r.pointerType;return e==="pen"||e==="touch"}function QE(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function kc(r){r&&(r.zrByTouch=!0)}function JE(r,e){return qe(r.dom,new t2(r,e),!0)}function c0(r,e){for(var t=e,n=!1;t&&t.nodeType!==9&&!(n=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return n}var t2=function(){function r(e,t){this.stopPropagation=qt,this.stopImmediatePropagation=qt,this.preventDefault=qt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),_r={mousedown:function(r){r=qe(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=qe(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=qe(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=qe(this.dom,r);var e=r.toElement||r.relatedTarget;c0(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){h0=!0,r=qe(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){h0||(r=qe(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=qe(this.dom,r),kc(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),_r.mousemove.call(this,r),_r.mousedown.call(this,r)},touchmove:function(r){r=qe(this.dom,r),kc(r),this.handler.processGesture(r,"change"),_r.mousemove.call(this,r)},touchend:function(r){r=qe(this.dom,r),kc(r),this.handler.processGesture(r,"end"),_r.mouseup.call(this,r),+new Date-+this.__lastTouchMomentg0||r<-g0}var ba=[],Oi=[],Hc=Ke(),$c=Math.abs,o2=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return wa(this.rotation)||wa(this.x)||wa(this.y)||wa(this.scaleX-1)||wa(this.scaleY-1)||wa(this.skewX)||wa(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&d0(n);return}n=n||Ke(),t?this.getLocalTransform(n):d0(n),e&&(t?rn(n,e,n):hc(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(ba);var n=ba[0]<0?-1:1,a=ba[1]<0?-1:1,i=((ba[0]-n)*t+n)/ba[0]||0,o=((ba[1]-a)*t+a)/ba[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||Ke(),Ii(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],a=Math.atan2(e[1],e[0]),i=Math.PI/2+a-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-a,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(rn(Oi,e.invTransform,t),t=Oi);var n=this.originX,a=this.originY;(n||a)&&(Hc[4]=n,Hc[5]=a,rn(Oi,t,Hc),Oi[4]-=n,Oi[5]-=a,t=Oi),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var n=[e,t],a=this.invTransform;return a&&he(n,n,a),n},r.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],a=this.transform;return a&&he(n,n,a),n},r.prototype.getLineScale=function(){var e=this.transform;return e&&$c(e[0]-1)>1e-10&&$c(e[3]-1)>1e-10?Math.sqrt($c(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){y0(this,e)},r.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,a=e.originY||0,i=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,f=e.x,h=e.y,c=e.skewX?Math.tan(e.skewX):0,v=e.skewY?Math.tan(-e.skewY):0;if(n||a||s||l){var p=n+s,d=a+l;t[4]=-p*i-c*d*o,t[5]=-d*o-v*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=v*i,t[2]=c*o,u&&ga(t,t,u),t[4]+=n+f,t[5]+=a+h,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),Nr=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function y0(r,e){for(var t=0;t=0?parseFloat(r)/100*e:parseFloat(r):r}function pu(r,e,t){var n=e.position||"inside",a=e.distance!=null?e.distance:5,i=t.height,o=t.width,s=i/2,l=t.x,u=t.y,f="left",h="top";if(n instanceof Array)l+=Sr(n[0],t.width),u+=Sr(n[1],t.height),f=null,h=null;else switch(n){case"left":l-=a,u+=s,f="right",h="middle";break;case"right":l+=a+o,u+=s,h="middle";break;case"top":l+=o/2,u-=a,f="center",h="bottom";break;case"bottom":l+=o/2,u+=i+a,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=a,u+=s,h="middle";break;case"insideRight":l+=o-a,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=a,f="center";break;case"insideBottom":l+=o/2,u+=i-a,f="center",h="bottom";break;case"insideTopLeft":l+=a,u+=a;break;case"insideTopRight":l+=o-a,u+=a,f="right";break;case"insideBottomLeft":l+=a,u+=i-a,h="bottom";break;case"insideBottomRight":l+=o-a,u+=i-a,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var Wc="__zr_normal__",Uc=Nr.concat(["ignore"]),s2=Er(Nr,function(r,e){return r[e]=!0,r},{ignore:!1}),Vi={},l2=new ct(0,0,0,0),Yc=function(){function r(e){this.id=mm(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=e,a[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,a=n.local,i=t.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=a?this:null;var u=!1;if(i.copyTransform(t),n.position!=null){var f=l2;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),a||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Vi,n,f):pu(Vi,n,f),i.x=Vi.x,i.y=Vi.y,o=Vi.align,s=Vi.verticalAlign;var h=n.origin;if(h&&n.rotation!=null){var c=void 0,v=void 0;h==="center"?(c=f.width*.5,v=f.height*.5):(c=Sr(h[0],f.width),v=Sr(h[1],f.height)),u=!0,i.originX=-i.x+c+(a?0:f.x),i.originY=-i.y+v+(a?0:f.y)}}n.rotation!=null&&(i.rotation=n.rotation);var p=n.offset;p&&(i.x+=p[0],i.y+=p[1],u||(i.originX=-p[0],i.originY=-p[1]));var d=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;d&&this.canBeInsideText()?(y=n.insideFill,m=n.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=n.outsideFill,m=n.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==g.fill||m!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=y,g.stroke=m,g.autoStroke=_,g.align=o,g.verticalAlign=s,t.setDefaultTextStyle(g)),t.__dirty|=He,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Fc:Gc},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t=="string"&&$e(t);n||(n=[255,255,255,1]);for(var a=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*a+(i?0:255)*(1-a);return n[3]=1,nn(n,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},B(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(Q(e))for(var n=e,a=St(n),i=0;i0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(Wc,!1,e)},r.prototype.useState=function(e,t,n,a){var i=e===Wc,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(pt(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!i){dr("State "+e+" not exists.");return}i||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||a);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!n&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,c=this._textGuide;return h&&h.useState(e,t,n,f),c&&c.useState(e,t,n,f),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~He),u}}},r.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var a=[],i=this.currentStates,o=e.length,s=o===i.length;if(s){for(var l=0;l0,p);var d=this._textContent,g=this._textGuide;d&&d.useStates(e,t,c),g&&g.useStates(e,t,c),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~He)}},r.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},r.prototype.replaceState=function(e,t,n){var a=this.currentStates.slice(),i=pt(a,e),o=pt(a,t)>=0;i>=0?o?a.splice(i,1):a[i]=t:n&&!o&&a.push(t),this.useStates(a)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},n,a=0;a=0&&i.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var n=this.animators,a=n.length,i=[],o=0;o0&&t.during&&i[0].during(function(p,d){t.during(d)});for(var c=0;c0||a.force&&!o.length){var T=void 0,C=void 0,A=void 0;if(s){C={},c&&(T={});for(var S=0;S<_;S++){var y=d[S];C[y]=t[y],c?T[y]=n[y]:t[y]=n[y]}}else if(c){A={};for(var S=0;S<_;S++){var y=d[S];A[y]=Ko(t[y]),f2(t,n,y)}}var w=new Pc(t,!1,!1,h?Rt(p,function(L){return L.targetName===e}):null);w.targetName=e,a.scope&&(w.scope=a.scope),c&&T&&w.whenWithKeys(0,T,d),A&&w.whenWithKeys(0,A,d),w.whenWithKeys(u??500,s?C:n,d).delay(f||0),r.addAnimator(w,e),o.push(w)}}const x0=Yc;var w0=function(r){O(e,r);function e(t){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var n=this._children,a=0;a=0&&(a.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,n){var a=pt(this._children,t);return a>=0&&this.replaceAt(n,a),this},e.prototype.replaceAt=function(t,n){var a=this._children,i=a[n];if(t&&t!==this&&t.parent!==this&&t!==i){a[n]=t,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var n=this.__zr;n&&n!==t.__zr&&t.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(t){var n=this.__zr,a=this._children,i=pt(a,t);return i<0?this:(a.splice(i,1),t.parent=null,n&&t.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,n=this.__zr,a=0;a0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover()},r.prototype.resize=function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},r.prototype.clearAnimation=function(){this.animation.clear()},r.prototype.getWidth=function(){return this.painter.getWidth()},r.prototype.getHeight=function(){return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){return this.handler.findHover(e,t)},r.prototype.on=function(e,t,n){return this.handler.on(e,t,n),this},r.prototype.off=function(e,t){this.handler.off(e,t)},r.prototype.trigger=function(e,t){this.handler.trigger(e,t)},r.prototype.clear=function(){for(var e=this.storage.getRoots(),t=0;t0){if(r<=a)return o;if(r>=i)return s}else{if(r>=a)return o;if(r<=i)return s}else{if(r===a)return o;if(r===i)return s}return(r-a)/l*u+o}function $(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return U(r)?y2(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function Zt(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),C0),r=(+r).toFixed(e),t?r:+r}function Je(r){return r.sort(function(e,t){return e-t}),r}function Or(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return qc(r)}function qc(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),n=t>0?+e.slice(t+1):0,a=t>0?t:e.length,i=e.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-n)}function A0(r,e){var t=Math.log,n=Math.LN10,a=Math.floor(t(r[1]-r[0])/n),i=Math.round(t(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function m2(r,e){var t=Er(r,function(v,p){return v+(isNaN(p)?0:p)},0);if(t===0)return[];for(var n=Math.pow(10,e),a=F(r,function(v){return(isNaN(v)?0:v)/t*n*100}),i=n*100,o=F(a,function(v){return Math.floor(v)}),s=Er(o,function(v,p){return v+p},0),l=F(a,function(v,p){return v-o[p]});su&&(u=l[h],f=h);++o[f],l[f]=0,++s}return F(o,function(v){return v/n})}function _2(r,e){var t=Math.max(Or(r),Or(e)),n=r+e;return t>C0?n:Zt(n,t)}var M0=9007199254740991;function L0(r){var e=Math.PI*2;return(r%e+e)%e}function du(r){return r>-D0&&r=10&&e++,e}function I0(r,e){var t=gu(r),n=Math.pow(10,t),a=r/n,i;return e?a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10:a<1?i=1:a<2?i=2:a<3?i=3:a<5?i=5:i=10,r=i*n,t>=-20?+r.toFixed(t<0?-t:0):r}function Kc(r,e){var t=(r.length-1)*e+1,n=Math.floor(t),a=+r[n-1],i=t-n;return i?a+i*(r[n]-a):a}function E0(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,n=0;n=0||i&&pt(i,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var X2=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],q2=Aa(X2),K2=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return q2(this,e,t)},r}(),rv=new Yo(50);function j2(r){if(typeof r=="string"){var e=rv.get(r);return e&&e.image}else return r}function nv(r,e,t,n,a){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var i=rv.get(r),o={hostEl:t,cb:n,cbPayload:a};return i?(e=i.image,!_u(e)&&i.pending.push(o)):(e=An.loadImage(r,X0,X0),e.__zrImageSrc=r,rv.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function X0(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=o;l++)s-=o;var u=We(t,e);return u>s&&(t="",u=0),s=r-u,a.ellipsis=t,a.ellipsisWidth=u,a.contentWidth=s,a.containerWidth=r,a}function K0(r,e){var t=e.containerWidth,n=e.font,a=e.contentWidth;if(!t)return"";var i=We(r,n);if(i<=t)return r;for(var o=0;;o++){if(i<=a||o>=e.maxIterations){r+=e.ellipsis;break}var s=o===0?J2(r,a,e.ascCharWidth,e.cnCharWidth):i>0?Math.floor(r.length*a/i):0;r=r.substr(0,s),i=We(r,n)}return r===""&&(r=e.placeholder),r}function J2(r,e,t,n){for(var a=0,i=0,o=r.length;iv&&u){var p=Math.floor(v/s);h=h.slice(0,p)}if(r&&i&&f!=null)for(var d=q0(f,a,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),g=0;gs&&iv(t,r.substring(s,u),e,o),iv(t,l[2],e,o,l[1]),s=av.lastIndex}sa){w>0?(m.tokens=m.tokens.slice(0,w),g(m,S,_),t.lines=t.lines.slice(0,y+1)):t.lines=t.lines.slice(0,y);break t}var L=b.width,I=L==null||L==="auto";if(typeof L=="string"&&L.charAt(L.length-1)==="%")x.percentWidth=L,f.push(x),x.contentWidth=We(x.text,A);else{if(I){var E=b.backgroundColor,P=E&&E.image;P&&(P=j2(P),_u(P)&&(x.width=Math.max(x.width,P.width*M/P.height)))}var N=p&&n!=null?n-S:null;N!=null&&N0&&p+n.accumWidth>n.width&&(f=e.split(` `),u=!0),n.accumWidth=p}else{var d=Q0(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=d.accumWidth+v,h=d.linesWidths,f=d.lines}}else f=e.split(` `);for(var g=0;g=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var iP=Er(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function oP(r){return aP(r)?!!iP[r]:!0}function Q0(r,e,t,n,a){for(var i=[],o=[],s="",l="",u=0,f=0,h=0;ht:a+f+v>t){f?(s||l)&&(p?(s||(s=l,l="",u=0,f=u),i.push(s),o.push(f-u),l+=c,u+=v,s="",f=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(f),s=c,f=v)):p?(i.push(l),o.push(u),l=c,u=v):(i.push(c),o.push(v));continue}f+=v,p?(l+=c,u+=v):(l&&(s+=l,l="",u=0),s+=c)}return!i.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(i.push(s),o.push(f)),i.length===1&&(f+=a),{accumWidth:f,lines:i,linesWidths:o}}var ov="__zr_style_"+Math.round(Math.random()*10),Ma={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Su={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ma[ov]=!0;var J0=["z","z2","invisible"],sP=["invisible"],lP=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var n=St(t),a=0;a1e-4){s[0]=r-t,s[1]=e-n,l[0]=r+t,l[1]=e+n;return}if(xu[0]=fv(a)*t+r,xu[1]=uv(a)*n+e,wu[0]=fv(i)*t+r,wu[1]=uv(i)*n+e,u(s,xu,wu),f(l,xu,wu),a=a%La,a<0&&(a=a+La),i=i%La,i<0&&(i=i+La),a>i&&!o?i+=La:aa&&(bu[0]=fv(v)*t+r,bu[1]=uv(v)*n+e,u(s,bu,s),f(l,bu,l))}var Ot={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ia=[],Ea=[],Br=[],kn=[],zr=[],Gr=[],hv=Math.min,cv=Math.max,Pa=Math.cos,Ra=Math.sin,ln=Math.abs,vv=Math.PI,Vn=vv*2,pv=typeof Float32Array<"u",is=[];function dv(r){var e=Math.round(r/vv*1e8)/1e8;return e%2*vv}function n_(r,e){var t=dv(r[0]);t<0&&(t+=Vn);var n=t-r[0],a=r[1];a+=n,!e&&a-t>=Vn?a=t+Vn:e&&t-a>=Vn?a=t-Vn:!e&&t>a?a=t+(Vn-dv(t-a)):e&&t0&&(this._ux=ln(n/cu/e)||0,this._uy=ln(n/cu/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Ot.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var n=ln(e-this._xi),a=ln(t-this._yi),i=n>this._ux||a>this._uy;if(this.addData(Ot.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+a*a;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,n,a,i,o){return this._drawPendingPt(),this.addData(Ot.C,e,t,n,a,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,a,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,n,a){return this._drawPendingPt(),this.addData(Ot.Q,e,t,n,a),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,a),this._xi=n,this._yi=a,this},r.prototype.arc=function(e,t,n,a,i,o){this._drawPendingPt(),is[0]=a,is[1]=i,n_(is,o),a=is[0],i=is[1];var s=i-a;return this.addData(Ot.A,e,t,n,n,a,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,a,i,o),this._xi=Pa(i)*n+e,this._yi=Ra(i)*n+t,this},r.prototype.arcTo=function(e,t,n,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,a,i),this},r.prototype.rect=function(e,t,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,a),this.addData(Ot.R,e,t,n,a),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ot.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&pv&&(this.data=new Float32Array(t));for(var n=0;nf.length&&(this._expandData(),f=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Br[0]=Br[1]=zr[0]=zr[1]=Number.MAX_VALUE,kn[0]=kn[1]=Gr[0]=Gr[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,a=0,i=0,o;for(o=0;on||ln(_)>a||c===t-1)&&(d=Math.sqrt(m*m+_*_),i=g,o=y);break}case Ot.C:{var S=e[c++],w=e[c++],g=e[c++],y=e[c++],x=e[c++],b=e[c++];d=CE(i,o,S,w,g,y,x,b,10),i=x,o=b;break}case Ot.Q:{var S=e[c++],w=e[c++],g=e[c++],y=e[c++];d=ME(i,o,S,w,g,y,10),i=g,o=y;break}case Ot.A:var T=e[c++],C=e[c++],A=e[c++],M=e[c++],L=e[c++],I=e[c++],E=I+L;c+=1,e[c++],p&&(s=Pa(L)*A+T,l=Ra(L)*M+C),d=cv(A,M)*hv(Vn,Math.abs(I)),i=Pa(E)*A+T,o=Ra(E)*M+C;break;case Ot.R:{s=i=e[c++],l=o=e[c++];var P=e[c++],N=e[c++];d=P*2+N*2;break}case Ot.Z:{var m=s-i,_=l-o;d=Math.sqrt(m*m+_*_),i=s,o=l;break}}d>=0&&(u[h++]=d,f+=d)}return this._pathLen=f,f},r.prototype.rebuildPath=function(e,t){var n=this.data,a=this._ux,i=this._uy,o=this._len,s,l,u,f,h,c,v=t<1,p,d,g=0,y=0,m,_=0,S,w;if(!(v&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,d=this._pathLen,m=t*d,!m)))t:for(var x=0;x0&&(e.lineTo(S,w),_=0),b){case Ot.M:s=u=n[x++],l=f=n[x++],e.moveTo(u,f);break;case Ot.L:{h=n[x++],c=n[x++];var C=ln(h-u),A=ln(c-f);if(C>a||A>i){if(v){var M=p[y++];if(g+M>m){var L=(m-g)/M;e.lineTo(u*(1-L)+h*L,f*(1-L)+c*L);break t}g+=M}e.lineTo(h,c),u=h,f=c,_=0}else{var I=C*C+A*A;I>_&&(S=h,w=c,_=I)}break}case Ot.C:{var E=n[x++],P=n[x++],N=n[x++],V=n[x++],k=n[x++],z=n[x++];if(v){var M=p[y++];if(g+M>m){var L=(m-g)/M;Rn(u,E,N,k,L,Ia),Rn(f,P,V,z,L,Ea),e.bezierCurveTo(Ia[1],Ea[1],Ia[2],Ea[2],Ia[3],Ea[3]);break t}g+=M}e.bezierCurveTo(E,P,N,V,k,z),u=k,f=z;break}case Ot.Q:{var E=n[x++],P=n[x++],N=n[x++],V=n[x++];if(v){var M=p[y++];if(g+M>m){var L=(m-g)/M;Uo(u,E,N,L,Ia),Uo(f,P,V,L,Ea),e.quadraticCurveTo(Ia[1],Ea[1],Ia[2],Ea[2]);break t}g+=M}e.quadraticCurveTo(E,P,N,V),u=N,f=V;break}case Ot.A:var H=n[x++],W=n[x++],X=n[x++],et=n[x++],rt=n[x++],mt=n[x++],Lt=n[x++],yt=!n[x++],it=X>et?X:et,_t=ln(X-et)>.001,vt=rt+mt,j=!1;if(v){var M=p[y++];g+M>m&&(vt=rt+mt*(m-g)/M,j=!0),g+=M}if(_t&&e.ellipse?e.ellipse(H,W,X,et,Lt,rt,vt,yt):e.arc(H,W,it,rt,vt,yt),j)break t;T&&(s=Pa(rt)*X+H,l=Ra(rt)*et+W),u=Pa(vt)*X+H,f=Ra(vt)*et+W;break;case Ot.R:s=u=n[x],l=f=n[x+1],h=n[x++],c=n[x++];var ft=n[x++],Ht=n[x++];if(v){var M=p[y++];if(g+M>m){var Dt=m-g;e.moveTo(h,c),e.lineTo(h+hv(Dt,ft),c),Dt-=ft,Dt>0&&e.lineTo(h+ft,c+hv(Dt,Ht)),Dt-=Ht,Dt>0&&e.lineTo(h+cv(ft-Dt,0),c+Ht),Dt-=ft,Dt>0&&e.lineTo(h,c+cv(Ht-Dt,0));break t}g+=M}e.rect(h,c,ft,Ht);break;case Ot.Z:if(v){var M=p[y++];if(g+M>m){var L=(m-g)/M;e.lineTo(u*(1-L)+s*L,f*(1-L)+l*L);break t}g+=M}e.closePath(),u=s,f=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=Ot,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function Bn(r,e,t,n,a,i,o){if(a===0)return!1;var s=a,l=0,u=r;if(o>e+s&&o>n+s||or+s&&i>t+s||ie+h&&f>n+h&&f>i+h&&f>s+h||fr+h&&u>t+h&&u>a+h&&u>o+h||ue+u&&l>n+u&&l>i+u||lr+u&&s>t+u&&s>a+u||st||f+ua&&(a+=os);var c=Math.atan2(l,s);return c<0&&(c+=os),c>=n&&c<=a||c+os>=n&&c+os<=a}function fn(r,e,t,n,a,i){if(i>e&&i>n||ia?s:0}var zn=Fr.CMD,Na=Math.PI*2,dP=1e-4;function gP(r,e){return Math.abs(r-e)e&&u>n&&u>i&&u>s||u1&&yP(),v=ie(e,n,i,s,er[0]),c>1&&(p=ie(e,n,i,s,er[1]))),c===2?ge&&s>n&&s>i||s=0&&u<=1){for(var f=0,h=ue(e,n,i,u),c=0;ct||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Ce[0]=-l,Ce[1]=l;var u=Math.abs(n-a);if(u<1e-4)return 0;if(u>=Na-1e-4){n=0,a=Na;var f=i?1:-1;return o>=Ce[0]+r&&o<=Ce[1]+r?f:0}if(n>a){var h=n;n=a,a=h}n<0&&(n+=Na,a+=Na);for(var c=0,v=0;v<2;v++){var p=Ce[v];if(p+r>o){var d=Math.atan2(s,p),f=i?1:-1;d<0&&(d=Na+d),(d>=n&&d<=a||d+Na>=n&&d+Na<=a)&&(d>Math.PI/2&&d1&&(t||(s+=fn(l,u,f,h,n,a))),g&&(l=i[p],u=i[p+1],f=l,h=u),d){case zn.M:f=i[p++],h=i[p++],l=f,u=h;break;case zn.L:if(t){if(Bn(l,u,i[p],i[p+1],e,n,a))return!0}else s+=fn(l,u,i[p],i[p+1],n,a)||0;l=i[p++],u=i[p++];break;case zn.C:if(t){if(vP(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],e,n,a))return!0}else s+=mP(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],n,a)||0;l=i[p++],u=i[p++];break;case zn.Q:if(t){if(a_(l,u,i[p++],i[p++],i[p],i[p+1],e,n,a))return!0}else s+=_P(l,u,i[p++],i[p++],i[p],i[p+1],n,a)||0;l=i[p++],u=i[p++];break;case zn.A:var y=i[p++],m=i[p++],_=i[p++],S=i[p++],w=i[p++],x=i[p++];p+=1;var b=!!(1-i[p++]);c=Math.cos(w)*_+y,v=Math.sin(w)*S+m,g?(f=c,h=v):s+=fn(l,u,c,v,n,a);var T=(n-y)*S/_+y;if(t){if(pP(y,m,S,w,w+x,b,e,T,a))return!0}else s+=SP(y,m,S,w,w+x,b,T,a);l=Math.cos(w+x)*_+y,u=Math.sin(w+x)*S+m;break;case zn.R:f=l=i[p++],h=u=i[p++];var C=i[p++],A=i[p++];if(c=f+C,v=h+A,t){if(Bn(f,h,c,h,e,n,a)||Bn(c,h,c,v,e,n,a)||Bn(c,v,f,v,e,n,a)||Bn(f,v,f,h,e,n,a))return!0}else s+=fn(c,h,c,v,n,a),s+=fn(f,v,f,h,n,a);break;case zn.Z:if(t){if(Bn(l,u,f,h,e,n,a))return!0}else s+=fn(l,u,f,h,n,a);l=f,u=h;break}}return!t&&!gP(u,h)&&(s+=fn(l,u,f,h,n,a)||0),s!==0}function xP(r,e,t){return o_(r,0,!1,e,t)}function wP(r,e,t,n){return o_(r,e,!0,t,n)}var Du=tt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ma),bP={style:tt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Su.style)},gv=Nr.concat(["invisible","culling","z","z2","zlevel","parent"]),TP=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var a=this._decalEl=this._decalEl||new e;a.buildPath===e.prototype.buildPath&&(a.buildPath=function(l){t.buildPath(l,t.shape)}),a.silent=!0;var i=a.style;for(var o in n)i[o]!==n[o]&&(i[o]=n[o]);i.fill=n.fill?n.decal:null,i.decal=null,i.shadowColor=null,n.strokeFirst&&(i.stroke=null);for(var s=0;s.5?Gc:n>.2?i2:Fc}else if(t)return Fc}return Gc},e.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(U(n)){var a=this.__zr,i=!!(a&&a.isDarkMode()),o=ru(t,0)0))},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,a=!t;if(a){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Ei)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||a){s.copy(t);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect(),o=this.style;if(t=a[0],n=a[1],i.contain(t,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),wP(s,l/u,t,n)))return!0}if(this.hasFill())return xP(s,t,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Ei,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,n){t==="shape"?this.setShape(n):r.prototype.attrKV.call(this,t,n)},e.prototype.setShape=function(t,n){var a=this.shape;return a||(a=this.shape={}),typeof t=="string"?a[t]=n:B(a,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Ei)},e.prototype.createStyle=function(t){return Fl(Du,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=B({},this.shape))},e.prototype._applyStateObj=function(t,n,a,i,o,s){r.prototype._applyStateObj.call(this,t,n,a,i,o,s);var l=!(n&&i),u;if(n&&n.shape?o?i?u=n.shape:(u=B({},a.shape),B(u,n.shape)):(u=B({},i?this.shape:a.shape),B(u,n.shape)):l&&(u=a.shape),u)if(o){this.shape=B({},this.shape);for(var f={},h=St(u),c=0;c0},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(t){return Fl(DP,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var n=t.text;n!=null?n+="":n="";var a=Jo(n,t.font,t.textAlign,t.textBaseline);if(a.x+=t.x||0,a.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;a.x-=i/2,a.y-=i/2,a.width+=i,a.height+=i}this._rect=a}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(tr);s_.prototype.type="tspan";const ss=s_;var CP=tt({x:0,y:0},Ma),AP={style:tt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Su.style)};function MP(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var l_=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return Fl(CP,t)},e.prototype._getSize=function(t){var n=this.style,a=n[t];if(a!=null)return a;var i=MP(n.image)?n.image:this.__image;if(!i)return 0;var o=t==="width"?"height":"width",s=n[o];return s==null?i[t]:i[t]/i[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return AP},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new ct(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(tr);l_.prototype.type="image";const ve=l_;function LP(r,e){var t=e.x,n=e.y,a=e.width,i=e.height,o=e.r,s,l,u,f;a<0&&(t=t+a,a=-a),i<0&&(n=n+i,i=-i),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var h;s+l>a&&(h=s+l,s*=a/h,l*=a/h),u+f>a&&(h=u+f,u*=a/h,f*=a/h),l+u>i&&(h=l+u,l*=i/h,u*=i/h),s+f>i&&(h=s+f,s*=i/h,f*=i/h),r.moveTo(t+s,n),r.lineTo(t+a-l,n),l!==0&&r.arc(t+a-l,n+l,l,-Math.PI/2,0),r.lineTo(t+a,n+i-u),u!==0&&r.arc(t+a-u,n+i-u,u,0,Math.PI/2),r.lineTo(t+f,n+i),f!==0&&r.arc(t+f,n+i-f,f,Math.PI/2,Math.PI),r.lineTo(t,n+s),s!==0&&r.arc(t+s,n+s,s,Math.PI,Math.PI*1.5)}var Gi=Math.round;function u_(r,e,t){if(e){var n=e.x1,a=e.x2,i=e.y1,o=e.y2;r.x1=n,r.x2=a,r.y1=i,r.y2=o;var s=t&&t.lineWidth;return s&&(Gi(n*2)===Gi(a*2)&&(r.x1=r.x2=Oa(n,s,!0)),Gi(i*2)===Gi(o*2)&&(r.y1=r.y2=Oa(i,s,!0))),r}}function f_(r,e,t){if(e){var n=e.x,a=e.y,i=e.width,o=e.height;r.x=n,r.y=a,r.width=i,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=Oa(n,s,!0),r.y=Oa(a,s,!0),r.width=Math.max(Oa(n+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(Oa(a+o,s,!1)-r.y,o===0?0:1)),r}}function Oa(r,e,t){if(!e)return r;var n=Gi(r*2);return(n+Gi(e))%2===0?n/2:(n+(t?1:-1))/2}var IP=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),EP={},h_=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new IP},e.prototype.buildPath=function(t,n){var a,i,o,s;if(this.subPixelOptimize){var l=f_(EP,n,this.style);a=l.x,i=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else a=n.x,i=n.y,o=n.width,s=n.height;n.r?LP(t,n):t.rect(a,i,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(gt);h_.prototype.type="rect";const Tt=h_;var c_={fill:"#000"},v_=2,PP={style:tt({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},Su.style)},p_=function(r){O(e,r);function e(t){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=c_,n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,L=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),I=o.calculatedLineHeight,E=0;E=0&&(E=x[I],E.align==="right");)this._placeToken(E,t,T,y,L,"right",_),C-=E.width,L-=E.width,I--;for(M+=(i-(M-g)-(m-L)-C)/2;A<=I;)E=x[A],this._placeToken(E,t,T,y,M+E.width/2,"center",_),M+=E.width,A++;y+=T}},e.prototype._placeToken=function(t,n,a,i,o,s,l){var u=n.rich[t.styleName]||{};u.text=t.text;var f=t.verticalAlign,h=i+a/2;f==="top"?h=i+t.height/2:f==="bottom"&&(h=i+a-t.height/2);var c=!t.isLineHolder&&yv(u);c&&this._renderBackground(u,n,s==="right"?o-t.width:s==="center"?o-t.width/2:o,h-t.height/2,t.width,t.height);var v=!!u.backgroundColor,p=t.textPadding;p&&(o=w_(o,s,p),h-=t.height/2-p[0]-t.innerHeight/2);var d=this._getOrCreateChild(ss),g=d.createStyle();d.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=x_("fill"in u?u.fill:"fill"in n?n.fill:(m=!0,y.fill)),w=S_("stroke"in u?u.stroke:"stroke"in n?n.stroke:!v&&!l&&(!y.autoStroke||m)?(_=v_,y.stroke):null),x=u.textShadowBlur>0||n.textShadowBlur>0;g.text=t.text,g.x=o,g.y=h,x&&(g.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,g.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=t.font||Cn,g.opacity=gr(u.opacity,n.opacity,1),y_(g,u),w&&(g.lineWidth=gr(u.lineWidth,n.lineWidth,_),g.lineDash=lt(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=w),S&&(g.fill=S);var b=t.contentWidth,T=t.contentHeight;d.setBoundingRect(new ct(ts(g.x,b,g.textAlign),ki(g.y,T,g.textBaseline),b,T))},e.prototype._renderBackground=function(t,n,a,i,o,s){var l=t.backgroundColor,u=t.borderWidth,f=t.borderColor,h=l&&l.image,c=l&&!h,v=t.borderRadius,p=this,d,g;if(c||t.lineHeight||u&&f){d=this._getOrCreateChild(Tt),d.useStyle(d.createStyle()),d.style.fill=null;var y=d.shape;y.x=a,y.y=i,y.width=o,y.height=s,y.r=v,d.dirtyShape()}if(c){var m=d.style;m.fill=l||null,m.fillOpacity=lt(t.fillOpacity,1)}else if(h){g=this._getOrCreateChild(ve),g.onload=function(){p.dirtyStyle()};var _=g.style;_.image=l.image,_.x=a,_.y=i,_.width=o,_.height=s}if(u&&f){var m=d.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=lt(t.strokeOpacity,1),m.lineDash=t.borderDash,m.lineDashOffset=t.borderDashOffset||0,d.strokeContainThreshold=0,d.hasFill()&&d.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(d||g).style;S.shadowBlur=t.shadowBlur||0,S.shadowColor=t.shadowColor||"transparent",S.shadowOffsetX=t.shadowOffsetX||0,S.shadowOffsetY=t.shadowOffsetY||0,S.opacity=gr(t.opacity,n.opacity,1)},e.makeFont=function(t){var n="";return m_(t)&&(n=[t.fontStyle,t.fontWeight,g_(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),n&&yr(n)||t.textFont||t.font},e}(tr),RP={left:!0,right:1,center:1},NP={top:1,bottom:1,middle:1},d_=["fontStyle","fontWeight","fontSize","fontFamily"];function g_(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Xh+"px":r+"px"}function y_(r,e){for(var t=0;t=0,i=!1;if(r instanceof gt){var o=C_(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(Hi(s)||Hi(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(i=!0,n=B({},n),u=B({},u),u.fill=s):!Hi(u.fill)&&Hi(s)?(i=!0,n=B({},n),u=B({},u),u.fill=M_(s)):!Hi(u.stroke)&&Hi(l)&&(i||(n=B({},n),u=B({},u)),u.stroke=M_(l)),n.style=u}}if(n&&n.z2==null){i||(n=B({},n));var f=r.z2EmphasisLift;n.z2=r.z2+(f??Fi)}return n}function FP(r,e,t){if(t&&t.z2==null){t=B({},t);var n=r.z2SelectLift;t.z2=r.z2+(n??kP)}return t}function HP(r,e,t){var n=pt(r.currentStates,e)>=0,a=r.style.opacity,i=n?null:zP(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=B({},t),o=B({opacity:n?a:i.opacity*.1},o),t.style=o),t}function wv(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return GP(this,r,e,t);if(r==="blur")return HP(this,r,t);if(r==="select")return FP(this,r,t)}return t}function Va(r){r.stateProxy=wv;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=wv),t&&(t.stateProxy=wv)}function R_(r,e){!B_(r,e)&&!r.__highByOuter&&hn(r,L_)}function N_(r,e){!B_(r,e)&&!r.__highByOuter&&hn(r,I_)}function cn(r,e){r.__highByOuter|=1<<(e||0),hn(r,L_)}function vn(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&hn(r,I_)}function O_(r){hn(r,xv)}function bv(r){hn(r,E_)}function k_(r){hn(r,VP)}function V_(r){hn(r,BP)}function B_(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function z_(r){var e=r.getModel(),t=[],n=[];e.eachComponent(function(a,i){var o=_v(i),s=a==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){E_(u)}),s&&t.push(i)),o.isBlured=!1}),D(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(t,!1,e)})}function Tv(r,e,t,n){var a=n.getModel();t=t||"coordinateSystem";function i(u,f){for(var h=0;h0){var s={dataIndex:o,seriesIndex:t.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function Ba(r,e,t){za(r,!0),hn(r,Va),Av(r,e,t)}function XP(r){za(r,!1)}function Wt(r,e,t,n){n?XP(r):Ba(r,e,t)}function Av(r,e,t){var n=ot(r);e!=null?(n.focus=e,n.blurScope=t):n.focus&&(n.focus=null)}var F_=["emphasis","blur","select"],qP={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function pe(r,e,t,n){t=t||"itemStyle";for(var a=0;a1&&(o*=Lv(p),s*=Lv(p));var d=(a===i?-1:1)*Lv((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,g=d*o*v/s,y=d*-s*c/o,m=(r+t)/2+Pu(h)*g-Eu(h)*y,_=(e+n)/2+Eu(h)*g+Pu(h)*y,S=Y_([1,0],[(c-g)/o,(v-y)/s]),w=[(c-g)/o,(v-y)/s],x=[(-1*c-g)/o,(-1*v-y)/s],b=Y_(w,x);if(Iv(w,x)<=-1&&(b=cs),Iv(w,x)>=1&&(b=0),b<0){var T=Math.round(b/cs*1e6)/1e6;b=cs*2+T%2*cs}f.addData(u,m,_,o,s,S,b,h,i)}var eR=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,rR=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function nR(r){var e=new Fr;if(!r)return e;var t=0,n=0,a=t,i=n,o,s=Fr.CMD,l=r.match(eR);if(!l)return e;for(var u=0;uE*E+P*P&&(T=A,C=M),{cx:T,cy:C,x0:-f,y0:-h,x1:T*(a/w-1),y1:C*(a/w-1)}}function fR(r){var e;if(G(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function hR(r,e){var t,n=ps(e.r,0),a=ps(e.r0||0,0),i=n>0,o=a>0;if(!(!i&&!o)){if(i||(n=a,a=0),a>n){var s=n;n=a,a=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var f=e.cx,h=e.cy,c=!!e.clockwise,v=e1(u-l),p=v>Rv&&v%Rv;if(p>wr&&(v=p),!(n>wr))r.moveTo(f,h);else if(v>Rv-wr)r.moveTo(f+n*Wi(l),h+n*Ga(l)),r.arc(f,h,n,l,u,!c),a>wr&&(r.moveTo(f+a*Wi(u),h+a*Ga(u)),r.arc(f,h,a,u,l,c));else{var d=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,w=void 0,x=void 0,b=void 0,T=void 0,C=void 0,A=void 0,M=void 0,L=void 0,I=void 0,E=void 0,P=n*Wi(l),N=n*Ga(l),V=a*Wi(u),k=a*Ga(u),z=v>wr;if(z){var H=e.cornerRadius;H&&(t=fR(H),d=t[0],g=t[1],y=t[2],m=t[3]);var W=e1(n-a)/2;if(_=$r(W,y),S=$r(W,m),w=$r(W,d),x=$r(W,g),C=b=ps(_,S),A=T=ps(w,x),(b>wr||T>wr)&&(M=n*Wi(u),L=n*Ga(u),I=a*Wi(l),E=a*Ga(l),vwr){var _t=$r(y,C),vt=$r(m,C),j=Ru(I,E,P,N,n,_t,c),ft=Ru(M,L,V,k,n,vt,c);r.moveTo(f+j.cx+j.x0,h+j.cy+j.y0),C0&&r.arc(f+j.cx,h+j.cy,_t,_e(j.y0,j.x0),_e(j.y1,j.x1),!c),r.arc(f,h,n,_e(j.cy+j.y1,j.cx+j.x1),_e(ft.cy+ft.y1,ft.cx+ft.x1),!c),vt>0&&r.arc(f+ft.cx,h+ft.cy,vt,_e(ft.y1,ft.x1),_e(ft.y0,ft.x0),!c))}else r.moveTo(f+P,h+N),r.arc(f,h,n,l,u,!c);if(!(a>wr)||!z)r.lineTo(f+V,h+k);else if(A>wr){var _t=$r(d,A),vt=$r(g,A),j=Ru(V,k,M,L,a,-vt,c),ft=Ru(P,N,I,E,a,-_t,c);r.lineTo(f+j.cx+j.x0,h+j.cy+j.y0),A0&&r.arc(f+j.cx,h+j.cy,vt,_e(j.y0,j.x0),_e(j.y1,j.x1),!c),r.arc(f,h,a,_e(j.cy+j.y1,j.cx+j.x1),_e(ft.cy+ft.y1,ft.cx+ft.x1),c),_t>0&&r.arc(f+ft.cx,h+ft.cy,_t,_e(ft.y1,ft.x1),_e(ft.y0,ft.x0),!c))}else r.lineTo(f+V,h+k),r.arc(f,h,a,u,l,c)}r.closePath()}}}var cR=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r}(),r1=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new cR},e.prototype.buildPath=function(t,n){hR(t,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(gt);r1.prototype.type="sector";const Oe=r1;var vR=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),n1=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new vR},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.PI*2;t.moveTo(a+n.r,i),t.arc(a,i,n.r,0,o,!1),t.moveTo(a+n.r0,i),t.arc(a,i,n.r0,0,o,!0)},e}(gt);n1.prototype.type="ring";const Nu=n1;function pR(r,e,t,n){var a=[],i=[],o=[],s=[],l,u,f,h;if(n){f=[1/0,1/0],h=[-1/0,-1/0];for(var c=0,v=r.length;c=2){if(n){var i=pR(a,n,t,e.smoothConstraint);r.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(t?o:o-1);s++){var l=i[s*2],u=i[s*2+1],f=a[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(a[0][0],a[0][1]);for(var s=1,h=a.length;sHa[1]){if(s=!1,i)return s;var f=Math.abs(Ha[0]-Fa[1]),h=Math.abs(Fa[0]-Ha[1]);Math.min(f,h)>a.len()&&(f0){var h=f.duration,c=f.delay,v=f.easing,p={duration:h,delay:c||0,easing:v,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),i&&i()}function Mt(r,e,t,n,a,i){kv("update",r,e,t,n,a,i)}function Gt(r,e,t,n,a,i){kv("enter",r,e,t,n,a,i)}function Yi(r){if(!r.__zr)return!0;for(var e=0;eMath.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function m1(r){return!r.isGroup}function NR(r){return r.shape!=null}function ys(r,e,t){if(!r||!e)return;function n(o){var s={};return o.traverse(function(l){m1(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return NR(o)&&(s.shape=B({},o.shape)),s}var i=n(r);e.traverse(function(o){if(m1(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),Mt(o,l,t,ot(o).dataIndex)}}})}function _1(r,e){return F(r,function(t){var n=t[0];n=zu(n,e.x),n=Gu(n,e.x+e.width);var a=t[1];return a=zu(a,e.y),a=Gu(a,e.y+e.height),[n,a]})}function OR(r,e){var t=zu(r.x,e.x),n=Gu(r.x+r.width,e.x+e.width),a=zu(r.y,e.y),i=Gu(r.y+r.height,e.y+e.height);if(n>=t&&i>=a)return{x:t,y:a,width:n-t,height:i-a}}function ms(r,e,t){var n=B({rectHover:!0},e),a=n.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(a.image=r.slice(8),tt(a,t),new ve(n)):Fu(r.replace("path://",""),n,t,"center")}function _s(r,e,t,n,a){for(var i=0,o=a[a.length-1];i1)return!1;var g=zv(v,p,f,h)/c;return!(g<0||g>1)}function zv(r,e,t,n){return r*n-t*e}function kR(r){return r<=1e-6&&r>=-1e-6}function Xi(r){var e=r.itemTooltipOption,t=r.componentModel,n=r.itemName,a=U(e)?{formatter:e}:e,i=t.mainType,o=t.componentIndex,s={componentType:i,name:n,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&D(St(l),function(f){Y(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=ot(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:n,option:tt({content:n,formatterParams:s},a)}}function x1(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function Hn(r,e){if(r)if(G(r))for(var t=0;t=0&&s.push(l)}),s}}function $n(r,e){return ht(ht({},r,!0),e,!0)}const qR={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"}},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:". "}}}},KR={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:"旭日图"}},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 Yu="ZH",$v="EN",xs=$v,Zu={},Wv={},P1=wt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return r.indexOf(Yu)>-1?Yu:xs}():xs;function R1(r,e){r=r.toUpperCase(),Wv[r]=new Vt(e),Zu[r]=e}function jR(r){if(U(r)){var e=Zu[r.toUpperCase()]||{};return r===Yu||r===$v?nt(e):ht(nt(e),nt(Zu[xs]),!1)}else return ht(nt(r),nt(Zu[xs]),!1)}function Uv(r){return Wv[r]}function QR(){return Wv[xs]}R1($v,qR),R1(Yu,KR);var Yv=1e3,Zv=Yv*60,ws=Zv*60,nr=ws*24,N1=nr*365,bs={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}"},Xu="{yyyy}-{MM}-{dd}",O1={year:"{yyyy}",month:"{yyyy}-{MM}",day:Xu,hour:Xu+" "+bs.hour,minute:Xu+" "+bs.minute,second:Xu+" "+bs.second,millisecond:bs.none},Xv=["year","month","day","hour","minute","second","millisecond"],k1=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Ua(r,e){return r+="","0000".substr(0,e-r.length)+r}function ji(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function JR(r){return r===ji(r)}function tN(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function qu(r,e,t,n){var a=kr(r),i=a[qv(t)](),o=a[Qi(t)]()+1,s=Math.floor((o-1)/3)+1,l=a[Ku(t)](),u=a["get"+(t?"UTC":"")+"Day"](),f=a[Ts(t)](),h=(f-1)%12+1,c=a[ju(t)](),v=a[Qu(t)](),p=a[Ju(t)](),d=n instanceof Vt?n:Uv(n||P1)||QR(),g=d.getModel("time"),y=g.get("month"),m=g.get("monthAbbr"),_=g.get("dayOfWeek"),S=g.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,i%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[o-1]).replace(/{MMM}/g,m[o-1]).replace(/{MM}/g,Ua(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Ua(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Ua(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Ua(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Ua(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,Ua(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Ua(p,3)).replace(/{S}/g,p+"")}function eN(r,e,t,n,a){var i=null;if(U(t))i=t;else if(q(t))i=t(r.value,e,{level:r.level});else{var o=B({},bs);if(r.level>0)for(var s=0;s=0;--s)if(l[u]){i=l[u];break}i=i||o.none}if(G(i)){var h=r.level==null?0:r.level>=0?r.level:i.length+r.level;h=Math.min(h,i.length-1),i=i[h]}}return qu(new Date(r.value),i,a,n)}function V1(r,e){var t=kr(r),n=t[Qi(e)]()+1,a=t[Ku(e)](),i=t[Ts(e)](),o=t[ju(e)](),s=t[Qu(e)](),l=t[Ju(e)](),u=l===0,f=u&&s===0,h=f&&o===0,c=h&&i===0,v=c&&a===1,p=v&&n===1;return p?"year":v?"month":c?"day":h?"hour":f?"minute":u?"second":"millisecond"}function B1(r,e,t){var n=Ct(r)?kr(r):r;switch(e=e||V1(r,t),e){case"year":return n[qv(t)]();case"half-year":return n[Qi(t)]()>=6?1:0;case"quarter":return Math.floor((n[Qi(t)]()+1)/4);case"month":return n[Qi(t)]();case"day":return n[Ku(t)]();case"half-day":return n[Ts(t)]()/24;case"hour":return n[Ts(t)]();case"minute":return n[ju(t)]();case"second":return n[Qu(t)]();case"millisecond":return n[Ju(t)]()}}function qv(r){return r?"getUTCFullYear":"getFullYear"}function Qi(r){return r?"getUTCMonth":"getMonth"}function Ku(r){return r?"getUTCDate":"getDate"}function Ts(r){return r?"getUTCHours":"getHours"}function ju(r){return r?"getUTCMinutes":"getMinutes"}function Qu(r){return r?"getUTCSeconds":"getSeconds"}function Ju(r){return r?"getUTCMilliseconds":"getMilliseconds"}function rN(r){return r?"setUTCFullYear":"setFullYear"}function z1(r){return r?"setUTCMonth":"setMonth"}function G1(r){return r?"setUTCDate":"setDate"}function F1(r){return r?"setUTCHours":"setHours"}function H1(r){return r?"setUTCMinutes":"setMinutes"}function $1(r){return r?"setUTCSeconds":"setSeconds"}function W1(r){return r?"setUTCMilliseconds":"setMilliseconds"}function U1(r){if(!jc(r))return U(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function Y1(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,n){return n.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Ji=Jh;function Kv(r,e,t){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(f){return f&&yr(f)?f:"-"}function i(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?kr(r):r;if(isNaN(+l)){if(s)return"-"}else return qu(l,n,t)}if(e==="ordinal")return Vl(r)?a(r):Ct(r)&&i(r)?r+"":"-";var u=sn(r);return i(u)?U1(u):Vl(r)?a(r):typeof r=="boolean"?r+"":"-"}var Z1=["a","b","c","d","e","f","g"],jv=function(r,e){return"{"+r+(e??"")+"}"};function X1(r,e,t){G(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],i=0;i':'';var o=t.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function Ya(r,e){return e=e||"transparent",U(r)?r:Q(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function tf(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var ef=D,q1=["left","right","top","bottom","width","height"],Za=[["width","left","right"],["height","top","bottom"]];function Qv(r,e,t,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var s=0;e.eachChild(function(l,u){var f=l.getBoundingRect(),h=e.childAt(u+1),c=h&&h.getBoundingRect(),v,p;if(r==="horizontal"){var d=f.width+(c?-c.x+f.x:0);v=i+d,v>n||l.newline?(i=0,v=d,o+=s+t,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(c?-c.y+f.y:0);p=o+g,p>a||l.newline?(i+=s+t,o=0,p=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=v+t:o=p+t)})}var Xa=Qv;st(Qv,"vertical"),st(Qv,"horizontal");function iN(r,e,t){var n=e.width,a=e.height,i=$(r.left,n),o=$(r.top,a),s=$(r.right,n),l=$(r.bottom,a);return(isNaN(i)||isNaN(parseFloat(r.left)))&&(i=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=a),t=Ji(t||0),{width:Math.max(s-i-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function ae(r,e,t){t=Ji(t||0);var n=e.width,a=e.height,i=$(r.left,n),o=$(r.top,a),s=$(r.right,n),l=$(r.bottom,a),u=$(r.width,n),f=$(r.height,a),h=t[2]+t[0],c=t[1]+t[3],v=r.aspect;switch(isNaN(u)&&(u=n-s-c-i),isNaN(f)&&(f=a-l-h-o),v!=null&&(isNaN(u)&&isNaN(f)&&(v>n/a?u=n*.8:f=a*.8),isNaN(u)&&(u=v*f),isNaN(f)&&(f=u/v)),isNaN(i)&&(i=n-s-u-c),isNaN(o)&&(o=a-l-f-h),r.left||r.right){case"center":i=n/2-u/2-t[3];break;case"right":i=n-u-c;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-f/2-t[0];break;case"bottom":o=a-f-h;break}i=i||0,o=o||0,isNaN(u)&&(u=n-c-i-(s||0)),isNaN(f)&&(f=a-h-o-(l||0));var p=new ct(i+t[3],o+t[0],u,f);return p.margin=t,p}function rf(r,e,t,n,a,i){var o=!a||!a.hv||a.hv[0],s=!a||!a.hv||a.hv[1],l=a&&a.boundingMode||"all";if(i=i||r,i.x=r.x,i.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new ct(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var f=r.getLocalTransform();u=u.clone(),u.applyTransform(f)}var h=ae(tt({width:u.width,height:u.height},e),t,n),c=o?h.x-u.x:0,v=s?h.y-u.y:0;return l==="raw"?(i.x=c,i.y=v):(i.x+=c,i.y+=v),i===r&&r.markRedraw(),!0}function oN(r,e){return r[Za[e][0]]!=null||r[Za[e][1]]!=null&&r[Za[e][2]]!=null}function Ds(r){var e=r.layoutMode||r.constructor.layoutMode;return Q(e)?e:e?{type:e}:null}function Wn(r,e,t){var n=t&&t.ignoreSize;!G(n)&&(n=[n,n]);var a=o(Za[0],0),i=o(Za[1],1);u(Za[0],r,a),u(Za[1],r,i);function o(f,h){var c={},v=0,p={},d=0,g=2;if(ef(f,function(_){p[_]=r[_]}),ef(f,function(_){s(e,_)&&(c[_]=p[_]=e[_]),l(c,_)&&v++,l(p,_)&&d++}),n[h])return l(e,f[1])?p[f[2]]=null:l(e,f[2])&&(p[f[1]]=null),p;if(d===g||!v)return p;if(v>=g)return c;for(var y=0;y=0;l--)s=ht(s,a[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(t,n){var a=t+"Index",i=t+"Id";return as(this.ecModel,t,{index:this.get(a,!0),id:this.get(i,!0)},n)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Vt);Z0(eo,Vt),mu(eo),ZR(eo),XR(eo,lN);function lN(r){var e=[];return D(eo.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=F(e,function(t){return Vr(t).main}),r!=="dataset"&&pt(e,"dataset")<=0&&e.unshift("dataset"),e}const xt=eo;var j1="";typeof navigator<"u"&&(j1=navigator.platform||"");var ro="rgba(0, 0, 0, 0.2)";const uN={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:ro,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ro,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ro,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ro,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ro,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ro,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:j1.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 Jv=K(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),ar="original",Se="arrayRows",ir="objectRows",Wr="keyedColumns",pn="typedArray",Q1="unknown",Ur="column",no="row",ge={Must:1,Might:2,Not:3},J1=bt();function fN(r){J1(r).datasetMap=K()}function tS(r,e,t){var n={},a=ep(e);if(!a||!r)return n;var i=[],o=[],s=e.ecModel,l=J1(s).datasetMap,u=a.uid+"_"+t.seriesLayoutBy,f,h;r=r.slice(),D(r,function(d,g){var y=Q(d)?d:r[g]={name:d};y.type==="ordinal"&&f==null&&(f=g,h=p(y)),n[y.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});D(r,function(d,g){var y=d.name,m=p(d);if(f==null){var _=c.valueWayDim;v(n[y],_,m),v(o,_,m),c.valueWayDim+=m}else if(f===g)v(n[y],0,m),v(i,0,m);else{var _=c.categoryWayDim;v(n[y],_,m),v(o,_,m),c.categoryWayDim+=m}});function v(d,g,y){for(var m=0;me)return r[n];return r[t-1]}function aS(r,e,t,n,a,i,o){i=i||r;var s=e(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var f=o==null||!n?t:dN(n,o);if(f=f||t,!(!f||!f.length)){var h=f[l];return a&&(u[a]=h),s.paletteIdx=(l+1)%f.length,h}}function gN(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var nf,Cs,iS,ip="\0_ec_inner",oS=1,yN={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"},mN={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"},af={};function _N(r){D(r,function(e,t){if(!xt.hasClass(t)){var n=yN[t];n&&!af[n]&&(ce("Component "+t+` is used but not imported. import { `+n+` } from 'echarts/components'; echarts.use([`+n+"]);"),af[n]=!0)}})}var sS=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,n,a,i,o,s){i=i||{},this.option=null,this._theme=new Vt(i),this._locale=new Vt(o),this._optionManager=s},e.prototype.setOption=function(t,n,a){process.env.NODE_ENV!=="production"&&(J(t!=null,"option is null/undefined"),J(t[ip]!==oS,"please use chart.getOption()"));var i=fS(n);this._optionManager.setOption(t,a,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,n){return this._resetOption(t,fS(n))},e.prototype._resetOption=function(t,n){var a=!1,i=this._optionManager;if(!t||t==="recreate"){var o=i.mountOption(t==="recreate");process.env.NODE_ENV!=="production"&&_N(o),!this.option||t==="recreate"?iS(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,n))}if(!t||t==="recreate"||t==="media"){var l=i.getMediaOption(this);l.length&&D(l,function(u){a=!0,this._mergeOption(u,n)},this)}return a},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=K(),u=n&&n.replaceMergeMainTypeMap;fN(this),D(t,function(h,c){h!=null&&(xt.hasClass(c)?c&&(s.push(c),l.set(c,!0)):a[c]=a[c]==null?nt(h):ht(a[c],h,!0))}),u&&u.each(function(h,c){xt.hasClass(c)&&!l.get(c)&&(s.push(c),l.set(c,!0))}),xt.topologicalTravel(s,xt.getAllClassMainTypes(),f,this);function f(h){var c=vN(this,h,Nt(t[h])),v=i.get(h),p=v?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",d=G0(v,c,p);R2(d,h,xt),a[h]=null,i.set(h,null),o.set(h,0);var g=[],y=[],m=0,_,S;D(d,function(w,x){var b=w.existing,T=w.newOption;if(!T)b&&(b.mergeOption({},this),b.optionUpdated({},!1));else{var C=h==="series",A=xt.getClass(h,w.keyInfo.subType,!C);if(!A){if(process.env.NODE_ENV!=="production"){var M=w.keyInfo.subType,L=mN[M];af[M]||(af[M]=!0,ce(L?"Series "+M+` is used but not imported. import { `+L+` } from 'echarts/charts'; echarts.use([`+L+"]);":"Unknown series "+M))}return}if(h==="tooltip"){if(_){process.env.NODE_ENV!=="production"&&(S||($t("Currently only one tooltip component is allowed."),S=!0));return}_=!0}if(b&&b.constructor===A)b.name=w.keyInfo.name,b.mergeOption(T,this),b.optionUpdated(T,!1);else{var I=B({componentIndex:x},w.keyInfo);b=new A(T,this,this,I),B(b,I),w.brandNew&&(b.__requireNewView=!0),b.init(T,this,this),b.optionUpdated(null,!0)}}b?(g.push(b.option),y.push(b),m++):(g.push(void 0),y.push(void 0))},this),a[h]=g,i.set(h,y),o.set(h,m),h==="series"&&nf(this)}this._seriesIndices||nf(this)},e.prototype.getOption=function(){var t=nt(this.option);return D(t,function(n,a){if(xt.hasClass(a)){for(var i=Nt(n),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!zi(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[a]=i}}),delete t[ip],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,n){var a=this._componentsMap.get(t);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function IN(r,e){return r.join(",")===e.join(",")}const EN=CN;var or=D,As=Q,vS=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function sp(r){var e=r&&r.itemStyle;if(e)for(var t=0,n=vS.length;t=0;g--){var y=r[g];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,v)),p>=0){var m=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&c>=0&&m>0||l==="samesign"&&c<=0&&m<0){c=_2(c,m),d=m;break}}}return n[0]=c,n[1]=d,n})})}var of=function(){function r(e){this.data=e.data||(e.sourceFormat===Wr?{}:[]),this.sourceFormat=e.sourceFormat||Q1,this.seriesLayoutBy=e.seriesLayoutBy||Ur,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;nd&&(d=_)}v[0]=p,v[1]=d}},a=function(){return this._data?this._data.length/this._dimSize:0};TS=(e={},e[Se+"_"+Ur]={pure:!0,appendData:i},e[Se+"_"+no]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[ir]={pure:!0,appendData:i},e[Wr]={pure:!0,appendData:function(o){var s=this._data;D(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},e[ar]={appendData:i},e[pn]={persistent:!1,pure:!0,appendData:function(o){process.env.NODE_ENV!=="production"&&J(Ee(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 i(o){for(var s=0;s=0&&(d=o.interpolatedValue[g])}return d!=null?d+"":""})}},r.prototype.getRawValue=function(e,t){return io(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,n){},r}();function PS(r){var e,t;return Q(r)?r.type?t=r:process.env.NODE_ENV!=="production"&&console.warn("The return type of `formatTooltip` is not supported: "+De(r)):e=r,{text:e,frag:t}}function Is(r){return new XN(r)}var XN=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var a=this.context;a.data=a.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(i="reset");function f(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||i==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=l,this._modDataCount=u;var c=e&&e.step;if(t?(process.env.NODE_ENV!=="production"&&J(t._outputDueEnd!=null),this._dueEnd=t._outputDueEnd):(process.env.NODE_ENV!=="production"&&J(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var v=this._dueIndex,p=Math.min(c!=null?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(h||v=this._outputDueEnd),this._outputDueEnd=y}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(e,t,n,a,i){RS.reset(t,n,a,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:RS.next},this.context)},r.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),G(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var a=this._downstream;return a&&a.dirty(),n},r.prototype.unfinished=function(){return this._progress&&this._dueIndex1&&n>0?s:o}};return i;function o(){return e=r?null:le},gte:function(r,e){return r>=e}},KN=function(){function r(e,t){if(!Ct(t)){var n="";process.env.NODE_ENV!=="production"&&(n='rvalue of "<", ">", "<=", ">=" can only be number in filter.'),Et(n)}this._opFn=OS[e],this._rvalFloat=sn(t)}return r.prototype.evaluate=function(e){return Ct(e)?this._opFn(e,this._rvalFloat):this._opFn(sn(e),this._rvalFloat)},r}(),kS=function(){function r(e,t){var n=e==="desc";this._resultLT=n?1:-1,t==null&&(t=n?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var n=Ct(e)?e:sn(e),a=Ct(t)?t:sn(t),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var s=U(e),l=U(t);s&&(n=l?e:0),l&&(a=s?t:0)}return na?-this._resultLT:0},r}(),jN=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=sn(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(t=sn(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function QN(r,e){return r==="eq"||r==="ne"?new jN(r==="eq",e):Y(OS,r)?new KN(r,e):null}var JN=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return Un(e,t)},r}();function tO(r,e){var t=new JN,n=r.data,a=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==Ur&&(process.env.NODE_ENV!=="production"&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),Et(o));var s=[],l={},u=r.dimensionsDefine;if(u)D(u,function(d,g){var y=d.name,m={index:g,name:y,displayName:d.displayName};if(s.push(m),y!=null){var _="";Y(l,y)&&(process.env.NODE_ENV!=="production"&&(_='dimension name "'+y+'" duplicated.'),Et(_)),l[y]=m}});else for(var f=0;f65535?lO:uO}function oo(){return[1/0,-1/0]}function fO(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function FS(r,e,t,n,a){var i=GS[t||"float"];if(a){var o=r[e],s=o&&o.length;if(s!==n){for(var l=new i(n),u=0;ug[1]&&(g[1]=d)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,n){for(var a=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=F(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=g)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(e,t,n){var a=this._chunks,i=a[e],o=[];if(!i)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,f=0,h=this.count();f=0&&l<0)&&(s=p,l=v,u=0),v===l&&(o[u++]=f))}return o.length=u,o},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,a=this._count;if(n===Array){e=new n(a);for(var i=0;i=h&&m<=c||isNaN(m))&&(l[u++]=d),d++}p=!0}else if(i===2){for(var g=v[a[0]],_=v[a[1]],S=e[a[1]][0],w=e[a[1]][1],y=0;y=h&&m<=c||isNaN(m))&&(x>=S&&x<=w||isNaN(x))&&(l[u++]=d),d++}p=!0}}if(!p)if(i===1)for(var y=0;y=h&&m<=c||isNaN(m))&&(l[u++]=b)}else for(var y=0;ye[A][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),a=n._chunks,i=a[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),f,h,c,v=new(Es(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var p=1;pf&&(f=h,c=S)}M>0&&Mf-p&&(l=f-p,s.length=l);for(var d=0;dh[1]&&(h[1]=y),c[v++]=m}return i._count=v,i._indices=c,i._updateGetRawIdx(),i},r.prototype.each=function(e,t){if(this._count)for(var n=e.length,a=this._chunks,i=0,o=this.count();il&&(l=h)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],a=this._chunks,i=0;i=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,n,a,i){return Un(t[i],this._dimensions[i])}gp={arrayRows:e,objectRows:function(t,n,a,i){return Un(t[n],this._dimensions[i])},keyedColumns:e,original:function(t,n,a,i){var o=t&&(t.value==null?t:t.value);return Un(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,n,a,i){return t[i]}}}(),r}(),HS=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,a,i;if(Ps(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var f=t[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,i=[f._getVersionSign()]}else s=o.get("data",!0),l=Ee(s)?pn:ar,i=[];var h=this._getSourceMetaRawOption()||{},c=u&&u.metaRawOption||{},v=lt(h.seriesLayoutBy,c.seriesLayoutBy)||null,p=lt(h.sourceHeader,c.sourceHeader),d=lt(h.dimensions,c.dimensions),g=v!==c.seriesLayoutBy||!!p!=!!c.sourceHeader||d;a=g?[fp(s,{seriesLayoutBy:v,sourceHeader:p,dimensions:d},l)]:[]}else{var y=e;if(n){var m=this._applyTransform(t);a=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);a=[fp(_,this._getSourceMetaRawOption(),null)],i=[]}}process.env.NODE_ENV!=="production"&&J(a&&i),this._setLocalSource(a,i)},r.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get("transform",!0),a=t.get("fromTransformResult",!0);if(process.env.NODE_ENV!=="production"&&J(a!=null||n!=null),a!=null){var i="";e.length!==1&&(process.env.NODE_ENV!=="production"&&(i="When using `fromTransformResult`, there should be only one upstream dataset"),WS(i))}var o,s=[],l=[];return D(e,function(u){u.prepareSource();var f=u.getSource(a||0),h="";a!=null&&!f&&(process.env.NODE_ENV!=="production"&&(h="Can not retrieve result by `fromTransformResult`: "+a),WS(h)),s.push(f),l.push(u._getVersionSign())}),n?o=oO(n,s,{datasetIndex:t.componentIndex}):a!=null&&(o=[FN(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!r.noHeader;return D(r.blocks,function(a){var i=XS(a);i>=e&&(e=i+ +(n&&(!i||mp(a)&&!a.noHeader)))}),e}return 0}function vO(r,e,t,n){var a=e.noHeader,i=dO(XS(e)),o=[],s=e.blocks||[];J(!s||G(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Y(u,l)){var f=new kS(u[l],null);s.sort(function(p,d){return f.evaluate(p.sortParam,d.sortParam)})}else l==="seriesDesc"&&s.reverse()}D(s,function(p,d){var g=e.valueFormatter,y=ZS(p)(g?B(B({},r),{valueFormatter:g}):r,p,d>0?i.html:0,n);y!=null&&o.push(y)});var h=r.renderMode==="richText"?o.join(i.richText):_p(o.join(""),a?t:i.html);if(a)return h;var c=Kv(e.header,"ordinal",r.useUTC),v=YS(n,r.renderMode).nameStyle;return r.renderMode==="richText"?KS(r,c,v)+i.richText+h:_p('
'+Pe(c)+"
"+h,t)}function pO(r,e,t,n){var a=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,f=e.valueFormatter||r.valueFormatter||function(S){return S=G(S)?S:[S],F(S,function(w,x){return Kv(w,G(v)?v[x]:v,u)})};if(!(i&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",a),c=i?"":Kv(l,"ordinal",u),v=e.valueType,p=o?[]:f(e.value),d=!s||!i,g=!s&&i,y=YS(n,a),m=y.nameStyle,_=y.valueStyle;return a==="richText"?(s?"":h)+(i?"":KS(r,c,m))+(o?"":mO(r,p,d,g,_)):_p((s?"":h)+(i?"":gO(c,!s,m))+(o?"":yO(p,d,g,_)),t)}}function qS(r,e,t,n,a,i){if(r){var o=ZS(r),s={useUTC:a,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function dO(r){return{html:hO[r],richText:cO[r]}}function _p(r,e){var t='
',n="margin: "+e+"px 0 0";return'
'+r+t+"
"}function gO(r,e,t){var n=e?"margin-left:2px":"";return''+Pe(r)+""}function yO(r,e,t,n){var a=t?"10px":"20px",i=e?"float:right;margin-left:"+a:"";return r=G(r)?r:[r],''+F(r,function(o){return Pe(o)}).join("  ")+""}function KS(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function mO(r,e,t,n,a){var i=[a],o=n?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(G(e)?e.join(" "):e,i)}function jS(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return Ya(n)}function QS(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var Sp=function(){function r(){this.richTextStyles={},this._nextStyleNameId=P0()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,n){var a=n==="richText"?this._generateStyleName():null,i=aN({color:t,type:e,renderMode:n,markerId:a});return U(i)?i:(process.env.NODE_ENV!=="production"&&J(a),this.richTextStyles[a]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var n={};G(t)?D(t,function(i){return B(n,i)}):B(n,t);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+e+"}"},r}();function JS(r){var e=r.series,t=r.dataIndex,n=r.multipleSeries,a=e.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=G(s),u=jS(e,t),f,h,c,v;if(o>1||l&&!o){var p=_O(s,e,t,i,u);f=p.inlineValues,h=p.inlineValueTypes,c=p.blocks,v=p.inlineValues[0]}else if(o){var d=a.getDimensionInfo(i[0]);v=f=io(a,t,i[0]),h=d.type}else v=f=l?s[0]:s;var g=Qc(e),y=g&&e.name||"",m=a.getName(t),_=n?y:m;return se("section",{header:y,noHeader:n||!g,sortParam:v,blocks:[se("nameValue",{markerType:"item",markerColor:u,name:_,noName:!yr(_),value:f,valueType:h})].concat(c||[])})}function _O(r,e,t,n,a){var i=e.getData(),o=Er(r,function(h,c,v){var p=i.getDimensionInfo(v);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?D(n,function(h){f(io(i,t,h),h)}):D(r,f);function f(h,c){var v=i.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?u.push(se("nameValue",{markerType:"subItem",markerColor:a,name:v.displayName,value:h,valueType:v.type})):(s.push(h),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Yn=bt();function lf(r,e){return r.getName(e)||r.getId(e)}var uf="__universalTransitionEnabled",ff=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,n,a){this.seriesIndex=this.componentIndex,this.dataTask=Is({count:xO,reset:wO}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,a);var i=Yn(this).sourceManager=new HS(this);i.prepareSource();var o=this.getInitialData(t,a);ex(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&J(o,"getInitialData returned invalid data."),Yn(this).dataBeforeProcessed=o,tx(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=Ds(this),i=a?to(t):{},o=this.subType;xt.hasClass(o)&&(o+="Series"),ht(t,n.getTheme().get(this.subType)),ht(t,this.getDefaultOption()),Ta(t,"label",["show"]),this.fillDataTextStyle(t.data),a&&Wn(t,i,a)},e.prototype.mergeOption=function(t,n){t=ht(this.option,t,!0),this.fillDataTextStyle(t.data);var a=Ds(this);a&&Wn(this.option,t,a);var i=Yn(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,n);ex(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Yn(this).dataBeforeProcessed=o,tx(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!Ee(t))for(var n=["show"],a=0;athis.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,n,a){var i=this.ecModel,o=np.prototype.getColorFromPalette.call(this,t,n,a);return o||(o=i.getColorFromPalette(t,n,a)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},e.prototype.unselect=function(t,n){var a=this.option.selectedMap;if(a){var i=this.option.selectedMode,o=this.getData(n);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&a.push(o)}return a},e.prototype.isSelected=function(t,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[lf(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[uf])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,n){var a,i,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Q(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(t,n)}},e.registerClass=function(t){return xt.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(xt);jt(ff,pp),jt(ff,np),Z0(ff,xt);function tx(r){var e=r.name;Qc(r)||(r.name=SO(r)||e)}function SO(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),n=[];return D(t,function(a){var i=e.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function xO(r){return r.model.getRawData().count()}function wO(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),bO}function bO(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function ex(r,e){D(Gl(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,st(TO,e))})}function TO(r,e){var t=xp(r);return t&&t.setOutputEnd((e||this).count()),e}function xp(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var n=t.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(r.uid))}return n}}const Ft=ff;var wp=function(){function r(){this.group=new at,this.uid=Ki("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){},r.prototype.updateLayout=function(e,t,n,a){},r.prototype.updateVisual=function(e,t,n,a){},r.prototype.toggleBlurSeries=function(e,t,n){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();ev(wp),mu(wp);const Ut=wp;function so(){var r=bt();return function(e){var t=r(e),n=e.pipelineContext,a=!!t.large,i=!!t.progressiveRender,o=t.large=!!(n&&n.large),s=t.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==s)&&"reset"}}var rx=bt(),DO=so(),bp=function(){function r(){this.group=new at,this.uid=Ki("viewChart"),this.renderTask=Is({plan:CO,reset:AO}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},r.prototype.highlight=function(e,t,n,a){var i=e.getData(a&&a.dataType);if(!i){process.env.NODE_ENV!=="production"&&ce("Unknown dataType "+a.dataType);return}ax(i,a,"emphasis")},r.prototype.downplay=function(e,t,n,a){var i=e.getData(a&&a.dataType);if(!i){process.env.NODE_ENV!=="production"&&ce("Unknown dataType "+a.dataType);return}ax(i,a,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateLayout=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateVisual=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.eachRendered=function(e){Hn(this.group,e)},r.markUpdateMethod=function(e,t){rx(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function nx(r,e,t){r&&Gn(r)&&(e==="emphasis"?cn:vn)(r,t)}function ax(r,e,t){var n=Da(r,e),a=e&&e.highlightKey!=null?jP(e.highlightKey):null;n!=null?D(Nt(n),function(i){nx(r.getItemGraphicEl(i),t,a)}):r.eachItemGraphicEl(function(i){nx(i,t,a)})}ev(bp,["dispose"]),mu(bp);function CO(r){return DO(r.model)}function AO(r){var e=r.model,t=r.ecModel,n=r.api,a=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=a&&rx(a).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,n,a),MO[l]}var MO={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const Bt=bp;var hf="\0__throttleOriginMethod",ix="\0__throttleRate",ox="\0__throttleType";function Tp(r,e,t){var n,a=0,i=0,o=null,s,l,u,f;e=e||0;function h(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var c=function(){for(var v=[],p=0;p=0?h():o=setTimeout(h,-s),a=n};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){f=v},c}function lo(r,e,t,n){var a=r[e];if(a){var i=a[hf]||a,o=a[ox],s=a[ix];if(s!==t||o!==n){if(t==null||!n)return r[e]=i;a=r[e]=Tp(i,t,n==="debounce"),a[hf]=i,a[ox]=n,a[ix]=t}return a}}function Rs(r,e){var t=r[e];t&&t[hf]&&(t.clear&&t.clear(),r[e]=t[hf])}var sx=bt(),lx={itemStyle:Aa(E1,!0),lineStyle:Aa(I1,!0)},LO={lineStyle:"stroke",itemStyle:"fill"};function ux(r,e){var t=r.visualStyleMapper||lx[e];return t||(console.warn("Unknown style type '"+e+"'."),lx.itemStyle)}function fx(r,e){var t=r.visualDrawType||LO[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var IO={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=r.getModel(n),i=ux(r,n),o=i(a),s=a.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=fx(r,n),u=o[l],f=q(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var c=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=c,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||q(o.fill)?c:o.fill,o.stroke=o.stroke==="auto"||q(o.stroke)?c:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&f)return t.setVisual("colorFromPalette",!1),{dataEach:function(v,p){var d=r.getDataParams(p),g=B({},o);g[l]=f(d),v.setItemVisual(p,"style",g)}}}},Ns=new Vt,EO={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=ux(r,n),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Ns.option=l[n];var u=a(Ns),f=o.ensureUniqueItemVisual(s,"style");B(f,u),Ns.option.decal&&(o.setItemVisual(s,"decal",Ns.option.decal),Ns.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},PO={performRawSeries:!0,overallReset:function(r){var e=K();r.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var a=t.type+"-"+n,i=e.get(a);i||(i={},e.set(a,i)),sx(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),a={},i=t.getData(),o=sx(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=fx(t,s);i.each(function(u){var f=i.getRawIndex(u);a[f]=u}),n.each(function(u){var f=a[u],h=i.getItemVisual(f,"colorFromPalette");if(h){var c=i.ensureUniqueItemVisual(f,"style"),v=n.getName(u)||u+"",p=n.count();c[l]=t.getColorFromPalette(v,o,p)}})}})}},cf=Math.PI;function RO(r,e){e=e||{},tt(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new at,n=new Tt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(n);var a=new At({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new Tt({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var o;return e.showSpinner&&(o=new Nv({shape:{startAngle:-cf/2,endAngle:-cf/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:cf*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:cf*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=a.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:f}),i.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var NO=function(){function r(e,t,n,a){this._stageTaskMap=K(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),a=n.context,i=!t&&n.progressiveEnabled&&(!a||a.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=i?n.step:null,s=a&&a.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),a=e.getData(),i=a.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=K();e.eachSeries(function(a){var i=a.getProgressive(),o=a.uid;n.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;D(this._allHandlers,function(a){var i=e.get(a.uid)||e.set(a.uid,{}),o="";process.env.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),J(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,t,n),a.overallReset&&this._createOverallStageTask(a,i,t,n)},this)},r.prototype.prepareView=function(e,t,n,a){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=a,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},r.prototype._performStageTasks=function(e,t,n,a){a=a||{};var i=!1,o=this;D(e,function(l,u){if(!(a.visualType&&a.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),h=f.seriesTaskMap,c=f.overallTask;if(c){var v,p=c.agentStubMap;p.each(function(g){s(a,g)&&(g.dirty(),v=!0)}),v&&c.dirty(),o.updatePayload(c,n);var d=o.getPerformArgs(c,a.block);p.each(function(g){g.perform(d)}),c.perform(d)&&(i=!0)}else h&&h.each(function(g,y){s(a,g)&&g.dirty();var m=o.getPerformArgs(g,a.block);m.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(m)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(n){t=n.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,n,a){var i=this,o=t.seriesTaskMap,s=t.seriesTaskMap=K(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):u&&u(n,a).each(f);function f(h){var c=h.uid,v=s.set(c,o&&o.get(c)||Is({plan:zO,reset:GO,count:HO}));v.context={model:h,ecModel:n,api:a,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(h,v)}},r.prototype._createOverallStageTask=function(e,t,n,a){var i=this,o=t.overallTask=t.overallTask||Is({reset:OO});o.context={ecModel:n,api:a,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=K(),u=e.seriesType,f=e.getTargetSeries,h=!0,c=!1,v="";process.env.NODE_ENV!=="production"&&(v='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),J(!e.createOnAllSeries,v),u?n.eachRawSeriesByType(u,p):f?f(n,a).each(p):(h=!1,D(n.getSeries(),p));function p(d){var g=d.uid,y=l.set(g,s&&s.get(g)||(c=!0,Is({reset:kO,onDirty:BO})));y.context={model:d,overallProgress:h},y.agent=o,y.__block=h,i._pipe(d,y)}c&&o.dirty()},r.prototype._pipe=function(e,t){var n=e.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=t),a.tail&&a.tail.pipe(t),a.tail=t,t.__idxInPipeline=a.count++,t.__pipeline=a},r.wrapStageHandler=function(e,t){return q(e)&&(e={overallReset:e,seriesType:$O(e)}),e.uid=Ki("stageHandler"),t&&(e.visualType=t),e},r}();function OO(r){r.overallReset(r.ecModel,r.api,r.payload)}function kO(r){return r.overallProgress&&VO}function VO(){this.agent.dirty(),this.getDownstream().dirty()}function BO(){this.agent&&this.agent.dirty()}function zO(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function GO(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Nt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?F(e,function(t,n){return hx(n)}):FO}var FO=hx(0);function hx(r){return function(e,t){var n=t.data,a=t.resetDefines[r];if(a&&a.dataEach)for(var i=e.start;i0&&v===u.length-c.length){var p=u.slice(0,v);p!=="data"&&(t.mainType=p,t[c.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(n[u]=l,f=!0),f||(a[u]=l)})}return{cptQuery:t,dataQuery:n,otherQuery:a}},r.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,i=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,i,"name")&&f(u,i,"dataIndex")&&f(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,i));function f(h,c,v,p){return h[v]==null||c[p||v]===h[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),Dp=["symbol","symbolSize","symbolRotate","symbolOffset"],_x=Dp.concat(["symbolKeepAspect"]),ZO={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},a={},i=!1,o=0;o=0&&Ja(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function Ap(r,e,t){for(var n=e.type==="radial"?uk(r,e,t):lk(r,e,t),a=e.colorStops,i=0;i0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:Ct(r)?[r]:G(r)?r:null}function Mp(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&hk(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(t){var a=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;a&&a!==1&&(t=F(t,function(i){return i/a}),n/=a)}return[t,n]}var ck=new Fr(!0);function yf(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function bx(r){return typeof r=="string"&&r!=="none"}function mf(r){var e=r.fill;return e!=null&&e!=="none"}function Tx(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function Dx(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function Lp(r,e,t){var n=nv(e.image,e.__image,t);if(_u(n)){var a=r.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*Hl),i.scaleSelf(e.scaleX||1,e.scaleY||1),a.setTransform(i)}return a}}function vk(r,e,t,n){var a,i=yf(t),o=mf(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var f=e.path||ck,h=e.__dirty;if(!n){var c=t.fill,v=t.stroke,p=o&&!!c.colorStops,d=i&&!!v.colorStops,g=o&&!!c.image,y=i&&!!v.image,m=void 0,_=void 0,S=void 0,w=void 0,x=void 0;(p||d)&&(x=e.getBoundingRect()),p&&(m=h?Ap(r,c,x):e.__canvasFillGradient,e.__canvasFillGradient=m),d&&(_=h?Ap(r,v,x):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(S=h||!e.__canvasFillPattern?Lp(r,c,e):e.__canvasFillPattern,e.__canvasFillPattern=S),y&&(w=h||!e.__canvasStrokePattern?Lp(r,v,e):e.__canvasStrokePattern,e.__canvasStrokePattern=S),p?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),d?r.strokeStyle=_:y&&(w?r.strokeStyle=w:i=!1)}var b=e.getGlobalScale();f.setScale(b[0],b[1],e.segmentIgnoreThreshold);var T,C;r.setLineDash&&t.lineDash&&(a=Mp(e),T=a[0],C=a[1]);var A=!0;(u||h&Ei)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),A=!1),f.reset(),e.buildPath(f,e.shape,n),f.toStatic(),e.pathUpdated()),A&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),n||(t.strokeFirst?(i&&Dx(r,t),o&&Tx(r,t)):(o&&Tx(r,t),i&&Dx(r,t))),T&&r.setLineDash([])}function pk(r,e,t){var n=e.__image=nv(t.image,e.__image,e,e.onload);if(!(!n||!_u(n))){var a=t.x||0,i=t.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),t.sWidth&&t.sHeight){var u=t.sx||0,f=t.sy||0;r.drawImage(n,u,f,t.sWidth,t.sHeight,a,i,o,s)}else if(t.sx&&t.sy){var u=t.sx,f=t.sy,h=o-u,c=s-f;r.drawImage(n,u,f,h,c,a,i,o,s)}else r.drawImage(n,a,i,o,s)}}function dk(r,e,t){var n,a=t.text;if(a!=null&&(a+=""),a){r.font=t.font||Cn,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var i=void 0,o=void 0;r.setLineDash&&t.lineDash&&(n=Mp(e),i=n[0],o=n[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),t.strokeFirst?(yf(t)&&r.strokeText(a,t.x,t.y),mf(t)&&r.fillText(a,t.x,t.y)):(mf(t)&&r.fillText(a,t.x,t.y),yf(t)&&r.strokeText(a,t.x,t.y)),i&&r.setLineDash([])}}var Cx=["shadowBlur","shadowOffsetX","shadowOffsetY"],Ax=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Mx(r,e,t,n,a){var i=!1;if(!n&&(t=t||{},e===t))return!1;if(n||e.opacity!==t.opacity){ze(r,a),i=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?Ma.opacity:o}(n||e.blend!==t.blend)&&(i||(ze(r,a),i=!0),r.globalCompositeOperation=e.blend||Ma.blend);for(var s=0;so.maxTileWidth&&N("maxTileWidth"),P>o.maxTileHeight&&N("maxTileHeight")}return{width:Math.max(1,Math.min(M,o.maxTileWidth)),height:Math.max(1,Math.min(P,o.maxTileHeight))}}function A(){T&&(T.clearRect(0,0,w.width,w.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,w.width,w.height)));for(var M=0,L=0;L0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,n,a){if(this[we]){process.env.NODE_ENV!=="production"&&ce("`setOption` should not be called during main process.");return}if(this._disposed){Ue(this.id);return}var i,o,s;if(Q(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[we]=!0,!this._model||n){var l=new EN(this._api),u=this._theme,f=this._model=new hS;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},Fp);var h={seriesTransition:s,optionChanged:!0};if(a)this[Ge]={silent:i,updateParams:h},this[we]=!1,this.getZr().wakeUp();else{try{vo(this),Zn.update.call(this,null,h)}catch(c){throw this[Ge]=null,this[we]=!1,c}this._ssr||this._zr.flush(),this[Ge]=null,this[we]=!1,zs.call(this,i),Gs.call(this,i)}},e.prototype.setTheme=function(){xr("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||wt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return process.env.NODE_ENV!=="production"&&Jt("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};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:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};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:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(wt.svgSupported){var t=this._zr,n=t.storage.getDisplayList();return D(n,function(a){a.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){Ue(this.id);return}t=t||{};var n=t.excludeComponents,a=this._model,i=[],o=this;D(n,function(l){a.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(i.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return D(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){Ue(this.id);return}var n=t.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(iw[a]){var l=s,u=s,f=-s,h=-s,c=[],v=t&&t.pixelRatio||this.getDevicePixelRatio();D(Hs,function(_,S){if(_.group===a){var w=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(nt(t)),x=_.getDom().getBoundingClientRect();l=i(x.left,l),u=i(x.top,u),f=o(x.right,f),h=o(x.bottom,h),c.push({dom:w,left:x.left,top:x.top})}}),l*=v,u*=v,f*=v,h*=v;var p=f-l,d=h-u,g=An.createCanvas(),y=T0(g,{renderer:n?"svg":"canvas"});if(y.resize({width:p,height:d}),n){var m="";return D(c,function(_){var S=_.left-l,w=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return t.connectedBackgroundColor&&y.add(new Tt({shape:{x:0,y:0,width:p,height:d},style:{fill:t.connectedBackgroundColor}})),D(c,function(_){var S=new ve({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n){return Op(this,"convertToPixel",t,n)},e.prototype.convertFromPixel=function(t,n){return Op(this,"convertFromPixel",t,n)},e.prototype.containPixel=function(t,n){if(this._disposed){Ue(this.id);return}var a=this._model,i,o=ns(a,t);return D(o,function(s,l){l.indexOf("Models")>=0&&D(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(n);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint?i=i||h.containPoint(n,u):process.env.NODE_ENV!=="production"&&$t(l+": "+(h?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&$t(l+": containPoint is not supported")},this)},this),!!i},e.prototype.getVisual=function(t,n){var a=this._model,i=ns(a,t,{defaultMainType:"series"}),o=i.seriesModel;process.env.NODE_ENV!=="production"&&(o||$t("There is no specified series model"));var s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?Cp(s,l,n):ks(s,n)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;D(Fk,function(n){var a=function(i){var o=t.getModel(),s=i.target,l,u=n==="globalout";if(u?l={}:s&&Qa(s,function(p){var d=ot(p);if(d&&d.dataIndex!=null){var g=d.dataModel||o.getSeriesByIndex(d.seriesIndex);return l=g&&g.getDataParams(d.dataIndex,d.dataType)||{},!0}else if(d.eventData)return l=B({},d.eventData),!0},!0),l){var f=l.componentType,h=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=l.seriesIndex);var c=f&&h!=null&&o.getComponent(f,h),v=c&&t[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];process.env.NODE_ENV!=="production"&&!u&&!(c&&v)&&$t("model or view can not be found by params"),l.event=i,l.type=n,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:c,view:v},t.trigger(n,l)}};a.zrEventfulCallAtLast=!0,t._zr.on(n,a,t)}),D(Fs,function(n,a){t._messageCenter.on(a,function(i){this.trigger(a,i)},t)}),D(["selectchanged"],function(n){t._messageCenter.on(n,function(a){this.trigger(n,a)},t)}),qO(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){Ue(this.id);return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){Ue(this.id);return}this._disposed=!0;var t=this.getDom();t&&W0(this.getDom(),$p,"");var n=this,a=n._api,i=n._model;D(n._componentsViews,function(o){o.dispose(i,a)}),D(n._chartsViews,function(o){o.dispose(i,a)}),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 Hs[n.id]},e.prototype.resize=function(t){if(this[we]){process.env.NODE_ENV!=="production"&&ce("`resize` should not be called during main process.");return}if(this._disposed){Ue(this.id);return}this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=t&&t.silent;this[Ge]&&(i==null&&(i=this[Ge].silent),a=!0,this[Ge]=null),this[we]=!0;try{a&&vo(this),Zn.update.call(this,{type:"resize",animation:B({duration:0},t&&t.animation)})}catch(o){throw this[we]=!1,o}this[we]=!1,zs.call(this,i),Gs.call(this,i)}},e.prototype.showLoading=function(t,n){if(this._disposed){Ue(this.id);return}if(Q(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!Hp[t]){process.env.NODE_ENV!=="production"&&$t("Loading effects "+t+" not exists.");return}var a=Hp[t](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)},e.prototype.hideLoading=function(){if(this._disposed){Ue(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var n=B({},t);return n.type=Fs[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){Ue(this.id);return}if(Q(n)||(n={silent:!!n}),!!bf[t.type]&&this._model){if(this[we]){this._pendingActions.push(t);return}var a=n.silent;Vp.call(this,t,a);var i=n.flush;i?this._zr.flush():i!==!1&&wt.browser.weChat&&this._throttledZrFlush(),zs.call(this,a),Gs.call(this,a)}},e.prototype.updateLabelLayout=function(){Cr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){Ue(this.id);return}var n=t.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);process.env.NODE_ENV!=="production"&&J(t.data&&i),i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){vo=function(h){var c=h._scheduler;c.restorePipelines(h._model),c.prepareStageTasks(),Np(h,!0),Np(h,!1),c.plan()},Np=function(h,c){for(var v=h._model,p=h._scheduler,d=c?h._componentsViews:h._chartsViews,g=c?h._componentsMap:h._chartsMap,y=h._zr,m=h._api,_=0;_c.get("hoverLayerThreshold")&&!wt.node&&!wt.worker&&c.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=h._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(h,c){var v=h.get("blendMode")||null;c.eachRendered(function(p){p.isGroup||(p.style.blend=v)})}function s(h,c){if(!h.preventAutoZ){var v=h.get("z")||0,p=h.get("zlevel")||0;c.eachRendered(function(d){return l(d,v,p,-1/0),!0})}}function l(h,c,v,p){var d=h.getTextContent(),g=h.getTextGuideLine(),y=h.isGroup;if(y)for(var m=h.childrenRef(),_=0;_0?{duration:d,delay:v.get("delay"),easing:v.get("easing")}:null;c.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Yi(y))return;if(y instanceof gt&&QP(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(p){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&a(y)}})}tw=function(h){return new(function(c){O(v,c);function v(){return c!==null&&c.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(p){for(;p;){var d=p.__ecComponentInfo;if(d!=null)return h._model.getComponent(d.mainType,d.index);p=p.parent}},v.prototype.enterEmphasis=function(p,d){cn(p,d),lr(h)},v.prototype.leaveEmphasis=function(p,d){vn(p,d),lr(h)},v.prototype.enterBlur=function(p){O_(p),lr(h)},v.prototype.leaveBlur=function(p){bv(p),lr(h)},v.prototype.enterSelect=function(p){k_(p),lr(h)},v.prototype.leaveSelect=function(p){V_(p),lr(h)},v.prototype.getModel=function(){return h.getModel()},v.prototype.getViewOfComponentModel=function(p){return h.getViewOfComponentModel(p)},v.prototype.getViewOfSeriesModel=function(p){return h.getViewOfSeriesModel(p)},v}(cS))(h)},ew=function(h){function c(v,p){for(var d=0;d=0)){uw.push(t);var i=px.wrapStageHandler(t,a);i.__prio=e,i.__raw=t,r.push(i)}}function fw(r,e){Hp[r]=e}function hw(r,e,t){var n=Ck("registerMap");n&&n(r,e,t)}var Xk=iO;ei(Ep,IO),ei(Sf,EO),ei(Sf,PO),ei(Ep,ZO),ei(Sf,XO),ei($x,bk),sw(_S),lw(Lk,zN),fw("default",RO),Yr({type:ka,event:ka,update:ka},qt),Yr({type:Au,event:Au,update:Au},qt),Yr({type:fs,event:fs,update:fs},qt),Yr({type:Mu,event:Mu,update:Mu},qt),Yr({type:hs,event:hs,update:hs},qt),ow("light",WO),ow("dark",UO);var cw=[],qk={registerPreprocessor:sw,registerProcessor:lw,registerPostInit:Wk,registerPostUpdate:Uk,registerUpdateLifecycle:Wp,registerAction:Yr,registerCoordinateSystem:Yk,registerLayout:Zk,registerVisual:ei,registerTransform:Xk,registerLoading:fw,registerMap:hw,registerImpl:Dk,PRIORITY:Bk,ComponentModel:xt,ComponentView:Ut,SeriesModel:Ft,ChartView:Bt,registerComponentModel:function(r){xt.registerClass(r)},registerComponentView:function(r){Ut.registerClass(r)},registerSeriesModel:function(r){Ft.registerClass(r)},registerChartView:function(r){Bt.registerClass(r)},registerSubTypeDefaulter:function(r,e){xt.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){g2(r,e)}};function dt(r){if(G(r)){D(r,function(e){dt(e)});return}pt(cw,r)>=0||(cw.push(r),q(r)&&(r={install:r}),r.install(qk))}function $s(r){return r==null?0:r.length||1}function vw(r){return r}var Kk=function(){function r(e,t,n,a,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||vw,this._newKeyGetter=a||vw,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},a=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,a,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(f,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},a={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,a,o,"_newKeyGetter");for(var s=0;s1&&c===1)this._updateManyToOne&&this._updateManyToOne(f,u),a[l]=null;else if(h===1&&c>1)this._updateOneToMany&&this._updateOneToMany(f,u),a[l]=null;else if(h===1&&c===1)this._update&&this._update(f,u),a[l]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(f,u),a[l]=null;else if(h>1)for(var v=0;v1)for(var s=0;s30}var Ws=Q,Xn=F,nV=typeof Int32Array>"u"?Array:Int32Array,aV="e\0\0",_w=-1,iV=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],oV=["_approximateExtent"],Sw,Af,Us,po,Zp,Mf,Xp,sV=function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,a=!1;dw(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(a=!0,n=e),n=n||["x","y"];for(var i={},o=[],s={},l=!1,u={},f=0;f=0),a&&(c.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted){var d=this._dimIdxToName=K();D(o,function(g){d.set(i[g].storeDimIndex,g)})}}return r.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var a=this._schema.getSourceDimension(t);if(a)return a.name},r.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},r.prototype._recognizeDimIndex=function(e){if(Ct(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},r.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);if(process.env.NODE_ENV!=="production"&&t==null)throw new Error("Unknown dimension "+e);return t},r.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},r.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(n){return t.hasOwnProperty(n)?t[n]:void 0}:function(n){return t[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var a=n.encode[e];return a?a[t]:null},r.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,n=t.encode[e];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(e,t,n){var a=this,i;if(e instanceof yp&&(i=e),!i){var o=this.dimensions,s=up(e)||me(e)?new CS(e,o.length):e;i=new yp;var l=Xn(o,function(u){return{type:a._dimInfos[u].type,property:u}});i.initData(s,l,n)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=Qk(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},r.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t.length),a=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var s=a;s=t)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===ar;if(l&&!a.pure)for(var u=[],f=e;f0},r.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,a=n[e];a||(a=n[e]={});var i=a[t];return i==null&&(i=this.getVisual(t),G(i)?i=i.slice():Ws(i)&&(i=B({},i)),a[t]=i),i},r.prototype.setItemVisual=function(e,t,n){var a=this._itemVisuals[e]||{};this._itemVisuals[e]=a,Ws(t)?B(a,t):a[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Ws(e)?B(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?B(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;mv(n,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){D(this._graphicEls,function(n,a){n&&e&&e.call(t,n,a)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:Xn(this.dimensions,this._getDimInfo,this),this.hostModel)),Zp(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var n=this[e];q(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var a=n.apply(this,arguments);return t.apply(this,[a].concat(Qh(arguments)))})},r.internalField=function(){Sw=function(e){var t=e._invertedIndicesMap;D(t,function(n,a){var i=e._dimInfos[a],o=i.ordinalMeta,s=e._store;if(o){n=t[a]=new nV(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),a[t]=l}}}(),r}();const Le=sV;function Ys(r,e){up(r)||(r=hp(r)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||r.dimensionsDefine||[],a=K(),i=[],o=uV(r,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&mw(o),l=n===r.dimensionsDefine,u=l?yw(r):gw(n),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(r,o));for(var h=K(f),c=new BS(o),v=0;v0&&(n.name=a+(i-1)),i++,e.set(a,i)}}function uV(r,e,t,n){var a=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,n||0);return D(e,function(i){var o;Q(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function fV(r,e,t){if(t||e.hasKey(r)){for(var n=0;e.hasKey(r+n);)n++;r+=n}return e.set(r,!0),r}var hV=function(){function r(e){this.coordSysDims=[],this.axisMap=K(),this.categoryAxisMap=K(),this.coordSysName=e}return r}();function cV(r){var e=r.get("coordinateSystem"),t=new hV(e),n=vV[e];if(n)return n(r,t,t.axisMap,t.categoryAxisMap),t}var vV={cartesian2d:function(r,e,t,n){var a=r.getReferringComponents("xAxis",te).models[0],i=r.getReferringComponents("yAxis",te).models[0];if(process.env.NODE_ENV!=="production"){if(!a)throw new Error('xAxis "'+Qt(r.get("xAxisIndex"),r.get("xAxisId"),0)+'" not found');if(!i)throw new Error('yAxis "'+Qt(r.get("xAxisIndex"),r.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],t.set("x",a),t.set("y",i),go(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),go(i)&&(n.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var a=r.getReferringComponents("singleAxis",te).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],t.set("single",a),go(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var a=r.getReferringComponents("polar",te).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!o)throw new Error("angleAxis option not found");if(!i)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),go(i)&&(n.set("radius",i),e.firstCategoryDimIndex=0),go(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,n){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,n){var a=r.ecModel,i=a.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();D(i.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),f=o[l];t.set(f,u),go(u)&&(n.set(f,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function go(r){return r.get("type")==="category"}function pV(r,e,t){t=t||{};var n=t.byIndex,a=t.stackedCoordDimension,i,o,s;dV(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,f,h,c;if(D(i,function(m,_){U(m)&&(i[_]=m={name:m}),l&&!m.isExtraCoord&&(!n&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!a||a===m.coordDim)&&(f=m))}),f&&!n&&!u&&(n=!0),f){h="__\0ecstackresult_"+r.id,c="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=f.coordDim,p=f.type,d=0;D(i,function(m){m.coordDim===v&&d++});var g={name:h,coordDim:v,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:c,coordDim:c,coordDimIndex:d+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(c,p),y.storeDimIndex=s.ensureCalculationDimension(h,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:c,stackResultDimension:h}}function dV(r){return!dw(r.schema)}function qn(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function xw(r,e){return qn(r,e)?r.getCalculationInfo("stackResultDimension"):e}function gV(r,e){var t=r.get("coordinateSystem"),n=ao.get(t),a;return e&&e.coordSysDims&&(a=F(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=Df(l)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function yV(r,e,t){var n,a;return t&&D(r,function(i,o){var s=i.coordDim,l=t.categoryAxisMap.get(s);l&&(n==null&&(n=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(r[n].otherDims.itemName=0),n}function yn(r,e,t){t=t||{};var n=e.getSourceManager(),a,i=!1;r?(i=!0,a=hp(r)):(a=n.getSource(),i=a.sourceFormat===ar);var o=cV(e),s=gV(e,o),l=t.useEncodeDefaulter,u=q(l)?l:l?st(tS,s,e):null,f={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},h=Ys(a,f),c=yV(h.dimensions,t.createInvertedIndices,o),v=i?null:n.getSharedDataStore(h),p=pV(e,{schema:h,store:v}),d=new Le(h,e);d.setCalculationInfo(p);var g=c!=null&&mV(a)?function(y,m,_,S){return S===c?_:this.defaultDimValueGetter(y,m,_,S)}:null;return d.hasItemOption=!1,d.initData(i?a:v,null,g),d}function mV(r){if(r.sourceFormat===ar){var e=_V(r.data||[]);return!G(Bi(e))}}function _V(r){for(var e=0;et[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();mu(ww);const mn=ww;var SV=0,xV=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++SV}return r.createByAxisModel=function(e){var t=e.option,n=t.data,a=n&&F(n,wV);return new r({categories:a,needCollect:!a,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!U(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var a=this._getOrCreateMap();return t=a.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,a.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=K(this.categories))},r}();function wV(r){return Q(r)&&r.value!=null?r.value:r+""}const qp=xV;function bV(r){var e=Math.pow(10,gu(Math.abs(r))),t=Math.abs(r/e);return t===0||t===1||t===2||t===3||t===5}function Kp(r){return r.type==="interval"||r.type==="log"}function TV(r,e,t,n){var a={},i=r[1]-r[0],o=a.interval=I0(i/e,!0);t!=null&&on&&(o=a.interval=n);var s=a.intervalPrecision=bw(o),l=a.niceTickExtent=[Zt(Math.ceil(r[0]/o)*o,s),Zt(Math.floor(r[1]/o)*o,s)];return DV(l,r),a}function jp(r){var e=Math.pow(10,gu(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Zt(t*e)}function bw(r){return Or(r)+2}function Tw(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function DV(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),Tw(r,0,e),Tw(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function Lf(r,e){return r>=e[0]&&r<=e[1]}function If(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function Ef(r,e){return r*(e[1]-e[0])+e[0]}var Dw=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new qp({})),G(a)&&(a=new qp({categories:F(a,function(i){return Q(i)?i.value:i})})),n._ordinalMeta=a,n._extent=n.getSetting("extent")||[0,a.categories.length-1],n}return e.prototype.parse=function(t){return t==null?NaN:U(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),Lf(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),If(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(Ef(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],n=this._extent,a=n[0];a<=n[1];)t.push({value:a}),a++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=t.ordinalNumbers,a=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(mn);mn.registerClass(Dw);const Qp=Dw;var ri=Zt,Cw=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Lf(t,this._extent)},e.prototype.normalize=function(t){return If(t,this._extent)},e.prototype.scale=function(t){return Ef(t,this._extent)},e.prototype.setExtent=function(t,n){var a=this._extent;isNaN(t)||(a[0]=parseFloat(t)),isNaN(n)||(a[1]=parseFloat(n))},e.prototype.unionExtent=function(t){var n=this._extent;t[0]n[1]&&(n[1]=t[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=bw(t)},e.prototype.getTicks=function(t){var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;a[0]l)return[];var f=s.length?s[s.length-1].value:i[1];return a[1]>f&&(t?s.push({value:ri(f+n,o)}):s.push({value:a[1]})),s},e.prototype.getMinorTicks=function(t){for(var n=this.getTicks(!0),a=[],i=this.getExtent(),o=1;oi[0]&&v0&&(i=i===null?s:Math.min(i,s))}t[n]=i}}return t}function Lw(r){var e=MV(r),t=[];return D(r,function(n){var a=n.coordinateSystem,i=a.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=e[l],f=Math.abs(o[1]-o[0]),h=i.scale.getExtent(),c=Math.abs(h[1]-h[0]);s=u?f/c*u:f}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var p=$(n.get("barWidth"),s),d=$(n.get("barMaxWidth"),s),g=$(n.get("barMinWidth")||(Nw(n)?.5:1),s),y=n.get("barGap"),m=n.get("barCategoryGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:d,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:ed(i),stackId:td(n)})}),Iw(t)}function Iw(r){var e={};D(r,function(n,a){var i=n.axisKey,o=n.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[i]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=n.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=n.barMaxWidth;h&&(l[u].maxWidth=h);var c=n.barMinWidth;c&&(l[u].minWidth=c);var v=n.barGap;v!=null&&(s.gap=v);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return D(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=St(i).length;s=Math.max(35-l*4,15)+"%"}var u=$(s,o),f=$(n.gap,1),h=n.remainedWidth,c=n.autoWidthCount,v=(h-u)/(c+(c-1)*f);v=Math.max(v,0),D(i,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var S=y.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),y.width=S,h-=S+f*S,c--}else{var S=v;m&&mS&&(S=_),S!==v&&(y.width=S,h-=S+f*S,c--)}}),v=(h-u)/(c+(c-1)*f),v=Math.max(v,0);var p=0,d;D(i,function(y,m){y.width||(y.width=v),d=y,p+=y.width*(1+f)}),d&&(p-=d.width*f);var g=-p/2;D(i,function(y,m){t[a][m]=t[a][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),t}function LV(r,e,t){if(r&&e){var n=r[ed(e)];return n!=null&&t!=null?n[td(t)]:n}}function Ew(r,e){var t=Mw(r,e),n=Lw(t);D(t,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=td(a),u=n[ed(s)][l],f=u.offset,h=u.width;i.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function Pw(r){return{seriesType:r,plan:so(),reset:function(e){if(Rw(e)){var t=e.getData(),n=e.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(a.dim)),l=e.get("showBackground",!0),u=t.mapDimension(i.dim),f=t.getCalculationInfo("stackResultDimension"),h=qn(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),c=i.isHorizontal(),v=IV(a,i),p=Nw(e),d=e.get("barMinHeight")||0,g=f&&t.getDimensionIndex(f),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(_,S){for(var w=_.count,x=p&&Zr(w*3),b=p&&l&&Zr(w*3),T=p&&Zr(w),C=n.master.getRect(),A=c?C.width:C.height,M,L=S.getStore(),I=0;(M=_.next())!=null;){var E=L.get(h?g:o,M),P=L.get(s,M),N=v,V=void 0;h&&(V=+E-L.get(o,M));var k=void 0,z=void 0,H=void 0,W=void 0;if(c){var X=n.dataToPoint([E,P]);if(h){var et=n.dataToPoint([V,P]);N=et[0]}k=N,z=X[1]+m,H=X[0]-N,W=y,Math.abs(H)>>1;r[a][1]a&&(this._approxInterval=a);var s=Pf.length,l=Math.min(EV(Pf,this._approxInterval,0,s),s-1);this._interval=Pf[l][1],this._minLevelUnit=Pf[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return Ct(t)?t:+kr(t)},e.prototype.contain=function(t){return Lf(this.parse(t),this._extent)},e.prototype.normalize=function(t){return If(this.parse(t),this._extent)},e.prototype.scale=function(t){return Ef(t,this._extent)},e.type="time",e}(Kn),Pf=[["second",Yv],["minute",Zv],["hour",ws],["quarter-day",ws*6],["half-day",ws*12],["day",nr*1.2],["half-week",nr*3.5],["week",nr*7],["month",nr*31],["quarter",nr*95],["half-year",N1/2],["year",N1]];function PV(r,e,t,n){var a=kr(e),i=kr(t),o=function(p){return B1(a,p,n)===B1(i,p,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},h=function(){return f()&&o("minute")},c=function(){return h()&&o("second")},v=function(){return c()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return h();case"second":return c();case"millisecond":return v()}}function RV(r,e){return r/=nr,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function NV(r){var e=30*nr;return r/=e,r>6?6:r>3?3:r>2?2:1}function OV(r){return r/=ws,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function kw(r,e){return r/=e?Zv:Yv,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function kV(r){return I0(r,!0)}function VV(r,e,t){var n=new Date(r);switch(ji(e)){case"year":case"month":n[z1(t)](0);case"day":n[G1(t)](1);case"hour":n[F1(t)](0);case"minute":n[H1(t)](0);case"second":n[$1(t)](0),n[W1(t)](0)}return n.getTime()}function BV(r,e,t,n){var a=1e4,i=k1,o=0;function s(A,M,L,I,E,P,N){for(var V=new Date(M),k=M,z=V[I]();k1&&P===0&&L.unshift({value:L[0].value-k})}}for(var P=0;P=n[0]&&m<=n[1]&&h++)}var _=(n[1]-n[0])/e;if(h>_*1.5&&c>_/1.5||(u.push(g),h>_||r===i[v]))break}f=[]}}}process.env.NODE_ENV!=="production"&&o>=a&&$t("Exceed safe limit.");for(var S=Rt(F(u,function(A){return Rt(A,function(M){return M.value>=n[0]&&M.value<=n[1]&&!M.notAdd})}),function(A){return A.length>0}),w=[],x=S.length-1,v=0;v0;)i*=10;var s=[Zt(FV(n[0]/i)*i),Zt(GV(n[1]/i)*i)];this._interval=i,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){Zs.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=Ar(t)/Ar(this.base),Lf(t,this._extent)},e.prototype.normalize=function(t){return t=Ar(t)/Ar(this.base),If(t,this._extent)},e.prototype.scale=function(t){return t=Ef(t,this._extent),Rf(this.base,t)},e.type="log",e}(mn),zw=rd.prototype;zw.getMinorTicks=Zs.getMinorTicks,zw.getLabel=Zs.getLabel;function Nf(r,e){return zV(r,Or(e))}mn.registerClass(rd);const HV=rd;var $V=function(){function r(e,t,n){this._prepareParams(e,t,n)}return r.prototype._prepareParams=function(e,t,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var c=this._determinedMin,v=this._determinedMax;return c!=null&&(s=c,u=!0),v!=null&&(l=v,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:h}},r.prototype.modifyDataMinMax=function(e,t){process.env.NODE_ENV!=="production"&&J(!this.frozen),this[UV[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var n=WV[e];process.env.NODE_ENV!=="production"&&J(!this.frozen&&this[n]==null),this[n]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),WV={min:"_determinedMin",max:"_determinedMax"},UV={min:"_dataMin",max:"_dataMax"};function Gw(r,e,t){var n=r.rawExtentInfo;return n||(n=new $V(r,e,t),r.rawExtentInfo=n,n)}function Of(r,e){return e==null?null:ca(e)?NaN:r.parse(e)}function Fw(r,e){var t=r.type,n=Gw(r,e,r.getExtent()).calculate();r.setBlank(n.isBlank);var a=n.min,i=n.max,o=e.ecModel;if(o&&t==="time"){var s=Mw("bar",o),l=!1;if(D(s,function(h){l=l||h.getBaseAxis()===e.axis}),l){var u=Lw(s),f=YV(a,i,e,u);a=f.min,i=f.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function YV(r,e,t,n){var a=t.axis.getExtent(),i=a[1]-a[0],o=LV(n,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;D(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;D(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=e-r,h=1-(s+l)/i,c=f/h-f;return e+=c*(l/u),r-=c*(s/u),{min:r,max:e}}function yo(r,e){var t=e,n=Fw(r,t),a=n.extent,i=t.get("splitNumber");r instanceof HV&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function kf(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new Qp({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new Vw({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(mn.getClass(e)||Kn)}}function ZV(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function Xs(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(n){return function(a,i){return r.scale.getFormattedLabel(a,i,n)}}(e):U(e)?function(n){return function(a){var i=r.scale.getLabel(a),o=n.replace("{value}",i??"");return o}}(e):q(e)?function(n){return function(a,i){return t!=null&&(i=a.value-t),n(nd(r,a),i,a.level!=null?{level:a.level}:null)}}(e):function(n){return r.scale.getLabel(n)}}function nd(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function XV(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var n,a,i=t.getExtent();t instanceof Qp?a=t.count():(n=t.getTicks(),a=n.length);var o=r.getLabelModel(),s=Xs(r),l,u=1;a>40&&(u=Math.ceil(a/40));for(var f=0;fr[1]&&(r[1]=a[1])})}var qs=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),jV=1e-8;function $w(r,e){return Math.abs(r-e)a&&(n=o,a=l)}if(n)return JV(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var n=this._rect;if(n&&!t)return n;var a=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return D(o,function(s){s.type==="polygon"?Ww(s.exterior,a,i,t):D(s.points,function(l){Ww(l,a,i,t)})}),isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])||(a[0]=a[1]=i[0]=i[1]=0),n=new ct(a[0],a[1],i[0]-a[0],i[1]-a[1]),t||(this._rect=n),n},e.prototype.contain=function(t){var n=this.getBoundingRect(),a=this.geometries;if(!n.contain(t[0],t[1]))return!1;t:for(var i=0,o=a.length;i>1^-(s&1),l=l>>1^-(l&1),s+=a,l+=i,a=s,i=l,n.push([s/t,l/t])}return n}function rB(r,e){return r=eB(r),F(Rt(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,a=t.geometry,i=[];switch(a.type){case"Polygon":var o=a.coordinates;i.push(new Yw(o[0],o.slice(1)));break;case"MultiPolygon":D(a.coordinates,function(l){l[0]&&i.push(new Yw(l[0],l.slice(1)))});break;case"LineString":i.push(new Zw([a.coordinates]));break;case"MultiLineString":i.push(new Zw(a.coordinates))}var s=new Xw(n[e||"name"],i,n.cp);return s.properties=n,s})}var Ks=bt();function nB(r){return r.type==="category"?iB(r):sB(r)}function aB(r,e){return r.type==="category"?oB(r,e):{ticks:F(r.scale.getTicks(),function(t){return t.value})}}function iB(r){var e=r.getLabelModel(),t=Kw(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function Kw(r,e){var t=jw(r,"labels"),n=ad(e),a=Qw(t,n);if(a)return a;var i,o;return q(n)?i=eb(r,n):(o=n==="auto"?lB(r):n,i=tb(r,o)),Jw(t,n,{labels:i,labelCategoryInterval:o})}function oB(r,e){var t=jw(r,"ticks"),n=ad(e),a=Qw(t,n);if(a)return a;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),q(n))i=eb(r,n,!0);else if(n==="auto"){var s=Kw(r,r.getLabelModel());o=s.labelCategoryInterval,i=F(s.labels,function(l){return l.tickValue})}else o=n,i=tb(r,o,!0);return Jw(t,n,{ticks:i,tickCategoryInterval:o})}function sB(r){var e=r.scale.getTicks(),t=Xs(r);return{labels:F(e,function(n,a){return{level:n.level,formattedLabel:t(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function jw(r,e){return Ks(r)[e]||(Ks(r)[e]=[])}function Qw(r,e){for(var t=0;t40&&(s=Math.max(1,Math.floor(o/40)));for(var l=i[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(n)),h=Math.abs(u*Math.sin(n)),c=0,v=0;l<=i[1];l+=s){var p=0,d=0,g=Jo(t({value:l}),e.font,"center","top");p=g.width*1.3,d=g.height*1.3,c=Math.max(c,p,7),v=Math.max(v,d,7)}var y=c/f,m=v/h;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),S=Ks(r.model),w=r.getExtent(),x=S.lastAutoInterval,b=S.lastTickCount;return x!=null&&b!=null&&Math.abs(x-_)<=1&&Math.abs(b-o)<=1&&x>_&&S.axisExtent0===w[0]&&S.axisExtent1===w[1]?_=x:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=w[0],S.axisExtent1=w[1]),_}function fB(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function tb(r,e,t){var n=Xs(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],f=a.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=Hw(r),c=o.get("showMinLabel")||h,v=o.get("showMaxLabel")||h;c&&u!==i[0]&&d(i[0]);for(var p=u;p<=i[1];p+=l)d(p);v&&p-l!==i[1]&&d(i[1]);function d(g){var y={value:g};s.push(t?g:{formattedLabel:n(y),rawLabel:a.getLabel(y),tickValue:g})}return s}function eb(r,e,t){var n=r.scale,a=Xs(r),i=[];return D(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:a(o),rawLabel:s,tickValue:l})}),i}var rb=[0,1],hB=function(){function r(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return r.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),a=Math.max(t[0],t[1]);return e>=n&&e<=a},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return A0(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},r.prototype.dataToCoord=function(e,t){var n=this._extent,a=this.scale;return e=a.normalize(e),this.onBand&&a.type==="ordinal"&&(n=n.slice(),nb(n,a.count())),Pt(e,rb,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),nb(n,a.count()));var i=Pt(e,n,rb,t);return this.scale.scale(i)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=aB(this,t),a=n.ticks,i=F(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return cB(this,i,o,e.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var n=this.scale.getMinorTicks(t),a=F(n,function(i){return F(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(){return nB(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(e[1]-e[0]);return Math.abs(a)/n},r.prototype.calculateCategoryInterval=function(){return uB(this)},r}();function nb(r,e){var t=r[1]-r[0],n=e,a=t/n/2;r[0]+=a,r[1]-=a}function cB(r,e,t,n){var a=e.length;if(!r.onBand||t||!a)return;var i=r.getExtent(),o,s;if(a===1)e[0].coord=i[0],o=e[1]={coord:i[0]};else{var l=e[a-1].tickValue-e[0].tickValue,u=(e[a-1].coord-e[0].coord)/l;D(e,function(v){v.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-e[a-1].tickValue,o={coord:e[a-1].coord+u*s},e.push(o)}var h=i[0]>i[1];c(e[0].coord,i[0])&&(n?e[0].coord=i[0]:e.shift()),n&&c(i[0],e[0].coord)&&e.unshift({coord:i[0]}),c(i[1],o.coord)&&(n?o.coord=i[1]:e.pop()),n&&c(o.coord,i[1])&&e.push({coord:i[1]});function c(v,p){return v=Zt(v),p=Zt(p),h?v>p:va&&(a+=js);var v=Math.atan2(s,o);if(v<0&&(v+=js),v>=n&&v<=a||v+js>=n&&v+js<=a)return l[0]=f,l[1]=h,u-t;var p=t*Math.cos(n)+r,d=t*Math.sin(n)+e,g=t*Math.cos(a)+r,y=t*Math.sin(a)+e,m=(p-o)*(p-o)+(d-s)*(d-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=p,l[1]=d,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function Bf(r,e,t,n,a,i,o,s){var l=a-r,u=i-e,f=t-r,h=n-e,c=Math.sqrt(f*f+h*h);f/=c,h/=c;var v=l*f+u*h,p=v/c;s&&(p=Math.min(Math.max(p,0),1)),p*=c;var d=o[0]=r+p*f,g=o[1]=e+p*h;return Math.sqrt((d-a)*(d-a)+(g-i)*(g-i))}function ab(r,e,t,n,a,i,o){t<0&&(r=r+t,t=-t),n<0&&(e=e+n,n=-n);var s=r+t,l=e+n,u=o[0]=Math.min(Math.max(a,r),s),f=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-a)*(u-a)+(f-i)*(f-i))}var Lr=[];function gB(r,e,t){var n=ab(e.x,e.y,e.width,e.height,r.x,r.y,Lr);return t.set(Lr[0],Lr[1]),n}function yB(r,e,t){for(var n=0,a=0,i=0,o=0,s,l,u=1/0,f=e.data,h=r.x,c=r.y,v=0;v0){e=e/180*Math.PI,Ir.fromArray(r[0]),zt.fromArray(r[1]),Kt.fromArray(r[2]),ut.sub(Xr,Ir,zt),ut.sub(qr,Kt,zt);var t=Xr.len(),n=qr.len();if(!(t<.001||n<.001)){Xr.scale(1/t),qr.scale(1/n);var a=Xr.dot(qr),i=Math.cos(e);if(i1&&ut.copy(Ie,Kt),Ie.toArray(r[1])}}}}function mB(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Ir.fromArray(r[0]),zt.fromArray(r[1]),Kt.fromArray(r[2]),ut.sub(Xr,zt,Ir),ut.sub(qr,Kt,zt);var n=Xr.len(),a=qr.len();if(!(n<.001||a<.001)){Xr.scale(1/n),qr.scale(1/a);var i=Xr.dot(e),o=Math.cos(t);if(i=l)ut.copy(Ie,Kt);else{Ie.scaleAndAdd(qr,s/Math.tan(Math.PI/2-f));var h=Kt.x!==zt.x?(Ie.x-zt.x)/(Kt.x-zt.x):(Ie.y-zt.y)/(Kt.y-zt.y);if(isNaN(h))return;h<0?ut.copy(Ie,zt):h>1&&ut.copy(Ie,Kt)}Ie.toArray(r[1])}}}}function sb(r,e,t,n){var a=t==="normal",i=a?r:r.ensureState(t);i.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();a?r.useStyle(s):i.style=s}function _B(r,e){var t=e.smooth,n=e.points;if(n)if(r.moveTo(n[0][0],n[0][1]),t>0&&n.length>=3){var a=Mn(n[0],n[1]),i=Mn(n[1],n[2]);if(!a||!i){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*t,s=Wl([],n[1],n[0],o/a),l=Wl([],n[1],n[2],o/i),u=Wl([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var f=1;f0&&i&&w(-f/o,0,o);var d=r[0],g=r[o-1],y,m;_(),y<0&&x(-y,.8),m<0&&x(m,.8),_(),S(y,m,1),S(m,y,-1),_(),y<0&&b(-y),m<0&&b(m);function _(){y=d.rect[e]-n,m=a-g.rect[e]-g.rect[t]}function S(T,C,A){if(T<0){var M=Math.min(C,-T);if(M>0){w(M*A,0,o);var L=M+T;L<0&&x(-L*A,1)}else x(-T*A,1)}}function w(T,C,A){T!==0&&(u=!0);for(var M=C;M0)for(var L=0;L0;L--){var N=A[L-1]*P;w(-N,L,o)}}}function b(T){var C=T<0?-1:1;T=Math.abs(T);for(var A=Math.ceil(T/(o-1)),M=0;M0?w(A,0,M+1):w(-A,o-M-1,o),T-=A,T<=0)return}return u}function SB(r,e,t,n){return ub(r,"x","width",e,t,n)}function fb(r,e,t,n){return ub(r,"y","height",e,t,n)}function hb(r){var e=[];r.sort(function(d,g){return g.priority-d.priority});var t=new ct(0,0,0,0);function n(d){if(!d.ignore){var g=d.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}d.ignore=!0}for(var a=0;a=0&&n.attr(i.oldLayoutSelect),pt(c,"emphasis")>=0&&n.attr(i.oldLayoutEmphasis)),Mt(n,u,t,l)}else if(n.attr(u),!qi(n).valueAnimation){var h=lt(n.style.opacity,1);n.style.opacity=0,Gt(n,{style:{opacity:h}},t,l)}if(i.oldLayout=u,n.states.select){var v=i.oldLayoutSelect={};Gf(v,u,Ff),Gf(v,n.states.select,Ff)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};Gf(p,u,Ff),Gf(p,n.states.emphasis,Ff)}L1(n,l,f,t,t)}if(a&&!a.ignore&&!a.invisible){var i=bB(a),o=i.oldLayout,d={points:a.shape.points};o?(a.attr({shape:o}),Mt(a,{shape:d},t)):(a.setShape(d),a.style.strokePercent=0,Gt(a,{style:{strokePercent:1}},t)),i.oldLayout=d}},r}();const DB=TB;var fd=bt();function CB(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var a=fd(t).labelManager;a||(a=fd(t).labelManager=new DB),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var a=fd(t).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),a.updateLayoutConfig(t),a.layout(t),a.processLabelsOverall()})}var hd=Math.sin,cd=Math.cos,vb=Math.PI,ii=Math.PI*2,AB=180/vb,MB=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,n,a,i,o){this._add("C",e,t,n,a,i,o)},r.prototype.quadraticCurveTo=function(e,t,n,a){this._add("Q",e,t,n,a)},r.prototype.arc=function(e,t,n,a,i,o){this.ellipse(e,t,n,n,0,a,i,o)},r.prototype.ellipse=function(e,t,n,a,i,o,s,l){var u=s-o,f=!l,h=Math.abs(u),c=On(h-ii)||(f?u>=ii:-u>=ii),v=u>0?u%ii:u%ii+ii,p=!1;c?p=!0:On(h)?p=!1:p=v>=vb==!!f;var d=e+n*cd(o),g=t+a*hd(o);this._start&&this._add("M",d,g);var y=Math.round(i*AB);if(c){var m=1/this._p,_=(f?1:-1)*(ii-m);this._add("A",n,a,y,1,+f,e+n*cd(o+_),t+a*hd(o+_)),m>.01&&this._add("A",n,a,y,0,+f,d,g)}else{var S=e+n*cd(s),w=t+a*hd(s);this._add("A",n,a,y,+p,+f,S,w)}},r.prototype.rect=function(e,t,n,a){this._add("M",e,t),this._add("l",n,0),this._add("l",0,a),this._add("l",-n,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,n,a,i,o,s,l,u){for(var f=[],h=this._p,c=1;c"}function VB(r){return""}function pd(r,e){e=e||{};var t=e.newline?` `:"";function n(a){var i=a.children,o=a.tag,s=a.attrs,l=a.text;return kB(o,s)+(o!=="style"?Pe(l):l||"")+(i?""+t+F(i,function(u){return n(u)}).join(t)+t:"")+VB(o)}return n(r)}function BB(r,e,t){t=t||{};var n=t.newline?` `:"",a=" {"+n,i=n+"}",o=F(St(r),function(l){return l+a+F(St(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+i}).join(n),s=F(St(e),function(l){return"@keyframes "+l+a+F(St(e[l]),function(u){return u+a+F(St(e[l][u]),function(f){var h=e[l][u][f];return f==="d"&&(h='path("'+h+'")'),f+":"+h+";"}).join(n)+i}).join(n)+i}).join(n);return!o&&!s?"":[""].join(n)}function dd(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function mb(r,e,t,n){return le("svg","root",{width:r,height:e,xmlns:db,"xmlns:xlink":gb,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+e:!1},t)}var _b={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},oi="transform-origin";function zB(r,e,t){var n=B({},r.shape);B(n,e),r.buildPath(t,n);var a=new pb;return a.reset(a0(r)),t.rebuildPath(a,1),a.generateStr(),a.getStr()}function GB(r,e){var t=e.originX,n=e.originY;(t||n)&&(r[oi]=t+"px "+n+"px")}var FB={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Sb(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function HB(r,e,t){var n=r.shape.paths,a={},i,o;if(D(n,function(l){var u=dd(t.zrId);u.animation=!0,Hf(l,{},u,!0);var f=u.cssAnims,h=u.cssNodes,c=St(f),v=c.length;if(v){o=c[v-1];var p=f[o];for(var d in p){var g=p[d];a[d]=a[d]||{d:""},a[d].d+=g.d||""}for(var y in h){var m=h[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){e.d=!1;var s=Sb(a,t);return i.replace(o,s)}}function xb(r){return U(r)?_b[r]?"cubic-bezier("+_b[r]+")":_c(r)?r:"":""}function Hf(r,e,t,n){var a=r.animators,i=a.length,o=[];if(r instanceof Ov){var s=HB(r,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u0}).length){var yt=Sb(b,t);return yt+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+t.cssClassIdx++;t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}var Js=Math.round;function wb(r){return r&&U(r.src)}function bb(r){return r&&q(r.toDataURL)}function gd(r,e,t,n){RB(function(a,i){var o=a==="fill"||a==="stroke";o&&n0(i)?Lb(e,r,a,n):o&&Ac(i)?Ib(t,r,a,n):r[a]=i},e,t,!1),qB(t,r,n)}function Tb(r){return On(r[0]-1)&&On(r[1])&&On(r[2])&&On(r[3]-1)}function $B(r){return On(r[4])&&On(r[5])}function yd(r,e,t){if(e&&!($B(e)&&Tb(e))){var n=t?10:1e4;r.transform=Tb(e)?"translate("+Js(e[4]*n)/n+" "+Js(e[5]*n)/n+")":VE(e)}}function Db(r,e,t){for(var n=r.points,a=[],i=0;i"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";J(c,g),J(v,g)}else if(c==null||v==null){var y=function(A,M){if(A){var L=A.elm,I=c||M.width,E=v||M.height;A.tag==="pattern"&&(u?(E=1,I/=i.width):f&&(I=1,E/=i.height)),A.attrs.width=I,A.attrs.height=E,L&&(L.setAttribute("width",I),L.setAttribute("height",E))}},m=nv(p,null,r,function(A){l||y(x,A),y(h,A)});m&&m.width&&m.height&&(c=c||m.width,v=v||m.height)}h=le("image","img",{href:p,width:c,height:v}),o.width=c,o.height=v}else a.svgElement&&(h=nt(a.svgElement),o.width=a.svgWidth,o.height=a.svgHeight);if(h){var _,S;l?_=S=1:u?(S=1,_=o.width/i.width):f?(_=1,S=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),S!=null&&!isNaN(S)&&(o.height=S);var w=i0(a);w&&(o.patternTransform=w);var x=le("pattern","",o,[h]),b=pd(x),T=n.patternCache,C=T[b];C||(C=n.zrId+"-p"+n.patternIdx++,T[b]=C,o.id=C,x=n.defs[C]=le("pattern",C,o,[h])),e[t]=iu(C)}}function KB(r,e,t){var n=t.clipPathCache,a=t.defs,i=n[r.id];if(!i){i=t.zrId+"-c"+t.clipPathIdx++;var o={id:i};n[r.id]=i,a[i]=le("clipPath",i,o,[Ab(r,t)])}e["clip-path"]=iu(i)}function Eb(r){return document.createTextNode(r)}function si(r,e,t){r.insertBefore(e,t)}function Pb(r,e){r.removeChild(e)}function Rb(r,e){r.appendChild(e)}function Nb(r){return r.parentNode}function Ob(r){return r.nextSibling}function md(r,e){r.textContent=e}var kb=58,jB=120,QB=le("","");function _d(r){return r===void 0}function Kr(r){return r!==void 0}function JB(r,e,t){for(var n={},a=e;a<=t;++a){var i=r[a].key;i!==void 0&&(process.env.NODE_ENV!=="production"&&n[i]!=null&&console.error("Duplicate key "+i),n[i]=a)}return n}function tl(r,e){var t=r.key===e.key,n=r.tag===e.tag;return n&&t}function el(r){var e,t=r.children,n=r.tag;if(Kr(n)){var a=r.elm=yb(n);if(Sd(QB,r),G(t))for(e=0;ei?(p=t[l+1]==null?null:t[l+1].elm,Vb(r,p,t,a,l)):$f(r,e,n,i))}function mo(r,e){var t=e.elm=r.elm,n=r.children,a=e.children;r!==e&&(Sd(r,e),_d(e.text)?Kr(n)&&Kr(a)?n!==a&&tz(t,n,a):Kr(a)?(Kr(r.text)&&md(t,""),Vb(t,null,a,0,a.length-1)):Kr(n)?$f(t,n,0,n.length-1):Kr(r.text)&&md(t,""):r.text!==e.text&&(Kr(n)&&$f(t,n,0,n.length-1),md(t,e.text)))}function ez(r,e){if(tl(r,e))mo(r,e);else{var t=r.elm,n=Nb(t);el(e),n!==null&&(si(n,e.elm,Ob(t)),$f(n,[r],0,0))}return e}var rz=0,nz=function(){function r(e,t,n){if(this.type="svg",this.refreshHover=Bb("refreshHover"),this.configLayer=Bb("configLayer"),this.storage=t,this._opts=n=B({},n),this.root=e,this._id="zr"+rz++,this._oldVNode=mb(n.width,n.height),e&&!n.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=yb("svg");Sd(null,this._oldVNode),a.appendChild(i),e.appendChild(a)}this.resize(n.width,n.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",ez(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return Mb(e,dd(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,a=this._height,i=dd(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress;var o=[],s=this._bgVNode=az(n,a,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=le("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=F(St(i.defs),function(c){return i.defs[c]});if(u.length&&o.push(le("defs","defs",{},u)),e.animation){var f=BB(i.cssNodes,i.cssAnims,{newline:!0});if(f){var h=le("style","stl",{},[],f);o.push(h)}}return mb(n,a,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},pd(this.renderToVNode({animation:lt(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:lt(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,n){for(var a=e.length,i=[],o=0,s,l,u=0,f=0;f=0&&!(c&&l&&c[d]===l[d]);d--);for(var g=p-1;g>d;g--)o--,s=i[o-1];for(var y=d+1;y=s)}}for(var h=this.__startIndex;h15)break}}E.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var A=v.dpr,M=0;M0&&e>a[0]){for(l=0;le);l++);s=n[a[l]]}if(a.splice(l+1,0,e),n[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.__painter=this},r.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,a=0;a0?Wf:0),this._needsManuallyCompositing),f.__builtin__||dr("ZLevel "+u+" has been used by unkown layer "+f.id),f!==i&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,t(l),i=f),a.__dirty&He&&!a.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(h,c){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,D(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?ht(n[e],t,!0):n[e]=t;for(var a=0;a-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.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}(Ft);const dz=pz;function _o(r,e){var t=r.mapDimensionsAll("defaultedLabel"),n=t.length;if(n===1){var a=io(r,e,t[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o=0&&n.push(e[i])}return n.join(" ")}var gz=function(r){O(e,r);function e(t,n,a,i){var o=r.call(this)||this;return o.updateData(t,n,a,i),o}return e.prototype._createSymbol=function(t,n,a,i,o){this.removeAll();var s=re(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=yz,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){cn(this.childAt(0))},e.prototype.downplay=function(){vn(this.childAt(0))},e.prototype.setZ=function(t,n){var a=this.childAt(0);a.zlevel=t,a.z=n},e.prototype.setDraggable=function(t,n){var a=this.childAt(0);a.draggable=t,a.cursor=!n&&t?"move":a.cursor},e.prototype.updateData=function(t,n,a,i){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=o!==this._symbolType,f=i&&i.disableAnimation;if(u){var h=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,l,h)}else{var c=this.childAt(0);c.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};f?c.attr(v):Mt(c,v,s,n),br(c)}if(this._updateCommon(t,n,l,a,i),u){var c=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,Gt(c,v,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,n,a,i,o){var s=this.childAt(0),l=t.hostModel,u,f,h,c,v,p,d,g,y;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,h=i.selectItemStyle,c=i.focus,v=i.blurScope,d=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,p=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(n),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),c=_.get("focus"),v=_.get("blurScope"),p=_.get("disabled"),d=oe(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=t.getItemVisual(n,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var w=fo(t.getItemVisual(n,"symbolOffset"),a);w&&(s.x=w[0],s.y=w[1]),y&&s.attr("cursor",y);var x=t.getItemVisual(n,"style"),b=x.fill;if(s instanceof ve){var T=s.style;s.useStyle(B({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(B({},x)):s.useStyle(x),s.style.decal=null,s.setColor(b,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=t.getItemVisual(n,"liftZ"),A=this._z2;C!=null?A==null&&(this._z2=s.z2,s.z2+=C):A!=null&&(s.z2=A,this._z2=null);var M=o&&o.useNameLabel;de(s,d,{labelFetcher:l,labelDataIndex:n,defaultText:L,inheritColor:b,defaultOpacity:x.opacity});function L(P){return M?t.getName(P):_o(t,P)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f;var E=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;I.scaleX=this._sizeX*E,I.scaleY=this._sizeY*E,this.setSymbolScale(1),Wt(this,c,v,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,n,a){var i=this.childAt(0),o=ot(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&Fn(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Fn(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,n){return Vs(t.getItemVisual(n,"symbolSize"))},e}(at);function yz(r,e){this.parent.drift(r,e)}const rl=gz;function wd(r,e,t,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(t))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function Hb(r){return r!=null&&!Q(r)&&(r={isIgnore:r}),r||{}}function $b(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:oe(e),cursorStyle:e.get("cursor")}}var mz=function(){function r(e){this.group=new at,this._SymbolCtor=e||rl}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=Hb(t);var n=this.group,a=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=$b(e),u={disableAnimation:s},f=t.getSymbolPoint||function(h){return e.getItemLayout(h)};i||n.removeAll(),e.diff(i).add(function(h){var c=f(h);if(wd(e,c,h,t)){var v=new o(e,h,l,u);v.setPosition(c),e.setItemGraphicEl(h,v),n.add(v)}}).update(function(h,c){var v=i.getItemGraphicEl(c),p=f(h);if(!wd(e,p,h,t)){n.remove(v);return}var d=e.getItemVisual(h,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==d)n.remove(v),v=new o(e,h,l,u),v.setPosition(p);else{v.updateData(e,h,l,u);var y={x:p[0],y:p[1]};s?v.attr(y):Mt(v,y,a)}n.add(v),e.setItemGraphicEl(h,v)}).remove(function(h){var c=i.getItemGraphicEl(h);c&&c.fadeOut(function(){n.remove(c)},a)}).execute(),this._getSymbolPoint=f,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(n,a){var i=e._getSymbolPoint(a);n.setPosition(i),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=$b(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=Hb(n);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0?t=n[0]:n[1]<0&&(t=n[1]),t}function Ub(r,e,t,n){var a=NaN;r.stacked&&(a=t.get(t.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=t.get(r.baseDim,n),o[1-i]=a,e.dataToPoint(o)}function Sz(r,e){var t=[];return e.diff(r).add(function(n){t.push({cmd:"+",idx:n})}).update(function(n,a){t.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){t.push({cmd:"-",idx:n})}).execute(),t}function xz(r,e,t,n,a,i,o,s){for(var l=Sz(r,e),u=[],f=[],h=[],c=[],v=[],p=[],d=[],g=Wb(a,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_=a||d<0)break;if(ui(y,m)){if(l){d+=i;continue}break}if(d===t)r[i>0?"moveTo":"lineTo"](y,m),h=y,c=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){d+=i;continue}if(o>0){for(var w=d+i,x=e[w*2],b=e[w*2+1];x===y&&b===m&&g=n||ui(x,b))v=y,p=m;else{A=x-u,M=b-f;var E=y-u,P=x-y,N=m-f,V=b-m,k=void 0,z=void 0;if(s==="x"){k=Math.abs(E),z=Math.abs(P);var H=A>0?1:-1;v=y-H*k*o,p=m,L=y+H*z*o,I=m}else if(s==="y"){k=Math.abs(N),z=Math.abs(V);var W=M>0?1:-1;v=y,p=m-W*k*o,L=y,I=m+W*z*o}else k=Math.sqrt(E*E+N*N),z=Math.sqrt(P*P+V*V),C=z/(z+k),v=y-A*o*(1-C),p=m-M*o*(1-C),L=y+A*o*C,I=m+M*o*C,L=jn(L,Qn(x,y)),I=jn(I,Qn(b,m)),L=Qn(L,jn(x,y)),I=Qn(I,jn(b,m)),A=L-y,M=I-m,v=y-A*k/z,p=m-M*k/z,v=jn(v,Qn(u,y)),p=jn(p,Qn(f,m)),v=Qn(v,jn(u,y)),p=Qn(p,jn(f,m)),A=y-v,M=m-p,L=y+A*z/k,I=m+M*z/k}r.bezierCurveTo(h,c,v,p,y,m),h=L,c=I}else r.lineTo(y,m)}u=y,f=m,d+=i}return g}var Yb=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),wz=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Yb},e.prototype.buildPath=function(t,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&ui(a[o*2-2],a[o*2-1]);o--);for(;i=0){var S=u?(p-l)*_+l:(v-s)*_+s;return u?[t,S]:[S,t]}s=v,l=p;break;case o.C:v=i[h++],p=i[h++],d=i[h++],g=i[h++],y=i[h++],m=i[h++];var w=u?Jl(s,v,d,y,t,f):Jl(l,p,g,m,t,f);if(w>0)for(var x=0;x=0){var S=u?ie(l,p,g,m,b):ie(s,v,d,y,b);return u?[t,S]:[S,t]}}s=y,l=m;break}}},e}(gt),bz=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(Yb),Zb=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new bz},e.prototype.buildPath=function(t,n){var a=n.points,i=n.stackedOnPoints,o=0,s=a.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&ui(a[s*2-2],a[s*2-1]);s--);for(;oe){i?t.push(o(i,l,e)):a&&t.push(o(a,l,0),o(a,l,e));break}else a&&(t.push(o(a,l,0)),a=null),t.push(l),i=l}return t}function Cz(r,e,t){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.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 a,i,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){i=n[o];break}}if(!i){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var l=e.getAxis(a),u=F(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var c=Dz(u,a==="x"?t.getWidth():t.getHeight()),v=c.length;if(!v&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[0]:u[0].color;var p=10,d=c[0].coord-p,g=c[v-1].coord+p,y=g-d;if(y<.001)return"transparent";D(c,function(_){_.offset=(_.coord-d)/y}),c.push({offset:v?c[v-1].offset:.5,color:h[1]||"transparent"}),c.unshift({offset:v?c[0].offset:.5,color:h[0]||"transparent"});var m=new ds(0,0,0,0,c,!0);return m[a]=d,m[a+"2"]=g,m}}function Az(r,e,t){var n=r.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=t.getAxesByScale("ordinal")[0];if(i&&!(a&&Mz(i,e))){var o=e.mapDimension(i.dim),s={};return D(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function Mz(r,e){var t=r.getExtent(),n=Math.abs(t[1]-t[0])/r.scale.count();isNaN(n)&&(n=0);for(var a=e.count(),i=Math.max(1,Math.round(a/5)),o=0;on)return!1;return!0}function Lz(r,e){return isNaN(r)||isNaN(e)}function Iz(r){for(var e=r.length/2;e>0&&Lz(r[e*2-2],r[e*2-1]);e--);return e-1}function tT(r,e){return[r[e*2],r[e*2+1]]}function Ez(r,e,t){for(var n=r.length/2,a=t==="x"?0:1,i,o,s=0,l=-1,u=0;u=e||i>=e&&o<=e){l=u;break}s=u,i=o}return{range:[s,l],t:(e-i)/(o-i)}}function eT(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var H=d.getState("emphasis").style;H.lineWidth=+d.style.lineWidth+1}ot(d).seriesIndex=t.seriesIndex,Wt(d,V,k,z);var W=Jb(t.get("smooth")),X=t.get("smoothMonotone");if(d.setShape({smooth:W,smoothMonotone:X,connectNulls:T}),g){var et=l.getCalculationInfo("stackedOnSeries"),rt=0;g.useStyle(tt(f.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),et&&(rt=Jb(et.get("smooth"))),g.setShape({smooth:W,stackedOnSmooth:rt,smoothMonotone:X,connectNulls:T}),pe(g,t,"areaStyle"),ot(g).seriesIndex=t.seriesIndex,Wt(g,V,k,z)}var mt=function(Lt){i._changePolyState(Lt)};l.eachItemGraphicEl(function(Lt){Lt&&(Lt.onHoverStateChange=mt)}),this._polyline.onHoverStateChange=mt,this._data=l,this._coordSys=o,this._stackedOnPoints=x,this._points=h,this._step=M,this._valueOrigin=S,t.get("triggerLineEvent")&&(this.packEventData(t,d),g&&this.packEventData(t,g))},e.prototype.packEventData=function(t,n){ot(n).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,n,a,i){var o=t.getData(),s=Da(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var c=t.get("zlevel")||0,v=t.get("z")||0;u=new rl(o,s),u.x=f,u.y=h,u.setZ(c,v);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=c,p.z=v,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Bt.prototype.highlight.call(this,t,n,a,i)},e.prototype.downplay=function(t,n,a,i){var o=t.getData(),s=Da(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Bt.prototype.downplay.call(this,t,n,a,i)},e.prototype._changePolyState=function(t){var n=this._polygon;Iu(this._polyline,t),n&&Iu(n,t)},e.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new wz({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(t,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new Zb({shape:{points:t,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},e.prototype._initSymbolLabelAnimation=function(t,n,a){var i,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):n.type==="polar"&&(i=s.dim==="angle",o=!0);var u=t.hostModel,f=u.get("animationDuration");q(f)&&(f=f(null));var h=u.get("animationDelay")||0,c=q(h)?h(null):h;t.eachItemGraphicEl(function(v,p){var d=v;if(d){var g=[v.x,v.y],y=void 0,m=void 0,_=void 0;if(a)if(o){var S=a,w=n.pointToCoord(g);i?(y=S.startAngle,m=S.endAngle,_=-w[1]/180*Math.PI):(y=S.r0,m=S.r,_=w[0])}else{var x=a;i?(y=x.x,m=x.x+x.width,_=v.x):(y=x.y+x.height,m=x.y,_=v.y)}var b=m===y?0:(_-y)/(m-y);l&&(b=1-b);var T=q(h)?h(p):f*b+c,C=d.getSymbolPath(),A=C.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,n,a){var i=t.getModel("endLabel");if(eT(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new At({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=Iz(l);f>=0&&(de(s,oe(t,"endLabel"),{inheritColor:a,labelFetcher:t,labelDataIndex:f,defaultText:function(h,c,v){return v!=null?Fb(o,v):_o(o,h)},enableTextSetter:!0},Pz(i,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,n,a,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){t<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var h=a.getLayout("points"),c=a.hostModel,v=c.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=n.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,w=(y?d:0)*(m?-1:1),x=(y?0:-d)*(m?-1:1),b=y?"x":"y",T=Ez(h,S,b),C=T.range,A=C[1]-C[0],M=void 0;if(A>=1){if(A>1&&!v){var L=tT(h,C[0]);u.attr({x:L[0]+w,y:L[1]+x}),o&&(M=c.getRawValue(C[0]))}else{var L=f.getPointOn(S,b);L&&u.attr({x:L[0]+w,y:L[1]+x});var I=c.getRawValue(C[0]),E=c.getRawValue(C[1]);o&&(M=U0(a,p,I,E,T.t))}i.lastFrameIndex=C[0]}else{var P=t===1||i.lastFrameIndex>0?C[0]:0,L=tT(h,P);o&&(M=c.getRawValue(P)),u.attr({x:L[0]+w,y:L[1]+x})}o&&qi(u).setLabelText(M)}},e.prototype._doUpdateAnimation=function(t,n,a,i,o,s,l){var u=this._polyline,f=this._polygon,h=t.hostModel,c=xz(this._data,t,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),v=c.current,p=c.stackedOnCurrent,d=c.next,g=c.stackedOnNext;if(o&&(v=Jn(c.current,a,o,l),p=Jn(c.stackedOnCurrent,a,o,l),d=Jn(c.next,a,o,l),g=Jn(c.stackedOnNext,a,o,l)),Qb(v,d)>3e3||f&&Qb(p,g)>3e3){u.stopAnimation(),u.setShape({points:d}),f&&(f.stopAnimation(),f.setShape({points:d,stackedOnPoints:g}));return}u.shape.__points=c.current,u.shape.points=v;var y={shape:{points:d}};c.current!==v&&(y.shape.__points=c.next),u.stopAnimation(),Mt(u,y,h),f&&(f.setShape({points:v,stackedOnPoints:p}),f.stopAnimation(),Mt(f,{shape:{stackedOnPoints:g}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=c.status,S=0;S<_.length;S++){var w=_[S].cmd;if(w==="="){var x=t.getItemGraphicEl(_[S].idx1);x&&m.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var b=u.shape.__points,T=0;Te&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(f[1]-f[0])*(h||1),v=Math.round(s/c);if(isFinite(v)&&v>1){i==="lttb"&&e.setData(a.lttbDownSample(a.mapDimension(u.dim),1/v));var p=void 0;U(i)?p=Oz[i]:q(i)&&(p=i),p&&e.setData(a.downSample(a.mapDimension(u.dim),1/v,p,kz))}}}}}function Vz(r){r.registerChartView(Nz),r.registerSeriesModel(dz),r.registerLayout(al("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,rT("line"))}var nT=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return yn(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,n,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),s=i.dataToPoint(o);if(a)D(i.getAxes(),function(c,v){if(c.type==="category"&&n!=null){var p=c.getTicksCoords(),d=o[v],g=n[v]==="x1"||n[v]==="y1";if(g&&(d+=1),p.length<2)return;if(p.length===2){s[v]=c.toGlobalCoord(c.getExtent()[g?1:0]);return}for(var y=void 0,m=void 0,_=1,S=0;Sd){m=(w+y)/2;break}S===1&&(_=x-p[0].tickValue)}m==null&&(y?y&&(m=p[p.length-1].coord):m=p[0].coord),s[v]=c.toGlobalCoord(m)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),h=i.getBaseAxis().isHorizontal()?0:1;s[h]+=u+f/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Ft);Ft.registerClass(nT);const Yf=nT;var Bz=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return yn(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>t&&(t=n),t},e.prototype.brushSelector=function(t,n,a){return a.rect(n.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=$n(Yf.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}(Yf);const zz=Bz;var Gz=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),Fz=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new Gz},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,f=n.startAngle,h=n.endAngle,c=n.clockwise,v=Math.PI*2,p=c?h-fMath.PI/2&&fs)return!0;s=h}return!1},e.prototype._isOrderDifferentInView=function(t,n){for(var a=n.scale,i=a.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,n,a,i){if(this._isOrderChangedWithinSameData(t,n,a)){var o=this._dataSort(t,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,n,a){var i=n.baseAxis,o=this._dataSort(t,i,function(s){return t.get(t.mapDimension(n.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(t,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var n=this.group,a=this._data;t&&t.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){gs(i,t,ot(i).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}(Bt),aT={cartesian2d:function(r,e){var t=e.width<0?-1:1,n=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var a=r.x+r.width,i=r.y+r.height,o=Dd(e.x,r.x),s=Cd(e.x+e.width,a),l=Dd(e.y,r.y),u=Cd(e.y+e.height,i),f=sa?s:o,e.y=h&&l>i?u:l,e.width=f?0:s-o,e.height=h?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),f||h},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}var a=Cd(e.r,r.r),i=Dd(e.r0,r.r0);e.r=a,e.r0=i;var o=a-i<0;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},iT={cartesian2d:function(r,e,t,n,a,i,o,s,l){var u=new Tt({shape:B({},n),z2:1});if(u.__dataIndex=t,u.name="item",i){var f=u.shape,h=a?"height":"width";f[h]=0}return u},polar:function(r,e,t,n,a,i,o,s,l){var u=!a&&l?Zf:Oe,f=new u({shape:n,z2:1});f.name="item";var h=uT(a);if(f.calculateTextPosition=Hz(h,{isRoundCap:u===Zf}),i){var c=f.shape,v=a?"r":"endAngle",p={};c[v]=a?n.r0:n.startAngle,p[v]=n[v],(s?Mt:Gt)(f,{shape:p},i)}return f}};function Yz(r,e){var t=r.get("realtimeSort",!0),n=e.getBaseAxis();if(process.env.NODE_ENV!=="production"&&t&&(n.type!=="category"&&$t("`realtimeSort` will not work because this bar series is not based on a category axis."),e.type!=="cartesian2d"&&$t("`realtimeSort` will not work because this bar series is not on cartesian2d.")),t&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function oT(r,e,t,n,a,i,o,s){var l,u;i?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Mt:Gt)(t,{shape:l},e,a,null);var f=e?r.baseAxis.model:null;(o?Mt:Gt)(t,{shape:u},f,a)}function sT(r,e){for(var t=0;t0?1:-1,o=n.height>0?1:-1;return{x:n.x+i*a/2,y:n.y+o*a/2,width:n.width-i*a,height:n.height-o*a}},polar:function(r,e,t){var n=r.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 qz(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function uT(r){return function(e){var t=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+t;default:return n}}}(r)}function fT(r,e,t,n,a,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var f=r.shape,h=hi(n.getModel("itemStyle"),f,!0);B(f,h),r.setShape(f)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var c=n.getShallow("cursor");c&&r.attr("cursor",c);var v=s?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",p=oe(n);de(r,p,{labelFetcher:i,labelDataIndex:t,defaultText:_o(i.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var d=r.getTextContent();if(s&&d){var g=n.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,$z(r,g==="outside"?v:g,uT(o),n.get(["label","rotate"]))}M1(d,p,i.getRawValue(t),function(m){return Fb(e,m)});var y=n.getModel(["emphasis"]);Wt(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),pe(r,n),qz(a)&&(r.style.fill="none",r.style.stroke="none",D(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function Kz(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,a=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,a,i)}var jz=function(){function r(){}return r}(),hT=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new jz},e.prototype.buildPath=function(t,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?t:null},30,!1);function Qz(r,e,t){for(var n=r.baseDimIdx,a=1-n,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=i.length/3;f=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[f]}return-1}function pT(r,e,t){if(fi(t,"cartesian2d")){var n=e,a=t.getArea();return{x:r?n.x:a.x,y:r?a.y:n.y,width:r?n.width:a.width,height:r?a.height:n.height}}else{var a=t.getArea(),i=e;return{cx:a.cx,cy:a.cy,r0:r?a.r0:i.r0,r:r?a.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function Jz(r,e,t){var n=r.type==="polar"?Oe:Tt;return new n({shape:pT(e,t,r),silent:!0,z2:0})}const t5=Uz;function e5(r){r.registerChartView(t5),r.registerSeriesModel(zz),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,st(Ew,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Pw("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,rT("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(a){e.sortInfo&&a.axis.setCategorySortInfo(e.sortInfo)})})}var jf=Math.PI*2,dT=Math.PI/180;function gT(r,e){return ae(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function yT(r,e){var t=gT(r,e),n=r.get("center"),a=r.get("radius");G(a)||(a=[0,a]);var i=$(t.width,e.getWidth()),o=$(t.height,e.getHeight()),s=Math.min(i,o),l=$(a[0],s/2),u=$(a[1],s/2),f,h,c=r.coordinateSystem;if(c){var v=c.dataToPoint(n);f=v[0]||0,h=v[1]||0}else G(n)||(n=[n,n]),f=$(n[0],i)+t.x,h=$(n[1],o)+t.y;return{cx:f,cy:h,r0:l,r:u}}function r5(r,e,t){e.eachSeriesByType(r,function(n){var a=n.getData(),i=a.mapDimension("value"),o=gT(n,t),s=yT(n,t),l=s.cx,u=s.cy,f=s.r,h=s.r0,c=-n.get("startAngle")*dT,v=n.get("minAngle")*dT,p=0;a.each(i,function(A){!isNaN(A)&&p++});var d=a.getSum(i),g=Math.PI/(d||p)*2,y=n.get("clockwise"),m=n.get("roseType"),_=n.get("stillShowZeroSum"),S=a.getDataExtent(i);S[0]=0;var w=jf,x=0,b=c,T=y?1:-1;if(a.setLayout({viewRect:o,r:f}),a.each(i,function(A,M){var L;if(isNaN(A)){a.setItemLayout(M,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:l,cy:u,r0:h,r:m?NaN:f});return}m!=="area"?L=d===0&&_?g:A*g:L=jf/p,Lt?y:g,w=Math.abs(_.label.y-t);if(w>=S.maxY){var x=_.label.x-e-_.len2*a,b=n+_.len,T=Math.abs(x)r.unconstrainedWidth?null:v:null;n.setStyle("width",p)}var d=n.getBoundingRect();i.width=d.width;var g=(n.style.margin||0)+2.1;i.height=d.height+g,i.y-=(i.height-h)/2}}}function Ad(r){return r.position==="center"}function i5(r){var e=r.getData(),t=[],n,a,i=!1,o=(r.get("minShowLabelAngle")||0)*n5,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,f=s.x,h=s.y,c=s.height;function v(x){x.ignore=!0}function p(x){if(!x.ignore)return!0;for(var b in x.states)if(x.states[b].ignore===!1)return!0;return!1}e.each(function(x){var b=e.getItemGraphicEl(x),T=b.shape,C=b.getTextContent(),A=b.getTextGuideLine(),M=e.getItemModel(x),L=M.getModel("label"),I=L.get("position")||M.get(["emphasis","label","position"]),E=L.get("distanceToLabelLine"),P=L.get("alignTo"),N=$(L.get("edgeDistance"),u),V=L.get("bleedMargin"),k=M.getModel("labelLine"),z=k.get("length");z=$(z,u);var H=k.get("length2");if(H=$(H,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":X>0?"left":"right"}var Xt=Math.PI,Yt=0,be=L.get("rotate");if(Ct(be))Yt=be*(Xt/180);else if(I==="center")Yt=0;else if(be==="radial"||be===!0){var Dn=X<0?-W+Xt:-W;Yt=Dn}else if(be==="tangential"&&I!=="outside"&&I!=="outer"){var Fe=Math.atan2(X,et);Fe<0&&(Fe=Xt*2+Fe);var Zh=et>0;Zh&&(Fe=Xt+Fe),Yt=Fe-Xt}if(i=!!Yt,C.x=rt,C.y=mt,C.rotation=Yt,C.setStyle({verticalAlign:"middle"}),it){C.setStyle({align:yt});var vm=C.states.select;vm&&(vm.x+=C.x,vm.y+=C.y)}else{var ua=C.getBoundingRect().clone();ua.applyTransform(C.getComputedTransform());var MI=(C.style.margin||0)+2.1;ua.y-=MI/2,ua.height+=MI,t.push({label:C,labelLine:A,position:I,len:z,len2:H,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new ut(X,et),linePoints:Lt,textAlign:yt,labelDistance:E,labelAlignTo:P,edgeDistance:N,bleedMargin:V,rect:ua,unconstrainedWidth:ua.width,labelStyleWidth:C.style.width})}b.setTextConfig({inside:it})}}),!i&&r.get("avoidLabelOverlap")&&a5(t,n,a,l,u,c,f,h);for(var d=0;d0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h=i.r0}},e.type="pie",e}(Bt);const l5=s5;function So(r,e,t){e=G(e)&&{coordDimensions:e}||B({encodeDefine:r.getEncode()},e);var n=r.getSource(),a=Ys(n,e).dimensions,i=new Le(a,r);return i.initData(n,t),i}var u5=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,t)},r}();const ol=u5;var f5=bt(),h5=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ol(Z(this.getData,this),Z(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return So(this,{coordDimensions:["value"],encodeDefaulter:st(tp,this)})},e.prototype.getDataParams=function(t){var n=this.getData(),a=f5(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),i=a.seats=m2(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){Ta(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,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}(Ft);const c5=h5;function v5(r){return{seriesType:r,reset:function(e,t){var n=e.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(Ct(o)&&!isNaN(o)&&o<0)})}}}function p5(r){r.registerChartView(l5),r.registerSeriesModel(c5),xx("pie",r.registerAction),r.registerLayout(st(r5,"pie")),r.registerProcessor(il("pie")),r.registerProcessor(v5("pie"))}var d5=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return yn(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,n,a){return a.point(n.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Ft);const g5=d5;var ST=4,y5=function(){function r(){}return r}(),m5=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new y5},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,n){var a=n.points,i=n.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]=0;u--){var f=u*2,h=i[f]-s/2,c=i[f+1]-l/2;if(t>=h&&n>=c&&t<=h+s&&n<=c+l)return u}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.points,i=n.size,o=i[0],s=i[1],l=1/0,u=1/0,f=-1/0,h=-1/0,c=0;c=0&&(u.dataIndex=h+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const S5=_5;var x5=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._symbolDraw.incrementalUpdate(t,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=t.end===n.getData().count()},e.prototype.updateTransform=function(t,n,a){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=al("").reset(t,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var n=t.coordinateSystem,a=n&&n.getArea&&n.getArea();return t.get("clip",!0)?a:null},e.prototype._updateSymbolDraw=function(t,n){var a=this._symbolDraw,i=n.pipelineContext,o=i.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new S5:new nl,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Bt);const w5=x5;var b5=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(xt);const T5=b5;var Md=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",te).models[0]},e.type="cartesian2dAxis",e}(xt);jt(Md,qs);var xT={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)"]}}},D5=ht({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},xT),Ld=ht({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}}},xT),C5=ht({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Ld),A5=tt({logBase:10},Ld);const wT={category:D5,value:Ld,time:C5,log:A5};var M5={value:1,category:1,time:1,log:1};function xo(r,e,t,n){D(M5,function(a,i){var o=ht(ht({},wT[i],!0),n,!0),s=function(l){O(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=e+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var c=Ds(this),v=c?to(f):{},p=h.getTheme();ht(f,p.get(i+"Axis")),ht(f,this.getDefaultOption()),f.type=bT(f),c&&Wn(f,v,c)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=qp.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+i,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",bT)}function bT(r){return r.type||(r.data?"category":"value")}var L5=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return F(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Rt(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}();const I5=L5;var Id=["x","y"];function TT(r){return r.type==="interval"||r.type==="time"}var E5=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Id,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!TT(t)||!TT(n))){var a=t.getExtent(),i=n.getExtent(),o=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),l=a[1]-a[0],u=i[1]-i[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,c=o[0]-a[0]*f,v=o[1]-i[0]*h,p=this._transform=[f,0,0,h,c,v];this._invTransform=Ii([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var n=this.getAxis("x"),a=this.getAxis("y");return n.contain(n.toLocalCoord(t[0]))&&a.contain(a.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,n){var a=this.dataToPoint(t),i=this.dataToPoint(n),o=this.getArea(),s=new ct(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,n,a){a=a||[];var i=t[0],o=t[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return he(a,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,n)),a[1]=l.toGlobalCoord(l.dataToCoord(o,n)),a},e.prototype.clampData=function(t,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),s=i.getExtent(),l=a.parse(t[0]),u=i.parse(t[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(t,n){var a=[];if(this._invTransform)return he(a,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(t[0]),n),a[1]=o.coordToData(o.toLocalCoord(t[1]),n),a},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(t[0],t[1]),i=Math.min(n[0],n[1]),o=Math.max(t[0],t[1])-a,s=Math.max(n[0],n[1])-i;return new ct(a,i,o,s)},e}(I5),P5=function(r){O(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),t&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(t,n){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Mr);const R5=P5;function Ed(r,e,t){t=t||{};var n=r.coordinateSystem,a=e.axis,i={},o=a.getAxesOnZeroOf()[0],s=a.position,l=o?"onZero":s,u=a.dim,f=n.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],c={left:0,right:1,top:0,bottom:1,onZero:2},v=e.get("offset")||0,p=u==="x"?[h[2]-v,h[3]+v]:[h[0]-v,h[1]+v];if(o){var d=o.toGlobalCoord(o.dataToCoord(0));p[c.onZero]=Math.max(Math.min(d,p[1]),p[0])}i.position=[u==="y"?p[c[l]]:h[0],u==="x"?p[c[l]]:h[3]],i.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[s],i.labelOffset=o?p[c[s]]-p[c.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Qt(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var y=e.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-y:y,i.z2=1,i}function DT(r){return r.get("coordinateSystem")==="cartesian2d"}function CT(r){var e={xAxisModel:null,yAxisModel:null};return D(e,function(t,n){var a=n.replace(/Model$/,""),i=r.getReferringComponents(a,te).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error(a+' "'+gr(r.get(a+"Index"),r.get(a+"Id"),0)+'" not found');e[n]=i}),e}var Pd=Math.log;function AT(r,e,t){var n=Kn.prototype,a=n.getTicks.call(t),i=n.getTicks.call(t,!0),o=a.length-1,s=n.getInterval.call(t),l=Fw(r,e),u=l.extent,f=l.fixMin,h=l.fixMax;if(r.type==="log"){var c=Pd(r.base);u=[Pd(u[0])/c,Pd(u[1])/c]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var v=n.getExtent.call(r);f&&(u[0]=v[0]),h&&(u[1]=v[1]);var p=n.getInterval.call(r),d=u[0],g=u[1];if(f&&h)p=(g-d)/o;else if(f)for(g=u[0]+p*o;gu[0]&&isFinite(d)&&isFinite(u[0]);)p=jp(p),d=u[1]-p*o;else{var y=r.getTicks().length-1;y>o&&(p=jp(p));var m=p*o;g=Math.ceil(u[1]/p)*p,d=Zt(g-m),d<0&&u[0]>=0?(d=0,g=Zt(m)):g>0&&u[1]<=0&&(g=0,d=-Zt(m))}var _=(a[0].value-i[0].value)/s,S=(a[o].value-i[o].value)/s;if(n.setExtent.call(r,d+p*_,g+p*S),n.setInterval.call(r,p),(_||S)&&n.setNiceExtent.call(r,d+p,g-p),process.env.NODE_ENV!=="production"){var w=n.getTicks.call(r);w[1]&&(!bV(p)||qc(w[1].value)>qc(p))&&$t("The ticks may be not readable when set min: "+e.get("min")+", max: "+e.get("max")+" and alignTicks: true")}}var N5=function(){function r(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Id,this._initCartesian(e,t,n),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model);function a(o){var s,l=St(o),u=l.length;if(u){for(var f=[],h=u-1;h>=0;h--){var c=+l[h],v=o[c],p=v.model,d=v.scale;Kp(d)&&p.get("alignTicks")&&p.get("interval")==null?f.push(v):(yo(d,p),Kp(d)&&(s=v))}f.length&&(s||(s=f.pop(),yo(s.scale,s.model)),D(f,function(g){AT(g.scale,g.model,s.scale)}))}}a(n.x),a(n.y);var i={};D(n.x,function(o){MT(n,"y",o,i)}),D(n.y,function(o){MT(n,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,n){var a=e.getBoxLayoutParams(),i=!n&&e.get("containLabel"),o=ae(a,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),i&&(D(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=XV(u);if(f){var h=u.isHorizontal()?"height":"width",c=u.model.get(["axisLabel","margin"]);o[h]-=f[h]+c,u.position==="top"?o.y+=f.height+c:u.position==="left"&&(o.x+=f.width+c)}}}),l()),D(this._coordsList,function(u){u.calcAffineTransform()});function l(){D(s,function(u){var f=u.isHorizontal(),h=f?[0,o.width]:[0,o.height],c=u.inverse?1:0;u.setExtent(h[c],h[1-c]),O5(u,f?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n="x"+e+"y"+t;return this._coordsMap[n]}Q(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var a=0,i=this._coordsList;a0?"top":"bottom",i="center"):du(a-ta)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a0?"right":"left":i=n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),IT={axisLine:function(r,e,t,n){var a=e.get(["axisLine","show"]);if(a==="auto"&&r.handleAutoShown&&(a=r.handleAutoShown("axisLine")),!!a){var i=e.axis.getExtent(),o=n.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];o&&(he(s,s,o),he(l,l,o));var f=B({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new fe({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Zi(h.shape,h.style.lineWidth),h.anid="line",t.add(h);var c=e.get(["axisLine","symbol"]);if(c!=null){var v=e.get(["axisLine","symbolSize"]);U(c)&&(c=[c,c]),(U(v)||Ct(v))&&(v=[v,v]);var p=fo(e.get(["axisLine","symbolOffset"])||0,v),d=v[0],g=v[1];D([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,m){if(c[m]!=="none"&&c[m]!=null){var _=re(c[m],-d/2,-g/2,d,g,f.stroke,!0),S=y.r+y.offset,w=u?l:s;_.attr({rotation:y.rotate,x:w[0]+S*Math.cos(r.rotation),y:w[1]-S*Math.sin(r.rotation),silent:!0,z2:11}),t.add(_)}})}}},axisTickLabel:function(r,e,t,n){var a=z5(t,n,e,r),i=F5(t,n,e,r);if(B5(e,i,a),G5(t,n,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=lb(F(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));hb(o)}},axisName:function(r,e,t,n){var a=Qt(r.axisName,e.get("name"));if(a){var i=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),f=u[0]>u[1]?-1:1,h=[i==="start"?u[0]-f*l:i==="end"?u[1]+f*l:(u[0]+u[1])/2,PT(i)?r.labelOffset+o*l:0],c,v=e.get("nameRotate");v!=null&&(v=v*ta/180);var p;PT(i)?c=ci.innerTextLayout(r.rotation,v??r.rotation,o):(c=V5(r.rotation,i,v||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(c.rotation)),!isFinite(p)&&(p=null)));var d=s.getFont(),g=e.get("nameTruncate",!0)||{},y=g.ellipsis,m=Qt(r.nameTruncateMaxWidth,g.maxWidth,p),_=new At({x:h[0],y:h[1],rotation:c.rotation,silent:ci.isLabelSilent(e),style:kt(s,{text:a,font:d,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(Xi({el:_,componentModel:e,itemName:a}),_.__fullText=a,_.anid="name",e.get("triggerEvent")){var S=ci.makeAxisEventDataBase(e);S.targetType="axisName",S.name=a,ot(_).eventData=S}n.add(_),_.updateTransform(),t.add(_),_.decomposeTransform()}}};function V5(r,e,t,n){var a=L0(t-r),i,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return du(a-ta/2)?(o=l?"bottom":"top",i="center"):du(a-ta*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",ata/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function B5(r,e,t){if(!Hw(r.axis)){var n=r.get(["axisLabel","showMinLabel"]),a=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var i=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],f=t[1],h=t[t.length-1],c=t[t.length-2];n===!1?(ur(i),ur(u)):ET(i,o)&&(n?(ur(o),ur(f)):(ur(i),ur(u))),a===!1?(ur(s),ur(h)):ET(l,s)&&(a?(ur(l),ur(c)):(ur(s),ur(h)))}}function ur(r){r&&(r.ignore=!0)}function ET(r,e){var t=r&&r.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!t||!n)){var a=Ul([]);return ga(a,a,-r.rotation),t.applyTransform(rn([],a,r.getLocalTransform())),n.applyTransform(rn([],a,e.getLocalTransform())),t.intersect(n)}}function PT(r){return r==="middle"||r==="center"}function RT(r,e,t,n,a){for(var i=[],o=[],s=[],l=0;l=0||r===e}function Z5(r){var e=Od(r);if(e){var t=e.axisPointerModel,n=e.axis.scale,a=t.option,i=t.get("status"),o=t.get("value");o!=null&&(o=n.parse(o));var s=kd(t);i==null&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=tt({color:p.color},l));var g=ht(nt(p),{boundaryGap:t,splitNumber:n,scale:a,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:c},!1);if(U(f)){var y=g.name;g.name=f.replace("{value}",y??"")}else q(f)&&(g.name=f(g.name,g));var m=new Vt(g,null,this.ecModel);return jt(m,qs.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=v},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ht({lineStyle:{color:"#bbb"}},ll.axisLine),axisLabel:Qf(ll.axisLabel,!1),axisTick:Qf(ll.axisTick,!1),splitLine:Qf(ll.splitLine,!0),splitArea:Qf(ll.splitArea,!0),indicator:[]},e}(xt);const uG=lG;var fG=["axisLine","axisTickLabel","axisName"],hG=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group;i.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var n=t.coordinateSystem,a=n.getIndicatorAxes(),i=F(a,function(o){var s=o.model.get("showName")?o.name:"",l=new _n(o.model,{axisName:s,position:[n.cx,n.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});D(i,function(o){D(fG,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var n=t.coordinateSystem,a=n.getIndicatorAxes();if(!a.length)return;var i=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),h=s.get("show"),c=l.get("color"),v=u.get("color"),p=G(c)?c:[c],d=G(v)?v:[v],g=[],y=[];function m(P,N,V){var k=V%N.length;return P[k]=P[k]||[],k}if(i==="circle")for(var _=a[0].getTicksCoords(),S=n.cx,w=n.cy,x=0;x<_.length;x++){if(f){var b=m(g,p,x);g[b].push(new Hr({shape:{cx:S,cy:w,r:_[x].coord}}))}if(h&&x<_.length-1){var b=m(y,d,x);y[b].push(new Nu({shape:{cx:S,cy:w,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,C=F(a,function(P,N){var V=P.getTicksCoords();return T=T==null?V.length-1:Math.min(V.length-1,T),F(V,function(k){return n.coordToPoint(k.coord,N)})}),A=[],x=0;x<=T;x++){for(var M=[],L=0;L3?1.4:o>1?1.2:1.1,f=i>0?u:1/u;Gd(this,"zoom","zoomOnMouseWheel",t,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(a){var h=Math.abs(i),c=(i>0?1:-1)*(h>3?.4:h>1?.15:.05);Gd(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:c,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!$T(this._zr,"globalPan")){var n=t.pinchScale>1?1.1:1/1.1;Gd(this,"zoom",null,t,{scale:n,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(Xe);function Gd(r,e,t,n,a){r.pointerChecker&&r.pointerChecker(n,a.originX,a.originY)&&(en(n.event),WT(r,e,t,n,a))}function WT(r,e,t,n,a){a.isAvailableBehavior=Z(Jf,null,t,n),r.trigger(e,a)}function Jf(r,e,t){var n=t[r];return!r||n&&(!U(n)||e.event[n+"Key"])}const ul=xG;function Fd(r,e,t){var n=r.target;n.x+=e,n.y+=t,n.dirty()}function Hd(r,e,t,n){var a=r.target,i=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,a.x-=(t-a.x)*(u-1),a.y-=(n-a.y)*(u-1),a.scaleX*=u,a.scaleY*=u,a.dirty()}var wG={axisPointer:1,tooltip:1,brush:1};function th(r,e,t){var n=e.getComponentByElement(r.topTarget),a=n&&n.coordinateSystem;return n&&n!==t&&!wG.hasOwnProperty(n.mainType)&&a&&a.model!==t}function UT(r){if(U(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var $d,eh={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},YT=St(eh),rh={"alignment-baseline":"textBaseline","stop-color":"stopColor"},ZT=St(rh),bG=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var n=UT(e);if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Illegal svg");this._defsUsePending=[];var a=new at;this._root=a;var i=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||t.width),l=parseFloat(n.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Ze(n,a,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,a,i,null,!1,!1),u=u.nextSibling;CG(this._defs,this._defsUsePending),this._defsUsePending=[];var f,h;if(o){var c=nh(o);c.length>=4&&(f={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(f&&s!=null&&l!=null&&(h=eD(f,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var v=a;a=new at,a.add(v),v.scaleX=v.scaleY=h.scale,v.x=h.x,v.y=h.y}return!t.ignoreRootClip&&s!=null&&l!=null&&a.setClipPath(new Tt({shape:{x:0,y:0,width:s,height:l}})),{root:a,width:s,height:l,viewBoxRect:f,viewBoxTransform:h,named:i}},r.prototype._parseNode=function(e,t,n,a,i,o){var s=e.nodeName.toLowerCase(),l,u=a;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!i){var f=$d[s];if(f&&Y($d,s)){l=f.call(this,e,t);var h=e.getAttribute("name");if(h){var c={name:h,namedFrom:null,svgNodeTagLower:s,el:l};n.push(c),s==="g"&&(u=c)}else a&&n.push({name:a.name,namedFrom:a,svgNodeTagLower:s,el:l});t.add(l)}}var v=XT[s];if(v&&Y(XT,s)){var p=v.call(this,e),d=e.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,n,u,i,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(e,t){var n=new ss({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});fr(t,n),Ze(e,n,this._defsUsePending,!1,!1),TG(n,t);var a=n.style,i=a.fontSize;i&&i<9&&(a.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9);var o=(a.fontSize||a.fontFamily)&&[a.fontStyle,a.fontWeight,(a.fontSize||12)+"px",a.fontFamily||"sans-serif"].join(" ");a.font=o;var s=n.getBoundingRect();return this._textX+=s.width,t.add(n),n},r.internalField=function(){$d={g:function(e,t){var n=new at;return fr(t,n),Ze(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new Tt;return fr(t,n),Ze(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new Hr;return fr(t,n),Ze(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new fe;return fr(t,n),Ze(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new Pv;return fr(t,n),Ze(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n=e.getAttribute("points"),a;n&&(a=jT(n));var i=new ke({shape:{points:a||[]},silent:!0});return fr(t,i),Ze(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n=e.getAttribute("points"),a;n&&(a=jT(n));var i=new Ve({shape:{points:a||[]},silent:!0});return fr(t,i),Ze(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new ve;return fr(t,n),Ze(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",a=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(a)+parseFloat(o);var s=new at;return fr(t,s),Ze(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var n=e.getAttribute("x"),a=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),a!=null&&(this._textY=parseFloat(a));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new at;return fr(t,s),Ze(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,t){var n=e.getAttribute("d")||"",a=j_(n);return fr(t,a),Ze(e,a,this._defsUsePending,!1,!1),a.silent=!0,a}}}(),r}(),XT={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),n=parseInt(r.getAttribute("x2")||"10",10),a=parseInt(r.getAttribute("y2")||"0",10),i=new ds(e,t,n,a);return qT(r,i),KT(r,i),i},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),n=parseInt(r.getAttribute("r")||"0",10),a=new c1(e,t,n);return qT(r,a),KT(r,a),a}};function qT(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function KT(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var n=t.getAttribute("offset"),a=void 0;n&&n.indexOf("%")>0?a=parseInt(n,10)/100:n?a=parseFloat(n):a=0;var i={};tD(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:a,color:o})}t=t.nextSibling}}function fr(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),tt(e.__inheritedStyle,r.__inheritedStyle))}function jT(r){for(var e=nh(r),t=[],n=0;n0;i-=2){var o=n[i],s=n[i-1],l=nh(o);switch(a=a||Ke(),s){case"translate":Pr(a,a,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":cc(a,a,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":ga(a,a,-parseFloat(l[0])*Wd);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Wd);rn(a,[1,0,u,1,0,0],a);break;case"skewY":var f=Math.tan(parseFloat(l[0])*Wd);rn(a,[1,f,0,1,0,0],a);break;case"matrix":a[0]=parseFloat(l[0]),a[1]=parseFloat(l[1]),a[2]=parseFloat(l[2]),a[3]=parseFloat(l[3]),a[4]=parseFloat(l[4]),a[5]=parseFloat(l[5]);break}}e.setLocalTransform(a)}}var JT=/([^\s:;]+)\s*:\s*([^:;]+)/g;function tD(r,e,t){var n=r.getAttribute("style");if(n){JT.lastIndex=0;for(var a;(a=JT.exec(n))!=null;){var i=a[1],o=Y(eh,i)?eh[i]:null;o&&(e[o]=a[2]);var s=Y(rh,i)?rh[i]:null;s&&(t[s]=a[2])}}}function IG(r,e,t){for(var n=0;n0,g={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:c};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,n),this._updateMapSelectHandler(e,u,n,a)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=K(),n=K(),a=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function f(v,p){return p&&(v=p(v)),v&&[v[0]*i.scaleX+i.x,v[1]*i.scaleY+i.y]}function h(v){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(c=a);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;de(e,oe(n),{labelFetcher:c,labelDataIndex:h,defaultText:t},v);var p=e.getTextContent();if(p&&(nD(p).ignore=p.ignore,e.textConfig&&o)){var d=e.getBoundingRect().clone();e.textConfig.layoutRect=d,e.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function sD(r,e,t,n,a,i){r.data?r.data.setItemGraphicEl(i,e):ot(e).eventData={componentType:"geo",componentIndex:a.componentIndex,geoIndex:a.componentIndex,name:t,region:n&&n.option||{}}}function lD(r,e,t,n,a){r.data||Xi({el:e,componentModel:a,itemName:t,itemTooltipOption:n.get("tooltip")})}function uD(r,e,t,n,a){e.highDownSilentOnTouch=!!a.get("selectedMode");var i=n.getModel("emphasis"),o=i.get("focus");return Wt(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&KP(e,a,t),o}function fD(r,e,t){var n=[],a;function i(){a=[]}function o(){a.length&&(n.push(a),a=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&a.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),D(r,function(l){s.lineStart();for(var u=0;u-1&&(a.style.stroke=a.style.fill,a.style.fill="#fff",a.style.lineWidth=2),a},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Ft);const QG=jG;function JG(r,e){var t={};return D(r,function(n){n.each(n.mapDimension("value"),function(a,i){var o="ec-"+n.getName(i);t[o]=t[o]||[],isNaN(a)||t[o].push(a)})}),r[0].map(r[0].mapDimension("value"),function(n,a){for(var i="ec-"+r[0].getName(a),o=0,s=1/0,l=-1/0,u=t[i].length,f=0;f1?(S.width=_,S.height=_/g):(S.height=_,S.width=_*g),S.y=m[1]-S.height/2,S.x=m[0]-S.width/2;else{var w=r.getBoxLayoutParams();w.aspect=g,S=ae(w,{width:p,height:d})}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function aF(r,e){D(e.get("geoCoord"),function(t,n){r.addGeoCoord(n,t)})}var iF=function(){function r(){this.dimensions=pD}return r.prototype.create=function(e,t){var n=[];function a(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new yD(l+s,l,B({nameMap:o.get("nameMap")},a(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=mD,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=n[l]}});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),D(i,function(o,s){var l=F(o,function(f){return f.get("nameMap")}),u=new yD(s,s,B({nameMap:jh(l)},a(o[0])));u.zoomLimit=Qt.apply(null,F(o,function(f){return f.get("scaleLimit")})),n.push(u),u.resize=mD,u.resize(o[0],t),D(o,function(f){f.coordinateSystem=u,aF(u,f)})}),n},r.prototype.getFilledRegions=function(e,t,n,a){for(var i=(e||[]).slice(),o=K(),s=0;s=0;o--){var s=a[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function pF(r,e){var t=r.isExpand?r.children:[],n=r.parentNode.children,a=r.hierNode.i?n[r.hierNode.i-1]:null;if(t.length){yF(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;a?(r.hierNode.prelim=a.hierNode.prelim+e(r,a),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else a&&(r.hierNode.prelim=a.hierNode.prelim+e(r,a));r.parentNode.hierNode.defaultAncestor=mF(r,a,r.parentNode.hierNode.defaultAncestor||n[0],e)}function dF(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function wD(r){return arguments.length?r:xF}function cl(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function gF(r,e){return ae(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function yF(r){for(var e=r.children,t=e.length,n=0,a=0;--t>=0;){var i=e[t];i.hierNode.prelim+=n,i.hierNode.modifier+=n,a+=i.hierNode.change,n+=i.hierNode.shift+a}}function mF(r,e,t,n){if(e){for(var a=r,i=r,o=i.parentNode.children[0],s=e,l=a.hierNode.modifier,u=i.hierNode.modifier,f=o.hierNode.modifier,h=s.hierNode.modifier;s=Xd(s),i=qd(i),s&&i;){a=Xd(a),o=qd(o),a.hierNode.ancestor=r;var c=s.hierNode.prelim+h-i.hierNode.prelim-u+n(s,i);c>0&&(SF(_F(s,r,t),r,c),u+=c,l+=c),h+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=a.hierNode.modifier,f+=o.hierNode.modifier}s&&!Xd(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=h-l),i&&!qd(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-f,t=r)}return t}function Xd(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function qd(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function _F(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function SF(r,e,t){var n=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=n}function xF(r,e){return r.parentNode===e.parentNode?1:2}var wF=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),bF=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new wF},e.prototype.buildPath=function(t,n){var a=n.childPoints,i=a.length,o=n.parentPoint,s=a[0],l=a[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=n.orient,f=u==="TB"||u==="BT"?0:1,h=1-f,c=$(n.forkPosition,1),v=[];v[f]=o[f],v[h]=o[h]+(l[h]-o[h])*c,t.moveTo(o[0],o[1]),t.lineTo(v[0],v[1]),t.moveTo(s[0],s[1]),v[f]=s[f],t.lineTo(v[0],v[1]),v[f]=l[f],t.lineTo(v[0],v[1]),t.lineTo(l[0],l[1]);for(var p=1;pm.x,w||(S=S-Math.PI));var b=w?"left":"right",T=s.getModel("label"),C=T.get("rotate"),A=C*(Math.PI/180),M=g.getTextContent();M&&(g.setTextConfig({position:T.get("position")||b,rotation:C==null?-S:A,origin:"center"}),M.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),I=L==="relative"?Gl(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;I&&(ot(t).focus=I),DF(a,o,f,t,p,v,d,n),t.__edge&&(t.onHoverStateChange=function(E){if(E!=="blur"){var P=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);P&&P.hoverState===ls||Iu(t.__edge,E)}})}function DF(r,e,t,n,a,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),f=r.get("layout"),h=r.getOrient(),c=r.get(["lineStyle","curveness"]),v=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(d||(d=n.__edge=new Ou({shape:Kd(f,h,c,a,a)})),Mt(d,{shape:Kd(f,h,c,i,o)},r));else if(u==="polyline"){if(f==="orthogonal"){if(e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;mt&&(t=a.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,a=n.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var n=t.getData().tree.root,a=r.targetNode;if(U(a)&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var i=r.targetNodeId;if(i!=null&&(a=n.getNodeById(i)))return{node:a}}}function ID(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function Jd(r,e){var t=ID(r);return pt(t,e)>=0}function ih(r,e){for(var t=[];r;){var n=r.dataIndex;t.push({name:r.name,dataIndex:n,value:e.getRawValue(n)}),r=r.parentNode}return t.reverse(),t}var kF=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var n={name:t.name,children:t.data},a=t.leaves||{},i=new Vt(a,this,this.ecModel),o=Qd.createTree(n,this,s);function s(h){h.wrapMethod("getItemModel",function(c,v){var p=o.getNodeByDataIndex(v);return p&&p.children.length&&p.isExpand||(c.parentModel=i),c})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=t.expandAndCollapse,f=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var c=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=c&&c.collapsed!=null?!c.collapsed:h.depth<=f}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,n,a){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return se("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=ih(a,this),n.collapsed=!a.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Ft);const VF=kF;function BF(r,e,t){for(var n=[r],a=[],i;i=n.pop();)if(a.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;i--)t.push(a[i])}}function zF(r,e){r.eachSeriesByType("tree",function(t){GF(t,e)})}function GF(r,e){var t=gF(r,e);r.layoutInfo=t;var n=r.get("layout"),a=0,i=0,o=null;n==="radial"?(a=2*Math.PI,i=Math.min(t.height,t.width)/2,o=wD(function(_,S){return(_.parentNode===S.parentNode?1:2)/_.depth})):(a=t.width,i=t.height,o=wD());var s=r.getData().tree.root,l=s.children[0];if(l){vF(s),BF(l,pF,o),s.hierNode.modifier=-l.hierNode.prelim,pl(l,dF);var u=l,f=l,h=l;pl(l,function(_){var S=_.getLayout().x;Sf.getLayout().x&&(f=_),_.depth>h.depth&&(h=_)});var c=u===f?1:o(u,f)/2,v=c-u.getLayout().x,p=0,d=0,g=0,y=0;if(n==="radial")p=a/(f.getLayout().x+c+v),d=i/(h.depth-1||1),pl(l,function(_){g=(_.getLayout().x+v)*p,y=(_.depth-1)*d;var S=cl(g,y);_.setLayout({x:S.x,y:S.y,rawX:g,rawY:y},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(d=i/(f.getLayout().x+c+v),p=a/(h.depth-1||1),pl(l,function(_){y=(_.getLayout().x+v)*d,g=m==="LR"?(_.depth-1)*p:a-(_.depth-1)*p,_.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(p=a/(f.getLayout().x+c+v),d=i/(h.depth-1||1),pl(l,function(_){g=(_.getLayout().x+v)*p,y=m==="TB"?(_.depth-1)*d:i-(_.depth-1)*d,_.setLayout({x:g,y},!0)}))}}}function FF(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),n=t.tree;n.eachNode(function(a){var i=a.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(a.dataIndex,"style");B(s,o)})})}function HF(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var a=e.dataIndex,i=n.getData().tree,o=i.getNodeByDataIndex(a);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var i=a.coordinateSystem,o=Zd(i,e,void 0,n);a.setCenter&&a.setCenter(o.center),a.setZoom&&a.setZoom(o.zoom)})})}function $F(r){r.registerChartView(CF),r.registerSeriesModel(VF),r.registerLayout(zF),r.registerVisual(FF),HF(r)}var ED=["treemapZoomToNode","treemapRender","treemapMove"];function WF(r){for(var e=0;e1;)i=i.parentNode;var o=ap(r.ecModel,i.name||i.dataIndex+"",n);a.setVisual("decal",o)})}var UF=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};RD(a);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new Vt({itemStyle:o},this,n);i=t.levels=YF(i,n);var l=F(i||[],function(h){return new Vt(h,s,n)},this),u=Qd.createTree(a,this,f);function f(h){h.wrapMethod("getItemModel",function(c,v){var p=u.getNodeByDataIndex(v),d=p?l[p.depth]:null;return c.parentModel=d||s,c})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return se("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=ih(a,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},B(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var n=this._idIndexMap;n||(n=this._idIndexMap=K(),this._idIndexMapCount=0);var a=n.get(t);return a==null&&n.set(t,a=this._idIndexMapCount++),a},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){PD(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Ft);function RD(r){var e=0;D(r.children,function(n){RD(n);var a=n.value;G(a)&&(a=a[0]),e+=a});var t=r.value;G(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),G(r.value)?r.value[0]=t:r.value=t}function YF(r,e){var t=Nt(e.get("color")),n=Nt(e.get(["aria","decal","decals"]));if(t){r=r||[];var a,i;D(r,function(s){var l=new Vt(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(a=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return a||(o.color=t.slice()),!i&&n&&(o.decal=n.slice()),r}}const ZF=UF;var XF=8,ND=8,tg=5,qF=function(){function r(e){this.group=new at,e.add(this.group)}return r.prototype.render=function(e,t,n,a){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!n)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),h={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,h,u),this._renderContent(e,h,s,l,u,f,a),rf(o,h.pos,h.box)}},r.prototype._prepare=function(e,t,n){for(var a=e;a;a=a.parentNode){var i=ne(a.getModel().get("name"),""),o=n.getTextRect(i),s=Math.max(o.width+XF*2,t.emptyItemWidth);t.totalWidth+=s+ND,t.renderList.push({node:a,text:i,width:s})}},r.prototype._renderContent=function(e,t,n,a,i,o,s){for(var l=0,u=t.emptyItemWidth,f=e.get(["breadcrumb","height"]),h=iN(t.pos,t.box),c=t.totalWidth,v=t.renderList,p=a.getModel("itemStyle").getItemStyle(),d=v.length-1;d>=0;d--){var g=v[d],y=g.node,m=g.width,_=g.text;c>h.width&&(c-=m-u,m=u,_=null);var S=new ke({shape:{points:KF(l,0,m,f,d===v.length-1,d===0)},style:tt(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new At({style:kt(i,{text:_})}),textConfig:{position:"inside"},z2:Fi*1e4,onclick:st(s,y)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=kt(o,{text:_}),S.ensureState("emphasis").style=p,Wt(S,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(S),jF(S,e,y),l+=m+ND}},r.prototype.remove=function(){this.group.removeAll()},r}();function KF(r,e,t,n,a,i){var o=[[a?r:r-tg,e],[r+t,e],[r+t,e+n],[a?r:r-tg,e+n]];return!i&&o.splice(2,0,[r+t+tg,e+n/2]),!a&&o.push([r,e+n/2]),o}function jF(r,e,t){ot(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&ih(t,e)}}const QF=qF;var JF=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,n,a,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:a,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},a=0,i=this._storage.length;akD||Math.abs(t.dy)>kD)){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x+t.dx,y:a.y+t.dy,width:a.width,height:a.height}})}},e.prototype._onZoom=function(t){var n=t.originX,a=t.originY;if(this._state!=="animating"){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var s=new ct(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;n-=l.x,a-=l.y;var u=Ke();Pr(u,u,[-n,-a]),cc(u,u,[t.scale,t.scale]),Pr(u,u,[n,a]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var n=this;t.on("click",function(a){if(n._state==="ready"){var i=n.seriesModel.get("nodeClick",!0);if(i){var o=n.findTarget(a.offsetX,a.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(i==="zoomToNode")n._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&tf(u,f)}}}}},this)},e.prototype._renderBreadcrumb=function(t,n,a){var i=this;a||(a=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),a||(a={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new QF(this.group))).render(t,n,a.node,function(o){i._state!=="animating"&&(Jd(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=dl(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,n){var a,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)a={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),a},e.type="treemap",e}(Bt);function dl(){return{nodeGroup:[],background:[],content:[]}}function i3(r,e,t,n,a,i,o,s,l,u){if(!o)return;var f=o.getLayout(),h=r.getData(),c=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var v=f.width,p=f.height,d=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=f.upperHeight,w=_&&_.length,x=c.getModel("itemStyle"),b=c.getModel(["emphasis","itemStyle"]),T=c.getModel(["blur","itemStyle"]),C=c.getModel(["select","itemStyle"]),A=x.get("borderRadius")||0,M=rt("nodeGroup",eg);if(!M)return;if(l.add(M),M.x=f.x||0,M.y=f.y||0,M.markRedraw(),oh(M).nodeWidth=v,oh(M).nodeHeight=p,f.isAboveViewRoot)return M;var L=rt("background",OD,u,r3);L&&z(M,L,w&&f.upperLabelHeight);var I=c.getModel("emphasis"),E=I.get("focus"),P=I.get("blurScope"),N=I.get("disabled"),V=E==="ancestor"?o.getAncestorsIndices():E==="descendant"?o.getDescendantIndices():E;if(w)Gn(M)&&za(M,!1),L&&(za(L,!N),h.setItemGraphicEl(o.dataIndex,L),Av(L,V,P));else{var k=rt("content",OD,u,n3);k&&H(M,k),L.disableMorphing=!0,L&&Gn(L)&&za(L,!1),za(M,!N),h.setItemGraphicEl(o.dataIndex,M),Av(M,V,P)}return M;function z(yt,it,_t){var vt=ot(it);if(vt.dataIndex=o.dataIndex,vt.seriesIndex=r.seriesIndex,it.setShape({x:0,y:0,width:v,height:p,r:A}),g)W(it);else{it.invisible=!1;var j=o.getVisual("style"),ft=j.stroke,Ht=zD(x);Ht.fill=ft;var Dt=gi(b);Dt.fill=b.get("borderColor");var Xt=gi(T);Xt.fill=T.get("borderColor");var Yt=gi(C);if(Yt.fill=C.get("borderColor"),_t){var be=v-2*d;X(it,ft,j.opacity,{x:d,y:0,width:be,height:S})}else it.removeTextContent();it.setStyle(Ht),it.ensureState("emphasis").style=Dt,it.ensureState("blur").style=Xt,it.ensureState("select").style=Yt,Va(it)}yt.add(it)}function H(yt,it){var _t=ot(it);_t.dataIndex=o.dataIndex,_t.seriesIndex=r.seriesIndex;var vt=Math.max(v-2*d,0),j=Math.max(p-2*d,0);if(it.culling=!0,it.setShape({x:d,y:d,width:vt,height:j,r:A}),g)W(it);else{it.invisible=!1;var ft=o.getVisual("style"),Ht=ft.fill,Dt=zD(x);Dt.fill=Ht,Dt.decal=ft.decal;var Xt=gi(b),Yt=gi(T),be=gi(C);X(it,Ht,ft.opacity,null),it.setStyle(Dt),it.ensureState("emphasis").style=Xt,it.ensureState("blur").style=Yt,it.ensureState("select").style=be,Va(it)}yt.add(it)}function W(yt){!yt.invisible&&i.push(yt)}function X(yt,it,_t,vt){var j=c.getModel(vt?BD:VD),ft=ne(c.get("name"),null),Ht=j.getShallow("show");de(yt,oe(c,vt?BD:VD),{defaultText:Ht?ft:null,inheritColor:it,defaultOpacity:_t,labelFetcher:r,labelDataIndex:o.dataIndex});var Dt=yt.getTextContent();if(Dt){var Xt=Dt.style,Yt=Jh(Xt.padding||0);vt&&(yt.setTextConfig({layoutRect:vt}),Dt.disableLabelLayout=!0),Dt.beforeUpdate=function(){var Dn=Math.max((vt?vt.width:yt.shape.width)-Yt[1]-Yt[3],0),Fe=Math.max((vt?vt.height:yt.shape.height)-Yt[0]-Yt[2],0);(Xt.width!==Dn||Xt.height!==Fe)&&Dt.setStyle({width:Dn,height:Fe})},Xt.truncateMinChar=2,Xt.lineOverflow="truncate",et(Xt,vt,f);var be=Dt.getState("emphasis");et(be?be.style:null,vt,f)}}function et(yt,it,_t){var vt=yt?yt.text:null;if(!it&&_t.isLeafRoot&&vt!=null){var j=r.get("drillDownIcon",!0);yt.text=j?j+" "+vt:vt}}function rt(yt,it,_t,vt){var j=m!=null&&t[yt][m],ft=a[yt];return j?(t[yt][m]=null,mt(ft,j)):g||(j=new it,j instanceof tr&&(j.z2=o3(_t,vt)),Lt(ft,j)),e[yt][y]=j}function mt(yt,it){var _t=yt[y]={};it instanceof eg?(_t.oldX=it.x,_t.oldY=it.y):_t.oldShape=B({},it.shape)}function Lt(yt,it){var _t=yt[y]={},vt=o.parentNode,j=it instanceof at;if(vt&&(!n||n.direction==="drillDown")){var ft=0,Ht=0,Dt=a.background[vt.getRawIndex()];!n&&Dt&&Dt.oldShape&&(ft=Dt.oldShape.width,Ht=Dt.oldShape.height),j?(_t.oldX=0,_t.oldY=Ht):_t.oldShape={x:ft,y:Ht,width:0,height:0}}_t.fadein=!j}}function o3(r,e){return r*e3+e}const s3=a3;var gl=D,l3=Q,sh=-1,rg=function(){function r(e){var t=e.mappingMethod,n=e.type,a=this.option=nt(e);this.type=n,this.mappingMethod=t,this._normalizeData=h3[t];var i=r.visualHandlers[n];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(ng(a),u3(a)):t==="category"?a.categories?f3(a):ng(a,!0):(J(t!=="linear"||a.dataExtent),ng(a))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return Z(this._normalizeData,this)},r.listVisualTypes=function(){return St(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,n){Q(e)?D(e,t,n):t.call(n,e)},r.mapVisual=function(e,t,n){var a,i=G(e)?[]:Q(e)?{}:(a=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(n,o,s);a?i=l:i[s]=l}),i},r.retrieveVisuals=function(e){var t={},n;return e&&gl(r.visualHandlers,function(a,i){e.hasOwnProperty(i)&&(t[i]=e[i],n=!0)}),n?t:null},r.prepareVisualTypes=function(e){if(G(e))e=e.slice();else if(l3(e)){var t=[];gl(e,function(n,a){t.push(a)}),e=t}else return[];return e.sort(function(n,a){return a==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,n){for(var a,i=1/0,o=0,s=t.length;o=0;i--)n[i]==null&&(delete t[e[i]],e.pop())}function ng(r,e){var t=r.visual,n=[];Q(t)?gl(t,function(i){n.push(i)}):t!=null&&n.push(t);var a={color:1,symbol:1};!e&&n.length===1&&!a.hasOwnProperty(r.type)&&(n[1]=n[0]),FD(r,n)}function lh(r){return{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("color",r(t("color"),a))},_normalizedToVisual:ag([0,1])}}function GD(r){var e=this.option.visual;return e[Math.round(Pt(r,[0,1],[0,e.length-1],!0))]||{}}function yl(r){return function(e,t,n){n(r,this.mapValueToVisual(e))}}function ml(r){var e=this.option.visual;return e[this.option.loop&&r!==sh?r%e.length:r]}function yi(){return this.option.visual[0]}function ag(r){return{linear:function(e){return Pt(e,r,this.option.visual,!0)},category:ml,piecewise:function(e,t){var n=ig.call(this,t);return n==null&&(n=Pt(e,r,this.option.visual,!0)),n},fixed:yi}}function ig(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var n=rg.findPieceIndex(r,t),a=t[n];if(a&&a.visual)return a.visual[this.type]}}function FD(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=F(e,function(t){var n=$e(t);return!n&&process.env.NODE_ENV!=="production"&&$t("'"+t+"' is an illegal color, fallback to '#000000'",!0),n||[0,0,0,1]})),e}var h3={linear:function(r){return Pt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=rg.findPieceIndex(r,e,!0);if(t!=null)return Pt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??sh},fixed:qt};function uh(r,e,t){return r?e<=t:e=t.length||d===t[d.depth]){var y=y3(a,l,d,g,p,n);$D(d,y,t,n)}})}}}function p3(r,e,t){var n=B({},e),a=t.designatedVisualItemStyle;return D(["color","colorAlpha","colorSaturation"],function(i){a[i]=e[i];var o=r.get(i);a[i]=null,o!=null&&(n[i]=o)}),n}function WD(r){var e=og(r,"color");if(e){var t=og(r,"colorAlpha"),n=og(r,"colorSaturation");return n&&(e=Xo(e,null,null,n)),t&&(e=eu(e,t)),e}}function d3(r,e){return e!=null?Xo(e,null,null,r):null}function og(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function g3(r,e,t,n,a,i){if(!(!i||!i.length)){var o=sg(e,"color")||a.color!=null&&a.color!=="none"&&(sg(e,"colorAlpha")||sg(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=e.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(f==="index"||f==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var c=new ye(h);return HD(c).drColorMappingBy=f,c}}}function sg(r,e){var t=r.get(e);return G(t)&&t.length?{name:e,range:t}:null}function y3(r,e,t,n,a,i){var o=B({},e);if(a){var s=a.type,l=s==="color"&&HD(a).drColorMappingBy,u=l==="index"?n:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}var _l=Math.max,fh=Math.min,UD=Qt,lg=D,YD=["itemStyle","borderWidth"],m3=["itemStyle","gapWidth"],_3=["upperLabel","show"],S3=["upperLabel","height"];const x3={seriesType:"treemap",reset:function(r,e,t,n){var a=t.getWidth(),i=t.getHeight(),o=r.option,s=ae(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=$(UD(s.width,l[0]),a),f=$(UD(s.height,l[1]),i),h=n&&n.type,c=["treemapZoomToNode","treemapRootToNode"],v=vl(n,c,r),p=h==="treemapRender"||h==="treemapMove"?n.rootRect:null,d=r.getViewRoot(),g=ID(d);if(h!=="treemapMove"){var y=h==="treemapZoomToNode"?A3(r,v,d,u,f):p?[p.width,p.height]:[u,f],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var _={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};d.hostTree.clearLayouts();var S={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};d.setLayout(S),ZD(d,_,!1,0),S=d.getLayout(),lg(g,function(x,b){var T=(g[b+1]||d).getValue();x.setLayout(B({dataExtent:[T,T],borderWidth:0,upperHeight:0},S))})}var w=r.getData().tree.root;w.setLayout(M3(s,p,v),!0),r.setLayoutInfo(s),qD(w,new ct(-s.x,-s.y,a,i),g,d,0)}};function ZD(r,e,t,n){var a,i;if(!r.isRemoved()){var o=r.getLayout();a=o.width,i=o.height;var s=r.getModel(),l=s.get(YD),u=s.get(m3)/2,f=KD(s),h=Math.max(l,f),c=l-u,v=h-u;r.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:f},!0),a=_l(a-2*c,0),i=_l(i-c-v,0);var p=a*i,d=w3(r,s,p,e,t,n);if(d.length){var g={x:c,y:v,width:a,height:i},y=fh(a,i),m=1/0,_=[];_.area=0;for(var S=0,w=d.length;S=0;l--){var u=a[n==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function C3(r,e,t){for(var n=0,a=1/0,i=0,o=void 0,s=r.length;in&&(n=o));var l=r.area*r.area,u=e*e*t;return l?_l(u*n/l,l/(u*a)):1/0}function XD(r,e,t,n,a){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],f=e?r.area/e:0;(a||f>t[l[o]])&&(f=t[l[o]]);for(var h=0,c=r.length;hM0&&(u=M0),i=s}un&&(n=e);var i=n%2?n+2:n+3;a=[];for(var o=0;o0&&(w[0]=-w[0],w[1]=-w[1]);var b=S[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(S[1],S[0]);h[0].8?"left":c[0]<-.8?"right":"center",d=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*y+f[0],i.y=-c[1]*m+f[1],p=c[0]>.8?"right":c[0]<-.8?"left":"center",d=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*b+f[0],i.y=f[1]+C,p=S[0]<0?"right":"left",i.originX=-y*b,i.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+C,p="center",i.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*b+h[0],i.y=h[1]+C,p=S[0]>=0?"right":"left",i.originX=y*b,i.originY=-C;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||p})}},e}(at);const _g=Z3;var X3=function(){function r(e){this.group=new at,this._LineCtor=e||_g}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,a=n.group,i=n._lineData;n._lineData=e,i||a.removeAll();var o=oC(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){a.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=oC(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function n(s){!s.isGroup&&!q3(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0}function oC(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:oe(e)}}function sC(r){return isNaN(r[0])||isNaN(r[1])}function Sg(r){return r&&!sC(r[0])&&!sC(r[1])}const xg=X3;var wg=[],bg=[],Tg=[],To=ue,Dg=da,lC=Math.abs;function uC(r,e,t){for(var n=r[0],a=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,f=.1;f<=.9;f+=.1){wg[0]=To(n[0],a[0],i[0],f),wg[1]=To(n[1],a[1],i[1],f);var h=lC(Dg(wg,e)-l);h=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function Cg(r,e){var t=[],n=Uo,a=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[tn(u[0]),tn(u[1])],u[2]&&u.__original.push(tn(u[2])));var c=u.__original;if(u[2]!=null){if(Te(a[0],c[0]),Te(a[1],c[2]),Te(a[2],c[1]),f&&f!=="none"){var v=wl(s.node1),p=uC(a,c[0],v*e);n(a[0][0],a[1][0],a[2][0],p,t),a[0][0]=t[3],a[1][0]=t[4],n(a[0][1],a[1][1],a[2][1],p,t),a[0][1]=t[3],a[1][1]=t[4]}if(h&&h!=="none"){var v=wl(s.node2),p=uC(a,c[1],v*e);n(a[0][0],a[1][0],a[2][0],p,t),a[1][0]=t[1],a[2][0]=t[2],n(a[0][1],a[1][1],a[2][1],p,t),a[1][1]=t[1],a[2][1]=t[2]}Te(u[0],a[0]),Te(u[1],a[2]),Te(u[2],a[1])}else{if(Te(i[0],c[0]),Te(i[1],c[1]),pa(o,i[1],i[0]),Mi(o,o),f&&f!=="none"){var v=wl(s.node1);tc(i[0],i[0],o,v*e)}if(h&&h!=="none"){var v=wl(s.node2);tc(i[1],i[1],o,-v*e)}Te(u[0],i[0]),Te(u[1],i[1])}})}function fC(r){return r.type==="view"}var K3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){var a=new nl,i=new xg,o=this.group;this._controller=new ul(n.getZr()),this._controllerHost={target:o},o.add(a.group),o.add(i.group),this._symbolDraw=a,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,n,a){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(fC(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(f):Mt(u,f,t)}Cg(t.getGraph(),xl(t));var h=t.getData();s.updateData(h);var c=t.getEdgeData();l.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,n,a),clearTimeout(this._layoutTimeout);var v=t.forceLayout,p=t.get(["force","layoutAnimation"]);v&&this._startForceLayoutIteration(v,p);var d=t.get("layout");h.graph.eachNode(function(_){var S=_.dataIndex,w=_.getGraphicEl(),x=_.getModel();if(w){w.off("drag").off("dragend");var b=x.get("draggable");b&&w.on("drag",function(C){switch(d){case"force":v.warmUp(),!i._layouting&&i._startForceLayoutIteration(v,p),v.setFixed(S),h.setItemLayout(S,[w.x,w.y]);break;case"circular":h.setItemLayout(S,[w.x,w.y]),_.setLayout({fixed:!0},!0),pg(t,"symbolSize",_,[C.offsetX,C.offsetY]),i.updateLayout(t);break;case"none":default:h.setItemLayout(S,[w.x,w.y]),cg(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){v&&v.setUnfixed(S)}),w.setDraggable(b,!!x.get("cursor"));var T=x.get(["emphasis","focus"]);T==="adjacency"&&(ot(w).focus=_.getAdjacentDataIndices())}}),h.graph.eachEdge(function(_){var S=_.getGraphicEl(),w=_.getModel().get(["emphasis","focus"]);S&&w==="adjacency"&&(ot(S).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),y=h.getLayout("cx"),m=h.getLayout("cy");h.graph.eachNode(function(_){eC(_,g,y,m)}),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,n){var a=this;(function i(){t.step(function(o){a.updateLayout(a._model),(a._layouting=!o)&&(n?a._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,n,a){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,f,h){var c=l.getBoundingRect();return c.applyTransform(l.transform),c.contain(f,h)&&!th(u,a,t)}),!fC(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){Fd(s,u.dx,u.dy),a.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Hd(s,u.scale,u.originX,u.originY),a.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),Cg(t.getGraph(),xl(t)),i._lineDraw.updateLayout(),a.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,n=t.getData(),a=xl(t);n.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(a)})},e.prototype.updateLayout=function(t){Cg(t.getGraph(),xl(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Bt);const j3=K3;function Do(r){return"_EC_"+r}var Q3=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var n=this._nodesMap;if(n[Do(e)]){process.env.NODE_ENV!=="production"&&console.error("Graph nodes have duplicate name or id");return}var a=new mi(e,t);return a.hostGraph=this,this.nodes.push(a),n[Do(e)]=a,a},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[Do(e)]},r.prototype.addEdge=function(e,t,n){var a=this._nodesMap,i=this._edgesMap;if(Ct(e)&&(e=this.nodes[e]),Ct(t)&&(t=this.nodes[t]),e instanceof mi||(e=a[Do(e)]),t instanceof mi||(t=a[Do(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new hC(e,t,n);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof mi&&(e=e.id),t instanceof mi&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var n=this.nodes,a=n.length,i=0;i=0&&e.call(t,n[i],i)},r.prototype.eachEdge=function(e,t){for(var n=this.edges,a=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},r.prototype.breadthFirstTraverse=function(e,t,n,a){if(t instanceof mi||(t=this._nodesMap[Do(t)]),!!t){for(var i=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var i=0,o=a.length;i=0&&this[r][e].setItemVisual(this.dataIndex,t,n)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,n){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,n)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}jt(mi,cC("hostGraph","data")),jt(hC,cC("hostGraph","edgeData"));const J3=Q3;function vC(r,e,t,n,a){for(var i=new J3(n),o=0;o "+c)),u++)}var v=t.get("coordinateSystem"),p;if(v==="cartesian2d"||v==="polar")p=yn(r,t);else{var d=ao.get(v),g=d?d.dimensions||[]:[];pt(g,"value")<0&&g.concat(["value"]);var y=Ys(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new Le(y,t),p.initData(r)}var m=new Le(["value"],t);return m.initData(l,s),a&&a(p,m),MD({mainData:p,struct:i,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var tH=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var n=this;function a(){return n._categoriesData}this.legendVisualProvider=new ol(a,a),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),Ta(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&a){O3(this);var s=vC(i,a,this,!0,l);return D(s.edges,function(u){k3(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,f){u.wrapMethod("getItemModel",function(p){var d=o._categoriesModels,g=p.getShallow("category"),y=d[g];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var h=Vt.prototype.getModel;function c(p,d){var g=h.call(this,p,d);return g.resolveParentPath=v,g}f.wrapMethod("getItemModel",function(p){return p.resolveParentPath=v,p.getModel=c,p});function v(p){if(p&&(p[0]==="label"||p[1]==="label")){var d=p.slice();return p[0]==="label"?d[0]="edgeLabel":p[1]==="label"&&(d[1]="edgeLabel"),d}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,n,a){if(a==="edge"){var i=this.getData(),o=this.getDataParams(t,a),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),se("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var h=JS({series:this,dataIndex:t,multipleSeries:n});return h},e.prototype._updateCategoriesData=function(){var t=F(this.option.categories||[],function(a){return a.value!=null?a:B({value:0},a)}),n=new Le(["value"],this);n.initData(t),this._categoriesData=n,this._categoriesModels=n.mapArray(function(a){return n.getItemModel(a)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Ft);const eH=tH;var rH={type:"graphRoam",event:"graphRoam",update:"none"};function nH(r){r.registerChartView(j3),r.registerSeriesModel(eH),r.registerProcessor(I3),r.registerVisual(E3),r.registerVisual(P3),r.registerLayout(V3),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,z3),r.registerLayout(F3),r.registerCoordinateSystem("graphView",{dimensions:hl.dimensions,create:$3}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},qt),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},qt),r.registerAction(rH,function(e,t,n){t.eachComponent({mainType:"series",query:e},function(a){var i=a.coordinateSystem,o=Zd(i,e,void 0,n);a.setCenter&&a.setCenter(o.center),a.setZoom&&a.setZoom(o.zoom)})})}var aH=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),iH=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new aH},e.prototype.buildPath=function(t,n){var a=Math.cos,i=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-a(l)*s*(s>=o/3?1:2),f=n.y-i(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,t.moveTo(u,f),t.lineTo(n.x+a(l)*s,n.y+i(l)*s),t.lineTo(n.x+a(n.angle)*o,n.y+i(n.angle)*o),t.lineTo(n.x-a(l)*s,n.y-i(l)*s),t.lineTo(u,f)},e}(gt);const oH=iH;function sH(r,e){var t=r.get("center"),n=e.getWidth(),a=e.getHeight(),i=Math.min(n,a),o=$(t[0],e.getWidth()),s=$(t[1],e.getHeight()),l=$(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function vh(r,e){var t=r==null?"":r+"";return e&&(U(e)?t=e.replace("{value}",t):q(e)&&(t=e(r))),t}var lH=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=sH(t,a);this._renderMain(t,n,a,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,n,a,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,f=-t.get("endAngle")/180*Math.PI,h=t.getModel("axisLine"),c=h.get("roundCap"),v=c?Zf:Oe,p=h.get("show"),d=h.getModel("lineStyle"),g=d.get("width"),y=[u,f];n_(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=[],w=0;p&&w=C&&(A===0?0:i[A-1][0])Math.PI/2&&(rt+=Math.PI)):et==="tangential"?rt=-T-Math.PI/2:Ct(et)&&(rt=et*Math.PI/180),rt===0?h.add(new At({style:kt(_,{text:z,x:W,y:X,verticalAlign:P<-.8?"top":P>.8?"bottom":"middle",align:E<-.4?"left":E>.4?"right":"center"},{inheritColor:H}),silent:!0})):h.add(new At({style:kt(_,{text:z,x:W,y:X,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:W,originY:X,rotation:rt}))}if(m.get("show")&&N!==S){var V=m.get("distance");V=V?V+f:f;for(var mt=0;mt<=w;mt++){E=Math.cos(T),P=Math.sin(T);var Lt=new fe({shape:{x1:E*(p-V)+c,y1:P*(p-V)+v,x2:E*(p-b-V)+c,y2:P*(p-b-V)+v},silent:!0,style:L});L.stroke==="auto"&&Lt.setStyle({stroke:i((N+mt/w)/S)}),h.add(Lt),T+=A}T-=A}else T+=C}},e.prototype._renderPointer=function(t,n,a,i,o,s,l,u,f){var h=this.group,c=this._data,v=this._progressEls,p=[],d=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),_=m.mapDimension("value"),S=+t.get("min"),w=+t.get("max"),x=[S,w],b=[s,l];function T(A,M){var L=m.getItemModel(A),I=L.getModel("pointer"),E=$(I.get("width"),o.r),P=$(I.get("length"),o.r),N=t.get(["pointer","icon"]),V=I.get("offsetCenter"),k=$(V[0],o.r),z=$(V[1],o.r),H=I.get("keepAspect"),W;return N?W=re(N,k-E/2,z-P,E,P,null,H):W=new oH({shape:{angle:-Math.PI/2,width:E,r:P,x:k,y:z}}),W.rotation=-(M+Math.PI/2),W.x=o.cx,W.y=o.cy,W}function C(A,M){var L=g.get("roundCap"),I=L?Zf:Oe,E=g.get("overlap"),P=E?g.get("width"):f/m.count(),N=E?o.r-P:o.r-(A+1)*P,V=E?o.r:o.r-A*P,k=new I({shape:{startAngle:s,endAngle:M,cx:o.cx,cy:o.cy,clockwise:u,r0:N,r:V}});return E&&(k.z2=w-m.get(_,A)%w),k}(y||d)&&(m.diff(c).add(function(A){var M=m.get(_,A);if(d){var L=T(A,s);Gt(L,{rotation:-((isNaN(+M)?b[0]:Pt(M,x,b,!0))+Math.PI/2)},t),h.add(L),m.setItemGraphicEl(A,L)}if(y){var I=C(A,s),E=g.get("clip");Gt(I,{shape:{endAngle:Pt(M,x,b,E)}},t),h.add(I),mv(t.seriesIndex,m.dataType,A,I),p[A]=I}}).update(function(A,M){var L=m.get(_,A);if(d){var I=c.getItemGraphicEl(M),E=I?I.rotation:s,P=T(A,E);P.rotation=E,Mt(P,{rotation:-((isNaN(+L)?b[0]:Pt(L,x,b,!0))+Math.PI/2)},t),h.add(P),m.setItemGraphicEl(A,P)}if(y){var N=v[M],V=N?N.shape.endAngle:s,k=C(A,V),z=g.get("clip");Mt(k,{shape:{endAngle:Pt(L,x,b,z)}},t),h.add(k),mv(t.seriesIndex,m.dataType,A,k),p[A]=k}}).execute(),m.each(function(A){var M=m.getItemModel(A),L=M.getModel("emphasis"),I=L.get("focus"),E=L.get("blurScope"),P=L.get("disabled");if(d){var N=m.getItemGraphicEl(A),V=m.getItemVisual(A,"style"),k=V.fill;if(N instanceof ve){var z=N.style;N.useStyle(B({image:z.image,x:z.x,y:z.y,width:z.width,height:z.height},V))}else N.useStyle(V),N.type!=="pointer"&&N.setColor(k);N.setStyle(M.getModel(["pointer","itemStyle"]).getItemStyle()),N.style.fill==="auto"&&N.setStyle("fill",i(Pt(m.get(_,A),x,[0,1],!0))),N.z2EmphasisLift=0,pe(N,M),Wt(N,I,E,P)}if(y){var H=p[A];H.useStyle(m.getItemVisual(A,"style")),H.setStyle(M.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,pe(H,M),Wt(H,I,E,P)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,n){var a=t.getModel("anchor"),i=a.get("show");if(i){var o=a.get("size"),s=a.get("icon"),l=a.get("offsetCenter"),u=a.get("keepAspect"),f=re(s,n.cx-o/2+$(l[0],n.r),n.cy-o/2+$(l[1],n.r),o,o,null,u);f.z2=a.get("showAbove")?1:0,f.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(f)}},e.prototype._renderTitleAndDetail=function(t,n,a,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),f=+t.get("min"),h=+t.get("max"),c=new at,v=[],p=[],d=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){v[y]=new At({silent:!0}),p[y]=new At({silent:!0})}).update(function(y,m){v[y]=s._titleEls[m],p[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),S=new at,w=i(Pt(_,[f,h],[0,1],!0)),x=m.getModel("title");if(x.get("show")){var b=x.get("offsetCenter"),T=o.cx+$(b[0],o.r),C=o.cy+$(b[1],o.r),A=v[y];A.attr({z2:g?0:2,style:kt(x,{x:T,y:C,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:w})}),S.add(A)}var M=m.getModel("detail");if(M.get("show")){var L=M.get("offsetCenter"),I=o.cx+$(L[0],o.r),E=o.cy+$(L[1],o.r),P=$(M.get("width"),o.r),N=$(M.get("height"),o.r),V=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:w,A=p[y],k=M.get("formatter");A.attr({z2:g?0:2,style:kt(M,{x:I,y:E,text:vh(_,k),width:isNaN(P)?null:P,height:isNaN(N)?null:N,align:"center",verticalAlign:"middle"},{inheritColor:V})}),M1(A,{normal:M},_,function(H){return vh(H,k)}),d&&L1(A,y,l,t,{getFormattedLabel:function(H,W,X,et,rt,mt){return vh(mt?mt.interpolatedValue:_,k)}}),S.add(A)}c.add(S)}),this.group.add(c),this._titleEls=v,this._detailEls=p},e.type="gauge",e}(Bt);const uH=lH;var fH=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,n){return So(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Ft);const hH=fH;function cH(r){r.registerChartView(uH),r.registerSeriesModel(hH)}var vH=["itemStyle","opacity"],pH=function(r){O(e,r);function e(t,n){var a=r.call(this)||this,i=a,o=new Ve,s=new At;return i.setTextContent(s),a.setTextGuideLine(o),a.updateData(t,n,!0),a}return e.prototype.updateData=function(t,n,a){var i=this,o=t.hostModel,s=t.getItemModel(n),l=t.getItemLayout(n),u=s.getModel("emphasis"),f=s.get(vH);f=f??1,a||br(i),i.useStyle(t.getItemVisual(n,"style")),i.style.lineJoin="round",a?(i.setShape({points:l.points}),i.style.opacity=0,Gt(i,{style:{opacity:f}},o,n)):Mt(i,{style:{opacity:f},shape:{points:l.points}},o,n),pe(i,s),this._updateLabel(t,n),Wt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n){var a=this,i=this.getTextGuideLine(),o=a.getTextContent(),s=t.hostModel,l=t.getItemModel(n),u=t.getItemLayout(n),f=u.label,h=t.getItemVisual(n,"style"),c=h.fill;de(o,oe(l),{labelFetcher:t.hostModel,labelDataIndex:n,defaultOpacity:h.opacity,defaultText:t.getName(n)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}}),a.setTextConfig({local:!0,inside:!!f.inside,insideStroke:c,outsideFill:c});var v=f.linePoints;i.setShape({points:v}),a.textGuideLineConfig={anchor:v?new ut(v[0][0],v[0][1]):null},Mt(o,{style:{x:f.x,y:f.y}},s,n),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),sd(a,ld(l),{stroke:c})},e}(ke),dH=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new pH(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(i,l),s.add(f),i.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);gs(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Bt);const gH=dH;var yH=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ol(Z(this.getData,this),Z(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,n){return So(this,{coordDimensions:["value"],encodeDefaulter:st(tp,this)})},e.prototype._defaultLabelLine=function(t){Ta(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var n=this.getData(),a=r.prototype.getDataParams.call(this,t),i=n.mapDimension("value"),o=n.getSum(i);return a.percent=o?+(n.get(i,t)/o*100).toFixed(2):0,a.$vars.push("percent"),a},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Ft);const mH=yH;function _H(r,e){return ae(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function SH(r,e){for(var t=r.mapDimension("value"),n=r.mapArray(t,function(l){return l}),a=[],i=e==="ascending",o=0,s=r.count();o-1&&(o="left",console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")),t==="horizontal"&&["left","right"].indexOf(o)>-1&&(o="bottom",console.warn("Position error: Funnel chart on horizontal orient dose not support left and right."))),o==="left"?(d=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=d-_,c=y-5,h="right"):o==="right"?(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=d+_,c=y+5,h="left"):o==="top"?(d=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=g-_,v=m-5,h="center"):o==="bottom"?(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=g+_,v=m+5,h="center"):o==="rightTop"?(d=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(m=g-_,v=m-5,h="center"):(y=d+_,c=y+5,h="top")):o==="rightBottom"?(d=u[2][0],g=u[2][1],t==="horizontal"?(m=g+_,v=m+5,h="center"):(y=d+_,c=y+5,h="bottom")):o==="leftTop"?(d=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(m=g-_,v=m-5,h="center"):(y=d-_,c=y-5,h="right")):o==="leftBottom"?(d=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(m=g+_,v=m+5,h="center"):(y=d-_,c=y-5,h="right")):(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(m=g+_,v=m+5,h="center"):(y=d+_,c=y+5,h="left")),t==="horizontal"?(y=d,c=y):(m=g,v=m),p=[[d,g],[y,m]]}l.label={linePoints:p,x:c,y:v,verticalAlign:"middle",textAlign:h,inside:f}})}function wH(r,e){r.eachSeriesByType("funnel",function(t){var n=t.getData(),a=n.mapDimension("value"),i=t.get("sort"),o=_H(t,e),s=t.get("orient"),l=o.width,u=o.height,f=SH(n,i),h=o.x,c=o.y,v=s==="horizontal"?[$(t.get("minSize"),u),$(t.get("maxSize"),u)]:[$(t.get("minSize"),l),$(t.get("maxSize"),l)],p=n.getDataExtent(a),d=t.get("min"),g=t.get("max");d==null&&(d=Math.min(p[0],0)),g==null&&(g=p[1]);var y=t.get("funnelAlign"),m=t.get("gap"),_=s==="horizontal"?l:u,S=(_-m*(n.count()-1))/n.count(),w=function(E,P){if(s==="horizontal"){var N=n.get(a,E)||0,V=Pt(N,[d,g],v,!0),k=void 0;switch(y){case"top":k=c;break;case"center":k=c+(u-V)/2;break;case"bottom":k=c+(u-V);break}return[[P,k],[P,k+V]]}var z=n.get(a,E)||0,H=Pt(z,[d,g],v,!0),W;switch(y){case"left":W=h;break;case"center":W=h+(l-H)/2;break;case"right":W=h+l-H;break}return[[W,P],[W+H,P]]};i==="ascending"&&(S=-S,m=-m,s==="horizontal"?h+=l:c+=u,f=f.reverse());for(var x=0;xzH)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);a.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!Mg(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),n=t.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function Mg(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}const HH=GH;var $H=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var n=this.option;t&&ht(n,t,!0),this._initDimensions()},e.prototype.contains=function(t,n){var a=t.get("parallelIndex");return a!=null&&n.getComponent("parallel",a)===this},e.prototype.setAxisExpand=function(t){D(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){t.hasOwnProperty(n)&&(this.option[n]=t[n])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],n=this.parallelAxisIndex=[],a=Rt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);D(a,function(i){t.push("dim"+i.get("dim")),n.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(xt);const WH=$H;var UH=function(r){O(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Mr);const YH=UH;function _i(r,e,t,n,a,i){r=r||0;var o=t[1]-t[0];if(a!=null&&(a=Co(a,[0,o])),i!=null&&(i=Math.max(i,a??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Co(s,[0,o]),a=i=Co(s,[a,i]),n=0}e[0]=Co(e[0],t),e[1]=Co(e[1],t);var l=Lg(e,n);e[n]+=r;var u=a||0,f=t.slice();l.sign<0?f[0]+=u:f[1]-=u,e[n]=Co(e[n],f);var h;return h=Lg(e,n),a!=null&&(h.sign!==l.sign||h.spani&&(e[1-n]=e[n]+h.sign*i),e}function Lg(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Co(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var Ig=D,yC=Math.min,mC=Math.max,_C=Math.floor,ZH=Math.ceil,SC=Zt,XH=Math.PI,qH=function(){function r(e,t,n){this.type="parallel",this._axesMap=K(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var a=e.dimensions,i=e.parallelAxisIndex;Ig(a,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),f=this._axesMap.set(o,new YH(o,kf(u),[0,0],u.get("type"),l)),h=f.type==="category";f.onBand=h&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,a=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=n&&o<=n+t.axisLength&&s>=a&&s<=a+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(e.contains(n,t)){var a=n.getData();Ig(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(a,a.mapDimension(i)),yo(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=ae(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=["x","y"],a=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[a[o]],l=[0,s],u=this.dimensions.length,f=ph(e.get("axisExpandWidth"),l),h=ph(e.get("axisExpandCount")||0,[0,u]),c=e.get("axisExpandable")&&u>3&&u>h&&h>1&&f>0&&s>0,v=e.get("axisExpandWindow"),p;if(v)p=ph(v[1]-v[0],l),v[1]=v[0]+p;else{p=ph(f*(h-1),l);var d=e.get("axisExpandCenter")||_C(u/2);v=[f*d-p/2],v[1]=v[0]+p}var g=(s-p)/(u-h);g<3&&(g=0);var y=[_C(SC(v[0]/f,1))+1,ZH(SC(v[1]/f,1))-1],m=g/f*v[0];return{layout:i,pixelDimIndex:o,layoutBase:t[n[o]],layoutLength:s,axisBase:t[n[1-o]],axisLength:t[a[1-o]],axisExpandable:c,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:v,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,a=this._makeLayoutInfo(),i=a.layout;t.each(function(o){var s=[0,a.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Ig(n,function(o,s){var l=(a.axisExpandable?jH:KH)(s,a),u={horizontal:{x:l.position,y:a.axisLength},vertical:{x:0,y:l.position}},f={horizontal:XH/2,vertical:0},h=[u[i].x+e.x,u[i].y+e.y],c=f[i],v=Ke();ga(v,v,c),Pr(v,v,h),this._axesLayout[o]={position:h,rotation:c,transform:v,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,n,a){n==null&&(n=0),a==null&&(a=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];D(o,function(g){s.push(e.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),f=n;fi*(1-h[0])?(u="jump",l=s-i*(1-h[2])):(l=s-i*h[1])>=0&&(l=s-i*(1-h[1]))<=0&&(l=0),l*=t.axisExpandWidth/f,l?_i(l,a,o,"all"):u="none";else{var v=a[1]-a[0],p=o[1]*s/v;a=[mC(0,p-v/2)],a[1]=yC(o[1],a[0]+v),a[0]=a[1]-v}return{axisExpandWindow:a,behavior:u}},r}();function ph(r,e){return yC(mC(r,e[0]),e[1])}function KH(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function jH(r,e){var t=e.layoutLength,n=e.axisExpandWidth,a=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,f;return r=0;a--)Je(n[a])},e.prototype.getActiveState=function(t){var n=this.activeIntervals;if(!n.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(n.length===1){var a=n[0];if(a[0]<=t&&t<=a[1])return"active"}else for(var i=0,o=n.length;ia4}function IC(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function EC(r,e,t,n){var a=new at;return a.add(new Tt({name:"main",style:kg(t),silent:!0,draggable:!0,cursor:"move",drift:st(NC,r,e,a,["n","s","w","e"]),ondragend:st(xi,e,{isEnd:!0})})),D(n,function(i){a.add(new Tt({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:st(NC,r,e,a,i),ondragend:st(xi,e,{isEnd:!0})}))}),a}function PC(r,e,t,n){var a=n.brushStyle.lineWidth||0,i=Ao(a,i4),o=t[0][0],s=t[1][0],l=o-a/2,u=s-a/2,f=t[0][1],h=t[1][1],c=f-i+a/2,v=h-i+a/2,p=f-o,d=h-s,g=p+a,y=d+a;xn(r,e,"main",o,s,p,d),n.transformable&&(xn(r,e,"w",l,u,i,y),xn(r,e,"e",c,u,i,y),xn(r,e,"n",l,u,g,i),xn(r,e,"s",l,v,g,i),xn(r,e,"nw",l,u,i,i),xn(r,e,"ne",c,u,i,i),xn(r,e,"sw",l,v,i,i),xn(r,e,"se",c,v,i,i))}function Og(r,e){var t=e.__brushOption,n=t.transformable,a=e.childAt(0);a.useStyle(kg(t)),a.attr({silent:!n,cursor:n?"move":"default"}),D([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?Vg(r,i[0]):c4(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?s4[s]+"-resize":null})})}function xn(r,e,t,n,a,i,o){var s=e.childOfName(t);s&&s.setShape(p4(Bg(r,e,[[n,a],[n+i,a+o]])))}function kg(r){return tt({strokeNoScale:!0},r.brushStyle)}function RC(r,e,t,n){var a=[bl(r,t),bl(e,n)],i=[Ao(r,t),Ao(e,n)];return[[a[0],i[0]],[a[1],i[1]]]}function h4(r){return $a(r.group)}function Vg(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=$u(t[e],h4(r));return n[a]}function c4(r,e){var t=[Vg(r,e[0]),Vg(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function NC(r,e,t,n,a,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=OC(e,a,i);D(n,function(u){var f=o4[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(RC(s[0][0],s[1][0],s[0][1],s[1][1])),Eg(e,t),xi(e,{isEnd:!1})}function v4(r,e,t,n){var a=e.__brushOption.range,i=OC(r,t,n);D(a,function(o){o[0]+=i[0],o[1]+=i[1]}),Eg(r,e),xi(r,{isEnd:!1})}function OC(r,e,t){var n=r.group,a=n.transformCoordToLocal(e,t),i=n.transformCoordToLocal(0,0);return[a[0]-i[0],a[1]-i[1]]}function Bg(r,e,t){var n=LC(r,e);return n&&n!==Si?n.clipPath(t,r._transform):nt(t)}function p4(r){var e=bl(r[0][0],r[1][0]),t=bl(r[0][1],r[1][1]),n=Ao(r[0][0],r[1][0]),a=Ao(r[0][1],r[1][1]);return{x:e,y:t,width:n-e,height:a-t}}function d4(r,e,t){if(!(!r._brushType||y4(r,e.offsetX,e.offsetY))){var n=r._zr,a=r._covers,i=Rg(r,e,t);if(!r._dragging)for(var o=0;on.getWidth()||t<0||t>n.getHeight()}var dh={lineX:zC(0),lineY:zC(1),rect:{createCover:function(r,e){function t(n){return n}return EC({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=IC(r);return RC(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,n){PC(r,e,t,n)},updateCommon:Og,contain:Gg},polygon:{createCover:function(r,e){var t=new at;return t.add(new Ve({name:"main",style:kg(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new ke({name:"main",draggable:!0,drift:st(v4,r,e),ondragend:st(xi,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,n){e.childAt(0).setShape({points:Bg(r,e,t)})},updateCommon:Og,contain:Gg}};function zC(r){return{createCover:function(e,t){return EC({toRectRange:function(n){var a=[n,[0,100]];return r&&a.reverse(),a},fromRectRange:function(n){return n[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=IC(e),n=bl(t[0][r],t[1][r]),a=Ao(t[0][r],t[1][r]);return[n,a]},updateCoverShape:function(e,t,n,a){var i,o=LC(e,t);if(o!==Si&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,i];r&&l.reverse(),PC(e,t,l,a)},updateCommon:Og,contain:Gg}}const Fg=u4;function GC(r){return r=Hg(r),function(e){return _1(e,r)}}function FC(r,e){return r=Hg(r),function(t){var n=e??t,a=n?r.width:r.height,i=n?r.x:r.y;return[i,i+(a||0)]}}function HC(r,e,t){var n=Hg(r);return function(a,i){return n.contain(i[0],i[1])&&!th(a,e,t)}}function Hg(r){return ct.create(r)}var m4=["axisLine","axisTickLabel","axisName"],_4=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){r.prototype.init.apply(this,arguments),(this._brushController=new Fg(n.getZr())).on("brush",Z(this._onBrush,this))},e.prototype.render=function(t,n,a,i){if(!S4(t,n,i)){this.axisModel=t,this.api=a,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new at,this.group.add(this._axisGroup),!!t.get("show")){var s=w4(t,n),l=s.coordinateSystem,u=t.getAreaSelectStyle(),f=u.width,h=t.axis.dim,c=l.getAxisLayout(h),v=B({strokeContainThreshold:f},c),p=new _n(t,v);D(m4,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(v,u,t,s,f,a),ys(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,n,a,i,o,s){var l=a.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),h=ct.create({x:l[0],y:-o/2,width:u,height:o});h.x-=f,h.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:GC(h),isTargetByCursor:HC(h,s,i),getLinearBrushOtherExtent:FC(h,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(x4(a))},e.prototype._onBrush=function(t){var n=t.areas,a=this.axisModel,i=a.axis,o=F(n,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!a.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:a.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Ut);function S4(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function x4(r){var e=r.axis;return F(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function w4(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}const b4=_4;var T4={type:"axisAreaSelect",event:"axisAreaSelected"};function D4(r){r.registerAction(T4,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var C4={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function $C(r){r.registerComponentView(HH),r.registerComponentModel(WH),r.registerCoordinateSystem("parallel",e4),r.registerPreprocessor(kH),r.registerComponentModel(wC),r.registerComponentView(b4),xo(r,"parallel",wC,C4),D4(r)}function A4(r){dt($C),r.registerChartView(MH),r.registerSeriesModel(PH),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,OH)}var M4=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),L4=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new M4},e.prototype.buildPath=function(t,n){var a=n.extent;t.moveTo(n.x1,n.y1),t.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(t.lineTo(n.x2+a,n.y2),t.bezierCurveTo(n.cpx2+a,n.cpy2,n.cpx1+a,n.cpy1,n.x1+a,n.y1)):(t.lineTo(n.x2,n.y2+a),t.bezierCurveTo(n.cpx2,n.cpy2+a,n.cpx1,n.cpy1+a,n.x1,n.y1+a)),t.closePath()},e.prototype.highlight=function(){cn(this)},e.prototype.downplay=function(){vn(this)},e}(gt),I4=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,n,a){var i=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,f=l.height,h=t.getData(),c=t.getData("edge"),v=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var d=new L4,g=ot(d);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=p.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),S=p.node1.getLayout(),w=p.node1.getModel(),x=w.get("localX"),b=w.get("localY"),T=p.node2.getLayout(),C=p.node2.getModel(),A=C.get("localX"),M=C.get("localY"),L=p.getLayout(),I,E,P,N,V,k,z,H;switch(d.shape.extent=Math.max(1,L.dy),d.shape.orient=v,v==="vertical"?(I=(x!=null?x*u:S.x)+L.sy,E=(b!=null?b*f:S.y)+S.dy,P=(A!=null?A*u:T.x)+L.ty,N=M!=null?M*f:T.y,V=I,k=E*(1-_)+N*_,z=P,H=E*_+N*(1-_)):(I=(x!=null?x*u:S.x)+S.dx,E=(b!=null?b*f:S.y)+L.sy,P=A!=null?A*u:T.x,N=(M!=null?M*f:T.y)+L.ty,V=I*(1-_)+P*_,k=E,z=I*_+P*(1-_),H=N),d.setShape({x1:I,y1:E,x2:P,y2:N,cpx1:V,cpy1:k,cpx2:z,cpy2:H}),d.useStyle(m.getItemStyle()),d.style.fill){case"source":d.style.fill=p.node1.getVisual("color"),d.style.decal=p.node1.getVisual("style").decal;break;case"target":d.style.fill=p.node2.getVisual("color"),d.style.decal=p.node2.getVisual("style").decal;break;case"gradient":var W=p.node1.getVisual("color"),X=p.node2.getVisual("color");U(W)&&U(X)&&(d.style.fill=new ds(0,0,+(v==="horizontal"),+(v==="vertical"),[{color:W,offset:0},{color:X,offset:1}]))}de(d,oe(y,"edgeLabel"),{labelFetcher:t,labelDataIndex:p.dataIndex,defaultText:""+y.get("value")}),d.setTextConfig({position:"inside"});var et=y.getModel("emphasis");pe(d,y,"lineStyle",function(mt){return mt.getItemStyle()}),s.add(d),c.setItemGraphicEl(p.dataIndex,d);var rt=et.get("focus");Wt(d,rt==="adjacency"?p.getAdjacentDataIndices():rt,et.get("blurScope"),et.get("disabled")),ot(d).dataType="edge"}),o.eachNode(function(p){var d=p.getLayout(),g=p.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),S=new Tt({shape:{x:y!=null?y*u:d.x,y:m!=null?m*f:d.y,width:d.dx,height:d.dy},style:g.getModel("itemStyle").getItemStyle(),z2:10});de(S,oe(g),{labelFetcher:t,labelDataIndex:p.dataIndex,defaultText:p.id}),S.disableLabelAnimation=!0,S.setStyle("fill",p.getVisual("color")),S.setStyle("decal",p.getVisual("style").decal),pe(S,g),s.add(S),h.setItemGraphicEl(p.dataIndex,S),ot(S).dataType="node";var w=_.get("focus");Wt(S,w==="adjacency"?p.getAdjacentDataIndices():w,_.get("blurScope"),_.get("disabled"))}),h.eachItemGraphicEl(function(p,d){var g=h.getItemModel(d);g.get("draggable")&&(p.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),a.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:h.getRawIndex(d),localX:this.shape.x/u,localY:this.shape.y/f})},p.ondragend=function(){i._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(E4(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(Bt);function E4(r,e,t){var n=new Tt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Gt(n,{shape:{width:r.width+20}},e,t),n}const P4=I4;var R4=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){var a=t.edges||t.links,i=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l=0)s[o[l].depth]=new Vt(o[l],this,n);else if(process.env.NODE_ENV!=="production")throw new Error("levels[i].depth is mandatory and should be natural number");if(i&&a){var u=vC(i,a,this,!0,f);return u.data}function f(h,c){h.wrapMethod("getItemModel",function(v,p){var d=v.parentModel,g=d.getData().getItemLayout(p);if(g){var y=g.depth,m=d.levelModels[y];m&&(v.parentModel=m)}return v}),c.wrapMethod("getItemModel",function(v,p){var d=v.parentModel,g=d.getGraph().getEdgeByIndex(p),y=g.node1.getLayout();if(y){var m=y.depth,_=d.levelModels[m];_&&(v.parentModel=_)}return v})}},e.prototype.setNodePosition=function(t,n){var a=this.option.data||this.option.nodes,i=a[t];i.localX=n[0],i.localY=n[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,a){function i(v){return isNaN(v)||v==null}if(a==="edge"){var o=this.getDataParams(t,a),s=o.data,l=o.value,u=s.source+" -- "+s.target;return se("nameValue",{name:u,value:l,noValue:i(l)})}else{var f=this.getGraph().getNodeByIndex(t),h=f.getLayout().value,c=this.getDataParams(t,a).data.name;return se("nameValue",{name:c!=null?c+"":null,value:h,noValue:i(h)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,n){var a=r.prototype.getDataParams.call(this,t,n);if(a.value==null&&n==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;a.value=o}return a},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Ft);const N4=R4;function O4(r,e){r.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),a=t.get("nodeGap"),i=k4(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,f=l.edges;B4(u);var h=Rt(u,function(d){return d.getLayout().value===0}),c=h.length!==0?0:t.get("layoutIterations"),v=t.get("orient"),p=t.get("nodeAlign");V4(u,f,n,a,o,s,c,v,p)})}function k4(r,e){return ae(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function V4(r,e,t,n,a,i,o,s,l){z4(r,e,t,a,i,s,l),$4(r,e,i,a,n,o,s),Q4(r,s)}function B4(r){D(r,function(e){var t=ra(e.outEdges,gh),n=ra(e.inEdges,gh),a=e.getValue()||0,i=Math.max(t,n,a);e.setLayout({value:i},!0)})}function z4(r,e,t,n,a,i,o){for(var s=[],l=[],u=[],f=[],h=0,c=0;c=0;y&&g.depth>v&&(v=g.depth),d.setLayout({depth:y?g.depth:h},!0),i==="vertical"?d.setLayout({dy:t},!0):d.setLayout({dx:t},!0);for(var m=0;mh-1?v:h-1;o&&o!=="left"&&G4(r,o,i,b);var T=i==="vertical"?(a-t)/b:(n-t)/b;H4(r,T,i)}function WC(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function G4(r,e,t,n){if(e==="right"){for(var a=[],i=r,o=0;i.length;){for(var s=0;s0;i--)l*=.99,Y4(s,l,o),$g(s,a,t,n,o),j4(s,l,o),$g(s,a,t,n,o)}function W4(r,e){var t=[],n=e==="vertical"?"y":"x",a=tv(r,function(i){return i.getLayout()[n]});return a.keys.sort(function(i,o){return i-o}),D(a.keys,function(i){t.push(a.buckets.get(i))}),t}function U4(r,e,t,n,a,i){var o=1/0;D(r,function(s){var l=s.length,u=0;D(s,function(h){u+=h.getLayout().value});var f=i==="vertical"?(n-(l-1)*a)/u:(t-(l-1)*a)/u;f0&&(s=l.getLayout()[i]+u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]+l.getLayout()[c]+e;var p=a==="vertical"?n:t;if(u=f-e-p,u>0){s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var v=h-2;v>=0;--v)l=o[v],u=l.getLayout()[i]+l.getLayout()[c]+e-f,u>0&&(s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]}})}function Y4(r,e,t){D(r.slice().reverse(),function(n){D(n,function(a){if(a.outEdges.length){var i=ra(a.outEdges,Z4,t)/ra(a.outEdges,gh);if(isNaN(i)){var o=a.outEdges.length;i=o?ra(a.outEdges,X4,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-ea(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-ea(a,t))*e;a.setLayout({y:l},!0)}}})})}function Z4(r,e){return ea(r.node2,e)*r.getValue()}function X4(r,e){return ea(r.node2,e)}function q4(r,e){return ea(r.node1,e)*r.getValue()}function K4(r,e){return ea(r.node1,e)}function ea(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function gh(r){return r.getValue()}function ra(r,e,t){for(var n=0,a=r.length,i=-1;++io&&(o=l)}),D(n,function(s){var l=new ye({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),f=s.getModel().get(["itemStyle","color"]);f!=null?(s.setVisual("color",f),s.setVisual("style",{fill:f})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}a.length&&D(a,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function t$(r){r.registerChartView(P4),r.registerSeriesModel(N4),r.registerLayout(O4),r.registerVisual(J4),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var UC=function(){function r(){}return r.prototype.getInitialData=function(e,t){var n,a=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",n=a.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",n=i.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],f=e.layout==="horizontal"?0:1,h=this._baseAxisDim=u[f],c=u[1-f],v=[a,i],p=v[f].get("type"),d=v[1-f].get("type"),g=e.data;if(g&&l){var y=[];D(g,function(S,w){var x;G(S)?(x=S.slice(),S.unshift(w)):G(S.value)?(x=B({},S),x.value=x.value.slice(),S.value.unshift(w)):x=S,y.push(x)}),e.data=y}var m=this.defaultValueDimensions,_=[{name:h,type:Df(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Df(d),dimsDef:m.slice()}];return So(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:st(tS,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),YC=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Ft);jt(YC,UC,!0);const e$=YC;var r$=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var f=i.getItemLayout(u),h=ZC(f,i,u,l,!0);i.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,f){var h=s.getItemGraphicEl(f);if(!i.hasValue(u)){o.remove(h);return}var c=i.getItemLayout(u);h?(br(h),XC(c,h,i,u)):h=ZC(c,i,u,l),o.add(h),i.setItemGraphicEl(u,h)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=i},e.prototype.remove=function(t){var n=this.group,a=this._data;this._data=null,a&&a.eachItemGraphicEl(function(i){i&&n.remove(i)})},e.type="boxplot",e}(Bt),n$=function(){function r(){}return r}(),a$=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new n$},e.prototype.buildPath=function(t,n){var a=n.points,i=0;for(t.moveTo(a[i][0],a[i][1]),i++;i<4;i++)t.lineTo(a[i][0],a[i][1]);for(t.closePath();id){var S=[y,_];n.push(S)}}}return{boxData:t,outliers:n}}var c$={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Se){var n="";process.env.NODE_ENV!=="production"&&(n=De("source data is not applicable for this boxplot transform. Expect number[][].")),Et(n)}var a=h$(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function v$(r){r.registerSeriesModel(e$),r.registerChartView(o$),r.registerLayout(s$),r.registerTransform(c$)}var p$=["color","borderColor"],d$=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,n,a){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,n,a,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,n):this._incrementalRenderNormal(t,n)},e.prototype.eachRendered=function(t){Hn(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t){var n=t.getData(),a=this._data,i=this.group,o=n.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),n.diff(a).add(function(f){if(n.hasValue(f)){var h=n.getItemLayout(f);if(s&&qC(u,h))return;var c=Wg(h,f,!0);Gt(c,{shape:{points:h.ends}},t,f),Ug(c,n,f,o),i.add(c),n.setItemGraphicEl(f,c)}}).update(function(f,h){var c=a.getItemGraphicEl(h);if(!n.hasValue(f)){i.remove(c);return}var v=n.getItemLayout(f);if(s&&qC(u,v)){i.remove(c);return}c?(Mt(c,{shape:{points:v.ends}},t,f),br(c)):c=Wg(v),Ug(c,n,f,o),i.add(c),n.setItemGraphicEl(f,c)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&i.remove(h)}).execute(),this._data=n},e.prototype._renderLarge=function(t){this._clear(),KC(t,this.group);var n=t.get("clip",!0)?Uf(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,n){for(var a=n.getData(),i=a.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=a.getItemLayout(o),l=Wg(s);Ug(l,a,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,n){KC(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Bt),g$=function(){function r(){}return r}(),y$=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new g$},e.prototype.buildPath=function(t,n){var a=n.points;this.__simpleBox?(t.moveTo(a[4][0],a[4][1]),t.lineTo(a[6][0],a[6][1])):(t.moveTo(a[0][0],a[0][1]),t.lineTo(a[1][0],a[1][1]),t.lineTo(a[2][0],a[2][1]),t.lineTo(a[3][0],a[3][1]),t.closePath(),t.moveTo(a[4][0],a[4][1]),t.lineTo(a[5][0],a[5][1]),t.moveTo(a[6][0],a[6][1]),t.lineTo(a[7][0],a[7][1]))},e}(gt);function Wg(r,e,t){var n=r.ends;return new y$({shape:{points:t?m$(n,r):n},z2:100})}function qC(r,e){for(var t=!0,n=0;n0?"borderColor":"borderColor0"])||t.get(["itemStyle",r>0?"color":"color0"]);r===0&&(a=t.get(["itemStyle","borderColorDoji"]));var i=t.getModel("itemStyle").getItemStyle(p$);e.useStyle(i),e.style.fill=null,e.style.stroke=a}const S$=d$;var jC=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,n,a){var i=n.getItemLayout(t);return i&&a.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Ft);jt(jC,UC,!0);const x$=jC;function w$(r){!r||!G(r.series)||D(r.series,function(e){Q(e)&&e.type==="k"&&(e.type="candlestick")})}var b$=["itemStyle","borderColor"],T$=["itemStyle","borderColor0"],D$=["itemStyle","borderColorDoji"],C$=["itemStyle","color"],A$=["itemStyle","color0"],M$={seriesType:"candlestick",plan:so(),performRawSeries:!0,reset:function(r,e){function t(i,o){return o.get(i>0?C$:A$)}function n(i,o){return o.get(i===0?D$:i>0?b$:T$)}if(!e.isSeriesFiltered(r)){var a=r.pipelineContext.large;return!a&&{progress:function(i,o){for(var s;(s=i.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,f=l.getItemStyle();f.fill=t(u,l),f.stroke=n(u,l)||f.fill;var h=o.ensureUniqueItemVisual(s,"style");B(h,f)}}}}}};const L$=M$;var I$={seriesType:"candlestick",plan:so(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),n=E$(r,t),a=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[a])),l=F(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],f=l[1],h=l[2],c=l[3];if(t.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?p:v};function v(d,g){for(var y,m=g.getStore();(y=d.next())!=null;){var _=m.get(s,y),S=m.get(u,y),w=m.get(f,y),x=m.get(h,y),b=m.get(c,y),T=Math.min(S,w),C=Math.max(S,w),A=V(T,_),M=V(C,_),L=V(x,_),I=V(b,_),E=[];k(E,M,0),k(E,A,1),E.push(H(I),H(M),H(L),H(A));var P=g.getItemModel(y),N=!!P.get(["itemStyle","borderColorDoji"]);g.setItemLayout(y,{sign:QC(m,y,S,w,f,N),initBaseline:S>w?M[i]:A[i],ends:E,brushRect:z(x,b,_)})}function V(W,X){var et=[];return et[a]=X,et[i]=W,isNaN(X)||isNaN(W)?[NaN,NaN]:e.dataToPoint(et)}function k(W,X,et){var rt=X.slice(),mt=X.slice();rt[a]=Hu(rt[a]+n/2,1,!1),mt[a]=Hu(mt[a]-n/2,1,!0),et?W.push(rt,mt):W.push(mt,rt)}function z(W,X,et){var rt=V(W,et),mt=V(X,et);return rt[a]-=n/2,mt[a]-=n/2,{x:rt[0],y:rt[1],width:n,height:mt[1]-rt[1]}}function H(W){return W[a]=Hu(W[a],1),W}}function p(d,g){for(var y=Zr(d.count*4),m=0,_,S=[],w=[],x,b=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(x=d.next())!=null;){var C=b.get(s,x),A=b.get(u,x),M=b.get(f,x),L=b.get(h,x),I=b.get(c,x);if(isNaN(C)||isNaN(L)||isNaN(I)){y[m++]=NaN,m+=3;continue}y[m++]=QC(b,x,A,M,f,T),S[a]=C,S[i]=L,_=e.dataToPoint(S,null,w),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,S[i]=I,_=e.dataToPoint(S,null,w),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function QC(r,e,t,n,a,i){var o;return t>n?o=-1:t0?r.get(a,e-1)<=n?1:-1:1,o}function E$(r,e){var t=r.getBaseAxis(),n,a=t.type==="category"?t.getBandWidth():(n=t.getExtent(),Math.abs(n[1]-n[0])/e.count()),i=$(lt(r.get("barMaxWidth"),a),a),o=$(lt(r.get("barMinWidth"),1),a),s=r.get("barWidth");return s!=null?$(s,a):Math.max(Math.min(a/2,i),o)}const P$=I$;function R$(r){r.registerChartView(S$),r.registerSeriesModel(x$),r.registerPreprocessor(w$),r.registerVisual(L$),r.registerLayout(P$)}function JC(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var N$=function(r){O(e,r);function e(t,n){var a=r.call(this)||this,i=new rl(t,n),o=new at;return a.add(i),a.add(o),a.updateData(t,n),a}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var n=t.symbolType,a=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(i)/f*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var c=void 0;q(h)?c=h(a):c=h,i.__t>0&&(c=-s*i.__t),this._animateSymbol(i,s,c,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,n,a,i,o){if(n>0){t.__t=0;var s=this,l=t.animate("",i).when(o?n*2:n,{__t:o?2:1}).delay(a).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return Mn(t.__p1,t.__cp1)+Mn(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,n){t.__p1=n[0],t.__p2=n[1],t.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(t,n,a){this.childAt(0).updateData(t,n,a),this._updateEffectSymbol(t,n)},e.prototype._updateSymbolPosition=function(t){var n=t.__p1,a=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=ue,f=mc;s[0]=u(n[0],i[0],a[0],o),s[1]=u(n[1],i[1],a[1],o);var h=t.__t<1?f(n[0],i[0],a[0],o):f(a[0],i[0],n[0],1-o),c=t.__t<1?f(n[1],i[1],a[1],o):f(a[1],i[1],n[1],1-o);t.rotation=-Math.atan2(c,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(i[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var f=(n-i[l])/(i[l+1]-i[l]),h=a[l],c=a[l+1];t.x=h[0]*(1-f)+f*c[0],t.y=h[1]*(1-f)+f*c[1];var v=t.__t<1?c[0]-h[0]:h[0]-c[0],p=t.__t<1?c[1]-h[1]:h[1]-c[1];t.rotation=-Math.atan2(p,v)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,t.ignore=!1}},e}(tA);const W$=$$;var U$=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),Y$=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new U$},e.prototype.buildPath=function(t,n){var a=n.segs,i=n.curveness,o;if(n.polyline)for(o=this._off;o0){t.moveTo(a[o++],a[o++]);for(var l=1;l0){var v=(u+h)/2-(f-c)*i,p=(f+c)/2-(h-u)*i;t.quadraticCurveTo(v,p,h,c)}else t.lineTo(h,c)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,n){var a=this.shape,i=a.segs,o=a.curveness,s=this.style.lineWidth;if(a.polyline)for(var l=0,u=0;u0)for(var h=i[u++],c=i[u++],v=1;v0){var g=(h+p)/2-(c-d)*o,y=(c+d)/2-(p-h)*o;if(a_(h,c,g,y,p,d,s,t,n))return l}else if(Bn(h,c,p,d,s,t,n))return l;l++}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const X$=Z$;var q$={seriesType:"lines",plan:so(),reset:function(r){var e=r.coordinateSystem;if(!e){process.env.NODE_ENV!=="production"&&ce("The lines series must have a coordinate system.");return}var t=r.get("polyline"),n=r.pipelineContext.large;return{progress:function(a,i){var o=[];if(n){var s=void 0,l=a.end-a.start;if(t){for(var u=0,f=a.start;f0&&(f?process.env.NODE_ENV!=="production"&&console.warn("SVG render mode doesn't support lines with trail effect"):u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var h=t.get("clip",!0)&&Uf(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(a),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._lineDraw.incrementalUpdate(t,n.getData()),this._finished=t.end===n.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,n,a){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=rA.reset(t,n,a);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(a)},e.prototype._updateLineDraw=function(t,n){var a=this._lineDraw,i=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return process.env.NODE_ENV!=="production"&&i&&l&&console.warn("Large lines not support effect"),(!a||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(a&&a.remove(),a=this._lineDraw=l?new X$:new xg(o?i?W$:eA:i?tA:_g),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(a.group),a},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var n=t.getZr(),a=n.painter.getType()==="svg";!a&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.type="lines",e}(Bt);const j$=K$;var Q$=typeof Uint32Array>"u"?Array:Uint32Array,J$=typeof Float64Array>"u"?Array:Float64Array;function nA(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(process.env.NODE_ENV!=="production"&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),r.data=F(e,function(t){var n=[t[0].coord,t[1].coord],a={coords:n};return t[0].name&&(a.fromName=t[0].name),t[1].name&&(a.toName=t[1].name),jh([a,t[0],t[1]])}))}var tW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],nA(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(nA(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var n=this._processFlatCoordsArray(t.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=Gl(this._flatCoords,n.flatCoords),this._flatCoordsOffset=Gl(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),t.data=new Float32Array(n.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var n=this.getData().getItemModel(t),a=n.option instanceof Array?n.option:n.getShallow("coords");if(process.env.NODE_ENV!=="production"&&!(a instanceof Array&&a.length>0&&a[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(a)+". Lines must have 2d coords array in data item.");return a},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,n){if(this._flatCoordsOffset){for(var a=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;oa&&process.env.NODE_ENV!=="production")throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,n){if(process.env.NODE_ENV!=="production"){var a=ao.get(t.coordinateSystem);if(!a)throw new Error("Unknown coordinate system "+t.coordinateSystem)}var i=new Le(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],function(o,s,l,u){if(o instanceof Array)return NaN;i.hasItemOption=!0;var f=o.value;if(f!=null)return f instanceof Array?f[u]:f}),i},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=i.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),se("nameValue",{name:f.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),n=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Ft);const eW=tW;function yh(r){return r instanceof Array||(r=[r,r]),r}var rW={seriesType:"lines",reset:function(r){var e=yh(r.get("symbol")),t=yh(r.get("symbolSize")),n=r.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",t&&t[0]),n.setVisual("toSymbolSize",t&&t[1]);function a(i,o){var s=i.getItemModel(o),l=yh(s.getShallow("symbol",!0)),u=yh(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?a:null}}};const nW=rW;function aW(r){r.registerChartView(j$),r.registerSeriesModel(eW),r.registerLayout(rA),r.registerVisual(nW)}var iW=256,oW=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=An.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,n,a,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),f=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),v=e.length;h.width=t,h.height=n;for(var p=0;p0){var L=o(_)?l:u;_>0&&(_=_*A+T),w[x++]=L[M],w[x++]=L[M+1],w[x++]=L[M+2],w[x++]=L[M+3]*_*256}else x+=4}return c.putImageData(S,0,0),h},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=An.createCanvas()),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var a=e.getContext("2d");return a.clearRect(0,0,n,n),a.shadowOffsetX=n,a.shadowBlur=this.blurSize,a.shadowColor="#000",a.beginPath(),a.arc(-t,t,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),e},r.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,a=n[t]||(n[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),a[o++]=i[0],a[o++]=i[1],a[o++]=i[2],a[o++]=i[3];return a},r}();const sW=oW;function lW(r,e,t){var n=r[1]-r[0];e=F(e,function(o){return{interval:[(o.interval[0]-r[0])/n,(o.interval[1]-r[0])/n]}});var a=e.length,i=0;return function(o){var s;for(s=i;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=e[0]&&n<=e[1]}}function aA(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var fW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i;if(n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),process.env.NODE_ENV!=="production"&&!i)throw new Error("Heatmap must use with visualMap");this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,a,0,t.getData().count()):aA(o)&&this._renderOnGeo(o,t,i,a)},e.prototype.incrementalPrepareRender=function(t,n,a){this.group.removeAll()},e.prototype.incrementalRender=function(t,n,a,i){var o=n.coordinateSystem;o&&(aA(o)?this.render(n,a,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Hn(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,n,a,i,o){var s=t.coordinateSystem,l=fi(s,"cartesian2d"),u,f,h,c;if(l){var v=s.getAxis("x"),p=s.getAxis("y");if(process.env.NODE_ENV!=="production"){if(!(v.type==="category"&&p.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(v.onBand&&p.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}u=v.getBandWidth()+.5,f=p.getBandWidth()+.5,h=v.scale.getExtent(),c=p.scale.getExtent()}for(var d=this.group,g=t.getData(),y=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),_=t.getModel(["select","itemStyle"]).getItemStyle(),S=t.get(["itemStyle","borderRadius"]),w=oe(t),x=t.getModel("emphasis"),b=x.get("focus"),T=x.get("blurScope"),C=x.get("disabled"),A=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],M=a;Mh[1]||Pc[1])continue;var N=s.dataToPoint([E,P]);L=new Tt({shape:{x:N[0]-u/2,y:N[1]-f/2,width:u,height:f},style:I})}else{if(isNaN(g.get(A[1],M)))continue;L=new Tt({z2:1,shape:s.dataToRect([g.get(A[0],M)]).contentShape,style:I})}if(g.hasItemOption){var V=g.getItemModel(M),k=V.getModel("emphasis");y=k.getModel("itemStyle").getItemStyle(),m=V.getModel(["blur","itemStyle"]).getItemStyle(),_=V.getModel(["select","itemStyle"]).getItemStyle(),S=V.get(["itemStyle","borderRadius"]),b=k.get("focus"),T=k.get("blurScope"),C=k.get("disabled"),w=oe(V)}L.shape.r=S;var z=t.getRawValue(M),H="-";z&&z[2]!=null&&(H=z[2]+""),de(L,w,{labelFetcher:t,labelDataIndex:M,defaultOpacity:I.opacity,defaultText:H}),L.ensureState("emphasis").style=y,L.ensureState("blur").style=m,L.ensureState("select").style=_,Wt(L,b,T,C),L.incremental=o,o&&(L.states.emphasis.hoverLayer=!0),d.add(L),g.setItemGraphicEl(M,L),this._progressiveEls&&this._progressiveEls.push(L)}},e.prototype._renderOnGeo=function(t,n,a,i){var o=a.targetVisuals.inRange,s=a.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new sW;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var f=t.getViewRect().clone(),h=t.getRoamTransform();f.applyTransform(h);var c=Math.max(f.x,0),v=Math.max(f.y,0),p=Math.min(f.width+f.x,i.getWidth()),d=Math.min(f.height+f.y,i.getHeight()),g=p-c,y=d-v,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(b,T,C){var A=t.dataToPoint([b,T]);return A[0]-=c,A[1]-=v,A.push(C),A}),S=a.getExtent(),w=a.type==="visualMap.continuous"?uW(S,a.option.range):lW(S,a.getPieceList(),a.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},w);var x=new ve({style:{width:g,height:y,x:c,y:v,image:u.canvas},silent:!0});this.group.add(x)},e.type="heatmap",e}(Bt);const hW=fW;var cW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return yn(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=ao.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(Ft);const vW=cW;function pW(r){r.registerChartView(hW),r.registerSeriesModel(vW)}var dW=["itemStyle","borderWidth"],iA=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Xg=new Hr,gW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),h=l.master.getRect(),c={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:f,valueDim:iA[+f],categoryDim:iA[1-+f]};return o.diff(s).add(function(v){if(o.hasValue(v)){var p=cA(o,v),d=oA(o,v,p,c),g=vA(o,c,d);o.setItemGraphicEl(v,g),i.add(g),gA(g,c,d)}}).update(function(v,p){var d=s.getItemGraphicEl(p);if(!o.hasValue(v)){i.remove(d);return}var g=cA(o,v),y=oA(o,v,g,c),m=dA(o,y);d&&m!==d.__pictorialShapeStr&&(i.remove(d),o.setItemGraphicEl(v,null),d=null),d?bW(d,c,y):d=vA(o,c,y,!0),o.setItemGraphicEl(v,d),d.__pictorialSymbolMeta=y,i.add(d),gA(d,c,y)}).remove(function(v){var p=s.getItemGraphicEl(v);p&&pA(s,v,p.__pictorialSymbolMeta.animationModel,p)}).execute(),this._data=o,this.group},e.prototype.remove=function(t,n){var a=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){pA(i,ot(o).dataIndex,t,o)}):a.removeAll()},e.type="pictorialBar",e}(Bt);function oA(r,e,t,n){var a=r.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=t.get("symbolPatternSize")||2,h=t.isAnimationEnabled(),c={dataIndex:e,layout:a,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:h?t:null,hoverScale:h&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};yW(t,i,a,n,c),mW(r,e,a,i,o,c.boundingLength,c.pxSign,f,n,c),_W(t,c.symbolScale,u,n,c);var v=c.symbolSize,p=fo(t.get("symbolOffset"),v);return SW(t,v,a,i,o,p,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function yW(r,e,t,n,a){var i=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[i.wh]<=0),f;if(G(o)){var h=[qg(s,o[0])-l,qg(s,o[1])-l];h[1]0?1:-1}function qg(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function mW(r,e,t,n,a,i,o,s,l,u){var f=l.valueDim,h=l.categoryDim,c=Math.abs(t[h.wh]),v=r.getItemVisual(e,"symbolSize"),p;G(v)?p=v.slice():v==null?p=["100%","100%"]:p=[v,v],p[h.index]=$(p[h.index],c),p[f.index]=$(p[f.index],n?c:Math.abs(i)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[f.index]*=(l.isHorizontal?-1:1)*o}function _W(r,e,t,n,a){var i=r.get(dW)||0;i&&(Xg.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Xg.updateTransform(),i/=Xg.getLineScale(),i*=e[n.valueDim.index]),a.valueLineWidth=i||0}function SW(r,e,t,n,a,i,o,s,l,u,f,h){var c=f.categoryDim,v=f.valueDim,p=h.pxSign,d=Math.max(e[v.index]+s,0),g=d;if(n){var y=Math.abs(l),m=Qt(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var S=$(m,e[v.index]),w=Math.max(d+S*2,0),x=_?0:S*2,b=jc(n),T=b?n:yA((y+x)/w),C=y-T*d;S=C/2/(_?T:Math.max(T-1,1)),w=d+S*2,x=_?0:S*2,!b&&n!=="fixed"&&(T=u?yA((Math.abs(u)+x)/w):0),g=T*w-x,h.repeatTimes=T,h.symbolMargin=S}var A=p*(g/2),M=h.pathPosition=[];M[c.index]=t[c.wh]/2,M[v.index]=o==="start"?A:o==="end"?l-A:l/2,i&&(M[0]+=i[0],M[1]+=i[1]);var L=h.bundlePosition=[];L[c.index]=t[c.xy],L[v.index]=t[v.xy];var I=h.barRectShape=B({},t);I[v.wh]=p*Math.max(Math.abs(t[v.wh]),Math.abs(M[v.index]+A)),I[c.wh]=t[c.wh];var E=h.clipShape={};E[c.xy]=-t[c.xy],E[c.wh]=f.ecSize[c.wh],E[v.xy]=0,E[v.wh]=t[v.wh]}function sA(r){var e=r.symbolPatternSize,t=re(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function lA(r,e,t,n){var a=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,f=0,h=i[e.valueDim.index]+o+t.symbolMargin*2;for(Kg(r,function(d){d.__pictorialAnimationIndex=f,d.__pictorialRepeatTimes=u,f0:y<0)&&(m=u-1-d),g[l.index]=h*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function uA(r,e,t,n){var a=r.__pictorialBundle,i=r.__pictorialMainPath;i?Mo(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,n):(i=r.__pictorialMainPath=sA(t),a.add(i),Mo(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,n))}function fA(r,e,t){var n=B({},e.barRectShape),a=r.__pictorialBarRect;a?Mo(a,null,{shape:n},e,t):(a=r.__pictorialBarRect=new Tt({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function hA(r,e,t,n){if(t.symbolClip){var a=r.__pictorialClipPath,i=B({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(a)Mt(a,{shape:i},s,l);else{i[o.wh]=0,a=new Tt({shape:i}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=t.clipShape[o.wh],Ss[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function cA(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=xW,t.isAnimationEnabled=wW,t}function xW(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function wW(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function vA(r,e,t,n){var a=new at,i=new at;return a.add(i),a.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?lA(a,e,t):uA(a,e,t),fA(a,t,n),hA(a,e,t,n),a.__pictorialShapeStr=dA(r,t),a.__pictorialSymbolMeta=t,a}function bW(r,e,t){var n=t.animationModel,a=t.dataIndex,i=r.__pictorialBundle;Mt(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},n,a),t.symbolRepeat?lA(r,e,t,!0):uA(r,e,t,!0),fA(r,t,!0),hA(r,e,t,!0)}function pA(r,e,t,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];Kg(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(t=null),D(i,function(o){Fn(o,{scaleX:0,scaleY:0},t,e,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(e,null)}function dA(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Kg(r,e,t){D(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&e.call(t,n)})}function Mo(r,e,t,n,a,i){e&&r.attr(e),n.symbolClip&&!a?t&&r.attr(t):t&&Ss[a?"updateProps":"initProps"](r,t,n.animationModel,n.dataIndex,i)}function gA(r,e,t){var n=t.dataIndex,a=t.itemModel,i=a.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=a.getModel(["blur","itemStyle"]).getItemStyle(),l=a.getModel(["select","itemStyle"]).getItemStyle(),u=a.getShallow("cursor"),f=i.get("focus"),h=i.get("blurScope"),c=i.get("scale");Kg(r,function(d){if(d instanceof ve){var g=d.style;d.useStyle(B({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else d.useStyle(t.style);var y=d.ensureState("emphasis");y.style=o,c&&(y.scaleX=d.scaleX*1.1,y.scaleY=d.scaleY*1.1),d.ensureState("blur").style=s,d.ensureState("select").style=l,u&&(d.cursor=u),d.z2=t.z2});var v=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;de(p,oe(a),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:_o(e.seriesModel.getData(),n),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:v}),Wt(r,f,h,i.get("disabled"))}function yA(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}const TW=gW;var DW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=$n(Yf.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Yf);const CW=DW;function AW(r){r.registerChartView(TW),r.registerSeriesModel(CW),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,st(Ew,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Pw("pictorialBar"))}var MW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),f=u.rect,h=u.boundaryGap;s.x=0,s.y=f.y+h[0];function c(g){return g.name}var v=new gn(this._layersSeries||[],l,c,c),p=[];v.add(Z(d,this,"add")).update(Z(d,this,"update")).remove(Z(d,this,"remove")).execute();function d(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var S=[],w=[],x,b=l[y].indices,T=0;Ti&&(i=s),n.push(s)}for(var u=0;ui&&(i=h)}return{y0:a,max:i}}function OW(r){r.registerChartView(IW),r.registerSeriesModel(PW),r.registerLayout(RW),r.registerProcessor(il("themeRiver"))}var kW=2,VW=4,BW=function(r){O(e,r);function e(t,n,a,i){var o=r.call(this)||this;o.z2=kW,o.textConfig={inside:!0},ot(o).seriesIndex=n.seriesIndex;var s=new At({z2:VW,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,n,a,i),o}return e.prototype.updateData=function(t,n,a,i,o){this.node=n,n.piece=this,a=a||this._seriesModel,i=i||this._ecModel;var s=this;ot(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),f=n.getLayout(),h=B({},f);h.label=null;var c=n.getVisual("style");c.lineJoin="bevel";var v=n.getVisual("decal");v&&(c.decal=co(v,o));var p=hi(l.getModel("itemStyle"),h,!0);B(h,p),D(Ae,function(m){var _=s.ensureState(m),S=l.getModel([m,"itemStyle"]);_.style=S.getItemStyle();var w=hi(S,h);w&&(_.shape=w)}),t?(s.setShape(h),s.shape.r=f.r0,Gt(s,{shape:{r:f.r}},a,n.dataIndex)):(Mt(s,{shape:h},a),br(s)),s.useStyle(c),this._updateLabel(a);var d=l.getShallow("cursor");d&&s.attr("cursor",d),this._seriesModel=a||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="ancestor"?n.getAncestorsIndices():g==="descendant"?n.getDescendantIndices():g;Wt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var n=this,a=this.node.getModel(),i=a.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),f=Math.sin(l),h=this,c=h.getTextContent(),v=this.node.dataIndex,p=i.get("minAngle")/180*Math.PI,d=i.get("show")&&!(p!=null&&Math.abs(s)Math.PI/2?"right":"left"):!L||L==="center"?(s===2*Math.PI&&o.r0===0?A=0:A=(o.r+o.r0)/2,L="center"):L==="left"?(A=o.r0+M,l>Math.PI/2&&(L="right")):L==="right"&&(A=o.r-M,l>Math.PI/2&&(L="left")),S.style.align=L,S.style.verticalAlign=g(m,"verticalAlign")||"middle",S.x=A*u+o.cx,S.y=A*f+o.cy;var I=g(m,"rotate"),E=0;I==="radial"?(E=un(-l),E>Math.PI/2&&EMath.PI/2?E-=Math.PI:E<-Math.PI/2&&(E+=Math.PI)):Ct(I)&&(E=I*Math.PI/180),S.rotation=E});function g(y,m){var _=y.get(m);return _??i.get(m)}c.dirtyStyle()},e}(Oe);const _A=BW;var Qg="sunburstRootToNode",SA="sunburstHighlight",zW="sunburstUnhighlight";function GW(r){r.registerAction({type:Qg,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(a,i){var o=vl(e,[Qg],a);if(o){var s=a.getViewRoot();s&&(e.direction=Jd(s,o.node)?"rollUp":"drillDown"),a.resetViewRoot(o.node)}}}),r.registerAction({type:SA,update:"none"},function(e,t,n){e=B({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(i){var o=vl(e,[SA],i);o&&(e.dataIndex=o.node.dataIndex)}process.env.NODE_ENV!=="production"&&Jt("sunburstHighlight","highlight"),n.dispatchAction(B(e,{type:"highlight"}))}),r.registerAction({type:zW,update:"updateView"},function(e,t,n){e=B({},e),process.env.NODE_ENV!=="production"&&Jt("sunburstUnhighlight","downplay"),n.dispatchAction(B(e,{type:"downplay"}))})}var FW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){var o=this;this.seriesModel=t,this.api=a,this.ecModel=n;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),f=this.group,h=t.get("renderLabelForZeroData"),c=[];u.eachNode(function(m){c.push(m)});var v=this._oldChildren||[];p(c,v),y(l,u),this._initEvents(),this._oldChildren=c;function p(m,_){if(m.length===0&&_.length===0)return;new gn(_,m,S,S).add(w).update(w).remove(st(w,null)).execute();function S(x){return x.getId()}function w(x,b){var T=x==null?null:m[x],C=b==null?null:_[b];d(T,C)}}function d(m,_){if(!h&&m&&!m.getValue()&&(m=null),m!==l&&_!==l){if(_&&_.piece)m?(_.piece.updateData(!1,m,t,n,a),s.setItemGraphicEl(m.dataIndex,_.piece)):g(_);else if(m){var S=new _A(m,t,n,a);f.add(S),s.setItemGraphicEl(m.dataIndex,S)}}}function g(m){m&&m.piece&&(f.remove(m.piece),m.piece=null)}function y(m,_){_.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,n,a):(o.virtualPiece=new _A(m,t,n,a),f.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(_.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(n){var a=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!a&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";tf(u,f)}}a=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Qg,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e}(Bt);const HW=FW;var $W=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};xA(a);var i=this._levelModels=F(t.levels||[],function(l){return new Vt(l,this,n)},this),o=Qd.createTree(a,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var h=o.getNodeByDataIndex(f),c=i[h.depth];return c&&(u.parentModel=c),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=ih(a,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){PD(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(Ft);function xA(r){var e=0;D(r.children,function(n){xA(n);var a=n.value;G(a)&&(a=a[0]),e+=a});var t=r.value;G(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),G(r.value)?r.value[0]=t:r.value=t}const WW=$W;var wA=Math.PI/180;function UW(r,e,t){e.eachSeriesByType(r,function(n){var a=n.get("center"),i=n.get("radius");G(i)||(i=[0,i]),G(a)||(a=[a,a]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=$(a[0],o),f=$(a[1],s),h=$(i[0],l/2),c=$(i[1],l/2),v=-n.get("startAngle")*wA,p=n.get("minAngle")*wA,d=n.getData().tree.root,g=n.getViewRoot(),y=g.depth,m=n.get("sort");m!=null&&bA(g,m);var _=0;D(g.children,function(N){!isNaN(N.getValue())&&_++});var S=g.getValue(),w=Math.PI/(S||_)*2,x=g.depth>0,b=g.height-(x?-1:1),T=(c-h)/(b||1),C=n.get("clockwise"),A=n.get("stillShowZeroSum"),M=C?1:-1,L=function(N,V){if(N){var k=V;if(N!==d){var z=N.getValue(),H=S===0&&A?w:z*w;H1;)o=o.parentNode;var s=a.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&U(s)&&(s=Tc(s,(n.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(n){var a=n.getData(),i=a.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,n,i.root.height));var u=a.ensureUniqueItemVisual(o.dataIndex,"style");B(u,l)})})}function XW(r){r.registerChartView(HW),r.registerSeriesModel(WW),r.registerLayout(st(UW,"sunburst")),r.registerProcessor(st(il,"sunburst")),r.registerVisual(ZW),GW(r)}var TA={color:"fill",borderColor:"stroke"},qW={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},wn=bt(),KW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,n){return yn(null,this)},e.prototype.getDataParams=function(t,n,a){var i=r.prototype.getDataParams.call(this,t,n);return a&&(i.info=wn(a).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Ft);const jW=KW;function QW(r,e){return e=e||[0,0],F(["x","y"],function(t,n){var a=this.getAxis(t),i=e[n],o=r[n]/2;return a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(i-o)-a.dataToCoord(i+o))},this)}function JW(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Z(QW,r)}}}function tU(r,e){return e=e||[0,0],F([0,1],function(t){var n=e[t],a=r[t]/2,i=[],o=[];return i[t]=n-a,o[t]=n+a,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function eU(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:Z(tU,r)}}}function rU(r,e){var t=this.getAxis(),n=e instanceof Array?e[0]:e,a=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(n-a)-t.dataToCoord(n+a))}function nU(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Z(rU,r)}}}function aU(r,e){return e=e||[0,0],F(["Radius","Angle"],function(t,n){var a="get"+t+"Axis",i=this[a](),o=e[n],s=r[n]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function iU(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:n[1],r0:n[0]},api:{coord:function(a){var i=e.dataToRadius(a[0]),o=t.dataToAngle(a[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:Z(aU,r)}}}function oU(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(n,a){return r.dataToPoint(n,a)}}}}var DA={};function CA(r,e,t,n){return r&&(r.legacy||r.legacy!==!1&&!t&&!n&&e!=="tspan"&&(e==="text"||Y(r,"text")))}function AA(r,e,t){var n=r,a,i,o;if(e==="text")o=n;else{o={},Y(n,"text")&&(o.text=n.text),Y(n,"rich")&&(o.rich=n.rich),Y(n,"textFill")&&(o.fill=n.textFill),Y(n,"textStroke")&&(o.stroke=n.textStroke),Y(n,"fontFamily")&&(o.fontFamily=n.fontFamily),Y(n,"fontSize")&&(o.fontSize=n.fontSize),Y(n,"fontStyle")&&(o.fontStyle=n.fontStyle),Y(n,"fontWeight")&&(o.fontWeight=n.fontWeight),i={type:"text",style:o,silent:!0},a={};var s=Y(n,"textPosition");t?a.position=s?n.textPosition:"inside":s&&(a.position=n.textPosition),Y(n,"textPosition")&&(a.position=n.textPosition),Y(n,"textOffset")&&(a.offset=n.textOffset),Y(n,"textRotation")&&(a.rotation=n.textRotation),Y(n,"textDistance")&&(a.distance=n.textDistance)}return MA(o,r),D(o.rich,function(l){MA(l,l)}),{textConfig:a,textContent:i}}function MA(r,e){e&&(e.font=e.textFont||e.font,Y(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),Y(e,"textAlign")&&(r.align=e.textAlign),Y(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),Y(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),Y(e,"textWidth")&&(r.width=e.textWidth),Y(e,"textHeight")&&(r.height=e.textHeight),Y(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),Y(e,"textPadding")&&(r.padding=e.textPadding),Y(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),Y(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),Y(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),Y(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),Y(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),Y(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),Y(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function LA(r,e,t){var n=r;n.textPosition=n.textPosition||t.position||"inside",t.offset!=null&&(n.textOffset=t.offset),t.rotation!=null&&(n.textRotation=t.rotation),t.distance!=null&&(n.textDistance=t.distance);var a=n.textPosition.indexOf("inside")>=0,i=r.fill||"#000";IA(n,e);var o=n.textFill==null;return a?o&&(n.textFill=t.insideFill||"#fff",!n.textStroke&&t.insideStroke&&(n.textStroke=t.insideStroke),!n.textStroke&&(n.textStroke=i),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=r.fill||t.outsideFill||"#000"),!n.textStroke&&t.outsideStroke&&(n.textStroke=t.outsideStroke)),n.text=e.text,n.rich=e.rich,D(e.rich,function(s){IA(s,s)}),n}function IA(r,e){e&&(Y(e,"fill")&&(r.textFill=e.fill),Y(e,"stroke")&&(r.textStroke=e.fill),Y(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),Y(e,"font")&&(r.font=e.font),Y(e,"fontStyle")&&(r.fontStyle=e.fontStyle),Y(e,"fontWeight")&&(r.fontWeight=e.fontWeight),Y(e,"fontSize")&&(r.fontSize=e.fontSize),Y(e,"fontFamily")&&(r.fontFamily=e.fontFamily),Y(e,"align")&&(r.textAlign=e.align),Y(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),Y(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),Y(e,"width")&&(r.textWidth=e.width),Y(e,"height")&&(r.textHeight=e.height),Y(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),Y(e,"padding")&&(r.textPadding=e.padding),Y(e,"borderColor")&&(r.textBorderColor=e.borderColor),Y(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),Y(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),Y(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),Y(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),Y(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),Y(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),Y(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),Y(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),Y(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),Y(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}function EA(r,e){if(process.env.NODE_ENV!=="production"){var t=r+"^_^"+e;DA[t]||(console.warn('[ECharts] DEPRECATED: "'+r+'" has been deprecated. '+e),DA[t]=!0)}}var PA={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},RA=St(PA),mh=Er(Nr,function(r,e){return r[e]=1,r},{}),NA=Nr.join(", "),_h=["","style","shape","extra"],Lo=bt();function Jg(r,e,t,n,a){var i=r+"Animation",o=Ui(r,n,a)||{},s=Lo(e).userDuring;return o.duration>0&&(o.during=s?Z(hU,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),B(o,t[i]),o}function Sh(r,e,t,n){n=n||{};var a=n.dataIndex,i=n.isInit,o=n.clearStyle,s=t.isAnimationEnabled(),l=Lo(r),u=e.style;l.userDuring=e.during;var f={},h={};if(vU(r,e,h),VA("shape",e,h),VA("extra",e,h),!i&&s&&(cU(r,e,f),kA("shape",r,e,f),kA("extra",r,e,f),pU(r,e,u,f)),h.style=u,sU(r,h,o),uU(r,e),s)if(i){var c={};D(_h,function(p){var d=p?e[p]:e;d&&d.enterFrom&&(p&&(c[p]=c[p]||{}),B(p?c[p]:c,d.enterFrom))});var v=Jg("enter",r,e,t,a);v.duration>0&&r.animateFrom(c,v)}else lU(r,e,a||0,t,f);OA(r,e),u?r.dirty():r.markRedraw()}function OA(r,e){for(var t=Lo(r).leaveToProps,n=0;n<_h.length;n++){var a=_h[n],i=a?e[a]:e;i&&i.leaveTo&&(t||(t=Lo(r).leaveToProps={}),a&&(t[a]=t[a]||{}),B(a?t[a]:t,i.leaveTo))}}function xh(r,e,t,n){if(r){var a=r.parent,i=Lo(r).leaveToProps;if(i){var o=Jg("update",r,e,t,0);o.done=function(){a.remove(r),n&&n()},r.animateTo(i,o)}else a.remove(r),n&&n()}}function wi(r){return r==="all"}function sU(r,e,t){var n=e.style;if(!r.isGroup&&n){if(t){r.useStyle({});for(var a=r.animators,i=0;i0&&r.animateFrom(a,i)}}function uU(r,e){Y(e,"silent")&&(r.silent=e.silent),Y(e,"ignore")&&(r.ignore=e.ignore),r instanceof tr&&Y(e,"invisible")&&(r.invisible=e.invisible),r instanceof gt&&Y(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var jr={},fU={setTransform:function(r,e){return process.env.NODE_ENV!=="production"&&J(Y(mh,r),"Only "+NA+" available in `setTransform`."),jr.el[r]=e,this},getTransform:function(r){return process.env.NODE_ENV!=="production"&&J(Y(mh,r),"Only "+NA+" available in `getTransform`."),jr.el[r]},setShape:function(r,e){process.env.NODE_ENV!=="production"&&Io(r);var t=jr.el,n=t.shape||(t.shape={});return n[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){process.env.NODE_ENV!=="production"&&Io(r);var e=jr.el.shape;if(e)return e[r]},setStyle:function(r,e){process.env.NODE_ENV!=="production"&&Io(r);var t=jr.el,n=t.style;return n&&(process.env.NODE_ENV!=="production"&&ca(e)&&$t("style."+r+" must not be assigned with NaN."),n[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){process.env.NODE_ENV!=="production"&&Io(r);var e=jr.el.style;if(e)return e[r]},setExtra:function(r,e){process.env.NODE_ENV!=="production"&&Io(r);var t=jr.el.extra||(jr.el.extra={});return t[r]=e,this},getExtra:function(r){process.env.NODE_ENV!=="production"&&Io(r);var e=jr.el.extra;if(e)return e[r]}};function Io(r){if(process.env.NODE_ENV!=="production"&&(r==="transition"||r==="enterFrom"||r==="leaveTo"))throw new Error('key must not be "'+r+'"')}function hU(){var r=this,e=r.el;if(e){var t=Lo(e).userDuring,n=r.userDuring;if(t!==n){r.el=r.userDuring=null;return}jr.el=e,n(fU)}}function kA(r,e,t,n){var a=t[r];if(a){var i=e[r],o;if(i){var s=t.transition,l=a.transition;if(l)if(!o&&(o=n[r]={}),wi(l))B(o,i);else for(var u=Nt(l),f=0;f=0){!o&&(o=n[r]={});for(var v=St(i),f=0;f=0)){var c=r.getAnimationStyleProps(),v=c?c.style:null;if(v){!i&&(i=n.style={});for(var p=St(t),u=0;u=1&&(u=!0),!!c){var v=St(c);if(s||(v=Rt(v,function(g){return pt(gU,g)<0})),!!v.length){l||(l=r.animate(s,e.loop,!0),l.scope="keyframe");for(var p=0;p=0?e.getStore().get(V,P):void 0}var k=e.get(N.name,P),z=N&&N.ordinalMeta;return z?z.categories[k]:k}function x(E,P){process.env.NODE_ENV!=="production"&&EA("api.style","Please write literal style directly instead."),P==null&&(P=u);var N=e.getItemVisual(P,"style"),V=N&&N.fill,k=N&&N.opacity,z=m(P,na).getItemStyle();V!=null&&(z.fill=V),k!=null&&(z.opacity=k);var H={inheritColor:U(V)?V:"#000"},W=_(P,na),X=kt(W,null,H,!1,!0);X.text=W.getShallow("show")?lt(r.getFormattedLabel(P,na),_o(e,P)):null;var et=Uu(W,H,!1);return C(E,z),z=LA(z,X,et),E&&T(z,E),z.legacy=!0,z}function b(E,P){process.env.NODE_ENV!=="production"&&EA("api.styleEmphasis","Please write literal style directly instead."),P==null&&(P=u);var N=m(P,bn).getItemStyle(),V=_(P,bn),k=kt(V,null,null,!0,!0);k.text=V.getShallow("show")?gr(r.getFormattedLabel(P,bn),r.getFormattedLabel(P,na),_o(e,P)):null;var z=Uu(V,null,!0);return C(E,N),N=LA(N,k,z),E&&T(N,E),N.legacy=!0,N}function T(E,P){for(var N in P)Y(P,N)&&(E[N]=P[N])}function C(E,P){E&&(E.textFill&&(P.textFill=E.textFill),E.textPosition&&(P.textPosition=E.textPosition))}function A(E,P){if(P==null&&(P=u),Y(TA,E)){var N=e.getItemVisual(P,"style");return N?N[TA[E]]:null}if(Y(qW,E))return e.getItemVisual(P,E)}function M(E){if(i.type==="cartesian2d"){var P=i.getBaseAxis();return AV(tt({axis:P},E))}}function L(){return t.getCurrentSeriesIndices()}function I(E){return A1(E,t)}}function TU(r){var e={};return D(r.dimensions,function(t){var n=r.getDimensionInfo(t);if(!n.isExtraCoord){var a=n.coordDim,i=e[a]=e[a]||[];i[n.coordDimIndex]=r.getDimensionIndex(t)}}),e}function sy(r,e,t,n,a,i,o){if(!n){i.remove(e);return}var s=ly(r,e,t,n,a,i);return s&&o.setItemGraphicEl(t,s),s&&Wt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function ly(r,e,t,n,a,i){process.env.NODE_ENV!=="production"&&J(n,"should not have an null/undefined element setting");var o=-1,s=e;e&&WA(e,n,a)&&(o=pt(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=iy(n),s&&_U(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),cr.normal.cfg=cr.normal.conOpt=cr.emphasis.cfg=cr.emphasis.conOpt=cr.blur.cfg=cr.blur.conOpt=cr.select.cfg=cr.select.conOpt=null,cr.isLegacy=!1,CU(u,t,n,a,l,cr),DU(u,t,n,a,l),oy(r,u,t,n,cr,a,l),Y(n,"info")&&(wn(u).info=n.info);for(var f=0;f=0?i.replaceAt(u,o):i.add(u),u}function WA(r,e,t){var n=wn(r),a=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||a!=null&&a!==n.customGraphicType||a==="path"&&EU(i)&&XA(i)!==n.customPathData||a==="image"&&Y(o,"image")&&o.image!==n.customImagePath}function DU(r,e,t,n,a){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&WA(o,i,n)&&(o=null),o||(o=iy(i),process.env.NODE_ENV!=="production"&&J(bh(o),"Only any type of `path` can be used in `clipPath`, rather than "+o.type+"."),r.setClipPath(o)),oy(null,o,e,i,null,n,a)}}function CU(r,e,t,n,a,i){if(!r.isGroup){UA(t,null,i),UA(t,bn,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var f=r.getTextContent();if(o===!1)f&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},f?f.clearStates():(f=iy(o),r.setTextContent(f)),oy(null,f,e,o,null,n,a);for(var h=o&&o.style,c=0;c=f;v--){var p=e.childAt(v);MU(e,p,a)}}}function MU(r,e,t){e&&xh(e,wn(r).option,t)}function LU(r){new gn(r.oldChildren,r.newChildren,YA,YA,r).add(ZA).update(ZA).remove(IU).execute()}function YA(r,e){var t=r&&r.name;return t??mU+e}function ZA(r,e){var t=this.context,n=r!=null?t.newChildren[r]:null,a=e!=null?t.oldChildren[e]:null;ly(t.api,a,t.dataIndex,n,t.seriesModel,t.group)}function IU(r){var e=this.context,t=e.oldChildren[r];t&&xh(t,wn(t).option,e.seriesModel)}function XA(r){return r&&(r.pathData||r.d)}function EU(r){return r&&(Y(r,"pathData")||Y(r,"d"))}function PU(r){r.registerChartView(xU),r.registerSeriesModel(jW)}var bi=bt(),qA=nt,fy=Z,RU=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,n,a){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!a&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,e,t,n);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new at,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),n.getZr().add(s);else{var c=st(KA,t,h);this.updatePointerEl(s,u,c),this.updateLabelEl(s,u,c,t)}JA(s,t,!0),this._renderHandle(i)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var n=t.get("animation"),a=e.axis,i=a.type==="category",o=t.get("snap");if(!o&&!i)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(i&&a.getBandWidth()>s)return!0;if(o){var l=Od(e).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(e,t,n,a,i){},r.prototype.createPointerEl=function(e,t,n,a){var i=t.pointer;if(i){var o=bi(e).pointerEl=new Ss[i.type](qA(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,a){if(t.label){var i=bi(e).labelEl=new At(qA(t.label));e.add(i),QA(i,a)}},r.prototype.updatePointerEl=function(e,t,n){var a=bi(e).pointerEl;a&&t.pointer&&(a.setStyle(t.pointer.style),n(a,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,n,a){var i=bi(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),QA(i,a))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=t.getModel("handle"),o=t.get("status");if(!i.get("show")||!o||o==="hide"){a&&n.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=ms(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){en(u.event)},onmousedown:fy(this._onHandleDragMove,this,0,0),drift:fy(this._onHandleDragMove,this),ondragend:fy(this._onHandleDragEnd,this)}),n.add(a)),JA(a,t,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");G(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,lo(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){KA(this._axisPointerModel,!t&&this._moveAnimation,this._handle,hy(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var a=this.updateHandleTransform(hy(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(hy(a)),bi(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,a=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),a&&t.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),Rs(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},r}();function KA(r,e,t,n){jA(bi(t).lastProp,n)||(bi(t).lastProp=n,e?Mt(t,n,r):(t.stopAnimation(),t.attr(n)))}function jA(r,e){if(Q(r)&&Q(e)){var t=!0;return D(e,function(n,a){t=t&&jA(r[a],n)}),!!t}else return r===e}function QA(r,e){r[e.get(["label","show"])?"show":"hide"]()}function hy(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function JA(r,e,t){var n=e.get("z"),a=e.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=t)})}const cy=RU;function vy(r){var e=r.get("type"),t=r.getModel(e+"Style"),n;return e==="line"?(n=t.getLineStyle(),n.fill=null):e==="shadow"&&(n=t.getAreaStyle(),n.stroke=null),n}function tM(r,e,t,n,a){var i=t.get("value"),o=eM(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Ji(s.get("padding")||0),u=s.getFont(),f=Jo(o,u),h=a.position,c=f.width+l[1]+l[3],v=f.height+l[0]+l[2],p=a.align;p==="right"&&(h[0]-=c),p==="center"&&(h[0]-=c/2);var d=a.verticalAlign;d==="bottom"&&(h[1]-=v),d==="middle"&&(h[1]-=v/2),NU(h,c,v,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:kt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function NU(r,e,t,n){var a=n.getWidth(),i=n.getHeight();r[0]=Math.min(r[0]+e,a)-e,r[1]=Math.min(r[1]+t,i)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function eM(r,e,t,n,a){r=e.scale.parse(r);var i=e.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:nd(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};D(n,function(l){var u=t.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),U(o)?i=o.replace("{value}",i):q(o)&&(i=o(s))}return i}function py(r,e,t){var n=Ke();return ga(n,n,t.rotation),Pr(n,n,t.position),Dr([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function rM(r,e,t,n,a,i){var o=_n.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=a.get(["label","margin"]),tM(e,n,a,i,{position:py(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function dy(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function nM(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function aM(r,e,t,n,a,i){return{cx:r,cy:e,r0:t,r:n,startAngle:a,endAngle:i,clockwise:!0}}var OU=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.grid,u=i.get("type"),f=iM(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var c=vy(i),v=kU[u](s,h,f);v.style=c,t.graphicKey=v.type,t.pointer=v}var p=Ed(l.model,a);rM(n,t,p,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=Ed(n.axis.grid.model,n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=py(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=iM(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[t.x,t.y];h[f]+=n[f],h[f]=Math.min(l[1],h[f]),h[f]=Math.max(l[0],h[f]);var c=(u[1]+u[0])/2,v=[c,c];v[f]=h[f];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:v,tooltipOption:p[f]}},e}(cy);function iM(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var kU={line:function(r,e,t){var n=dy([e,t[0]],[e,t[1]],oM(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=Math.max(1,r.getBandWidth()),a=t[1]-t[0];return{type:"Rect",shape:nM([e-n/2,t[0]],[n,a],oM(r))}}};function oM(r){return r.dim==="x"?0:1}const VU=OU;var BU=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,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}(xt);const zU=BU;var Tn=bt(),GU=D;function sM(r,e,t){if(!wt.node){var n=e.getZr();Tn(n).records||(Tn(n).records={}),FU(n,e);var a=Tn(n).records[r]||(Tn(n).records[r]={});a.handler=t}}function FU(r,e){if(Tn(r).initialized)return;Tn(r).initialized=!0,t("click",st(lM,"click")),t("mousemove",st(lM,"mousemove")),t("globalout",$U);function t(n,a){r.on(n,function(i){var o=WU(e);GU(Tn(r).records,function(s){s&&a(s,i,o.dispatchAction)}),HU(o.pendings,e)})}}function HU(r,e){var t=r.showTip.length,n=r.hideTip.length,a;t?a=r.showTip[t-1]:n&&(a=r.hideTip[n-1]),a&&(a.dispatchAction=null,e.dispatchAction(a))}function $U(r,e,t){r.handler("leave",null,t)}function lM(r,e,t,n){e.handler(r,t,n)}function WU(r){var e={showTip:[],hideTip:[]},t=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=t,r.dispatchAction(n))};return{dispatchAction:t,pendings:e}}function gy(r,e){if(!wt.node){var t=e.getZr(),n=(Tn(t).records||{})[r];n&&(Tn(t).records[r]=null)}}var UU=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=n.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";sM("axisPointer",a,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,n){gy("axisPointer",n)},e.prototype.dispose=function(t,n){gy("axisPointer",n)},e.type="axisPointer",e}(Ut);const YU=UU;function uM(r,e){var t=[],n=r.seriesIndex,a;if(n==null||!(a=e.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=Da(i,r);if(o==null||o<0||G(o))return{point:[]};var s=i.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)t=a.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),h=f.dim,c=u.dim,v=h==="x"||h==="radius"?1:0,p=i.mapDimension(c),d=[];d[v]=i.get(p,o),d[1-v]=i.get(i.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(d)||[]}else t=l.dataToPoint(i.getValues(F(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var fM=bt();function ZU(r,e,t){var n=r.currTrigger,a=[r.x,r.y],i=r,o=r.dispatchAction||Z(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Dh(a)&&(a=uM({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=Dh(a),u=i.axesInfo,f=s.axesInfo,h=n==="leave"||Dh(a),c={},v={},p={list:[],map:{}},d={showPointer:st(qU,v),showTooltip:st(KU,p)};D(s.coordSysMap,function(y,m){var _=l||y.containPoint(a);D(s.coordSysAxesInfo[m],function(S,w){var x=S.axis,b=t6(u,S);if(!h&&_&&(!u||b)){var T=b&&b.value;T==null&&!l&&(T=x.pointToData(a)),T!=null&&hM(S,T,d,!1,c)}})});var g={};return D(f,function(y,m){var _=y.linkGroup;_&&!v[m]&&D(_.axesInfo,function(S,w){var x=v[w];if(S!==y&&x){var b=x.value;_.mapper&&(b=y.axis.scale.parse(_.mapper(b,cM(S),cM(y)))),g[y.key]=b}})}),D(g,function(y,m){hM(f[m],y,d,!0,c)}),jU(v,f,c),QU(p,a,r,o),JU(f,o,t),c}}function hM(r,e,t,n,a){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=XU(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&B(a,s[0]),!n&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function XU(r,e){var t=e.axis,n=t.dim,a=r,i=[],o=Number.MAX_VALUE,s=-1;return D(e.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(n),h,c;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(f,r,t);c=v.dataIndices,h=v.nestestValue}else{if(c=l.getData().indicesOfNearest(f[0],r,t.type==="category"?.5:null),!c.length)return;h=l.getData().get(f[0],c[0])}if(!(h==null||!isFinite(h))){var p=r-h,d=Math.abs(p);d<=o&&((d=0&&s<0)&&(o=d,s=p,a=h,i.length=0),D(c,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:a}}function qU(r,e,t,n){r[e.key]={value:t,payloadBatch:n}}function KU(r,e,t,n){var a=t.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!a.length)){var l=e.coordSys.model,u=sl(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function jU(r,e,t){var n=t.axesInfo=[];D(e,function(a,i){var o=a.axisPointerModel.option,s=r[i];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function QU(r,e,t,n){if(Dh(e)||!r.list.length){n({type:"hideTip"});return}var a=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function JU(r,e,t){var n=t.getZr(),a="axisPointerLastHighlights",i=fM(n)[a]||{},o=fM(n)[a]={};D(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&D(h.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];D(i,function(u,f){!o[f]&&l.push(u)}),D(o,function(u,f){!i[f]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function t6(r,e){for(var t=0;t<(r||[]).length;t++){var n=r[t];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function cM(r){var e=r.axis.model,t={},n=t.axisDim=r.axis.dim;return t.axisIndex=t[n+"AxisIndex"]=e.componentIndex,t.axisName=t[n+"AxisName"]=e.name,t.axisId=t[n+"AxisId"]=e.id,t}function Dh(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Dl(r){vi.registerAxisPointerClass("CartesianAxisPointer",VU),r.registerComponentModel(zU),r.registerComponentView(YU),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!G(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=H5(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},ZU)}function e6(r){dt(zT),dt(Dl)}var r6=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),f=u.getExtent(),h=s.dataToCoord(n),c=i.get("type");if(c&&c!=="none"){var v=vy(i),p=a6[c](s,l,h,f);p.style=v,t.graphicKey=p.type,t.pointer=p}var d=i.get(["label","margin"]),g=n6(n,a,i,l,d);tM(t,a,i,o,g)},e}(cy);function n6(r,e,t,n,a){var i=e.axis,o=i.dataToCoord(r),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,f,h;if(i.dim==="radius"){var c=Ke();ga(c,c,s),Pr(c,c,[n.cx,n.cy]),u=Dr([o,-a],c);var v=e.getModel("axisLabel").get("rotate")||0,p=_n.innerTextLayout(s,v*Math.PI/180,-1);f=p.textAlign,h=p.textVerticalAlign}else{var d=l[1];u=n.coordToPoint([d+a,o]);var g=n.cx,y=n.cy;f=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",h=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:f,verticalAlign:h}}var a6={line:function(r,e,t,n){return r.dim==="angle"?{type:"Line",shape:dy(e.coordToPoint([n[0],t]),e.coordToPoint([n[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,n){var a=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:aM(e.cx,e.cy,n[0],n[1],(-t-a/2)*i,(-t+a/2)*i)}:{type:"Sector",shape:aM(e.cx,e.cy,t-a/2,t+a/2,0,Math.PI*2)}}};const i6=r6;var o6=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var n,a=this.ecModel;return a.eachComponent(t,function(i){i.getCoordSysModel()===this&&(n=i)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(xt);const s6=o6;var yy=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",te).models[0]},e.type="polarAxis",e}(xt);jt(yy,qs);var l6=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(yy),u6=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(yy),my=function(r){O(e,r);function e(t,n){return r.call(this,"radius",t,n)||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e}(Mr);my.prototype.dataToRadius=Mr.prototype.dataToCoord,my.prototype.radiusToData=Mr.prototype.coordToData;const f6=my;var h6=bt(),_y=function(r){O(e,r);function e(t,n){return r.call(this,"angle",t,n||[0,360])||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,n=t.getLabelModel(),a=t.scale,i=a.getExtent(),o=a.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),f=Jo(s==null?"":s+"",n.getFont(),"center","top"),h=Math.max(f.height,7),c=h/u;isNaN(c)&&(c=1/0);var v=Math.max(0,Math.floor(c)),p=h6(t.model),d=p.lastAutoInterval,g=p.lastTickCount;return d!=null&&g!=null&&Math.abs(d-v)<=1&&Math.abs(g-o)<=1&&d>v?v=d:(p.lastTickCount=o,p.lastAutoInterval=v),v},e}(Mr);_y.prototype.dataToAngle=Mr.prototype.dataToCoord,_y.prototype.angleToData=Mr.prototype.coordToData;const c6=_y;var vM=["radius","angle"],v6=function(){function r(e){this.dimensions=vM,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new f6,this._angleAxis=new c6,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,a=this._radiusAxis;return n.scale.type===e&&t.push(n),a.scale.type===e&&t.push(a),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,a=this.getAngleAxis(),i=a.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);a.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+n*n);t/=l,n/=l;for(var u=Math.atan2(-n,t)/Math.PI*180,f=us;)u+=f*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI,a=Math.cos(n)*t+this.cx,i=-Math.sin(n)*t+this.cy;return[a,i]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),n=t.getExtent().slice();n[0]>n[1]&&n.reverse();var a=e.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-a[0]*i,endAngle:-a[1]*i,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,f=l*l+u*u-1e-4,h=this.r,c=this.r0;return f<=h*h&&f>=c*c}}},r.prototype.convertToPixel=function(e,t,n){var a=pM(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=pM(t);return a===this?this.pointToData(n):null},r}();function pM(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}const p6=v6;function d6(r,e,t){var n=e.get("center"),a=t.getWidth(),i=t.getHeight();r.cx=$(n[0],a),r.cy=$(n[1],i);var o=r.getRadiusAxis(),s=Math.min(a,i)/2,l=e.get("radius");l==null?l=[0,"100%"]:G(l)||(l=[0,l]);var u=[$(l[0],s),$(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function g6(r,e){var t=this,n=t.getAngleAxis(),a=t.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();D(Vf(l,"radius"),function(u){a.scale.unionExtentFromData(l,u)}),D(Vf(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),yo(n.scale,n.model),yo(a.scale,a.model),n.type==="category"&&!n.onBand){var i=n.getExtent(),o=360/n.scale.count();n.inverse?i[1]+=o:i[1]-=o,n.setExtent(i[0],i[1])}}function y6(r){return r.mainType==="angleAxis"}function dM(r,e){if(r.type=e.get("type"),r.scale=kf(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),y6(e)){r.inverse=r.inverse!==e.get("clockwise");var t=e.get("startAngle");r.setExtent(t,t+(r.inverse?-360:360))}e.axis=r,r.model=e}var m6={dimensions:vM,create:function(r,e){var t=[];return r.eachComponent("polar",function(n,a){var i=new p6(a+"");i.update=g6;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");dM(o,l),dM(s,u),d6(i,n,e),t.push(i),n.coordinateSystem=i,i.model=n}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var a=n.getReferringComponents("polar",te).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error('Polar "'+Qt(n.get("polarIndex"),n.get("polarId"),0)+'" not found');n.coordinateSystem=a.coordinateSystem}}),t}};const _6=m6;var S6=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Ch(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var n=r.coordToPoint([e[0],t]),a=r.coordToPoint([e[1],t]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function Ah(r){var e=r.getRadiusAxis();return e.inverse?0:1}function gM(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var x6=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n){if(this.group.removeAll(),!!t.get("show")){var a=t.axis,i=a.polar,o=i.getRadiusAxis().getExtent(),s=a.getTicksCoords(),l=a.getMinorTicksCoords(),u=F(a.getViewLabels(),function(f){f=nt(f);var h=a.scale,c=h.type==="ordinal"?h.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=a.dataToCoord(c),f});gM(u),gM(s),D(S6,function(f){t.get([f,"show"])&&(!a.scale.isBlank()||f==="axisLine")&&w6[f](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e}(vi),w6={axisLine:function(r,e,t,n,a,i){var o=e.getModel(["axisLine","lineStyle"]),s=Ah(t),l=s?0:1,u;i[l]===0?u=new Hr({shape:{cx:t.cx,cy:t.cy,r:i[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new Nu({shape:{cx:t.cx,cy:t.cy,r:i[s],r0:i[l]},style:o.getLineStyle(),z2:1,silent:!0}),u.style.fill=null,r.add(u)},axisTick:function(r,e,t,n,a,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[Ah(t)],u=F(n,function(f){return new fe({shape:Ch(t,[l,l+s],f.coord)})});r.add(rr(u,{style:tt(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,n,a,i){if(a.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[Ah(t)],f=[],h=0;hy?"left":"right",S=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var w=s[p];Q(w)&&w.textStyle&&(v=new Vt(w.textStyle,l,l.ecModel))}var x=new At({silent:_n.isLabelSilent(e),style:kt(v,{x:g[0],y:g[1],fill:v.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:S})});if(r.add(x),f){var b=_n.makeAxisEventDataBase(e);b.targetType="axisLabel",b.value=h.rawLabel,ot(x).eventData=b}},this)},splitLine:function(r,e,t,n,a,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var f=[],h=0;h=0?"p":"n",I=b;w&&(n[f][M]||(n[f][M]={p:b,n:b}),I=n[f][M][L]);var E=void 0,P=void 0,N=void 0,V=void 0;if(p.dim==="radius"){var k=p.dataToCoord(A)-b,z=l.dataToCoord(M);Math.abs(k)=V})}}})}function E6(r){var e={};D(r,function(n,a){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=mM(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),h=e[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=h.stacks;e[l]=h;var v=yM(n);c[v]||h.autoWidthCount++,c[v]=c[v]||{width:0,maxWidth:0};var p=$(n.get("barWidth"),f),d=$(n.get("barMaxWidth"),f),g=n.get("barGap"),y=n.get("barCategoryGap");p&&!c[v].width&&(p=Math.min(h.remainedWidth,p),c[v].width=p,h.remainedWidth-=p),d&&(c[v].maxWidth=d),g!=null&&(h.gap=g),y!=null&&(h.categoryGap=y)});var t={};return D(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=$(n.categoryGap,o),l=$(n.gap,1),u=n.remainedWidth,f=n.autoWidthCount,h=(u-s)/(f+(f-1)*l);h=Math.max(h,0),D(i,function(d,g){var y=d.maxWidth;y&&y=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),a=[],i=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),a[i]=t.toGlobalCoord(t.dataToCoord(+e)),a[1-i]=i===0?n.y+n.height/2:n.x+n.width/2,a},r.prototype.convertToPixel=function(e,t,n){var a=xM(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=xM(t);return a===this?this.pointToData(n):null},r}();function xM(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function W6(r,e){var t=[];return r.eachComponent("singleAxis",function(n,a){var i=new $6(n,r,e);i.name="single_"+a,i.resize(n,e),n.coordinateSystem=i,t.push(i)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var a=n.getReferringComponents("singleAxis",te).models[0];n.coordinateSystem=a&&a.coordinateSystem}}),t}var U6={create:W6,dimensions:SM};const Y6=U6;var wM=["x","y"],Z6=["width","height"],X6=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.coordinateSystem,u=wy(l,1-Mh(s)),f=l.dataToPoint(n)[0],h=i.get("type");if(h&&h!=="none"){var c=vy(i),v=q6[h](s,f,u);v.style=c,t.graphicKey=v.type,t.pointer=v}var p=Sy(a);rM(n,t,p,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=Sy(n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=py(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.coordinateSystem,l=Mh(o),u=wy(s,l),f=[t.x,t.y];f[l]+=n[l],f[l]=Math.min(u[1],f[l]),f[l]=Math.max(u[0],f[l]);var h=wy(s,1-l),c=(h[1]+h[0])/2,v=[c,c];return v[l]=f[l],{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:v,tooltipOption:{verticalAlign:"middle"}}},e}(cy),q6={line:function(r,e,t){var n=dy([e,t[0]],[e,t[1]],Mh(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=r.getBandWidth(),a=t[1]-t[0];return{type:"Rect",shape:nM([e-n/2,t[0]],[n,a],Mh(r))}}};function Mh(r){return r.isHorizontal()?0:1}function wy(r,e){var t=r.getRect();return[t[wM[e]],t[wM[e]]+t[Z6[e]]]}const K6=X6;var j6=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Ut);function Q6(r){dt(Dl),vi.registerAxisPointerClass("SingleAxisPointer",K6),r.registerComponentView(j6),r.registerComponentView(G6),r.registerComponentModel(xy),xo(r,"single",xy,xy.defaultOption),r.registerCoordinateSystem("single",Y6)}var J6=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,a){var i=to(t);r.prototype.init.apply(this,arguments),bM(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),bM(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(xt);function bM(r,e){var t=r.cellSize,n;G(t)?n=t:n=r.cellSize=[t,t],n.length===1&&(n[1]=n[0]);var a=F([0,1],function(i){return oN(e,i)&&(n[i]="auto"),n[i]!=null&&n[i]!=="auto"});Wn(r,e,{type:"box",ignoreSize:a})}const t8=J6;var e8=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,n,a){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=n.start.time;u<=n.end.time;u=i.getNextNDay(u,1).time){var f=i.dataToRect([u],!1).tl,h=new Tt({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});a.add(h)}},e.prototype._renderLines=function(t,n,a,i){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),f=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=n.start,c=0;h.time<=n.end.time;c++){p(h.formatedDate),c===0&&(h=s.getDateInfo(n.start.y+"-"+n.start.m));var v=h.date;v.setMonth(v.getMonth()+1),h=s.getDateInfo(v)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToRect([d],!1).tl);var g=o._getLinePointsOfOneWeek(t,d,a);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,f,a),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,f,a),l,i)},e.prototype._getEdgesPoints=function(t,n,a){var i=[t[0].slice(),t[t.length-1].slice()],o=a==="horizontal"?0:1;return i[0][o]=i[0][o]-n/2,i[1][o]=i[1][o]+n/2,i},e.prototype._drawSplitline=function(t,n,a){var i=new Ve({z2:20,shape:{points:t},style:n});a.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,n,a){for(var i=t.coordinateSystem,o=i.getDateInfo(n),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),f=i.dataToRect([u.time],!1);s[2*u.day]=f.tl,s[2*u.day+1]=f[a==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,n){return U(t)&&t?nN(t,n):q(t)?t(n):n.nameMap},e.prototype._yearTextPositionControl=function(t,n,a,i,o){var s=n[0],l=n[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var f=0;return(i==="left"||i==="right")&&(f=Math.PI/2),{rotation:f,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,n,a,i){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=a!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],f=(u[0][0]+u[1][0])/2,h=(u[0][1]+u[1][1])/2,c=a==="horizontal"?0:1,v={top:[f,u[c][1]],bottom:[f,u[1-c][1]],left:[u[1-c][0],h],right:[u[c][0],h]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var d=o.get("formatter"),g={start:n.start.y,end:n.end.y,nameMap:p},y=this._formatterLabel(d,g),m=new At({z2:30,style:kt(o,{text:y})});m.attr(this._yearTextPositionControl(m,v[l],a,l,s)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,n,a,i,o){var s="left",l="top",u=t[0],f=t[1];return a==="horizontal"?(f=f+o,n&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),i==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,n,a,i){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),f=o.get("align"),h=[this._tlpoints,this._blpoints];(!s||U(s))&&(s&&(n=Uv(s)||n),s=n.get(["time","monthAbbr"])||[]);var c=u==="start"?0:1,v=a==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=f==="center",d=0;d=a.start.time&&n.times.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var a=Math.floor(t[1].time/by)-Math.floor(t[0].time/by)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+a-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)a-=u,i.setDate(l-u);var f=Math.floor((a+t[0].day+6)/7),h=n?-f+1:f-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:a,weeks:f,nthWeek:h,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,n){var a=this._getRangeInfo(n);if(e>a.weeks||e===0&&ta.lweek)return null;var i=(e-1)*7-a.fweek+t,o=new Date(a.start.time);return o.setDate(+a.start.d+i),this.getDateInfo(o)},r.create=function(e,t){var n=[];return e.eachComponent("calendar",function(a){var i=new r(a);n.push(i),a.coordinateSystem=i}),e.eachSeries(function(a){a.get("coordinateSystem")==="calendar"&&(a.coordinateSystem=n[a.get("calendarIndex")||0])}),n},r.dimensions=["time","value"],r}();function TM(r){var e=r.calendarModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}const a8=n8;function i8(r){r.registerComponentModel(t8),r.registerComponentView(r8),r.registerCoordinateSystem("calendar",a8)}function o8(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function DM(r,e){var t;return D(e,function(n){r[n]!=null&&r[n]!=="auto"&&(t=!0)}),t}function s8(r,e,t){var n=B({},t),a=r[e],i=t.$action||"merge";if(i==="merge")if(a){if(process.env.NODE_ENV!=="production"){var o=t.type;J(!o||a.type===o,'Please set $action: "replace" to change `type`')}ht(a,n,!0),Wn(a,n,{ignoreSize:!0}),K1(t,a),Lh(t,a),Lh(t,a,"shape"),Lh(t,a,"style"),Lh(t,a,"extra"),t.clipPath=a.clipPath}else r[e]=n;else i==="replace"?r[e]=n:i==="remove"&&a&&(r[e]=null)}var CM=["transition","enterFrom","leaveTo"],l8=CM.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Lh(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var n=t?CM:l8,a=0;a=0;f--){var h=a[f],c=ne(h.id,null),v=c!=null?o.get(c):null;if(v){var p=v.parent,y=vr(p),m=p===i?{width:s,height:l}:{width:y.width,height:y.height},_={},S=rf(v,h,m,null,{hv:h.hv,boundingMode:h.bounding},_);if(!vr(v).isNew&&S){for(var w=h.transition,x={},b=0;b=0)?x[T]=C:v[T]=C}Mt(v,x,t,0)}else v.attr(_)}}},e.prototype._clear=function(){var t=this,n=this._elMap;n.each(function(a){Ih(a,vr(a).option,n,t._lastGraphicModel)}),this._elMap=K()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Ut);function Ty(r){process.env.NODE_ENV!=="production"&&J(r,"graphic type MUST be set");var e=Y(AM,r)?AM[r]:Bv(r);process.env.NODE_ENV!=="production"&&J(e,"graphic type "+r+" can not be found");var t=new e({});return vr(t).type=r,t}function MM(r,e,t,n){var a=Ty(t);return e.add(a),n.set(r,a),vr(a).id=r,vr(a).isNew=!0,a}function Ih(r,e,t,n){var a=r&&r.parent;a&&(r.type==="group"&&r.traverse(function(i){Ih(i,e,t,n)}),xh(r,e,n),t.removeKey(vr(r).id))}function LM(r,e,t,n){r.isGroup||D([["cursor",tr.prototype.cursor],["zlevel",n||0],["z",t||0],["z2",0]],function(a){var i=a[0];Y(e,i)?r[i]=lt(e[i],a[1]):r[i]==null&&(r[i]=a[1])}),D(St(e),function(a){if(a.indexOf("on")===0){var i=e[a];r[a]=q(i)?i:null}}),Y(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function c8(r){return r=B({},r),D(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(q1),function(e){delete r[e]}),r}function v8(r,e,t){var n=ot(r).eventData;!r.silent&&!r.ignore&&!n&&(n=ot(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),n&&(n.info=t.info)}function p8(r){r.registerComponentModel(f8),r.registerComponentView(h8),r.registerPreprocessor(function(e){var t=e.graphic;G(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var IM=["x","y","radius","angle","single"],d8=["cartesian2d","polar","singleAxis"];function g8(r){var e=r.get("coordinateSystem");return pt(d8,e)>=0}function ia(r){return process.env.NODE_ENV!=="production"&&J(r),r+"Axis"}function y8(r,e){var t=K(),n=[],a=K();r.eachComponent({mainType:"dataZoom",query:e},function(f){a.get(f.uid)||s(f)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(f){!a.get(f.uid)&&l(f)&&(s(f),i=!0)}function s(f){a.set(f.uid,!0),n.push(f),u(f)}function l(f){var h=!1;return f.eachTargetAxis(function(c,v){var p=t.get(c);p&&p[v]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,c){(t.get(h)||t.set(h,[]))[c]=!0})}return n}function EM(r){var e=r.ecModel,t={infoList:[],infoMap:K()};return r.eachTargetAxis(function(n,a){var i=e.getComponent(ia(n),a);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(i)}}}),t}var Dy=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),m8=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,n,a){var i=PM(t);this.settledOption=i,this.mergeDefaultAndTheme(t,a),this._doInit(i)},e.prototype.mergeOption=function(t){var n=PM(t);ht(this.option,t,!0),ht(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var a=this.settledOption;D([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(n[i[0]]=a[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=K(),a=this._fillSpecifiedTargetAxis(n);a?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return D(IM,function(a){var i=this.getReferringComponents(ia(a),V2);if(i.specified){n=!0;var o=new Dy;D(i.models,function(s){o.add(s.componentIndex)}),t.set(a,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(t,n){var a=this.ecModel,i=!0;if(i){var o=n==="vertical"?"y":"x",s=a.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=a.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===n}});l(s,"single")}function l(u,f){var h=u[0];if(h){var c=new Dy;if(c.add(h.componentIndex),t.set(f,c),i=!1,f==="x"||f==="y"){var v=h.getReferringComponents("grid",te).models[0];v&&D(u,function(p){h.componentIndex!==p.componentIndex&&v===p.getReferringComponents("grid",te).models[0]&&c.add(p.componentIndex)})}}}i&&D(IM,function(u){if(i){var f=a.findComponents({mainType:ia(u),filter:function(c){return c.get("type",!0)==="category"}});if(f[0]){var h=new Dy;h.add(f[0].componentIndex),t.set(u,h),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(n){!t&&(t=n)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var n=this._rangePropMode,a=this.get("rangeMode");D([["start","startValue"],["end","endValue"]],function(i,o){var s=t[i[0]]!=null,l=t[i[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":a?n[o]=a[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(n,a){t==null&&(t=this.ecModel.getComponent(ia(n),a))},this),t},e.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each(function(a,i){D(a.indexList,function(o){t.call(n,i,o)})})},e.prototype.getAxisProxy=function(t,n){var a=this.getAxisModel(t,n);if(a)return a.__dzAxisProxy},e.prototype.getAxisModel=function(t,n){process.env.NODE_ENV!=="production"&&J(t&&n!=null);var a=this._targetAxisInfoMap.get(t);if(a&&a.indexMap[n])return this.ecModel.getComponent(ia(t),n)},e.prototype.setRawRange=function(t){var n=this.option,a=this.settledOption;D([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(n[i[0]]=a[i[0]]=t[i[0]],n[i[1]]=a[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var n=this.option;D(["start","startValue","end","endValue"],function(a){n[a]=t[a]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,n){if(t==null&&n==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(t,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,a=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!S&&!w)return!0;_&&(g=!0),S&&(p=!0),w&&(d=!0)}return g&&p&&d})}else Eo(f,function(v){if(i==="empty")l.setData(u=u.map(v,function(d){return s(d)?d:NaN}));else{var p={};p[v]=o,u.selectRange(p)}});Eo(f,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;Eo(["min","max"],function(a){var i=t.get(a+"Span"),o=t.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=Pt(n[0]+o,n,[0,100],!0):i!=null&&(o=Pt(i,[0,100],n,!0)-n[0]),e[a+"Span"]=i,e[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var a=A0(n,[0,500]);a=Math.min(a,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+n[0].toFixed(a)),t[1]!==100&&i.setDeterminedMinMax("max",+n[1].toFixed(a)),i.freeze()}},r}();function D8(r,e,t){var n=[1/0,-1/0];Eo(t,function(o){KV(n,o.getData(),e)});var a=r.getAxisModel(),i=Gw(a.axis.scale,a,n).calculate();return[i.min,i.max]}const C8=T8;var A8={getTargetSeries:function(r){function e(a){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(ia(o),s);a(o,s,l,i)})})}e(function(a,i,o,s){o.__dzAxisProxy=null});var t=[];e(function(a,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new C8(a,i,s,r),t.push(o.__dzAxisProxy))});var n=K();return D(t,function(a){D(a.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).reset(t)}),t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var n=t.findRepresentativeAxisProxy();if(n){var a=n.getDataPercentWindow(),i=n.getDataValueWindow();t.setCalculatedRange({start:a[0],end:a[1],startValue:i[0],endValue:i[1]})}})}};const M8=A8;function L8(r){r.registerAction("dataZoom",function(e,t){var n=y8(t,e);D(n,function(a){a.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var NM=!1;function Ay(r){NM||(NM=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,M8),L8(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function I8(r){r.registerComponentModel(S8),r.registerComponentView(b8),Ay(r)}var pr=function(){function r(){}return r}(),OM={};function Po(r,e){OM[r]=e}function kM(r){return OM[r]}var E8=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;D(this.option.feature,function(n,a){var i=kM(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),ht(n,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(xt);const P8=E8;function R8(r,e,t){var n=e.getBoxLayoutParams(),a=e.get("padding"),i={width:t.getWidth(),height:t.getHeight()},o=ae(n,i,a);Xa(e.get("orient"),r,e.get("itemGap"),o.width,o.height),rf(r,n,i,a)}function VM(r,e){var t=Ji(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),r=new Tt({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}),r}var N8=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},f=this._features||(this._features={}),h=[];D(u,function(p,d){h.push(d)}),new gn(this._featureNames||[],h).add(c).update(c).remove(st(c,null)).execute(),this._featureNames=h;function c(p,d){var g=h[p],y=h[d],m=u[g],_=new Vt(m,t,t.ecModel),S;if(i&&i.newTitle!=null&&i.featureName===g&&(m.title=i.newTitle),g&&!y){if(O8(g))S={onclick:_.option.onclick,featureName:g};else{var w=kM(g);if(!w)return;S=new w}f[g]=S}else if(S=f[y],!S)return;S.uid=Ki("toolbox-feature"),S.model=_,S.ecModel=n,S.api=a;var x=S instanceof pr;if(!g&&y){x&&S.dispose&&S.dispose(n,a);return}if(!_.get("show")||x&&S.unusable){x&&S.remove&&S.remove(n,a);return}v(_,S,g),_.setIconStatus=function(b,T){var C=this.option,A=this.iconPaths;C.iconStatus=C.iconStatus||{},C.iconStatus[b]=T,A[b]&&(T==="emphasis"?cn:vn)(A[b])},S instanceof pr&&S.render&&S.render(_,n,a,i)}function v(p,d,g){var y=p.getModel("iconStyle"),m=p.getModel(["emphasis","iconStyle"]),_=d instanceof pr&&d.getIcons?d.getIcons():p.get("icon"),S=p.get("title")||{},w,x;U(_)?(w={},w[g]=_):w=_,U(S)?(x={},x[g]=S):x=S;var b=p.iconPaths={};D(w,function(T,C){var A=ms(T,{},{x:-s/2,y:-s/2,width:s,height:s});A.setStyle(y.getItemStyle());var M=A.ensureState("emphasis");M.style=m.getItemStyle();var L=new At({style:{text:x[C],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null},ignore:!0});A.setTextContent(L),Xi({el:A,componentModel:t,itemName:C,formatterParamsExtra:{title:x[C]}}),A.__title=x[C],A.on("mouseover",function(){var I=m.getItemStyle(),E=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";L.setStyle({fill:m.get("textFill")||I.fill||I.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),A.setTextConfig({position:m.get("textPosition")||E}),L.ignore=!t.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",C])!=="emphasis"&&a.leaveEmphasis(this),L.hide()}),(p.get(["iconStatus",C])==="emphasis"?cn:vn)(A),o.add(A),A.on("click",Z(d.onclick,d,n,a,C)),b[C]=A})}R8(o,t,a),o.add(VM(o.getBoundingRect(),t)),l||o.eachChild(function(p){var d=p.__title,g=p.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),m=p.getTextContent(),_=m&&m.ensureState("emphasis");if(_&&!q(_)&&d){var S=_.style||(_.style={}),w=Jo(d,At.makeFont(S)),x=p.x+o.x,b=p.y+o.y+s,T=!1;b+w.height>a.getHeight()&&(y.position="top",T=!0);var C=T?-5-w.height:s+10;x+w.width/2>a.getWidth()?(y.position=["100%",C],S.align="right"):x-w.width/2<0&&(y.position=[0,C],S.align="left")}})},e.prototype.updateView=function(t,n,a,i){D(this._features,function(o){o instanceof pr&&o.updateView&&o.updateView(o.model,n,a,i)})},e.prototype.remove=function(t,n){D(this._features,function(a){a instanceof pr&&a.remove&&a.remove(t,n)}),this.group.removeAll()},e.prototype.dispose=function(t,n){D(this._features,function(a){a instanceof pr&&a.dispose&&a.dispose(t,n)})},e.type="toolbox",e}(Ut);function O8(r){return r.indexOf("my")===0}const k8=N8;var V8=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){var a=this.model,i=a.get("name")||t.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":a.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:a.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=wt.browser;if(q(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=i+"."+s,f.target="_blank",f.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var c=l.split(","),v=c[0].indexOf("base64")>-1,p=o?decodeURIComponent(c[1]):c[1];v&&(p=window.atob(p));var d=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,y=new Uint8Array(g);g--;)y[g]=p.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,d)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,w=S.document;w.open("image/svg+xml","replace"),w.write(p),w.close(),S.focus(),w.execCommand("SaveAs",!0,d),document.body.removeChild(_)}}else{var x=a.get("lang"),b='',T=window.open();T.document.write(b),T.document.title=i}},e.getDefaultOption=function(t){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(pr);const B8=V8;var BM="__ec_magicType_stack__",z8=[["line","bar"],["stack"]],G8=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,n=t.get("icon"),a={};return D(t.get("type"),function(i){n[i]&&(a[i]=n[i])}),a},e.getDefaultOption=function(t){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(t,n,a){var i=this.model,o=i.get(["seriesIndex",a]);if(zM[a]){var s={series:[]},l=function(h){var c=h.subType,v=h.id,p=zM[a](c,v,h,i);p&&(tt(p,h.option),s.series.push(p));var d=h.coordinateSystem;if(d&&d.type==="cartesian2d"&&(a==="line"||a==="bar")){var g=d.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=h.getReferringComponents(m,te).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var w=0;w<=S;w++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=a==="bar"}}};D(z8,function(h){pt(h,a)>=0&&D(h,function(c){i.setIconStatus(c,"normal")})}),i.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=a;a==="stack"&&(u=ht({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(f="tiled")),n.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},e}(pr),zM={line:function(r,e,t,n){if(r==="bar")return ht({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,e,t,n){if(r==="line")return ht({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,e,t,n){var a=t.get("stack")===BM;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),ht({id:e,stack:a?"":BM},n.get(["option","stack"])||{},!0)}};Yr({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});const F8=G8;var Eh=new Array(60).join("-"),Ro=" ";function H8(r){var e={},t=[],n=[];return r.eachRawSeries(function(a){var i=a.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(a)}else t.push(a)}else t.push(a)}),{seriesGroupByCategoryAxis:e,other:t,meta:n}}function $8(r){var e=[];return D(r,function(t,n){var a=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat(F(t.series,function(v){return v.name})),l=[a.model.getCategories()];D(t.series,function(v){var p=v.getRawData();l.push(v.getRawData().mapArray(p.mapDimension(o),function(d){return d}))});for(var u=[s.join(Ro)],f=0;f=0)return!0}var My=new RegExp("["+Ro+"]+","g");function Z8(r){for(var e=r.split(/\n+/g),t=Ph(e.shift()).split(My),n=[],a=F(t,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=t[i];if(o[a])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(s){var l=s.getPercentRange();t[0][a]={dataZoomId:a,start:l[0],end:l[1]}}}}),t.push(e)}function tY(r){var e=Ly(r),t=e[e.length-1];e.length>1&&e.pop();var n={};return GM(t,function(a,i){for(var o=e.length-1;o>=0;o--)if(a=e[o][i],a){n[i]=a;break}}),n}function eY(r){FM(r).snapshots=null}function rY(r){return Ly(r).length}function Ly(r){var e=FM(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var nY=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){eY(t),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return n},e}(pr);Yr({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});const aY=nY;var iY=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],oY=function(){function r(e,t,n){var a=this;this._targetInfoList=[];var i=HM(t,e);D(sY,function(o,s){(!n||!n.include||pt(n.include,s)>=0)&&o(i,a._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(n,a,i){if((n.coordRanges||(n.coordRanges=[])).push(a),!n.coordRange){n.coordRange=a;var o=Ey[n.brushType](0,i,a);n.__rangeOffset={offset:YM[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,n){D(e,function(a){var i=this.findTargetInfo(a,t);i&&i!==!0&&D(i.coordSyses,function(o){var s=Ey[a.brushType](1,o,a.range,!0);n(a,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){D(e,function(n){var a=this.findTargetInfo(n,t);if(process.env.NODE_ENV!=="production"&&(J(!a||a===!0||n.coordRange,"coordRange must be specified when coord index specified."),J(!a||a!==!0||n.range,"range must be specified in global brush.")),n.range=n.range||[],a&&a!==!0){n.panelId=a.panelId;var i=Ey[n.brushType](0,a.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?YM[n.brushType](i.values,o.offset,lY(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return F(this._targetInfoList,function(n){var a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:GC(a),isTargetByCursor:HC(a,e,n.coordSysModel),getLinearBrushOtherExtent:FC(a)}})},r.prototype.controlSeries=function(e,t,n){var a=this.findTargetInfo(e,n);return a===!0||a&&pt(a.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,a=HM(t,e),i=0;ir[1]&&r.reverse(),r}function HM(r,e){return ns(r,e,{includeMainTypes:iY})}var sY={grid:function(r,e){var t=r.xAxisModels,n=r.yAxisModels,a=r.gridModels,i=K(),o={},s={};!t&&!n&&!a||(D(t,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),D(n,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),D(a,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,f=[];D(u.getCartesians(),function(h,c){(pt(t,h.getAxis("x").model)>=0||pt(n,h.getAxis("y").model)>=0)&&f.push(h)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:WM.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){D(r.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:WM.geo})})}},$M=[function(r,e){var t=r.xAxisModel,n=r.yAxisModel,a=r.gridModel;return!a&&t&&(a=t.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],WM={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform($a(r)),e}},Ey={lineX:st(UM,0),lineY:st(UM,1),rect:function(r,e,t,n){var a=r?e.pointToData([t[0][0],t[1][0]],n):e.dataToPoint([t[0][0],t[1][0]],n),i=r?e.pointToData([t[0][1],t[1][1]],n):e.dataToPoint([t[0][1],t[1][1]],n),o=[Iy([a[0],i[0]]),Iy([a[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,n){var a=[[1/0,-1/0],[1/0,-1/0]],i=F(t,function(o){var s=r?e.pointToData(o,n):e.dataToPoint(o,n);return a[0][0]=Math.min(a[0][0],s[0]),a[1][0]=Math.min(a[1][0],s[1]),a[0][1]=Math.max(a[0][1],s[0]),a[1][1]=Math.max(a[1][1],s[1]),s});return{values:i,xyMinMax:a}}};function UM(r,e,t,n){process.env.NODE_ENV!=="production"&&J(t.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var a=t.getAxis(["x","y"][r]),i=Iy(F([0,1],function(s){return e?a.coordToData(a.toLocalCoord(n[s]),!0):a.toGlobalCoord(a.dataToCoord(n[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var YM={lineX:st(ZM,0),lineY:st(ZM,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return F(r,function(n,a){return[n[0]-t[0]*e[a][0],n[1]-t[1]*e[a][1]]})}};function ZM(r,e,t,n){return[e[0]-n[r]*t[0],e[1]-n[r]*t[1]]}function lY(r,e){var t=XM(r),n=XM(e),a=[t[0]/n[0],t[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function XM(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}const Py=oY;var Ry=D,uY=P2("toolbox-dataZoom_"),fY=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){this._brushController||(this._brushController=new Fg(a.getZr()),this._brushController.on("brush",Z(this._onBrush,this)).mount()),vY(t,n,this,i,a),cY(t,n)},e.prototype.onclick=function(t,n,a){hY[a].call(this)},e.prototype.remove=function(t,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var n=t.areas;if(!t.isEnd||!n.length)return;var a={},i=this.ecModel;this._brushController.updateCovers([]);var o=new Py(Ny(this.model),i,{include:["grid"]});o.matchOutputRanges(n,i,function(u,f,h){if(h.type==="cartesian2d"){var c=u.brushType;c==="rect"?(s("x",h,f[0]),s("y",h,f[1])):s({lineX:"x",lineY:"y"}[c],h,f)}}),J8(i,a),this._dispatchZoomAction(a);function s(u,f,h){var c=f.getAxis(u),v=c.model,p=l(u,v,i),d=p.findRepresentativeAxisProxy(v).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(h=_i(0,h.slice(),c.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(a[p.id]={dataZoomId:p.id,startValue:h[0],endValue:h[1]})}function l(u,f,h){var c;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var p=v.getAxisModel(u,f.componentIndex);p&&(c=v)}),c}},e.prototype._dispatchZoomAction=function(t){var n=[];Ry(t,function(a,i){n.push(nt(a))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(t){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return n},e}(pr),hY={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(tY(this.ecModel))}};function Ny(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function cY(r,e){r.setIconStatus("back",rY(e)>1?"emphasis":"normal")}function vY(r,e,t,n,a){var i=t._isZoomActive;n&&n.type==="takeGlobalCursor"&&(i=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),t._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new Py(Ny(r),e,{include:["grid"]}),s=o.makePanelOpts(a,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}cN("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var n=e.getModel(t),a=[],i=Ny(n),o=ns(r,i);Ry(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Ry(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var h=l.componentIndex,c={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:uY+u+h};c[f]=h,a.push(c)}return a});const pY=fY;function dY(r){r.registerComponentModel(P8),r.registerComponentView(k8),Po("saveAsImage",B8),Po("magicType",F8),Po("dataView",Q8),Po("dataZoom",pY),Po("restore",aY),dt(I8)}var gY=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(xt);const yY=gY;function qM(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function KM(r){if(wt.domSupported){for(var e=document.documentElement.style,t=0,n=r.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var f=u*Math.PI/180,h=o+a,c=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),v=Math.round(((c-Math.SQRT2*a)/2+Math.SQRT2*a-(c-h)/2)*100)/100;s+=";"+i+":-"+v+"px";var p=e+" solid "+a+"px;",d=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'
'}function TY(r,e){var t="cubic-bezier(0.23,1,0.32,1)",n=" "+r/2+"s "+t,a="opacity"+n+",visibility"+n;return e||(n=" "+r+"s "+t,a+=wt.transformSupported?","+Oy+n:",left"+n+",top"+n),SY+":"+a}function JM(r,e,t){var n=r.toFixed(0)+"px",a=e.toFixed(0)+"px";if(!wt.transformSupported)return t?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=wt.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return t?"top:0;left:0;"+Oy+":"+o+";":[["top",0],["left",0],[jM,o]]}function DY(r){var e=[],t=r.get("fontSize"),n=r.getTextColor();n&&e.push("color:"+n),e.push("font:"+r.getFont()),t&&e.push("line-height:"+Math.round(t*3/2)+"px");var a=r.get("textShadowColor"),i=r.get("textShadowBlur")||0,o=r.get("textShadowOffsetX")||0,s=r.get("textShadowOffsetY")||0;return a&&i&&e.push("text-shadow:"+o+"px "+s+"px "+i+"px "+a),D(["decoration","align"],function(l){var u=r.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function CY(r,e,t){var n=[],a=r.get("transitionDuration"),i=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=QS(r,"html"),c=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+c),e&&a&&n.push(TY(a,t)),i&&n.push("background-color:"+i),D(["width","color","radius"],function(v){var p="border-"+v,d=Y1(p),g=r.get(d);g!=null&&n.push(p+":"+g+(v==="color"?"":"px"))}),n.push(DY(f)),h!=null&&n.push("padding:"+Ji(h).join("px ")+"px"),n.join(";")+";"}function tL(r,e,t,n,a){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&eE(r,o,document.body,n,a)}else{r[0]=n,r[1]=a;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var AY=function(){function r(e,t,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,wt.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var i=this._zr=t.getZr(),o=this._appendToBody=n&&n.appendToBody;tL(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(a):e.appendChild(a),this._container=e;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,f=i.painter.getViewportRoot();qe(f,l,!0),u.dispatch("mousemove",l)}},a.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){var t=this._container,n=_Y(t,"position"),a=t.style;a.position!=="absolute"&&n!=="absolute"&&(a.position="relative");var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=xY+CY(e,!this._firstShow,this._longHide)+JM(i[0],i[1],!0)+("border-color:"+Ya(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,n,a,i){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(U(i)&&n.get("trigger")==="item"&&!qM(n)&&(s=bY(n,a,i)),U(e))o.innerHTML=e+s;else if(e){o.innerHTML="",G(e)||(e=[e]);for(var l=0;l=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,a=this._api,i=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&o.manuallyShowTip(t,n,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,n,a,i){if(!(i.from===this.uid||wt.node||!a.getDom())){var o=nL(i,a);this._ticket="";var s=i.dataByCoordSys,l=kY(i,n,a);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var f=EY;f.x=i.x,f.y=i.y,f.update(),ot(f).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:f},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(t,n,a,i))return;var h=uM(i,n),c=h.point[0],v=h.point[1];c!=null&&v!=null&&this._tryShow({offsetX:c,offsetY:v,target:h.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:a.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,n,a,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(nL(i,a))},e.prototype._manuallyAxisShowTip=function(t,n,a,i){var o=i.seriesIndex,s=i.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var f=u.getData(),h=Al([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},e.prototype._tryShow=function(t,n){var a=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(a){this._lastDataByCoordSys=null;var s,l;Qa(a,function(u){if(ot(u).dataIndex!=null)return s=u,!0;if(ot(u).tooltipConfig!=null)return l=u,!0},!0),s?this._showSeriesItemTooltip(t,s,n):l?this._showComponentItemTooltip(t,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(t,n){var a=t.get("showDelay");n=Z(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},e.prototype._showAxisTooltip=function(t,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Al([n.tooltipOption],i),l=this._renderMode,u=[],f=se("section",{blocks:[],noHeader:!0}),h=[],c=new Sp;D(t,function(m){D(m.dataByAxis,function(_){var S=a.getComponent(_.axisDim+"Axis",_.axisIndex),w=_.value;if(!(!S||w==null)){var x=eM(w,S.axis,a,_.seriesDataIndices,_.valueLabelOpt),b=se("section",{header:x,noHeader:!yr(x),sortBlocks:!0,blocks:[]});f.blocks.push(b),D(_.seriesDataIndices,function(T){var C=a.getSeriesByIndex(T.seriesIndex),A=T.dataIndexInside,M=C.getDataParams(A);if(!(M.dataIndex<0)){M.axisDim=_.axisDim,M.axisIndex=_.axisIndex,M.axisType=_.axisType,M.axisId=_.axisId,M.axisValue=nd(S.axis,{value:w}),M.axisValueLabel=x,M.marker=c.makeTooltipMarker("item",Ya(M.color),l);var L=PS(C.formatTooltip(A,!0,null)),I=L.frag;if(I){var E=Al([C],i).get("valueFormatter");b.blocks.push(E?B({valueFormatter:E},I):I)}L.text&&h.push(L.text),u.push(M)}})}})}),f.blocks.reverse(),h.reverse();var v=n.position,p=s.get("order"),d=qS(f,c,l,p,a.get("useUTC"),s.get("textStyle"));d&&h.unshift(d);var g=l==="richText"?` `:"
",y=h.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],v,null,c)})},e.prototype._showSeriesItemTooltip=function(t,n,a){var i=this._ecModel,o=ot(n),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,c=u.getData(h),v=this._renderMode,p=t.positionDefault,d=Al([c.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=d.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(f,h),m=new Sp;y.marker=m.makeTooltipMarker("item",Ya(y.color),v);var _=PS(u.formatTooltip(f,!1,h)),S=d.get("order"),w=d.get("valueFormatter"),x=_.frag,b=x?qS(w?B({valueFormatter:w},x):x,m,v,S,i.get("useUTC"),d.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(d,function(){this._showTooltipContent(d,b,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),a({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,n,a){var i=ot(n),o=i.tooltipConfig,s=o.option||{};if(U(s)){var l=s;s={content:l,formatter:l}}var u=[s],f=this._ecModel.getComponent(i.componentMainType,i.componentIndex);f&&u.push(f),u.push({formatter:s.content});var h=t.positionDefault,c=Al(u,this._tooltipModel,h?{position:h}:null),v=c.get("content"),p=Math.random()+"",d=new Sp;this._showOrMove(c,function(){var g=nt(c.get("formatterParams")||{});this._showTooltipContent(c,v,g,p,t.offsetX,t.offsetY,t.position,n,d)}),a({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,n,a,i,o,s,l,u,f){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var c=t.get("formatter");l=l||t.get("position");var v=n,p=this._getNearestPoint([o,s],a,t.get("trigger"),t.get("borderColor")),d=p.color;if(c)if(U(c)){var g=t.ecModel.get("useUTC"),y=G(a)?a[0]:a,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=c,m&&(v=qu(y.axisValue,v,g)),v=X1(v,a,!0)}else if(q(c)){var _=Z(function(S,w){S===this._ticket&&(h.setContent(w,f,t,d,l),this._updatePosition(t,l,o,s,h,a,u))},this);this._ticket=i,v=c(a,i,_)}else v=c;h.setContent(v,f,t,d,l),h.show(t,d),this._updatePosition(t,l,o,s,h,a,u)}},e.prototype._getNearestPoint=function(t,n,a,i){if(a==="axis"||G(n))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!G(n))return{color:i||n.color||n.borderColor}},e.prototype._updatePosition=function(t,n,a,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();n=n||t.get("position");var h=o.getSize(),c=t.get("align"),v=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),q(n)&&(n=n([a,i],s,o.el,p,{viewSize:[u,f],contentSize:h.slice()})),G(n))a=$(n[0],u),i=$(n[1],f);else if(Q(n)){var d=n;d.width=h[0],d.height=h[1];var g=ae(d,{width:u,height:f});a=g.x,i=g.y,c=null,v=null}else if(U(n)&&l){var y=OY(n,p,h,t.get("borderWidth"));a=y[0],i=y[1]}else{var y=RY(a,i,o,u,f,c?null:20,v?null:20);a=y[0],i=y[1]}if(c&&(a-=aL(c)?h[0]/2:c==="right"?h[0]:0),v&&(i-=aL(v)?h[1]/2:v==="bottom"?h[1]:0),qM(t)){var y=NY(a,i,o,u,f);a=y[0],i=y[1]}o.moveTo(a,i)},e.prototype._updateContentNotChangedOnAxis=function(t,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===t.length;return o&&D(a,function(s,l){var u=s.dataByAxis||[],f=t[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&D(u,function(c,v){var p=h[v]||{},d=c.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&c.value===p.value&&c.axisType===p.axisType&&c.axisId===p.axisId&&d.length===g.length,o&&D(d,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&D(c.seriesDataIndices,function(y){var m=y.seriesIndex,_=n[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=n,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,n){wt.node||!n.getDom()||(Rs(this,"_updatePosition"),this._tooltipContent.dispose(),gy("itemTooltip",n))},e.type="tooltip",e}(Ut);function Al(r,e,t){var n=e.ecModel,a;t?(a=new Vt(t,n,n),a=new Vt(e.option,a,n)):a=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof Vt&&(o=o.get("tooltip",!0)),U(o)&&(o={formatter:o}),o&&(a=new Vt(o,a,n)))}return a}function nL(r,e){return r.dispatchAction||Z(e.dispatchAction,e)}function RY(r,e,t,n,a,i,o){var s=t.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>n?r-=l+i:r+=i),o!=null&&(e+u+o>a?e-=u+o:e+=o),[r,e]}function NY(r,e,t,n,a){var i=t.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,n)-o,e=Math.min(e+s,a)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function OY(r,e,t,n){var a=t[0],i=t[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,f=e.height;switch(r){case"inside":s=e.x+u/2-a/2,l=e.y+f/2-i/2;break;case"top":s=e.x+u/2-a/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-a/2,l=e.y+f+o;break;case"left":s=e.x-a-o,l=e.y+f/2-i/2;break;case"right":s=e.x+u+o,l=e.y+f/2-i/2}return[s,l]}function aL(r){return r==="center"||r==="middle"}function kY(r,e,t){var n=Jc(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=as(e,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=ot(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}const VY=PY;function BY(r){dt(Dl),r.registerComponentModel(yY),r.registerComponentView(VY),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},qt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},qt)}var zY=["rect","polygon","keep","clear"];function GY(r,e){var t=Nt(r?r.brush:[]);if(t.length){var n=[];D(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var a=r&&r.toolbox;G(a)&&(a=a[0]),a||(a={feature:{}},r.toolbox=[a]);var i=a.feature||(a.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),FY(s),e&&!s.length&&s.push.apply(s,zY)}}function FY(r){var e={};D(r,function(t){e[t]=1}),r.length=0,D(e,function(t,n){r.push(n)})}var iL=D;function oL(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function ky(r,e,t){var n={};return iL(e,function(i){var o=n[i]=a();iL(r[i],function(s,l){if(ye.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new ye(u),l==="opacity"&&(u=nt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new ye(u))}})}),n;function a(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function sL(r,e,t){var n;D(t,function(a){e.hasOwnProperty(a)&&oL(e[a])&&(n=!0)}),n&&D(t,function(a){e.hasOwnProperty(a)&&oL(e[a])?r[a]=nt(e[a]):delete r[a]})}function HY(r,e,t,n,a,i){var o={};D(r,function(h){var c=ye.prepareVisualTypes(e[h]);o[h]=c});var s;function l(h){return Cp(t,s,h)}function u(h,c){Sx(t,s,h,c)}i==null?t.each(f):t.each([i],f);function f(h,c){s=i==null?h:c;var v=t.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var p=n.call(a,h),d=e[p],g=o[p],y=0,m=g.length;ye[0][1]&&(e[0][1]=i[0]),i[1]e[1][1]&&(e[1][1]=i[1])}return e&&vL(e)}};function vL(r){return new ct(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var KY=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n,this.model,(this._brushController=new Fg(n.getZr())).on("brush",Z(this._onBrush,this)).mount()},e.prototype.render=function(t,n,a,i){this.model=t,this._updateController(t,n,a,i)},e.prototype.updateTransform=function(t,n,a,i){hL(n),this._updateController(t,n,a,i)},e.prototype.updateVisual=function(t,n,a,i){this.updateTransform(t,n,a,i)},e.prototype.updateView=function(t,n,a,i){this._updateController(t,n,a,i)},e.prototype._updateController=function(t,n,a,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(a)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var n=this.model.id,a=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:nt(a),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:nt(a),$from:n})},e.type="brush",e}(Ut);const jY=KY;var QY="#ddd",JY=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&sL(a,t,["inBrush","outOfBrush"]);var i=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:QY},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){process.env.NODE_ENV!=="production"&&(J(G(t)),D(t,function(n){J(n.brushType,"Illegal areas")})),t&&(this.areas=F(t,function(n){return pL(this.option,n)},this))},e.prototype.setBrushOption=function(t){this.brushOption=pL(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(xt);function pL(r,e){return ht({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Vt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}const t9=JY;var e9=["rect","polygon","lineX","lineY","keep","clear"],r9=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a){var i,o,s;n.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,D(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,n,a){this.render(t,n,a)},e.prototype.getIcons=function(){var t=this.model,n=t.get("icon",!0),a={};return D(t.get("type",!0),function(i){n[i]&&(a[i]=n[i])}),a},e.prototype.onclick=function(t,n,a){var i=this._brushType,o=this._brushMode;a==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:a==="keep"?i:i===a?!1:a,brushMode:a==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var n={show:!0,type:e9.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return n},e}(pr);const n9=r9;function a9(r){r.registerComponentView(jY),r.registerComponentModel(t9),r.registerPreprocessor(GY),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,UY),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},qt),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},qt),Po("brush",n9)}var i9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(xt),o9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=lt(t.get("textBaseline"),t.get("textVerticalAlign")),f=new At({style:kt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),c=t.get("subtext"),v=new At({style:kt(s,{text:c,fill:s.getTextColor(),y:h.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),g=t.get("triggerEvent",!0);f.silent=!p&&!g,v.silent=!d&&!g,p&&f.on("click",function(){tf(p,"_"+t.get("target"))}),d&&v.on("click",function(){tf(d,"_"+t.get("subtarget"))}),ot(f).eventData=ot(v).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(f),c&&i.add(v);var y=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=ae(m,{width:a.getWidth(),height:a.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),i.x=_.x,i.y=_.y,i.markRedraw();var S={align:l,verticalAlign:u};f.setStyle(S),v.setStyle(S),y=i.getBoundingRect();var w=_.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var b=new Tt({shape:{x:y.x-w[3],y:y.y-w[0],width:y.width+w[1]+w[3],height:y.height+w[0]+w[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(b)}},e.type="title",e}(Ut);function s9(r){r.registerComponentModel(i9),r.registerComponentView(o9)}var l9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var n=this._data.count();this.option.loop?t=(t%n+n)%n:(t>=n&&(t=n-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,n=t.data||[],a=t.axisType,i=this._names=[],o;a==="category"?(o=[],D(n,function(u,f){var h=ne(Bi(u),""),c;Q(u)?(c=nt(u),c.value=f):c=f,o.push(c),i.push(h)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[a]||"number",l=this._data=new Le([{name:"value",type:s}],this);l.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(xt);const dL=l9;var gL=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=$n(dL.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(dL);jt(gL,pp.prototype);const u9=gL;var f9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Ut);const h9=f9;var c9=function(r){O(e,r);function e(t,n,a,i){var o=r.call(this,t,n,a)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Mr);const v9=c9;var zy=Math.PI,yL=bt(),p9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.api=n},e.prototype.render=function(t,n,a){if(this.model=t,this.api=a,this.ecModel=n,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,a),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return se("nameValue",{noName:!0,value:f})},D(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,n){var a=t.get(["label","position"]),i=t.get("orient"),o=g9(t,n),s;a==null||a==="auto"?s=i==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:zy/2},h=i==="vertical"?o.height:o.width,c=t.getModel("controlStyle"),v=c.get("show",!0),p=v?c.get("itemSize"):0,d=v?c.get("itemGap"):0,g=p+d,y=t.get(["label","rotate"])||0;y=y*zy/180;var m,_,S,w=c.get("position",!0),x=v&&c.get("showPlayBtn",!0),b=v&&c.get("showPrevBtn",!0),T=v&&c.get("showNextBtn",!0),C=0,A=h;w==="left"||w==="bottom"?(x&&(m=[0,0],C+=g),b&&(_=[C,0],C+=g),T&&(S=[A-p,0],A-=g)):(x&&(m=[A-p,0],A-=g),b&&(_=[0,0],C+=g),T&&(S=[A-p,0],A-=g));var M=[C,A];return t.get("inverse")&&M.reverse(),{viewRect:o,mainLength:h,orient:i,rotation:f[i],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:_,nextBtnPosition:S,axisExtent:M,controlSize:p,controlGap:d}},e.prototype._position=function(t,n){var a=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=Ke(),l=o.x,u=o.y+o.height;Pr(s,s,[-l,-u]),ga(s,s,-zy/2),Pr(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=m(o),h=m(a.getBoundingRect()),c=m(i.getBoundingRect()),v=[a.x,a.y],p=[i.x,i.y];p[0]=v[0]=f[0][0];var d=t.labelPosOpt;if(d==null||U(d)){var g=d==="+"?0:1;_(v,h,f,1,g),_(p,c,f,1,1-g)}else{var g=d>=0?0:1;_(v,h,f,1,g),p[1]=v[1]+d}a.setPosition(v),i.setPosition(p),a.rotation=i.rotation=t.rotation,y(a),y(i);function y(S){S.originX=f[0][0]-S.x,S.originY=f[1][0]-S.y}function m(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function _(S,w,x,b,T){S[b]+=x[b][T]-w[b][T]}},e.prototype._createAxis=function(t,n){var a=n.getData(),i=n.get("axisType"),o=d9(n,i);o.getTicks=function(){return a.mapArray(["value"],function(u){return{value:u}})};var s=a.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new v9("value",o,t.axisExtent,i);return l.model=n,l},e.prototype._createGroup=function(t){var n=this[t]=new at;return this.group.add(n),n},e.prototype._renderAxisLine=function(t,n,a,i){var o=a.getExtent();if(i.get(["lineStyle","show"])){var s=new fe({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:B({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new fe({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:tt({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(t,n,a,i){var o=this,s=i.getData(),l=a.scale.getTicks();this._tickSymbols=[],D(l,function(u){var f=a.dataToCoord(u.value),h=s.getItemModel(u.value),c=h.getModel("itemStyle"),v=h.getModel(["emphasis","itemStyle"]),p=h.getModel(["progress","itemStyle"]),d={x:f,y:0,onclick:Z(o._changeTimeline,o,u.value)},g=mL(h,c,n,d);g.ensureState("emphasis").style=v.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),Ba(g);var y=ot(g);h.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,n,a,i){var o=this,s=a.getLabelModel();if(s.get("show")){var l=i.getData(),u=a.getViewLabels();this._tickLabels=[],D(u,function(f){var h=f.tickValue,c=l.getItemModel(h),v=c.getModel("label"),p=c.getModel(["emphasis","label"]),d=c.getModel(["progress","label"]),g=a.dataToCoord(f.tickValue),y=new At({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:Z(o._changeTimeline,o,h),silent:!1,style:kt(v,{text:f.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=kt(p),y.ensureState("progress").style=kt(d),n.add(y),Ba(y),yL(y).dataIndex=h,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,n,a,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),f=i.getPlayState(),h=i.get("inverse",!0);c(t.nextBtnPosition,"next",Z(this._changeTimeline,this,h?"-":"+")),c(t.prevBtnPosition,"prev",Z(this._changeTimeline,this,h?"+":"-")),c(t.playPosition,f?"stop":"play",Z(this._handlePlayClick,this,!f),!0);function c(v,p,d,g){if(v){var y=Sr(lt(i.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=y9(i,p+"Icon",m,{x:v[0],y:v[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});_.ensureState("emphasis").style=u,n.add(_),Ba(_)}}},e.prototype._renderCurrentPointer=function(t,n,a,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(h){h.draggable=!0,h.drift=Z(u._handlePointerDrag,u),h.ondragend=Z(u._handlePointerDragend,u),_L(h,u._progressLine,s,a,i,!0)},onUpdate:function(h){_L(h,u._progressLine,s,a,i)}};this._currentPointer=mL(l,l,this._mainGroup,{},this._currentPointer,f)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,n,a){this._clearTimer(),this._pointerChangeTimeline([a.offsetX,a.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,n){var a=this._toAxisCoord(t)[0],i=this._axis,o=Je(i.getExtent().slice());a>o[1]&&(a=o[1]),a=0&&(o[i]=+o[i].toFixed(c)),[o,h]}var Hy={min:st(Oh,"min"),max:st(Oh,"max"),average:st(Oh,"average"),median:st(Oh,"median")};function Ll(r,e){if(e){var t=r.getData(),n=r.coordinateSystem,a=n&&n.dimensions;if(!D9(e)&&!G(e.coord)&&G(a)){var i=wL(e,t,n,r);if(e=nt(e),e.type&&Hy[e.type]&&i.baseAxis&&i.valueAxis){var o=pt(a,i.baseAxis.dim),s=pt(a,i.valueAxis.dim),l=Hy[e.type](t,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!G(a))e.coord=[];else for(var u=e.coord,f=0;f<2;f++)Hy[u[f]]&&(u[f]=$y(t,t.mapDimension(a[f]),u[f]));return e}}function wL(r,e,t,n){var a={};return r.valueIndex!=null||r.valueDim!=null?(a.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,a.valueAxis=t.getAxis(C9(n,a.valueDataDim)),a.baseAxis=t.getOtherAxis(a.valueAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim)):(a.baseAxis=n.getBaseAxis(),a.valueAxis=t.getOtherAxis(a.baseAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim),a.valueDataDim=e.mapDimension(a.valueAxis.dim)),a}function C9(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Il(r,e){return r&&r.containData&&e.coord&&!Fy(e)?r.containData(e.coord):!0}function A9(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Fy(e)&&!Fy(t)?r.containZone(e.coord,t.coord):!0}function bL(r,e){return r?function(t,n,a,i){var o=i<2?t.coord&&t.coord[i]:t.value;return Un(o,e[i])}:function(t,n,a,i){return Un(t.value,e[i])}}function $y(r,e,t){if(t==="average"){var n=0,a=0;return r.each(e,function(i,o){isNaN(i)||(n+=i,a++)}),n/a}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var Wy=bt(),M9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=K()},e.prototype.render=function(t,n,a){var i=this,o=this.markerGroupMap;o.each(function(s){Wy(s).keep=!1}),n.eachSeries(function(s){var l=sa.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,n,a)}),o.each(function(s){!Wy(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){Wy(t).keep=!0},e.prototype.toggleBlurSeries=function(t,n){var a=this;D(t,function(i){var o=sa.getMarkerModelFromSeries(i,a.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?O_(l):bv(l))})}})},e.type="marker",e}(Ut);const Uy=M9;function TL(r,e,t){var n=e.coordinateSystem;r.each(function(a){var i=r.getItemModel(a),o,s=$(i.get("x"),t.getWidth()),l=$(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,a));else if(n){var u=r.get(n.dimensions[0],a),f=r.get(n.dimensions[1],a);o=n.dataToPoint([u,f])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(a,o)})}var L9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=sa.getMarkerModelFromSeries(i,"markPoint");o&&(TL(o.getData(),i,a),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new nl),h=I9(o,t,n);n.setData(h),TL(n.getData(),t,i),h.each(function(c){var v=h.getItemModel(c),p=v.getShallow("symbol"),d=v.getShallow("symbolSize"),g=v.getShallow("symbolRotate"),y=v.getShallow("symbolOffset"),m=v.getShallow("symbolKeepAspect");if(q(p)||q(d)||q(g)||q(y)){var _=n.getRawValue(c),S=n.getDataParams(c);q(p)&&(p=p(_,S)),q(d)&&(d=d(_,S)),q(g)&&(g=g(_,S)),q(y)&&(y=y(_,S))}var w=v.getModel("itemStyle").getItemStyle(),x=ks(l,"color");w.fill||(w.fill=x),h.setItemVisual(c,{symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:w})}),f.updateData(h),this.group.add(f.group),h.eachItemGraphicEl(function(c){c.traverse(function(v){ot(v).dataModel=n})}),this.markKeep(f),f.group.silent=n.get("silent")||t.get("silent")},e.type="markPoint",e}(Uy);function I9(r,e,t){var n;r?n=F(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return B(B({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Le(n,t),i=F(t.get("data"),st(Ll,e));r&&(i=Rt(i,st(Il,r)));var o=bL(!!r,n);return a.initData(i,null,o),a}const E9=L9;function P9(r){r.registerComponentModel(T9),r.registerComponentView(E9),r.registerPreprocessor(function(e){Gy(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var R9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(sa);const N9=R9;var kh=bt(),O9=function(r,e,t,n){var a=r.getData(),i;if(G(n))i=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=Qt(n.yAxis,n.xAxis);else{var u=wL(n,a,e,r);s=u.valueAxis;var f=xw(a,u.valueDataDim);l=$y(a,f,o)}var h=s.dim==="x"?0:1,c=1-h,v=nt(n),p={coord:[]};v.type=null,v.coord=[],v.coord[c]=-1/0,p.coord[c]=1/0;var d=t.get("precision");d>=0&&Ct(l)&&(l=+l.toFixed(Math.min(d,20))),v.coord[h]=p.coord[h]=l,i=[v,p,{type:o,valueIndex:n.valueIndex,value:l}]}else process.env.NODE_ENV!=="production"&&dr("Invalid markLine data."),i=[]}var g=[Ll(r,i[0]),Ll(r,i[1]),B({},i[2])];return g[2].type=g[2].type||null,ht(g[2],g[0]),ht(g[2],g[1]),g};function Vh(r){return!isNaN(r)&&!isFinite(r)}function DL(r,e,t,n){var a=1-r,i=n.dimensions[r];return Vh(e[a])&&Vh(t[a])&&e[r]===t[r]&&n.getAxis(i).containData(e[r])}function k9(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,n=e[1].coord;if(t&&n&&(DL(1,t,n,r)||DL(0,t,n,r)))return!0}return Il(r,e[0])&&Il(r,e[1])}function Yy(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=$(o.get("x"),a.getWidth()),u=$(o.get("y"),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(r.getValues(r.dimensions,e));else{var f=i.dimensions,h=r.get(f[0],e),c=r.get(f[1],e);s=i.dataToPoint([h,c])}if(fi(i,"cartesian2d")){var v=i.getAxis("x"),p=i.getAxis("y"),f=i.dimensions;Vh(r.get(f[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[t?0:1]):Vh(r.get(f[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var V9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=sa.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=kh(o).from,u=kh(o).to;l.each(function(f){Yy(l,f,!0,i,a),Yy(u,f,!1,i,a)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new xg);this.group.add(f.group);var h=B9(o,t,n),c=h.from,v=h.to,p=h.line;kh(n).from=c,kh(n).to=v,n.setData(p);var d=n.get("symbol"),g=n.get("symbolSize"),y=n.get("symbolRotate"),m=n.get("symbolOffset");G(d)||(d=[d,d]),G(g)||(g=[g,g]),G(y)||(y=[y,y]),G(m)||(m=[m,m]),h.from.each(function(S){_(c,S,!0),_(v,S,!1)}),p.each(function(S){var w=p.getItemModel(S).getModel("lineStyle").getLineStyle();p.setItemLayout(S,[c.getItemLayout(S),v.getItemLayout(S)]),w.stroke==null&&(w.stroke=c.getItemVisual(S,"style").fill),p.setItemVisual(S,{fromSymbolKeepAspect:c.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(S,"symbolOffset"),fromSymbolRotate:c.getItemVisual(S,"symbolRotate"),fromSymbolSize:c.getItemVisual(S,"symbolSize"),fromSymbol:c.getItemVisual(S,"symbol"),toSymbolKeepAspect:v.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(S,"symbolOffset"),toSymbolRotate:v.getItemVisual(S,"symbolRotate"),toSymbolSize:v.getItemVisual(S,"symbolSize"),toSymbol:v.getItemVisual(S,"symbol"),style:w})}),f.updateData(p),h.line.eachItemGraphicEl(function(S){ot(S).dataModel=n,S.traverse(function(w){ot(w).dataModel=n})});function _(S,w,x){var b=S.getItemModel(w);Yy(S,w,x,t,i);var T=b.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=ks(l,"color")),S.setItemVisual(w,{symbolKeepAspect:b.get("symbolKeepAspect"),symbolOffset:lt(b.get("symbolOffset",!0),m[x?0:1]),symbolRotate:lt(b.get("symbolRotate",!0),y[x?0:1]),symbolSize:lt(b.get("symbolSize"),g[x?0:1]),symbol:lt(b.get("symbol",!0),d[x?0:1]),style:T})}this.markKeep(f),f.group.silent=n.get("silent")||t.get("silent")},e.type="markLine",e}(Uy);function B9(r,e,t){var n;r?n=F(r&&r.dimensions,function(u){var f=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return B(B({},f),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Le(n,t),i=new Le(n,t),o=new Le([],t),s=F(t.get("data"),st(O9,e,r,t));r&&(s=Rt(s,st(k9,r)));var l=bL(!!r,n);return a.initData(F(s,function(u){return u[0]}),null,l),i.initData(F(s,function(u){return u[1]}),null,l),o.initData(F(s,function(u){return u[2]})),o.hasItemOption=!0,{from:a,to:i,line:o}}const z9=V9;function G9(r){r.registerComponentModel(N9),r.registerComponentView(z9),r.registerPreprocessor(function(e){Gy(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var F9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(sa);const H9=F9;var Bh=bt(),$9=function(r,e,t,n){var a=n[0],i=n[1];if(!(!a||!i)){var o=Ll(r,a),s=Ll(r,i),l=o.coord,u=s.coord;l[0]=Qt(l[0],-1/0),l[1]=Qt(l[1],-1/0),u[0]=Qt(u[0],1/0),u[1]=Qt(u[1],1/0);var f=jh([{},o,s]);return f.coord=[o.coord,s.coord],f.x0=o.x,f.y0=o.y,f.x1=s.x,f.y1=s.y,f}};function zh(r){return!isNaN(r)&&!isFinite(r)}function CL(r,e,t,n){var a=1-r;return zh(e[a])&&zh(t[a])}function W9(r,e){var t=e.coord[0],n=e.coord[1],a={coord:t,x:e.x0,y:e.y0},i={coord:n,x:e.x1,y:e.y1};return fi(r,"cartesian2d")?t&&n&&(CL(1,t,n)||CL(0,t,n))?!0:A9(r,a,i):Il(r,a)||Il(r,i)}function AL(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=$(o.get(t[0]),a.getWidth()),u=$(o.get(t[1]),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var f=r.getValues(["x0","y0"],e),h=r.getValues(["x1","y1"],e),c=i.clampData(f),v=i.clampData(h),p=[];t[0]==="x0"?p[0]=c[0]>v[0]?h[0]:f[0]:p[0]=c[0]>v[0]?f[0]:h[0],t[1]==="y0"?p[1]=c[1]>v[1]?h[1]:f[1]:p[1]=c[1]>v[1]?f[1]:h[1],s=n.getMarkerPosition(p,t,!0)}else{var d=r.get(t[0],e),g=r.get(t[1],e),y=[d,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(fi(i,"cartesian2d")){var m=i.getAxis("x"),_=i.getAxis("y"),d=r.get(t[0],e),g=r.get(t[1],e);zh(d)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):zh(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var ML=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],U9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=sa.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=F(ML,function(h){return AL(s,l,h,i,a)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new at});this.group.add(f.group),this.markKeep(f);var h=Y9(o,t,n);n.setData(h),h.each(function(c){var v=F(ML,function(T){return AL(h,c,T,t,i)}),p=o.getAxis("x").scale,d=o.getAxis("y").scale,g=p.getExtent(),y=d.getExtent(),m=[p.parse(h.get("x0",c)),p.parse(h.get("x1",c))],_=[d.parse(h.get("y0",c)),d.parse(h.get("y1",c))];Je(m),Je(_);var S=!(g[0]>m[1]||g[1]_[1]||y[1]<_[0]),w=!S;h.setItemLayout(c,{points:v,allClipped:w});var x=h.getItemModel(c).getModel("itemStyle").getItemStyle(),b=ks(l,"color");x.fill||(x.fill=b,U(x.fill)&&(x.fill=eu(x.fill,.4))),x.stroke||(x.stroke=b),h.setItemVisual(c,"style",x)}),h.diff(Bh(f).data).add(function(c){var v=h.getItemLayout(c);if(!v.allClipped){var p=new ke({shape:{points:v.points}});h.setItemGraphicEl(c,p),f.group.add(p)}}).update(function(c,v){var p=Bh(f).data.getItemGraphicEl(v),d=h.getItemLayout(c);d.allClipped?p&&f.group.remove(p):(p?Mt(p,{shape:{points:d.points}},n,c):p=new ke({shape:{points:d.points}}),h.setItemGraphicEl(c,p),f.group.add(p))}).remove(function(c){var v=Bh(f).data.getItemGraphicEl(c);f.group.remove(v)}).execute(),h.eachItemGraphicEl(function(c,v){var p=h.getItemModel(v),d=h.getItemVisual(v,"style");c.useStyle(h.getItemVisual(v,"style")),de(c,oe(p),{labelFetcher:n,labelDataIndex:v,defaultText:h.getName(v)||"",inheritColor:U(d.fill)?eu(d.fill,1):"#000"}),pe(c,p),Wt(c,null,null,p.get(["emphasis","disabled"])),ot(c).dataModel=n}),Bh(f).data=h,f.group.silent=n.get("silent")||t.get("silent")},e.type="markArea",e}(Uy);function Y9(r,e,t){var n,a,i=["x0","y0","x1","y1"];if(r){var o=F(r&&r.dimensions,function(u){var f=e.getData(),h=f.getDimensionInfo(f.mapDimension(u))||{};return B(B({},h),{name:u,ordinalMeta:null})});a=F(i,function(u,f){return{name:u,type:o[f%2].type}}),n=new Le(a,t)}else a=[{name:"value",type:"float"}],n=new Le(a,t);var s=F(t.get("data"),st($9,e,r,t));r&&(s=Rt(s,st(W9,r)));var l=r?function(u,f,h,c){var v=u.coord[Math.floor(c/2)][c%2];return Un(v,a[c])}:function(u,f,h,c){return Un(u.value,a[c])};return n.initData(s,null,l),n.hasItemOption=!0,n}const Z9=U9;function X9(r){r.registerComponentModel(H9),r.registerComponentView(Z9),r.registerPreprocessor(function(e){Gy(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var q9=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},K9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},e.prototype._updateSelector=function(t){var n=t.selector,a=this.ecModel;n===!0&&(n=t.selector=["all","inverse"]),G(n)&&D(n,function(i,o){U(i)&&(i={type:i}),n[o]=ht(i,q9(a,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var n=!1,a=0;a=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}(xt);const Zy=K9;var No=st,Xy=D,Gh=at,j9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new Gh),this.group.add(this._selectorGroup=new Gh),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,n,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,n,a,l,s,u);var f=t.getBoxLayoutParams(),h={width:a.getWidth(),height:a.getHeight()},c=t.get("padding"),v=ae(f,h,c),p=this.layoutInner(t,o,v,i,l,u),d=ae(tt({width:p.width,height:p.height},f),h,c);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=VM(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this.getContentGroup(),f=K(),h=n.get("selectedMode"),c=[];a.eachRawSeries(function(v){!v.get("legendHoverLink")&&c.push(v.id)}),Xy(n.getData(),function(v,p){var d=v.get("name");if(!this.newlineDisabled&&(d===""||d===` `)){var g=new Gh;g.newline=!0,u.add(g);return}var y=a.getSeriesByName(d)[0];if(!f.get(d)){if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),w=m.getVisual("style"),x=this._createItem(y,d,p,v,n,t,_,w,S,h,i);x.on("click",No(LL,d,null,i,c)).on("mouseover",No(qy,y.name,null,i,c)).on("mouseout",No(Ky,y.name,null,i,c)),f.set(d,!0)}else a.eachRawSeries(function(b){if(!f.get(d)&&b.legendVisualProvider){var T=b.legendVisualProvider;if(!T.containName(d))return;var C=T.indexOfName(d),A=T.getItemVisual(C,"style"),M=T.getItemVisual(C,"legendIcon"),L=$e(A.fill);L&&L[3]===0&&(L[3]=.2,A=B(B({},A),{fill:nn(L,"rgba")}));var I=this._createItem(b,d,p,v,n,t,{},A,M,h,i);I.on("click",No(LL,null,d,i,c)).on("mouseover",No(qy,null,d,i,c)).on("mouseout",No(Ky,null,d,i,c)),f.set(d,!0)}},this);process.env.NODE_ENV!=="production"&&(f.get(d)||console.warn(d+" series not exists. Legend data should be same with series name or data name."))}},this),o&&this._createSelector(o,n,i,s,l)},e.prototype._createSelector=function(t,n,a,i,o){var s=this.getSelectorGroup();Xy(t,function(u){var f=u.type,h=new At({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(h);var c=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);de(h,{normal:c,emphasis:v},{defaultText:u.title}),Ba(h)})},e.prototype._createItem=function(t,n,a,i,o,s,l,u,f,h,c){var v=t.visualDrawType,p=o.get("itemWidth"),d=o.get("itemHeight"),g=o.isSelected(n),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=Q9(f,i,l,u,v,g,c),w=new Gh,x=i.getModel("textStyle");if(q(t.getLegendIcon)&&(!_||_==="inherit"))w.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var b=_==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;w.add(J9({itemWidth:p,itemHeight:d,icon:f,iconRotate:b,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?p+5:-5,C=s,A=o.get("formatter"),M=n;U(A)&&A?M=A.replace("{name}",n??""):q(A)&&(M=A(n));var L=i.get("inactiveColor");w.add(new At({style:kt(x,{text:M,x:T,y:d/2,fill:g?x.getTextColor():L,align:C,verticalAlign:"middle"})}));var I=new Tt({shape:w.getBoundingRect(),invisible:!0}),E=i.getModel("tooltip");return E.get("show")&&Xi({el:I,componentModel:o,itemName:n,itemTooltipOption:E.option}),w.add(I),w.eachChild(function(P){P.silent=!0}),I.silent=!h,this.getContentGroup().add(w),Ba(w),w.__legendDataIndex=a,w},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Xa(t.get("orient"),l,t.get("itemGap"),a.width,a.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Xa("horizontal",u,t.get("selectorItemGap",!0));var c=u.getBoundingRect(),v=[-c.x,-c.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,g=d===0?"width":"height",y=d===0?"height":"width",m=d===0?"y":"x";s==="end"?v[d]+=f[g]+p:h[d]+=c[g]+p,v[1-d]+=f[y]/2-c[y]/2,u.x=v[0],u.y=v[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=f[g]+p+c[g],_[y]=Math.max(f[y],c[y]),_[m]=Math.min(0,c[m]+v[1-d]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Ut);function Q9(r,e,t,n,a,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),Xy(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?n.decal:co(h,o),u.fill==="inherit"&&(u.fill=n[a]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?n:t).opacity),s(u,n);var c=e.getModel("lineStyle"),v=c.getLineStyle();if(s(v,t),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!i){var p=e.get("inactiveBorderWidth"),d=u[f];u.lineWidth=p==="auto"?n.lineWidth>0&&d?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),v.stroke=c.get("inactiveColor"),v.lineWidth=c.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function J9(r){var e=r.icon||"roundRect",t=re(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function LL(r,e,t,n){Ky(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r??e}),qy(r,e,t,n)}function IL(r){for(var e=r.getZr().storage.getDisplayList(),t,n=0,a=e.length;na[o],g=[-v.x,-v.y];n||(g[i]=f[u]);var y=[0,0],m=[-p.x,-p.y],_=lt(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var S=t.get("pageButtonPosition",!0);S==="end"?m[i]+=a[o]-p[o]:y[i]+=p[o]+_}m[1-i]+=v[s]/2-p[s]/2,f.setPosition(g),h.setPosition(y),c.setPosition(m);var w={x:0,y:0};if(w[o]=d?a[o]:v[o],w[s]=Math.max(v[s],p[s]),w[l]=Math.min(0,p[l]+m[1-i]),h.__rectSize=a[o],d){var x={x:0,y:0};x[o]=Math.max(a[o]-p[o]-_,0),x[s]=w[s],h.setClipPath(new Tt({shape:x})),h.__rectSize=x[o]}else c.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(t);return b.pageIndex!=null&&Mt(f,{x:b.contentPosition[0],y:b.contentPosition[1]},d?t:null),this._updatePageInfoView(t,b),w},e.prototype._pageGo=function(t,n,a){var i=this._getPageInfo(n)[t];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var a=this._controllerGroup;D(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",c=n[h]!=null,v=a.childOfName(f);v&&(v.setStyle("fill",c?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),v.cursor=c?"pointer":"default")});var i=a.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",U(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=jy[o],l=Qy[o],u=this._findTargetItemIndex(n),f=a.children(),h=f[u],c=f.length,v=c?1:0,p={contentPosition:[a.x,a.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var d=S(h);p.contentPosition[o]=-d.s;for(var g=u+1,y=d,m=d,_=null;g<=c;++g)_=S(f[g]),(!_&&m.e>y.s+i||_&&!w(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=_;for(var g=u-1,y=d,m=d,_=null;g>=-1;--g)_=S(f[g]),(!_||!w(m,_.s))&&y.i=b&&x.s<=b+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(n=s)}),n??i},e.type="legend.scroll",e}(EL);const i7=a7;function o7(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(a){a.setScrollDataIndex(n)})})}function s7(r){dt(PL),r.registerComponentModel(n7),r.registerComponentView(i7),o7(r)}function l7(r){dt(PL),dt(s7)}var u7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=$n(Cl.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Cl);const f7=u7;var Jy=bt();function h7(r,e,t){Jy(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function c7(r,e){for(var t=Jy(r).coordSysRecordMap,n=t.keys(),a=0;an[t+e]&&(e=s),a=a&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function y7(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=Jy(t),a=n.coordSysRecordMap||(n.coordSysRecordMap=K());a.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=EM(i);D(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,v7(t,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=K());f.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),a.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){OL(a,i);return}var f=g7(l);o.enable(f.controlType,f.opt),o.setPointerChecker(i.containsPoint),lo(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var m7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,a){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),h7(a,t,{pan:Z(tm.pan,this),zoom:Z(tm.zoom,this),scrollMove:Z(tm.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){c7(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(Cy),tm={zoom:function(r,e,t,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(o){var s=em[e](null,[n.originX,n.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/n.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(_i(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:kL(function(r,e,t,n,a,i){var o=em[n]([i.oldX,i.oldY],[i.newX,i.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:kL(function(r,e,t,n,a,i){var o=em[n]([0,0],[i.scrollDelta,i.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function kL(r){return function(e,t,n,a){var i=this.range,o=i.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,n,a);if(_i(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var em={grid:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,n,a){var i=t.axis,o=a.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};const _7=m7;function VL(r){Ay(r),r.registerComponentModel(f7),r.registerComponentView(_7),y7(r)}var S7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=$n(Cl.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Cl);const x7=S7;var Pl=Tt,BL=7,w7=1,rm=30,b7=7,Rl="horizontal",zL="vertical",T7=5,D7=["line","bar","candlestick","scatter"],C7={easing:"cubicOut",duration:100,delay:0},A7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=Z(this._onBrush,this),this._onBrushEnd=Z(this._onBrushEnd,this)},e.prototype.render=function(t,n,a,i){if(r.prototype.render.apply(this,arguments),lo(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Rs(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new at;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,a=t.get("brushSelect"),i=a?b7:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===Rl?{right:s.width-o.x-o.width,top:s.height-rm-BL-i,width:o.width,height:rm}:{right:BL,top:o.y,width:rm,height:o.height},u=to(t.option);D(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var f=ae(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===zL&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,a=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===Rl&&!o?{scaleY:l?1:-1,scaleX:1}:a===Rl&&o?{scaleY:l?1:-1,scaleX:-1}:a===zL&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=n.x-u.x,t.y=n.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,a=this._displayables.sliderGroup,i=t.get("brushSelect");a.add(new Pl({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new Pl({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:Z(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),a.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,a=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==a[0]||n[1]!==a[1]){var h=o.getDataExtent(l),c=(h[1]-h[0])*.3;h=[h[0]-c,h[1]+c];var v=[0,n[1]],p=[0,n[0]],d=[[n[0],0],[0,0]],g=[],y=p[1]/(o.count()-1),m=0,_=Math.round(o.count()/n[0]),S;o.each([l],function(C,A){if(_>0&&A%_){m+=y;return}var M=C==null||isNaN(C)||C==="",L=M?0:Pt(C,h,v,!0);M&&!S&&A?(d.push([d[d.length-1][0],0]),g.push([g[g.length-1][0],0])):!M&&S&&(d.push([m,0]),g.push([m,0])),d.push([m,L]),g.push([m,L]),m+=y,S=M}),u=this._shadowPolygonPts=d,f=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var w=this.dataZoomModel;function x(C){var A=w.getModel(C?"selectedDataBackground":"dataBackground"),M=new at,L=new ke({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),I=new Ve({shape:{points:f},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(L),M.add(I),M}for(var b=0;b<3;b++){var T=x(b===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var a,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();D(l,function(u){if(!a&&!(n!==!0&&pt(D7,u.get("type"))<0)){var f=i.getComponent(ia(o),s).axis,h=M7(o),c,v=u.coordinateSystem;h!=null&&v.getOtherAxis&&(c=v.getOtherAxis(f).inverse),h=u.getData().mapDimension(h),a={thisAxis:f,series:u,thisDim:o,otherDim:h,otherAxisInverse:c}}},this)},this),a}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,a=n.handles=[null,null],i=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,h=l.get("brushSelect"),c=n.filler=new Pl({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new Pl({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:w7,fill:"rgba(0,0,0,0)"}})),D([0,1],function(_){var S=l.get("handleIcon");!df[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S,process.env.NODE_ENV!=="production"&&xr("handleIcon now needs 'path://' prefix when using a path string"));var w=re(S,-1,0,2,2,null,!0);w.attr({cursor:GL(this._orient),draggable:!0,drift:Z(this._onDragMove,this,_),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1),z2:5});var x=w.getBoundingRect(),b=l.get("handleSize");this._handleHeight=$(b,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Ba(w);var T=l.get("handleColor");T!=null&&(w.style.fill=T),o.add(a[_]=w);var C=l.getModel("textStyle");t.add(i[_]=new At({silent:!0,invisible:!0,style:kt(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var v=c;if(h){var p=$(l.get("moveHandleSize"),s[1]),d=n.moveHandle=new Tt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,y=n.moveHandleIcon=re(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+p/2-.5,d.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(p,10));v=n.moveZone=new Tt({invisible:!0,shape:{y:s[1]-m,height:p+m}}),v.on("mouseover",function(){u.enterEmphasis(d)}).on("mouseout",function(){u.leaveEmphasis(d)}),o.add(d),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:GL(this._orient),drift:Z(this._onDragMove,this,"all"),ondragstart:Z(this._showDataInfo,this,!0),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[Pt(t[0],[0,100],n,!0),Pt(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var a=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];_i(n,i,o,a.get("zoomLock")?"all":t,s.minSpan!=null?Pt(s.minSpan,l,o,!0):null,s.maxSpan!=null?Pt(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=Je([Pt(i[0],o,l,!0),Pt(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},e.prototype._updateView=function(t){var n=this._displayables,a=this._handleEnds,i=Je(a.slice()),o=this._size;D([0,1],function(v){var p=n.handles[v],d=this._handleHeight;p.attr({scaleX:d/2,scaleY:d/2,x:a[v]+(v?-1:1),y:o[1]/2-d/2})},this),n.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,i[0],i[1],o[0]],f=0;fn[0]||a[1]<0||a[1]>n[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,a=t.offsetY;this._brushStart=new ut(n,a),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var a=n.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=Je([Pt(a.x,o,s,!0),Pt(a.x+a.width,o,s,!0)]),this._handleEnds=[a.x,a.x+a.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(en(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var a=this._displayables,i=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new Pl({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),a.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,n),f=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:h[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?C7:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=EM(this.dataZoomModel).infoList;if(!t&&n.length){var a=n[0].model.coordinateSystem;t=a.getRect&&a.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(Cy);function M7(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function GL(r){return r==="vertical"?"ns-resize":"ew-resize"}const L7=A7;function FL(r){r.registerComponentModel(x7),r.registerComponentView(L7),Ay(r)}function I7(r){dt(VL),dt(FL)}var E7={get:function(r,e,t){var n=nt((P7[r]||{})[e]);return t&&G(n)?n[n.length-1]:n}},P7={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const HL=E7;var $L=ye.mapVisual,R7=ye.eachVisual,N7=G,WL=D,O7=Je,k7=Pt,V7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&sL(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=Z(t,this),this.controllerVisuals=ky(this.option.controller,n,t),this.targetVisuals=ky(this.option.target,n,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return t==null||t==="all"?this.ecModel.eachSeries(function(a,i){n.push(i)}):n=Nt(t),n},e.prototype.eachTargetSeries=function(t,n){D(this.getTargetSeriesIndices(),function(a){var i=this.ecModel.getSeriesByIndex(a);i&&t.call(n,i)},this)},e.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries(function(a){a===t&&(n=!0)}),n},e.prototype.formatValueText=function(t,n,a){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;a=a||["<",">"],G(t)&&(t=t.slice(),u=!0);var f=n?t:u?[h(t[0]),h(t[1])]:h(t);if(U(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(q(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?a[0]+" "+f[1]:t[1]===s[1]?a[1]+" "+f[0]:f[0]+" - "+f[1];return f;function h(c){return c===s[0]?"min":c===s[1]?"max":(+c).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=O7([t.min,t.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(t){var n=this.option.dimension;if(n!=null)return t.getDimensionIndex(n);for(var a=t.dimensions,i=a.length-1;i>=0;i--){var o=a[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,n=this.option,a={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});ht(i,a),ht(o,a);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),f.call(this,o);function l(h){N7(n.color)&&!h.inRange&&(h.inRange={color:n.color.slice().reverse()}),h.inRange=h.inRange||{color:t.get("gradientColor")}}function u(h,c,v){var p=h[c],d=h[v];p&&!d&&(d=h[v]={},WL(p,function(g,y){if(ye.isValidType(y)){var m=HL.get(y,"inactive",s);m!=null&&(d[y]=m,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function f(h){var c=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,v=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";WL(this.stateList,function(y){var m=this.itemSize,_=h[y];_||(_=h[y]={color:s?p:[p]}),_.symbol==null&&(_.symbol=c&&nt(c)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=v&&nt(v)||(s?m[0]:[m[0],m[0]])),_.symbol=$L(_.symbol,function(x){return x==="none"?g:x});var S=_.symbolSize;if(S!=null){var w=-1/0;R7(S,function(x){x>w&&(w=x)}),_.symbolSize=$L(S,function(x){return k7(x,[0,w],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(xt);const Fh=V7;var UL=[20,140],B7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=UL[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=UL[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):G(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],t[0]),n[1]=Math.min(n[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),D(this.stateList,function(t){var n=this.option.controller[t].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),n=Je((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]=a[1]||t<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries(function(a){var i=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),n.push({seriesId:a.id,dataIndex:i})},this),n},e.prototype.getVisualMeta=function(t){var n=YL(this,"outOfRange",this.getExtent()),a=YL(this,"inRange",this.option.range.slice()),i=[];function o(v,p){i.push({value:v,color:t(v,p)})}for(var s=0,l=0,u=a.length,f=n.length;lt[1])break;i.push({color:this.getControllerVisual(l,"color",n),offset:s/a})}return i.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),i},e.prototype._createBarPoints=function(t,n){var a=this.visualMapModel.itemSize;return[[a[0]-n[0],t[0]],[a[0],t[0]],[a[0],t[1]],[a[0]-n[1],t[1]]]},e.prototype._createBarGroup=function(t){var n=this._orient,a=this.visualMapModel.get("inverse");return new at(n==="horizontal"&&!a?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&a?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!a?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,n){if(this._useHandle){var a=this._shapes,i=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=i.itemSize,u=i.getExtent();F7([0,1],function(f){var h=o[f];h.setStyle("fill",n.handlesColor[f]),h.y=t[f];var c=Qr(t[f],[0,l[1]],u,!0),v=this.getControllerVisual(c,"symbolSize");h.scaleX=h.scaleY=v/l[0],h.x=l[0]-v/2;var p=Dr(a.handleLabelPoints[f],$a(h,this.group));s[f].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,n,a,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,h=f.indicator;if(h){h.attr("invisible",!1);var c={convertOpacityToAlpha:!0},v=this.getControllerVisual(t,"color",c),p=this.getControllerVisual(t,"symbolSize"),d=Qr(t,s,u,!0),g=l[0]-p/2,y={x:h.x,y:h.y};h.y=d,h.x=g;var m=Dr(f.indicatorLabelPoint,$a(h,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),w=this._orient,x=w==="horizontal";_.setStyle({text:(a||"")+o.formatValueText(n),verticalAlign:x?S:"middle",align:x?"center":S});var b={x:g,y:d,style:{fill:v}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};h.x=y.x,h.y=y.y,h.animateTo(b,C),_.animateTo(T,C)}else h.attr(b),_.attr(T);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var M=0;Mo[1]&&(h[1]=1/0),n&&(h[0]===-1/0?this._showIndicator(f,h[1],"< ",l):h[1]===1/0?this._showIndicator(f,h[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var c=this._hoverLinkDataIndices,v=[];(n||QL(a))&&(v=this._hoverLinkDataIndices=a.findTargetDataIndices(h));var p=O2(c,v);this._dispatchHighDown("downplay",Hh(p[0],a)),this._dispatchHighDown("highlight",Hh(p[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(Qa(t.target,function(l){var u=ot(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var a=this.ecModel.getSeriesByIndex(n.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(a)){var o=a.getData(n.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var a=0;a=0&&(i.dimension=o,n.push(i))}}),r.getData().setVisual("visualMeta",n)}}];function K7(r,e,t,n){for(var a=e.targetVisuals[n],i=ye.prepareVisualTypes(a),o={color:ks(r.getData(),"color")},s=0,l=i.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(Z7,X7),D(q7,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(j7))}function nI(r){r.registerComponentModel(z7),r.registerComponentView(Y7),rI(r)}var Q7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],J7[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=nt(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=F(this._pieceList,function(l){return l=nt(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},a=ye.listVisualTypes(),i=this.isCategory();D(t.pieces,function(s){D(a,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),D(n,function(s,l){var u=!1;D(this.stateList,function(f){u=u||o(t,f,l)||o(t.target,f,l)},this),!u&&D(this.stateList,function(f){(t[f]||(t[f]={}))[l]=HL.get(l,f==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,n){var a=this.option,i=this._pieceList,o=(n?a:t).selected||{};if(a.selected=o,D(i,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),a.selectedMode==="single"){var s=!1;D(i,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=nt(t)},e.prototype.getValueState=function(t){var n=ye.findPieceIndex(t,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[],a=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=ye.findPieceIndex(l,a);f===t&&o.push(u)},this),n.push({seriesId:i.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(t){var n;if(this.isCategory())n=t.value;else if(t.value!=null)n=t.value;else{var a=t.interval||[];n=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return n},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var n=[],a=["",""],i=this;function o(f,h){var c=i.getRepresentValue({interval:f});h||(h=i.getValueState(c));var v=t(c,h);f[0]===-1/0?a[0]=v:f[1]===1/0?a[1]=v:n.push({value:f[0],color:v},{value:f[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return D(s,function(f){var h=f.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:n,outerColors:a}},e.type="visualMap.piecewise",e.defaultOption=$n(Fh.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Fh),J7={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),n=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var i=(n[1]-n[0])/a;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];oo[1]&&console.warn("Piece "+n+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&s[0]&&s[1]&&(a.value=o[0])}a.visual=ye.retrieveVisuals(t),r.push(a)},this),aI(e,r),E0(r),D(r,function(t){var n=t.close,a=[["<","≤"][n[1]],[">","≥"][n[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,a)},this)}};function aI(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}const tZ=Q7;var eZ=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var n=this.visualMapModel,a=n.get("textGap"),i=n.textStyleModel,o=i.getFont(),s=i.getTextColor(),l=this._getItemAlign(),u=n.itemSize,f=this._getViewData(),h=f.endsText,c=Qt(n.get("showLabel",!0),!h);h&&this._renderEndsText(t,h[0],u,c,l),D(f.viewPieceList,function(v){var p=v.piece,d=new at;d.onclick=Z(this._onItemClick,this,p),this._enableHoverLink(d,v.indexInModelPieceList);var g=n.getRepresentValue(p);if(this._createItemSymbol(d,g,[0,0,u[0],u[1]]),c){var y=this.visualMapModel.getValueState(g);d.add(new At({style:{x:l==="right"?-a:u[0]+a,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}t.add(d)},this),h&&this._renderEndsText(t,h[1],u,c,l),Xa(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,n){var a=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:Hh(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return qL(t,this.api,t.itemSize);var a=n.align;return(!a||a==="auto")&&(a="left"),a},e.prototype._renderEndsText=function(t,n,a,i,o){if(n){var s=new at,l=this.visualMapModel.textStyleModel;s.add(new At({style:kt(l,{x:i?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:i?o:"center",text:n})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,n=F(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?n.reverse():a&&(a=a.slice().reverse()),{viewPieceList:n,endsText:a}},e.prototype._createItemSymbol=function(t,n,a){t.add(re(this.getControllerVisual(n,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(n,"color")))},e.prototype._onItemClick=function(t){var n=this.visualMapModel,a=n.option,i=a.selectedMode;if(i){var o=nt(a.selected),s=n.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,D(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(ZL);const rZ=eZ;function iI(r){r.registerComponentModel(tZ),r.registerComponentView(rZ),rI(r)}function nZ(r){dt(nI),dt(iI)}var aZ={label:{enabled:!0},decal:{show:!1}},oI=bt(),iZ={};function oZ(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=nt(aZ);ht(n.label,r.getLocaleModel().get("aria"),!1),ht(t.option,n,!1),a(),i();function a(){var u=t.getModel("decal"),f=u.get("show");if(f){var h=K();r.eachSeries(function(c){if(!c.isColorBySeries()){var v=h.get(c.type);v||(v={},h.set(c.type,v)),oI(c).scope=v}}),r.eachRawSeries(function(c){if(r.isSeriesFiltered(c))return;if(q(c.enableAriaDecal)){c.enableAriaDecal();return}var v=c.getData();if(c.isColorBySeries()){var m=ap(c.ecModel,c.name,iZ,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",S(_,m))}else{var p=c.getRawData(),d={},g=oI(c).scope;v.each(function(w){var x=v.getRawIndex(w);d[x]=w});var y=p.count();p.each(function(w){var x=d[w],b=p.getName(w)||w+"",T=ap(c.ecModel,b,g,y),C=v.getItemVisual(x,"decal");v.setItemVisual(x,"decal",S(C,T))})}function S(w,x){var b=w?B(B({},x),w):x;return b.dirty=!0,b}})}}function i(){var u=r.getLocaleModel().get("aria"),f=t.getModel("label");if(f.option=tt(f.option,u),!!f.get("enabled")){var h=e.getZr().dom;if(f.get("description")){h.setAttribute("aria-label",f.get("description"));return}var c=r.getSeriesCount(),v=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,d=Math.min(c,p),g;if(!(c<1)){var y=s();if(y){var m=f.get(["general","withTitle"]);g=o(m,{title:y})}else g=f.get(["general","withoutTitle"]);var _=[],S=c>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);g+=o(S,{seriesCount:c}),r.eachSeries(function(T,C){if(C1?f.get(["series","multiple",L]):f.get(["series","single",L]),A=o(A,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var I=T.getData();if(I.count()>v){var E=f.get(["data","partialData"]);A+=o(E,{displayCnt:v})}else A+=f.get(["data","allData"]);for(var P=f.get(["data","separator","middle"]),N=f.get(["data","separator","end"]),V=[],k=0;k":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},uZ=function(){function r(e){var t=this._condVal=U(e)?new RegExp(e):Sm(e)?e:null;if(t==null){var n="";process.env.NODE_ENV!=="production"&&(n=De("Illegal regexp",e,"in")),Et(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return U(t)?this._condVal.test(e):Ct(t)?this._condVal.test(e+""):!1},r}(),fZ=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),hZ=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&n.push(a),a=[I,E]}function f(I,E,P,N){ko(I,P)&&ko(E,N)||a.push(I,E,P,N,P,N)}function h(I,E,P,N,V,k){var z=Math.abs(E-I),H=Math.tan(z/4)*4/3,W=ET:M2&&n.push(a),n}function sm(r,e,t,n,a,i,o,s,l,u){if(ko(r,t)&&ko(e,n)&&ko(a,o)&&ko(i,s)){l.push(o,s);return}var f=2/u,h=f*f,c=o-r,v=s-e,p=Math.sqrt(c*c+v*v);c/=p,v/=p;var d=t-r,g=n-e,y=a-o,m=i-s,_=d*d+g*g,S=y*y+m*m;if(_=0&&T=0){l.push(o,s);return}var C=[],A=[];Rn(r,t,a,o,.5,C),Rn(e,n,i,s,.5,A),sm(C[0],A[0],C[1],A[1],C[2],A[2],C[3],A[3],l,u),sm(C[4],A[4],C[5],A[5],C[6],A[6],C[7],A[7],l,u)}function DZ(r,e){var t=om(r),n=[];e=e||1;for(var a=0;a0)for(var u=0;uMath.abs(u),h=fI([l,u],f?0:1,e),c=(f?s:u)/h.length,v=0;va,o=fI([n,a],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",f=i?"y":"x",h=r[s]/o.length,c=0;c1?null:new ut(d*l+r,d*u+e)}function MZ(r,e,t){var n=new ut;ut.sub(n,t,e),n.normalize();var a=new ut;ut.sub(a,r,e);var i=a.dot(n);return i}function Vo(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function LZ(r,e,t){for(var n=r.length,a=[],i=0;io?(u.x=f.x=s+i/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+i),LZ(e,u,f)}function $h(r,e,t,n){if(t===1)n.push(e);else{var a=Math.floor(t/2),i=r(e);$h(r,i[0],a,n),$h(r,i[1],t-a,n)}return n}function IZ(r,e){for(var t=[],n=0;n0)for(var w=n/t,x=-n/2;x<=n/2;x+=w){for(var b=Math.sin(x),T=Math.cos(x),C=0,_=0;_0;u/=2){var f=0,h=0;(r&u)>0&&(f=1),(e&u)>0&&(h=1),s+=u*u*(3*f^h),h===0&&(f===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function Yh(r){var e=1/0,t=1/0,n=-1/0,a=-1/0,i=F(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(f,e),t=Math.min(h,t),n=Math.max(f,n),a=Math.max(h,a),[f,h]}),o=F(i,function(s,l){return{cp:s,z:zZ(s[0],s[1],e,t,n,a),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function _I(r){return RZ(r.path,r.count)}function um(){return{fromIndividuals:[],toIndividuals:[],count:0}}function GZ(r,e,t){var n=[];function a(w){for(var x=0;x=0;a--)if(!t[a].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[a].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var HZ={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;SI(r)&&(u=r,f=e),SI(e)&&(u=e,f=r);function h(y,m,_,S,w){var x=y.many,b=y.one;if(x.length===1&&!w){var T=m?x[0]:b,C=m?b:x[0];if(Wh(T))h({many:[T],one:C},!0,_,S,!0);else{var A=s?tt({delay:s(_,S)},l):l;lm(T,C,A),i(T,C,T,C,A)}}else for(var M=tt({dividePath:HZ[t],individualDelay:s&&function(V,k,z,H){return s(V+_,S)}},l),L=m?GZ(x,b,M):FZ(b,x,M),I=L.fromIndividuals,E=L.toIndividuals,P=I.length,N=0;Ne.length,v=u?xI(f,u):xI(c?e:r,[c?r:e]),p=0,d=0;dwI){process.env.NODE_ENV!=="production"&&$t("Universal transition is disabled on large data > 10k.");return}for(var a=n.getIndices(),i=WZ(n),o=0;o0&&S.group.traverse(function(x){x instanceof gt&&!x.animators.length&&x.animateFrom({style:{opacity:0}},w)})})}function DI(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function CI(r){return G(r)?r.sort().join(","):r}function la(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function ZZ(r,e){var t=K(),n=K(),a=K();D(r.oldSeries,function(o,s){var l=r.oldDataGroupIds[s],u=r.oldData[s],f=DI(o),h=CI(f);n.set(h,{dataGroupId:l,data:u}),G(f)&&D(f,function(c){a.set(c,{key:h,dataGroupId:l,data:u})})});function i(o){t.get(o)&&$t("Duplicated seriesKey in universalTransition "+o)}return D(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),u=DI(o),f=CI(u),h=n.get(f);if(h)process.env.NODE_ENV!=="production"&&i(f),t.set(f,{oldSeries:[{dataGroupId:h.dataGroupId,divide:la(h.data),data:h.data}],newSeries:[{dataGroupId:s,divide:la(l),data:l}]});else if(G(u)){process.env.NODE_ENV!=="production"&&i(f);var c=[];D(u,function(d){var g=n.get(d);g.data&&c.push({dataGroupId:g.dataGroupId,divide:la(g.data),data:g.data})}),c.length&&t.set(f,{oldSeries:c,newSeries:[{dataGroupId:s,data:l,divide:la(l)}]})}else{var v=a.get(u);if(v){var p=t.get(v.key);p||(p={oldSeries:[{dataGroupId:v.dataGroupId,data:v.data,divide:la(v.data)}],newSeries:[]},t.set(v.key,p)),p.newSeries.push({dataGroupId:s,data:l,divide:la(l)})}}}}),t}function AI(r,e){for(var t=0;t=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:la(e.oldData[s]),dim:o.dimension})}),D(Nt(r.to),function(o){var s=AI(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:la(l),dim:o.dimension})}}),a.length>0&&i.length>0&&TI(a,i,n)}function qZ(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){D(Nt(n.seriesTransition),function(a){D(Nt(a.to),function(i){for(var o=n.updatedSeries,s=0;s{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),jZ={install(r){r.component("echart-area",KZ)}},QZ=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),JZ={install(r){r.component("echart-line",QZ)}},tX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),eX={install(r){r.component("echart-bar",tX)}},rX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),nX={install(r){r.component("echart-pie",rX)}},aX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),iX={install(r){r.component("echart-scatter",aX)}},oX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;n.hideLoading(),hw("HK",e.options.datas),a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),sX={install(r){r.component("echart-map",oX)}},lX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),uX={install(r){r.component("echart-candlestick",lX)}},fX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),hX={install(r){r.component("echart-radar",fX)}},cX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),vX={install(r){r.component("echart-boxplot",cX)}},pX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),dX={install(r){r.component("echart-heatmap",pX)}},gX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),yX={install(r){r.component("echart-graph",gX)}},mX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),_X={install(r){r.component("echart-lines",mX)}},SX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),xX={install(r){r.component("echart-tree",SX)}},wX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),bX={install(r){r.component("echart-treemap",wX)}},TX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),DX={install(r){r.component("echart-sunburst",TX)}},CX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),AX={install(r){r.component("echart-parallel",CX)}},MX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),LX={install(r){r.component("echart-sankey",MX)}},IX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),EX={install(r){r.component("echart-funnel",IX)}},PX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),RX={install(r){r.component("echart-gauge",PX)}},NX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),OX={install(r){r.component("echart-pictorialbar",NX)}},kX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),VX={install(r){r.component("echart-themeriver",kX)}},BX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),zX={install(r){r.component("echart-calendar",BX)}},GX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),FX={install(r){r.component("echart-custom",GX)}},HX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),$X={install(r){r.component("echart-dataset",HX)}},WX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),UX={install(r){r.component("echart-datazoom",WX)}},YX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),ZX={install(r){r.component("echart-graphic",YX)}},XX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),qX={install(r){r.component("echart-rich",XX)}},KX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),jX={install(r){r.component("echart-globe",KX)}},QX=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),JX={install(r){r.component("echart-bar3d",QX)}},tq=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),eq={install(r){r.component("echart-scatter3d",tq)}},rq=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),nq={install(r){r.component("echart-surface",rq)}},aq=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),iq={install(r){r.component("echart-map3d",aq)}},oq=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),sq={install(r){r.component("echart-lines3d",oq)}},lq=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),uq={install(r){r.component("echart-line3d",lq)}},fq=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),hq={install(r){r.component("echart-scattergl",fq)}},cq=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),vq={install(r){r.component("echart-linesgl",cq)}},pq=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),dq={install(r){r.component("echart-flowgl",pq)}},gq=R.defineComponent({__name:"index",props:{data:{type:Object,default:{}},options:{type:Object,default:{width:"90%",height:"300px"}}},setup(r){const e=r,t=R.ref();return R.onMounted(()=>{const n=It(t.value),a=e.data;a&&n.setOption(a),window.addEventListener("resize",()=>{n.resize()})}),(n,a)=>(R.openBlock(),R.createElementBlock("div",{ref_key:"chartDom",ref:t,style:R.normalizeStyle(`width: ${r.options.width};height:${r.options.height};`)},null,4))}}),yq=[jZ,JZ,eX,nX,iX,sX,uX,hX,vX,dX,yX,_X,xX,bX,DX,AX,LX,EX,RX,OX,VX,zX,FX,$X,UX,ZX,qX,jX,JX,eq,nq,iq,sq,uq,hq,vq,dq,{install(r){r.component("echart-graphgl",gq)}}];return{install(r){yq.forEach(e=>{r.use(e)})}}});