var vC=Object.defineProperty;var sd=Object.getOwnPropertySymbols;var cC=Object.prototype.hasOwnProperty,pC=Object.prototype.propertyIsEnumerable;var ld=(r,t,e)=>t in r?vC(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,ud=(r,t)=>{for(var e in t||(t={}))cC.call(t,e)&&ld(r,e,t[e]);if(sd)for(var e of sd(t))pC.call(t,e)&&ld(r,e,t[e]);return r};import{bB as dC,f as fd,s as gC,a7 as yC,cc as mC,i as La,b4 as qu,al as _C,du as SC,ed as xC,bs as bC}from"./index.7e08ba81.js";/*! ***************************************************************************** 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 Bh=function(r,t){return Bh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])},Bh(r,t)};function O(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Bh(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var wC=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),TC=function(){function r(){this.browser=new wC,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!="undefined"}return r}(),Ji=new TC;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Ji.wxa=!0,Ji.touchEventsSupported=!0):typeof document=="undefined"&&typeof self!="undefined"?Ji.worker=!0:typeof navigator=="undefined"?(Ji.node=!0,Ji.svgSupported=!0):CC(navigator.userAgent,Ji);function CC(r,t){var e=t.browser,i=r.match(/Firefox\/([\d.]+)/),a=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),n=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);i&&(e.firefox=!0,e.version=i[1]),a&&(e.ie=!0,e.version=a[1]),n&&(e.edge=!0,e.version=n[1],e.newEdge=+n[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect!="undefined",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11),t.domSupported=typeof document!="undefined";var s=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in s||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}var ht=Ji,nc=12,K_="sans-serif",_i=nc+"px "+K_,AC=20,MC=100,DC="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function PC(r){var t={};if(typeof JSON=="undefined")return t;for(var e=0;e=0)s=o*e.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",i[l]+":0",a[u]+":0",i[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return e}function aA(r,t,e){for(var i=e?"invTrans":"trans",a=t[i],n=t.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&&n&&c===n[h]&&v===n[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&a?a:(t.srcCoords=o,t[i]=e?vd(s,o):vd(o,s))}function h1(r){return r.nodeName.toUpperCase()==="CANVAS"}var nA=/([&<>"'])/g,oA={"&":"&","<":"<",">":">",'"':""","'":"'"};function oe(r){return r==null?"":(r+"").replace(nA,function(t,e){return oA[e]})}var sA=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ju=[],lA=ht.browser.firefox&&+ht.browser.version.split(".")[0]<39;function Hh(r,t,e,i){return e=e||{},i?pd(r,t,e):lA&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):pd(r,t,e),e}function pd(r,t,e){if(ht.domSupported&&r.getBoundingClientRect){var i=t.clientX,a=t.clientY;if(h1(r)){var n=r.getBoundingClientRect();e.zrX=i-n.left,e.zrY=a-n.top;return}else if(Gh(ju,r,i,a)){e.zrX=ju[0],e.zrY=ju[1];return}}e.zrX=e.zrY=0}function pc(r){return r||window.event}function Ie(r,t,e){if(t=pc(t),t.zrX!=null)return t;var i=t.type,a=i&&i.indexOf("touch")>=0;if(a){var o=i!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Hh(r,o,t,e)}else{Hh(r,t,t,e);var n=uA(t);t.zrDelta=n?n/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&sA.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function uA(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,i=r.deltaY;if(e==null||i==null)return t;var a=Math.abs(i!==0?i:e),n=i>0?-1:i<0?1:e>0?-1:1;return 3*a*n}function Wh(r,t,e,i){r.addEventListener(t,e,i)}function fA(r,t,e,i){r.removeEventListener(t,e,i)}var Hr=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function dd(r){return r.which===2||r.which===3}var hA=function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,i){var a=t.touches;if(!!a){for(var n={points:[],touches:[],target:e,event:t},o=0,s=a.length;o1&&i&&i.length>1){var n=gd(i)/gd(a);!isFinite(n)&&(n=1),t.pinchScale=n;var o=vA(i);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function Fe(){return[1,0,0,1,0,0]}function qo(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function su(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function Tr(r,t,e){var i=t[0]*e[0]+t[2]*e[1],a=t[1]*e[0]+t[3]*e[1],n=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=i,r[1]=a,r[2]=n,r[3]=o,r[4]=s,r[5]=l,r}function Wr(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function Ai(r,t,e){var i=t[0],a=t[2],n=t[4],o=t[1],s=t[3],l=t[5],u=Math.sin(e),f=Math.cos(e);return r[0]=i*f+o*u,r[1]=-i*u+o*f,r[2]=a*f+s*u,r[3]=-a*u+f*s,r[4]=f*n+u*l,r[5]=f*l-u*n,r}function dc(r,t,e){var i=e[0],a=e[1];return r[0]=t[0]*i,r[1]=t[1]*a,r[2]=t[2]*i,r[3]=t[3]*a,r[4]=t[4]*i,r[5]=t[5]*a,r}function Ca(r,t){var e=t[0],i=t[2],a=t[4],n=t[1],o=t[3],s=t[5],l=e*o-n*i;return l?(l=1/l,r[0]=o*l,r[1]=-n*l,r[2]=-i*l,r[3]=e*l,r[4]=(i*s-o*a)*l,r[5]=(n*a-e*s)*l,r):null}function cA(r){var t=Fe();return su(t,r),t}var pA=Object.freeze(Object.defineProperty({__proto__:null,create:Fe,identity:qo,copy:su,mul:Tr,translate:Wr,rotate:Ai,scale:dc,invert:Ca,clone:cA},Symbol.toStringTag,{value:"Module"})),dA=function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.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 t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(!!t){var e=this.x,i=this.y;return this.x=t[0]*e+t[2]*i+t[4],this.y=t[1]*e+t[3]*i+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,i){t.x=e,t.y=i},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,i){t.x=e.x+i.x,t.y=e.y+i.y},r.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},r.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},r.scaleAndAdd=function(t,e,i,a){t.x=e.x+i.x*a,t.y=e.y+i.y*a},r.lerp=function(t,e,i,a){var n=1-a;t.x=n*e.x+a*i.x,t.y=n*e.y+a*i.y},r}(),et=dA,fs=Math.min,hs=Math.max,Pi=new et,Li=new et,Ii=new et,Ri=new et,Cn=new et,An=new et,gA=function(){function r(t,e,i,a){i<0&&(t=t+i,i=-i),a<0&&(e=e+a,a=-a),this.x=t,this.y=e,this.width=i,this.height=a}return r.prototype.union=function(t){var e=fs(t.x,this.x),i=fs(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=hs(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=hs(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,i=t.width/e.width,a=t.height/e.height,n=Fe();return Wr(n,n,[-e.x,-e.y]),dc(n,n,[i,a]),Wr(n,n,[t.x,t.y]),n},r.prototype.intersect=function(t,e){if(!t)return!1;t instanceof r||(t=r.create(t));var i=this,a=i.x,n=i.x+i.width,o=i.y,s=i.y+i.height,l=t.x,u=t.x+t.width,f=t.y,h=t.y+t.height,c=!(np&&(p=_,dp&&(p=S,y=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},r.applyTransform=function(t,e,i){if(!i){t!==e&&r.copy(t,e);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var a=i[0],n=i[3],o=i[4],s=i[5];t.x=e.x*a+o,t.y=e.y*n+s,t.width=e.width*a,t.height=e.height*n,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Pi.x=Ii.x=e.x,Pi.y=Ri.y=e.y,Li.x=Ri.x=e.x+e.width,Li.y=Ii.y=e.y+e.height,Pi.transform(i),Ri.transform(i),Li.transform(i),Ii.transform(i),t.x=fs(Pi.x,Li.x,Ii.x,Ri.x),t.y=fs(Pi.y,Li.y,Ii.y,Ri.y);var l=hs(Pi.x,Li.x,Ii.x,Ri.x),u=hs(Pi.y,Li.y,Ii.y,Ri.y);t.width=l-t.x,t.height=u-t.y},r}(),st=gA,v1="silent";function yA(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:mA}}function mA(){Hr(this.event)}var _A=function(r){bt(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(or),Mn=function(){function r(t,e){this.x=t,this.y=e}return r}(),SA=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Qu=new st(0,0,0,0),c1=function(r){bt(t,r);function t(e,i,a,n,o){var s=r.call(this)||this;return s._hovered=new Mn(0,0),s.storage=e,s.painter=i,s.painterRoot=n,s._pointerSize=o,a=a||new _A,s.proxy=null,s.setHandlerProxy(a),s._draggingMgr=new QC(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(w(SA,function(i){e.on&&e.on(i,this[i],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var i=e.zrX,a=e.zrY,n=p1(this,i,a),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=n?new Mn(i,a):this.findHover(i,a),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(l,"mousemove",e),u&&u!==s&&this.dispatchToElement(l,"mouseover",e)},t.prototype.mouseout=function(e){var i=e.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new Mn(0,0)},t.prototype.dispatch=function(e,i){var a=this[e];a&&a.call(this,i)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var i=this.proxy;i.setCursor&&i.setCursor(e)},t.prototype.dispatchToElement=function(e,i,a){e=e||{};var n=e.target;if(!(n&&n.silent)){for(var o="on"+i,s=yA(i,e,a);n&&(n[o]&&(s.cancelBubble=!!n[o].call(n,s)),n.trigger(i,s),n=n.__hostTarget?n.__hostTarget:n.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(i,s)}))}},t.prototype.findHover=function(e,i,a){var n=this.storage.getDisplayList(),o=new Mn(e,i);if(yd(n,o,e,i,a),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new st(e-u,i-u,l,l),h=n.length-1;h>=0;h--){var c=n[h];c!==a&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(Qu.copy(c.getBoundingRect()),c.transform&&Qu.applyTransform(c.transform),Qu.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(n,r,t)}});function xA(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var i=r,a=void 0,n=!1;i;){if(i.ignoreClip&&(n=!0),!n){var o=i.getClipPath();if(o&&!o.contain(t,e))return!1;i.silent&&(a=!0)}var s=i.__hostTarget;i=s||i.parent}return a?v1:!0}return!1}function yd(r,t,e,i,a){for(var n=r.length-1;n>=0;n--){var o=r[n],s=void 0;if(o!==a&&!o.ignore&&(s=xA(o,e,i))&&(!t.topTarget&&(t.topTarget=o),s!==v1)){t.target=o;break}}}function p1(r,t,e){var i=r.painter;return t<0||t>i.getWidth()||e<0||e>i.getHeight()}var bA=c1,d1=32,Dn=7;function wA(r){for(var t=0;r>=d1;)t|=r&1,r>>=1;return r+t}function md(r,t,e,i){var a=t+1;if(a===e)return 1;if(i(r[a++],r[t])<0){for(;a=0;)a++;return a-t}function TA(r,t,e){for(e--;t>>1,a(n,r[l])<0?s=l:o=l+1;var u=i-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]=n}}function tf(r,t,e,i,a,n){var o=0,s=0,l=1;if(n(r,t[e+a])>0){for(s=i-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);n(r,t[e+f])>0?o=f+1:l=f}return l}function ef(r,t,e,i,a,n){var o=0,s=0,l=1;if(n(r,t[e+a])<0){for(s=a+1;ls&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=i-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);n(r,t[e+f])<0?l=f:o=f+1}return l}function CA(r,t){var e=Dn,i,a,n=0;r.length;var o=[];i=[],a=[];function s(v,p){i[n]=v,a[n]=p,n+=1}function l(){for(;n>1;){var v=n-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(;n>1;){var v=n-2;v>0&&a[v-1]=Dn||T>=Dn);if(C)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),p===1){for(y=0;y=0;y--)r[x+y]=r[b+y];r[S]=o[_];return}for(var T=e;;){var C=0,A=0,D=!1;do if(t(o[_],r[m])<0){if(r[S--]=r[m--],C++,A=0,--p===0){D=!0;break}}else if(r[S--]=o[_--],A++,C=0,--g===1){D=!0;break}while((C|A)=0;y--)r[x+y]=r[b+y];if(p===0){D=!0;break}}if(r[S--]=o[_--],--g===1){D=!0;break}if(A=g-tf(r[m],o,0,g,g-1,t),A!==0){for(S-=A,_-=A,g-=A,x=S+1,b=_+1,y=0;y=Dn||A>=Dn);if(D)break;T<0&&(T=0),T+=2}if(e=T,e<1&&(e=1),g===1){for(S-=p,m-=p,x=S+1,b=m+1,y=p-1;y>=0;y--)r[x+y]=r[b+y];r[S]=o[_]}else{if(g===0)throw new Error;for(b=S-(g-1),y=0;ys&&(l=s),_d(r,e,e+l,e+n,t),n=l}o.pushRun(e,n),o.mergeRuns(),a-=n,e+=n}while(a!==0);o.forceMergeRuns()}}var yr=1,Jn=2,Za=4,Sd=!1;function rf(){Sd||(Sd=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function xd(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var AA=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=xd}return r.prototype.traverse=function(t,e){for(var i=0;i0&&(f.__clipPaths=[]),isNaN(f.z)&&(rf(),f.z=0),isNaN(f.z2)&&(rf(),f.z2=0),isNaN(f.zlevel)&&(rf(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,i);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,i);var v=t.getTextContent();v&&this._updateAndAddDisplayable(v,e,i)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,i=t.length;e=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}(),MA=AA,g1;g1=ht.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var bd=g1,al={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 t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)))},elasticOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-al.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?al.bounceIn(r*2)*.5:al.bounceOut(r*2-1)*.5+.5}},y1=al,vs=Math.pow,di=Math.sqrt,wl=1e-8,m1=1e-4,wd=di(3),cs=1/3,mr=Ta(),Oe=Ta(),rn=Ta();function ui(r){return r>-wl&&rwl||r<-wl}function Nt(r,t,e,i,a){var n=1-a;return n*n*(n*r+3*a*t)+a*a*(a*i+3*n*e)}function Td(r,t,e,i,a){var n=1-a;return 3*(((t-r)*n+2*(e-t)*a)*n+(i-e)*a*a)}function Tl(r,t,e,i,a,n){var o=i+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-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(ui(f)&&ui(h))if(ui(s))n[0]=0;else{var p=-l/s;p>=0&&p<=1&&(n[v++]=p)}else{var d=h*h-4*f*c;if(ui(d)){var g=h/f,p=-s/o+g,y=-g/2;p>=0&&p<=1&&(n[v++]=p),y>=0&&y<=1&&(n[v++]=y)}else if(d>0){var m=di(d),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-vs(-_,cs):_=vs(_,cs),S<0?S=-vs(-S,cs):S=vs(S,cs);var p=(-s-(_+S))/(3*o);p>=0&&p<=1&&(n[v++]=p)}else{var b=(2*f*s-3*o*h)/(2*di(f*f*f)),x=Math.acos(b)/3,T=di(f),C=Math.cos(x),p=(-s-2*T*C)/(3*o),y=(-s+T*(C+wd*Math.sin(x)))/(3*o),A=(-s+T*(C-wd*Math.sin(x)))/(3*o);p>=0&&p<=1&&(n[v++]=p),y>=0&&y<=1&&(n[v++]=y),A>=0&&A<=1&&(n[v++]=A)}}return v}function S1(r,t,e,i,a){var n=6*e-12*t+6*r,o=9*t+3*i-3*r-9*e,s=3*t-3*r,l=0;if(ui(o)){if(_1(n)){var u=-s/n;u>=0&&u<=1&&(a[l++]=u)}}else{var f=n*n-4*o*s;if(ui(f))a[0]=-n/(2*o);else if(f>0){var h=di(f),u=(-n+h)/(2*o),c=(-n-h)/(2*o);u>=0&&u<=1&&(a[l++]=u),c>=0&&c<=1&&(a[l++]=c)}}return l}function Cl(r,t,e,i,a,n){var o=(t-r)*a+r,s=(e-t)*a+t,l=(i-e)*a+e,u=(s-o)*a+o,f=(l-s)*a+s,h=(f-u)*a+u;n[0]=r,n[1]=o,n[2]=u,n[3]=h,n[4]=h,n[5]=f,n[6]=l,n[7]=i}function x1(r,t,e,i,a,n,o,s,l,u,f){var h,c=.005,v=1/0,p,d,g,y;mr[0]=l,mr[1]=u;for(var m=0;m<1;m+=.05)Oe[0]=Nt(r,e,a,o,m),Oe[1]=Nt(t,i,n,s,m),g=ha(mr,Oe),g=0&&g=0&&u<=1&&(a[l++]=u)}}else{var f=o*o-4*n*s;if(ui(f)){var u=-o/(2*n);u>=0&&u<=1&&(a[l++]=u)}else if(f>0){var h=di(f),u=(-o+h)/(2*n),c=(-o-h)/(2*n);u>=0&&u<=1&&(a[l++]=u),c>=0&&c<=1&&(a[l++]=c)}}return l}function b1(r,t,e){var i=r+e-2*t;return i===0?.5:(r-t)/i}function Al(r,t,e,i,a){var n=(t-r)*i+r,o=(e-t)*i+t,s=(o-n)*i+n;a[0]=r,a[1]=n,a[2]=s,a[3]=s,a[4]=o,a[5]=e}function w1(r,t,e,i,a,n,o,s,l){var u,f=.005,h=1/0;mr[0]=o,mr[1]=s;for(var c=0;c<1;c+=.05){Oe[0]=jt(r,e,a,c),Oe[1]=jt(t,i,n,c);var v=ha(mr,Oe);v=0&&v=1?1:Tl(0,i,n,1,l,s)&&Nt(0,a,o,1,s[0])}}}var RA=function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Gt,this.ondestroy=t.ondestroy||Gt,this.onrestart=t.onrestart||Gt,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var i=this._life,a=t-this._startTime-this._pausedTime,n=a/i;n<0&&(n=0),n=Math.min(n,1);var o=this.easingFunc,s=o?o(n):n;if(this.onframe(s),n===1)if(this.loop){var l=a%i;this._startTime=t-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(t){this.easing=t,this.easingFunc=q(t)?t:y1[t]||gc(t)},r}(),EA=RA,T1=function(){function r(t){this.value=t}return r}(),kA=function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new T1(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),OA=function(){function r(t){this._list=new kA,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var i=this._list,a=this._map,n=null;if(a[t]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete a[l.key],n=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new T1(e),s.key=t,i.insertEntry(s),a[t]=s}return n},r.prototype.get=function(t){var e=this._map[t],i=this._list;if(e!=null)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),Ko=OA,Ad={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 er(r){return r=Math.round(r),r<0?0:r>255?255:r}function BA(r){return r=Math.round(r),r<0?0:r>360?360:r}function To(r){return r<0?0:r>1?1:r}function af(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?er(parseFloat(t)/100*255):er(parseInt(t,10))}function va(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?To(parseFloat(t)/100):To(parseFloat(t))}function nf(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function fi(r,t,e){return r+(t-r)*e}function Le(r,t,e,i,a){return r[0]=t,r[1]=e,r[2]=i,r[3]=a,r}function $h(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var C1=new Ko(20),ps=null;function Ra(r,t){ps&&$h(ps,t),ps=C1.put(r,ps||t.slice())}function ue(r,t){if(!!r){t=t||[];var e=C1.get(r);if(e)return $h(t,e);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in Ad)return $h(t,Ad[i]),Ra(r,t),t;var a=i.length;if(i.charAt(0)==="#"){if(a===4||a===5){var n=parseInt(i.slice(1,4),16);if(!(n>=0&&n<=4095)){Le(t,0,0,0,1);return}return Le(t,(n&3840)>>4|(n&3840)>>8,n&240|(n&240)>>4,n&15|(n&15)<<4,a===5?parseInt(i.slice(4),16)/15:1),Ra(r,t),t}else if(a===7||a===9){var n=parseInt(i.slice(1,7),16);if(!(n>=0&&n<=16777215)){Le(t,0,0,0,1);return}return Le(t,(n&16711680)>>16,(n&65280)>>8,n&255,a===9?parseInt(i.slice(7),16)/255:1),Ra(r,t),t}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===a){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Le(t,+u[0],+u[1],+u[2],1):Le(t,0,0,0,1);f=va(u.pop());case"rgb":if(u.length>=3)return Le(t,af(u[0]),af(u[1]),af(u[2]),u.length===3?f:va(u[3])),Ra(r,t),t;Le(t,0,0,0,1);return;case"hsla":if(u.length!==4){Le(t,0,0,0,1);return}return u[3]=va(u[3]),Uh(u,t),Ra(r,t),t;case"hsl":if(u.length!==3){Le(t,0,0,0,1);return}return Uh(u,t),Ra(r,t),t;default:return}}Le(t,0,0,0,1)}}function Uh(r,t){var e=(parseFloat(r[0])%360+360)%360/360,i=va(r[1]),a=va(r[2]),n=a<=.5?a*(i+1):a+i-a*i,o=a*2-n;return t=t||[],Le(t,er(nf(o,n,e+1/3)*255),er(nf(o,n,e)*255),er(nf(o,n,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function NA(r){if(!!r){var t=r[0]/255,e=r[1]/255,i=r[2]/255,a=Math.min(t,e,i),n=Math.max(t,e,i),o=n-a,s=(n+a)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(n+a):u=o/(2-n-a);var f=((n-t)/6+o/2)/o,h=((n-e)/6+o/2)/o,c=((n-i)/6+o/2)/o;t===n?l=c-h:e===n?l=1/3+f-c:i===n&&(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 Yh(r,t){var e=ue(r);if(e){for(var i=0;i<3;i++)t<0?e[i]=e[i]*(1-t)|0:e[i]=(255-e[i])*t+e[i]|0,e[i]>255?e[i]=255:e[i]<0&&(e[i]=0);return rr(e,e.length===4?"rgba":"rgb")}}function zA(r){var t=ue(r);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function lo(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var i=r*(t.length-1),a=Math.floor(i),n=Math.ceil(i),o=t[a],s=t[n],l=i-a;return e[0]=er(fi(o[0],s[0],l)),e[1]=er(fi(o[1],s[1],l)),e[2]=er(fi(o[2],s[2],l)),e[3]=To(fi(o[3],s[3],l)),e}}var VA=lo;function yc(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var i=r*(t.length-1),a=Math.floor(i),n=Math.ceil(i),o=ue(t[a]),s=ue(t[n]),l=i-a,u=rr([er(fi(o[0],s[0],l)),er(fi(o[1],s[1],l)),er(fi(o[2],s[2],l)),To(fi(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:a,rightIndex:n,value:i}:u}}var FA=yc;function nl(r,t,e,i){var a=ue(r);if(r)return a=NA(a),t!=null&&(a[0]=BA(t)),e!=null&&(a[1]=va(e)),i!=null&&(a[2]=va(i)),rr(Uh(a),"rgba")}function A1(r,t){var e=ue(r);if(e&&t!=null)return e[3]=To(t),rr(e,"rgba")}function rr(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function Co(r,t){var e=ue(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}function GA(){return rr([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var HA=Object.freeze(Object.defineProperty({__proto__:null,parse:ue,lift:Yh,toHex:zA,fastLerp:lo,fastMapToColor:VA,lerp:yc,mapToColor:FA,modifyHSL:nl,modifyAlpha:A1,stringify:rr,lum:Co,random:GA},Symbol.toStringTag,{value:"Module"})),Ml=Math.round;function Ao(r){var t;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var e=ue(r);e&&(r="rgb("+e[0]+","+e[1]+","+e[2]+")",t=e[3])}return{color:r,opacity:t==null?1:t}}var Md=1e-4;function hi(r){return r-Md}function ds(r){return Ml(r*1e3)/1e3}function Xh(r){return Ml(r*1e4)/1e4}function WA(r){return"matrix("+ds(r[0])+","+ds(r[1])+","+ds(r[2])+","+ds(r[3])+","+Xh(r[4])+","+Xh(r[5])+")"}var $A={left:"start",right:"end",center:"middle",middle:"middle"};function UA(r,t,e){return e==="top"?r+=t/2:e==="bottom"&&(r-=t/2),r}function YA(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function XA(r){var t=r.style,e=r.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),e[0],e[1]].join(",")}function M1(r){return r&&!!r.image}function ZA(r){return r&&!!r.svgElement}function mc(r){return M1(r)||ZA(r)}function D1(r){return r.type==="linear"}function P1(r){return r.type==="radial"}function L1(r){return r&&(r.type==="linear"||r.type==="radial")}function lu(r){return"url(#"+r+")"}function I1(r){var t=r.getGlobalScale(),e=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(e)/Math.log(10)),1)}function R1(r){var t=r.x||0,e=r.y||0,i=(r.rotation||0)*so,a=rt(r.scaleX,1),n=rt(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(t||e)&&l.push("translate("+t+"px,"+e+"px)"),i&&l.push("rotate("+i+")"),(a!==1||n!==1)&&l.push("scale("+a+","+n+")"),(o||s)&&l.push("skew("+Ml(o*so)+"deg, "+Ml(s*so)+"deg)"),l.join(" ")}var qA=function(){return ht.hasGlobalWindow&&q(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer!="undefined"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),Zh=Array.prototype.slice;function kr(r,t,e){return(t-r)*e+r}function of(r,t,e,i){for(var a=t.length,n=0;ni?t:r,n=Math.min(e,i),o=a[n-1]||{color:[0,0,0,0],offset:0},s=n;so;if(s)i.length=o;else for(var l=n;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,i){this._needsSort=!0;var a=this.keyframes,n=a.length,o=!1,s=Pd,l=e;if(ee(e)){var u=QA(e);s=u,(u===1&&!yt(e[0])||u===2&&!yt(e[0][0]))&&(o=!0)}else if(yt(e)&&!bo(e))s=ys;else if(V(e))if(!isNaN(+e))s=ys;else{var f=ue(e);f&&(l=f,s=Qn)}else if(nu(e)){var h=k({},l);h.colorStops=z(e.colorStops,function(v){return{offset:v.offset,color:ue(v.color)}}),D1(e)?s=qh:P1(e)&&(s=Kh),l=h}n===0?this.valType=s:(s!==this.valType||s===Pd)&&(o=!0),this.discrete=this.discrete||o;var c={time:t,value:l,rawValue:e,percent:0};return i&&(c.easing=i,c.easingFunc=q(i)?i:y1[i]||gc(i)),a.push(c),c},r.prototype.prepare=function(t,e){var i=this.keyframes;this._needsSort&&i.sort(function(d,g){return d.time-g.time});for(var a=this.valType,n=i.length,o=i[n-1],s=this.discrete,l=ms(a),u=Ld(a),f=0;f=0&&!(o[f].percent<=e);f--);f=c(f,s-2)}else{for(f=h;fe);f++);f=c(f-1,s-2)}p=o[f+1],v=o[f]}if(!!(v&&p)){this._lastFr=f,this._lastFrP=e;var g=p.percent-v.percent,y=g===0?1:c((e-v.percent)/g,1);p.easingFunc&&(y=p.easingFunc(y));var m=i?this._additiveValue:u?Pn:t[l];if((ms(n)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)t[l]=y<1?v.rawValue:p.rawValue;else if(ms(n))n===sl?of(m,v[a],p[a],y):KA(m,v[a],p[a],y);else if(Ld(n)){var _=v[a],S=p[a],b=n===qh;t[l]={type:b?"linear":"radial",x:kr(_.x,S.x,y),y:kr(_.y,S.y,y),colorStops:z(_.colorStops,function(T,C){var A=S.colorStops[C];return{offset:kr(T.offset,A.offset,y),color:ol(of([],T.color,A.color,y))}}),global:S.global},b?(t[l].x2=kr(_.x2,S.x2,y),t[l].y2=kr(_.y2,S.y2,y)):t[l].r=kr(_.r,S.r,y)}else if(u)of(m,v[a],p[a],y),i||(t[l]=ol(m));else{var x=kr(v[a],p[a],y);i?this._additiveValue=x:t[l]=x}i&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,i=this.propName,a=this._additiveValue;e===ys?t[i]=t[i]+a:e===Qn?(ue(t[i],Pn),gs(Pn,Pn,a,1),t[i]=ol(Pn)):e===sl?gs(t[i],t[i],a,1):e===E1&&Dd(t[i],t[i],a,1)},r}(),eM=function(){function r(t,e,i,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&a){uc("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=i}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,i){return this.whenWithKeys(t,e,at(e),i)},r.prototype.whenWithKeys=function(t,e,i,a){for(var n=this._tracks,o=0;o0&&l.addKeyframe(0,uo(u),a),this._trackKeys.push(s)}l.addKeyframe(t,uo(e[s]),a)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,i=0;i0)){this._started=1;for(var e=this,i=[],a=this._maxTime||0,n=0;n1){var s=o.pop();n.addKeyframe(s.time,t[a]),n.prepare(this._maxTime,n.getAdditiveTrack())}}}},r}(),_c=eM;function Ja(){return new Date().getTime()}var rM=function(r){bt(t,r);function t(e){var i=r.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,e=e||{},i.stage=e.stage||{},i}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var i=e.getClip();i&&this.addClip(i)},t.prototype.removeClip=function(e){if(!!e.animation){var i=e.prev,a=e.next;i?i.next=a:this._head=a,a?a.prev=i:this._tail=i,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var i=e.getClip();i&&this.removeClip(i),e.animation=null},t.prototype.update=function(e){for(var i=Ja()-this._pausedTime,a=i-this._time,n=this._head;n;){var o=n.next,s=n.step(i,a);s&&(n.ondestroy(),this.removeClip(n)),n=o}this._time=i,e||(this.trigger("frame",a),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function i(){e._running&&(bd(i),!e._paused&&e.update())}bd(i)},t.prototype.start=function(){this._running||(this._time=Ja(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Ja(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Ja()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var i=e.next;e.prev=e.next=e.animation=null,e=i}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,i){i=i||{},this.start();var a=new _c(e,i.loop);return this.addAnimator(a),a},t}(or),iM=rM,aM=300,sf=ht.domSupported,lf=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=z(r,function(a){var n=a.replace("mouse","pointer");return e.hasOwnProperty(n)?n:a});return{mouse:r,touch:t,pointer:i}}(),Id={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Rd=!1;function jh(r){var t=r.pointerType;return t==="pen"||t==="touch"}function nM(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 uf(r){r&&(r.zrByTouch=!0)}function oM(r,t){return Ie(r.dom,new sM(r,t),!0)}function k1(r,t){for(var e=t,i=!1;e&&e.nodeType!==9&&!(i=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return i}var sM=function(){function r(t,e){this.stopPropagation=Gt,this.stopImmediatePropagation=Gt,this.preventDefault=Gt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r}(),Ke={mousedown:function(r){r=Ie(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Ie(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Ie(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Ie(this.dom,r);var t=r.toElement||r.relatedTarget;k1(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){Rd=!0,r=Ie(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){Rd||(r=Ie(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Ie(this.dom,r),uf(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Ke.mousemove.call(this,r),Ke.mousedown.call(this,r)},touchmove:function(r){r=Ie(this.dom,r),uf(r),this.handler.processGesture(r,"change"),Ke.mousemove.call(this,r)},touchend:function(r){r=Ie(this.dom,r),uf(r),this.handler.processGesture(r,"end"),Ke.mouseup.call(this,r),+new Date-+this.__lastTouchMomentBd||r<-Bd}var ki=[],Ea=[],hf=Fe(),vf=Math.abs,cM=function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return Ei(this.rotation)||Ei(this.x)||Ei(this.y)||Ei(this.scaleX-1)||Ei(this.scaleY-1)||Ei(this.skewX)||Ei(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),i=this.transform;if(!(e||t)){i&&(Od(i),this.invTransform=null);return}i=i||Fe(),e?this.getLocalTransform(i):Od(i),t&&(e?Tr(i,t,i):su(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(ki);var i=ki[0]<0?-1:1,a=ki[1]<0?-1:1,n=((ki[0]-i)*e+i)/ki[0]||0,o=((ki[1]-a)*e+a)/ki[1]||0;t[0]*=n,t[1]*=n,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Fe(),Ca(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(!!t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],a=Math.atan2(t[1],t[0]),n=Math.PI/2+a-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(n),e=Math.sqrt(e),this.skewX=n,this.skewY=0,this.rotation=-a,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=i,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(!!this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Tr(Ea,t.invTransform,e),e=Ea);var i=this.originX,a=this.originY;(i||a)&&(hf[4]=i,hf[5]=a,Tr(Ea,e,hf),Ea[4]-=i,Ea[5]-=a,e=Ea),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var i=[t,e],a=this.invTransform;return a&&Ht(i,i,a),i},r.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],a=this.transform;return a&&Ht(i,i,a),i},r.prototype.getLineScale=function(){var t=this.transform;return t&&vf(t[0]-1)>1e-10&&vf(t[3]-1)>1e-10?Math.sqrt(vf(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){B1(this,t)},r.getLocalTransform=function(t,e){e=e||[];var i=t.originX||0,a=t.originY||0,n=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,f=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,v=t.skewY?Math.tan(-t.skewY):0;if(i||a||s||l){var p=i+s,d=a+l;e[4]=-p*n-c*d*o,e[5]=-d*o-v*p*n}else e[4]=e[5]=0;return e[0]=n,e[3]=o,e[1]=v*n,e[2]=c*o,u&&Ai(e,e,u),e[4]+=i+f,e[5]+=a+h,e},r.initDefaultProps=function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),r}(),Cr=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function B1(r,t){for(var e=0;e=0?parseFloat(r)/100*t:parseFloat(r):r}function Dl(r,t,e){var i=t.position||"inside",a=t.distance!=null?t.distance:5,n=e.height,o=e.width,s=n/2,l=e.x,u=e.y,f="left",h="top";if(i instanceof Array)l+=ar(i[0],e.width),u+=ar(i[1],e.height),f=null,h=null;else switch(i){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+=n+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+=n-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+=n-a,h="bottom";break;case"insideBottomRight":l+=o-a,u+=n-a,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var cf="__zr_normal__",pf=Cr.concat(["ignore"]),pM=Ve(Cr,function(r,t){return r[t]=!0,r},{ignore:!1}),ka={},dM=new st(0,0,0,0),Sc=function(){function r(t){this.id=lc(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=t,a[5]+=e,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(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,a=i.local,n=e.innerTransformable,o=void 0,s=void 0,l=!1;n.parent=a?this:null;var u=!1;if(n.copyTransform(e),i.position!=null){var f=dM;i.layoutRect?f.copy(i.layoutRect):f.copy(this.getBoundingRect()),a||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(ka,i,f):Dl(ka,i,f),n.x=ka.x,n.y=ka.y,o=ka.align,s=ka.verticalAlign;var h=i.origin;if(h&&i.rotation!=null){var c=void 0,v=void 0;h==="center"?(c=f.width*.5,v=f.height*.5):(c=ar(h[0],f.width),v=ar(h[1],f.height)),u=!0,n.originX=-n.x+c+(a?0:f.x),n.originY=-n.y+v+(a?0:f.y)}}i.rotation!=null&&(n.rotation=i.rotation);var p=i.offset;p&&(n.x+=p[0],n.y+=p[1],u||(n.originX=-p[0],n.originY=-p[1]));var d=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;d&&this.canBeInsideText()?(y=i.insideFill,m=i.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=i.outsideFill,m=i.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,e.setDefaultTextStyle(g)),e.__dirty|=yr,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ev:tv},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i=typeof e=="string"&&ue(e);i||(i=[255,255,255,1]);for(var a=i[3],n=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*a+(n?0:255)*(1-a);return i[3]=1,rr(i,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},k(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(U(t))for(var i=t,a=at(i),n=0;n0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(cf,!1,t)},r.prototype.useState=function(t,e,i,a){var n=t===cf,o=this.hasState();if(!(!o&&n)){var s=this.currentStates,l=this.stateTransition;if(!(ot(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!n&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!n){uc("State "+t+" not exists.");return}n||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||a);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!i&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,c=this._textGuide;return h&&h.useState(t,e,i,f),c&&c.useState(t,e,i,f),n?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~yr),u}}},r.prototype.useStates=function(t,e,i){if(!t.length)this.clearStates();else{var a=[],n=this.currentStates,o=t.length,s=o===n.length;if(s){for(var l=0;l0,p);var d=this._textContent,g=this._textGuide;d&&d.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~yr)}},r.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var i=this.currentStates.slice();i.splice(e,1),this.useStates(i)}},r.prototype.replaceState=function(t,e,i){var a=this.currentStates.slice(),n=ot(a,t),o=ot(a,e)>=0;n>=0?o?a.splice(n,1):a[n]=e:i&&!o&&a.push(e),this.useStates(a)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},i,a=0;a=0&&n.splice(o,1)}),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var i=this.animators,a=i.length,n=[],o=0;o0&&e.during&&n[0].during(function(p,d){e.during(d)});for(var c=0;c0||a.force&&!o.length){var C=void 0,A=void 0,D=void 0;if(s){A={},c&&(C={});for(var S=0;S<_;S++){var y=d[S];A[y]=e[y],c?C[y]=i[y]:e[y]=i[y]}}else if(c){D={};for(var S=0;S<_;S++){var y=d[S];D[y]=uo(e[y]),yM(e,i,y)}}var b=new _c(e,!1,!1,h?Ct(p,function(P){return P.targetName===t}):null);b.targetName=t,a.scope&&(b.scope=a.scope),c&&C&&b.whenWithKeys(0,C,d),D&&b.whenWithKeys(0,D,d),b.whenWithKeys(u==null?500:u,s?A:i,d).delay(f||0),r.addAnimator(b,t),o.push(b)}}var z1=Sc,V1=function(r){bt(t,r);function t(e){var i=r.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(e),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var i=this._children,a=0;a=0&&(a.splice(n,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,i){var a=ot(this._children,e);return a>=0&&this.replaceAt(i,a),this},t.prototype.replaceAt=function(e,i){var a=this._children,n=a[i];if(e&&e!==this&&e.parent!==this&&e!==n){a[i]=e,n.parent=null;var o=this.__zr;o&&n.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var i=this.__zr;i&&i!==e.__zr&&e.addSelfToZr(i),i&&i.refresh()},t.prototype.remove=function(e){var i=this.__zr,a=this._children,n=ot(a,e);return n<0?this:(a.splice(n,1),e.parent=null,i&&e.removeSelfFromZr(i),i&&i.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,i=this.__zr,a=0;a0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},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(t){t=t||{},this.painter.resize(t.width,t.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(t){this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},r.prototype.on=function(t,e,i){return this.handler.on(t,e,i),this},r.prototype.off=function(t,e){this.handler.off(t,e)},r.prototype.trigger=function(t,e){this.handler.trigger(t,e)},r.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e0){if(r<=a)return o;if(r>=n)return s}else{if(r>=a)return o;if(r<=n)return s}else{if(r===a)return o;if(r===n)return s}return(r-a)/l*u+o}function K(r,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return V(r)?DM(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function Et(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),G1),r=(+r).toFixed(t),e?r:+r}function Sr(r){return r.sort(function(t,e){return t-e}),r}function xr(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return H1(r)}function H1(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),i=e>0?+t.slice(e+1):0,a=e>0?e:t.length,n=t.indexOf("."),o=n<0?0:a-1-n;return Math.max(0,o-i)}function xc(r,t){var e=Math.log,i=Math.LN10,a=Math.floor(e(r[1]-r[0])/i),n=Math.round(e(Math.abs(t[1]-t[0]))/i),o=Math.min(Math.max(-a+n,0),20);return isFinite(o)?o:20}function PM(r,t,e){if(!r[t])return 0;var i=W1(r,e);return i[t]||0}function W1(r,t){var e=Ve(r,function(v,p){return v+(isNaN(p)?0:p)},0);if(e===0)return[];for(var i=Math.pow(10,t),a=z(r,function(v){return(isNaN(v)?0:v)/e*i*100}),n=i*100,o=z(a,function(v){return Math.floor(v)}),s=Ve(o,function(v,p){return v+p},0),l=z(a,function(v,p){return v-o[p]});su&&(u=l[h],f=h);++o[f],l[f]=0,++s}return z(o,function(v){return v/i})}function LM(r,t){var e=Math.max(xr(r),xr(t)),i=r+t;return e>G1?i:Et(i,e)}var IM=9007199254740991;function bc(r){var t=Math.PI*2;return(r%t+t)%t}function Mo(r){return r>-Vd&&r=10&&t++,t}function wc(r,t){var e=fu(r),i=Math.pow(10,e),a=r/i,n;return t?a<1.5?n=1:a<2.5?n=2:a<4?n=3:a<7?n=5:n=10:a<1?n=1:a<2?n=2:a<3?n=3:a<5?n=5:n=10,r=n*i,e>=-20?+r.toFixed(e<0?-e:0):r}function EM(r,t){var e=(r.length-1)*t+1,i=Math.floor(e),a=+r[i-1],n=e-i;return n?a+n*(r[i]-a):a}function iv(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,i=0;i=0||n&&ot(n,l)<0)){var u=i.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var iD=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],aD=ln(iD),nD=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return aD(this,t,e)},r}(),av=new Ko(50);function oD(r){if(typeof r=="string"){var t=av.get(r);return t&&t.image}else return r}function Dc(r,t,e,i,a){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var n=av.get(r),o={hostEl:e,cb:i,cbPayload:a};return n?(t=n.image,!vu(t)&&n.pending.push(o)):(t=Si.loadImage(r,Wd,Wd),t.__zrImageSrc=r,av.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function Wd(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=o;l++)s-=o;var u=Ce(e,t);return u>s&&(e="",u=0),s=r-u,a.ellipsis=e,a.ellipsisWidth=u,a.contentWidth=s,a.containerWidth=r,a}function iS(r,t){var e=t.containerWidth,i=t.font,a=t.contentWidth;if(!e)return"";var n=Ce(r,i);if(n<=e)return r;for(var o=0;;o++){if(n<=a||o>=t.maxIterations){r+=t.ellipsis;break}var s=o===0?sD(r,a,t.ascCharWidth,t.cnCharWidth):n>0?Math.floor(r.length*a/n):0;r=r.substr(0,s),n=Ce(r,i)}return r===""&&(r=t.placeholder),r}function sD(r,t,e,i){for(var a=0,n=0,o=r.length;nv&&u){var p=Math.floor(v/s);h=h.slice(0,p)}if(r&&n&&f!=null)for(var d=rS(f,a,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),g=0;gs&&mf(e,r.substring(s,u),t,o),mf(e,l[2],t,o,l[1]),s=yf.lastIndex}sa){b>0?(m.tokens=m.tokens.slice(0,b),g(m,S,_),e.lines=e.lines.slice(0,y+1)):e.lines=e.lines.slice(0,y);break t}var P=T.width,L=P==null||P==="auto";if(typeof P=="string"&&P.charAt(P.length-1)==="%")x.percentWidth=P,f.push(x),x.contentWidth=Ce(x.text,D);else{if(L){var I=T.backgroundColor,R=I&&I.image;R&&(R=oD(R),vu(R)&&(x.width=Math.max(x.width,R.width*M/R.height)))}var E=p&&i!=null?i-S:null;E!=null&&E0&&p+i.accumWidth>i.width&&(f=t.split(` `),u=!0),i.accumWidth=p}else{var d=aS(t,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=d.accumWidth+v,h=d.linesWidths,f=d.lines}}else f=t.split(` `);for(var g=0;g=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var cD=Ve(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function pD(r){return vD(r)?!!cD[r]:!0}function aS(r,t,e,i,a){for(var n=[],o=[],s="",l="",u=0,f=0,h=0;he:a+f+v>e){f?(s||l)&&(p?(s||(s=l,l="",u=0,f=u),n.push(s),o.push(f-u),l+=c,u+=v,s="",f=u):(l&&(s+=l,l="",u=0),n.push(s),o.push(f),s=c,f=v)):p?(n.push(l),o.push(u),l=c,u=v):(n.push(c),o.push(v));continue}f+=v,p?(l+=c,u+=v):(l&&(s+=l,l="",u=0),s+=c)}return!n.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(n.push(s),o.push(f)),n.length===1&&(f+=a),{accumWidth:f,lines:n,linesWidths:o}}var nv="__zr_style_"+Math.round(Math.random()*10),ca={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},cu={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ca[nv]=!0;var Ud=["z","z2","invisible"],dD=["invisible"],gD=function(r){bt(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var i=at(e),a=0;a1e-4){s[0]=r-e,s[1]=t-i,l[0]=r+e,l[1]=t+i;return}if(_s[0]=bf(a)*e+r,_s[1]=xf(a)*i+t,Ss[0]=bf(n)*e+r,Ss[1]=xf(n)*i+t,u(s,_s,Ss),f(l,_s,Ss),a=a%Bi,a<0&&(a=a+Bi),n=n%Bi,n<0&&(n=n+Bi),a>n&&!o?n+=Bi:aa&&(xs[0]=bf(v)*e+r,xs[1]=xf(v)*i+t,u(s,xs,s),f(l,xs,l))}var mt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ni=[],zi=[],fr=[],Qr=[],hr=[],vr=[],wf=Math.min,Tf=Math.max,Vi=Math.cos,Fi=Math.sin,Ir=Math.abs,ov=Math.PI,si=ov*2,Cf=typeof Float32Array!="undefined",Ln=[];function Af(r){var t=Math.round(r/ov*1e8)/1e8;return t%2*ov}function xD(r,t){var e=Af(r[0]);e<0&&(e+=si);var i=e-r[0],a=r[1];a+=i,!t&&a-e>=si?a=e+si:t&&e-a>=si?a=e-si:!t&&e>a?a=e+(si-Af(e-a)):t&&e0&&(this._ux=Ir(i/kd/t)||0,this._uy=Ir(i/kd/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(mt.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var i=Ir(t-this._xi),a=Ir(e-this._yi),n=i>this._ux||a>this._uy;if(this.addData(mt.L,t,e),this._ctx&&n&&this._ctx.lineTo(t,e),n)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=i*i+a*a;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,i,a,n,o){return this._drawPendingPt(),this.addData(mt.C,t,e,i,a,n,o),this._ctx&&this._ctx.bezierCurveTo(t,e,i,a,n,o),this._xi=n,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,i,a){return this._drawPendingPt(),this.addData(mt.Q,t,e,i,a),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,a),this._xi=i,this._yi=a,this},r.prototype.arc=function(t,e,i,a,n,o){this._drawPendingPt(),Ln[0]=a,Ln[1]=n,xD(Ln,o),a=Ln[0],n=Ln[1];var s=n-a;return this.addData(mt.A,t,e,i,i,a,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,a,n,o),this._xi=Vi(n)*i+t,this._yi=Fi(n)*i+e,this},r.prototype.arcTo=function(t,e,i,a,n){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,i,a,n),this},r.prototype.rect=function(t,e,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,i,a),this.addData(mt.R,t,e,i,a),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(mt.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&t.closePath(),this._xi=e,this._yi=i,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){var e=t.length;!(this.data&&this.data.length===e)&&Cf&&(this.data=new Float32Array(e));for(var i=0;if.length&&(this._expandData(),f=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){fr[0]=fr[1]=hr[0]=hr[1]=Number.MAX_VALUE,Qr[0]=Qr[1]=vr[0]=vr[1]=-Number.MAX_VALUE;var t=this.data,e=0,i=0,a=0,n=0,o;for(o=0;oi||Ir(_)>a||c===e-1)&&(d=Math.sqrt(m*m+_*_),n=g,o=y);break}case mt.C:{var S=t[c++],b=t[c++],g=t[c++],y=t[c++],x=t[c++],T=t[c++];d=DA(n,o,S,b,g,y,x,T,10),n=x,o=T;break}case mt.Q:{var S=t[c++],b=t[c++],g=t[c++],y=t[c++];d=LA(n,o,S,b,g,y,10),n=g,o=y;break}case mt.A:var C=t[c++],A=t[c++],D=t[c++],M=t[c++],P=t[c++],L=t[c++],I=L+P;c+=1,t[c++],p&&(s=Vi(P)*D+C,l=Fi(P)*M+A),d=Tf(D,M)*wf(si,Math.abs(L)),n=Vi(I)*D+C,o=Fi(I)*M+A;break;case mt.R:{s=n=t[c++],l=o=t[c++];var R=t[c++],E=t[c++];d=R*2+E*2;break}case mt.Z:{var m=s-n,_=l-o;d=Math.sqrt(m*m+_*_),n=s,o=l;break}}d>=0&&(u[h++]=d,f+=d)}return this._pathLen=f,f},r.prototype.rebuildPath=function(t,e){var i=this.data,a=this._ux,n=this._uy,o=this._len,s,l,u,f,h,c,v=e<1,p,d,g=0,y=0,m,_=0,S,b;if(v&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,d=this._pathLen,m=e*d,!m))return;t:for(var x=0;x0&&(t.lineTo(S,b),_=0),T){case mt.M:s=u=i[x++],l=f=i[x++],t.moveTo(u,f);break;case mt.L:{h=i[x++],c=i[x++];var A=Ir(h-u),D=Ir(c-f);if(A>a||D>n){if(v){var M=p[y++];if(g+M>m){var P=(m-g)/M;t.lineTo(u*(1-P)+h*P,f*(1-P)+c*P);break t}g+=M}t.lineTo(h,c),u=h,f=c,_=0}else{var L=A*A+D*D;L>_&&(S=h,b=c,_=L)}break}case mt.C:{var I=i[x++],R=i[x++],E=i[x++],W=i[x++],B=i[x++],F=i[x++];if(v){var M=p[y++];if(g+M>m){var P=(m-g)/M;Cl(u,I,E,B,P,Ni),Cl(f,R,W,F,P,zi),t.bezierCurveTo(Ni[1],zi[1],Ni[2],zi[2],Ni[3],zi[3]);break t}g+=M}t.bezierCurveTo(I,R,E,W,B,F),u=B,f=F;break}case mt.Q:{var I=i[x++],R=i[x++],E=i[x++],W=i[x++];if(v){var M=p[y++];if(g+M>m){var P=(m-g)/M;Al(u,I,E,P,Ni),Al(f,R,W,P,zi),t.quadraticCurveTo(Ni[1],zi[1],Ni[2],zi[2]);break t}g+=M}t.quadraticCurveTo(I,R,E,W),u=E,f=W;break}case mt.A:var Y=i[x++],tt=i[x++],J=i[x++],lt=i[x++],ct=i[x++],kt=i[x++],xt=i[x++],Zt=!i[x++],Ft=J>lt?J:lt,Lt=Ir(J-lt)>.001,Tt=ct+kt,j=!1;if(v){var M=p[y++];g+M>m&&(Tt=ct+kt*(m-g)/M,j=!0),g+=M}if(Lt&&t.ellipse?t.ellipse(Y,tt,J,lt,xt,ct,Tt,Zt):t.arc(Y,tt,Ft,ct,Tt,Zt),j)break t;C&&(s=Vi(ct)*J+Y,l=Fi(ct)*lt+tt),u=Vi(Tt)*J+Y,f=Fi(Tt)*lt+tt;break;case mt.R:s=u=i[x],l=f=i[x+1],h=i[x++],c=i[x++];var ut=i[x++],pe=i[x++];if(v){var M=p[y++];if(g+M>m){var It=m-g;t.moveTo(h,c),t.lineTo(h+wf(It,ut),c),It-=ut,It>0&&t.lineTo(h+ut,c+wf(It,pe)),It-=pe,It>0&&t.lineTo(h+Tf(ut-It,0),c+pe),It-=ut,It>0&&t.lineTo(h,c+Tf(pe-It,0));break t}g+=M}t.rect(h,c,ut,pe);break;case mt.Z:if(v){var M=p[y++];if(g+M>m){var P=(m-g)/M;t.lineTo(u*(1-P)+s*P,f*(1-P)+l*P);break t}g+=M}t.closePath(),u=s,f=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.CMD=mt,r.initDefaultProps=function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),r}(),Yr=bD;function Oa(r,t,e,i,a,n,o){if(a===0)return!1;var s=a,l=0,u=r;if(o>t+s&&o>i+s||or+s&&n>e+s||nt+h&&f>i+h&&f>n+h&&f>s+h||fr+h&&u>e+h&&u>a+h&&u>o+h||ut+u&&l>i+u&&l>n+u||lr+u&&s>e+u&&s>a+u||se||f+ua&&(a+=In);var c=Math.atan2(l,s);return c<0&&(c+=In),c>=i&&c<=a||c+In>=i&&c+In<=a}function Or(r,t,e,i,a,n){if(n>t&&n>i||na?s:0}var ti=Yr.CMD,Gi=Math.PI*2,AD=1e-4;function MD(r,t){return Math.abs(r-t)t&&u>i&&u>n&&u>s||u1&&DD(),v=Nt(t,i,n,s,Ee[0]),c>1&&(p=Nt(t,i,n,s,Ee[1]))),c===2?gt&&s>i&&s>n||s=0&&u<=1){for(var f=0,h=jt(t,i,n,u),c=0;ce||s<-e)return 0;var l=Math.sqrt(e*e-s*s);ie[0]=-l,ie[1]=l;var u=Math.abs(i-a);if(u<1e-4)return 0;if(u>=Gi-1e-4){i=0,a=Gi;var f=n?1:-1;return o>=ie[0]+r&&o<=ie[1]+r?f:0}if(i>a){var h=i;i=a,a=h}i<0&&(i+=Gi,a+=Gi);for(var c=0,v=0;v<2;v++){var p=ie[v];if(p+r>o){var d=Math.atan2(s,p),f=n?1:-1;d<0&&(d=Gi+d),(d>=i&&d<=a||d+Gi>=i&&d+Gi<=a)&&(d>Math.PI/2&&d1&&(e||(s+=Or(l,u,f,h,i,a))),g&&(l=n[p],u=n[p+1],f=l,h=u),d){case ti.M:f=n[p++],h=n[p++],l=f,u=h;break;case ti.L:if(e){if(Oa(l,u,n[p],n[p+1],t,i,a))return!0}else s+=Or(l,u,n[p],n[p+1],i,a)||0;l=n[p++],u=n[p++];break;case ti.C:if(e){if(wD(l,u,n[p++],n[p++],n[p++],n[p++],n[p],n[p+1],t,i,a))return!0}else s+=PD(l,u,n[p++],n[p++],n[p++],n[p++],n[p],n[p+1],i,a)||0;l=n[p++],u=n[p++];break;case ti.Q:if(e){if(TD(l,u,n[p++],n[p++],n[p],n[p+1],t,i,a))return!0}else s+=LD(l,u,n[p++],n[p++],n[p],n[p+1],i,a)||0;l=n[p++],u=n[p++];break;case ti.A:var y=n[p++],m=n[p++],_=n[p++],S=n[p++],b=n[p++],x=n[p++];p+=1;var T=!!(1-n[p++]);c=Math.cos(b)*_+y,v=Math.sin(b)*S+m,g?(f=c,h=v):s+=Or(l,u,c,v,i,a);var C=(i-y)*S/_+y;if(e){if(CD(y,m,S,b,b+x,T,t,C,a))return!0}else s+=ID(y,m,S,b,b+x,T,C,a);l=Math.cos(b+x)*_+y,u=Math.sin(b+x)*S+m;break;case ti.R:f=l=n[p++],h=u=n[p++];var A=n[p++],D=n[p++];if(c=f+A,v=h+D,e){if(Oa(f,h,c,h,t,i,a)||Oa(c,h,c,v,t,i,a)||Oa(c,v,f,v,t,i,a)||Oa(f,v,f,h,t,i,a))return!0}else s+=Or(c,h,c,v,i,a),s+=Or(f,v,f,h,i,a);break;case ti.Z:if(e){if(Oa(l,u,f,h,t,i,a))return!0}else s+=Or(l,u,f,h,i,a);l=f,u=h;break}}return!e&&!MD(u,h)&&(s+=Or(l,u,f,h,i,a)||0),s!==0}function RD(r,t,e){return nS(r,0,!1,t,e)}function ED(r,t,e,i){return nS(r,t,!0,e,i)}var Ll=Z({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ca),kD={style:Z({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},cu.style)},Mf=Cr.concat(["invisible","culling","z","z2","zlevel","parent"]),OD=function(r){bt(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var i=this.style;if(i.decal){var a=this._decalEl=this._decalEl||new t;a.buildPath===t.prototype.buildPath&&(a.buildPath=function(l){e.buildPath(l,e.shape)}),a.silent=!0;var n=a.style;for(var o in i)n[o]!==i[o]&&(n[o]=i[o]);n.fill=i.fill?i.decal:null,n.decal=null,n.shadowColor=null,i.strokeFirst&&(n.stroke=null);for(var s=0;s.5?tv:i>.2?vM:ev}else if(e)return ev}return tv},t.prototype.getInsideTextStroke=function(e){var i=this.style.fill;if(V(i)){var a=this.__zr,n=!!(a&&a.isDarkMode()),o=Co(e,0)0))},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,i=this.style,a=!e;if(a){var n=!1;this.path||(n=!0,this.createPathProxy());var o=this.path;(n||this.__dirty&Za)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||a){s.copy(e);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f==null?4:f)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,i){var a=this.transformCoordToLocal(e,i),n=this.getBoundingRect(),o=this.style;if(e=a[0],i=a[1],n.contain(e,i)){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)),ED(s,l/u,e,i)))return!0}if(this.hasFill())return RD(s,e,i)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Za,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,i){e==="shape"?this.setShape(i):r.prototype.attrKV.call(this,e,i)},t.prototype.setShape=function(e,i){var a=this.shape;return a||(a=this.shape={}),typeof e=="string"?a[e]=i:k(a,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Za)},t.prototype.createStyle=function(e){return Zo(Ll,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.shape&&!i.shape&&(i.shape=k({},this.shape))},t.prototype._applyStateObj=function(e,i,a,n,o,s){r.prototype._applyStateObj.call(this,e,i,a,n,o,s);var l=!(i&&n),u;if(i&&i.shape?o?n?u=i.shape:(u=k({},a.shape),k(u,i.shape)):(u=k({},n?this.shape:a.shape),k(u,i.shape)):l&&(u=a.shape),u)if(o){this.shape=k({},this.shape);for(var f={},h=at(u),c=0;c0},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.createStyle=function(e){return Zo(BD,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var i=e.text;i!=null?i+="":i="";var a=jo(i,e.font,e.textAlign,e.textBaseline);if(a.x+=e.x||0,a.y+=e.y||0,this.hasStroke()){var n=e.lineWidth;a.x-=n/2,a.y-=n/2,a.width+=n,a.height+=n}this._rect=a}return this._rect},t.initDefaultProps=function(){var e=t.prototype;e.dirtyRectTolerance=10}(),t}(Ur);oS.prototype.type="tspan";var Po=oS,ND=Z({x:0,y:0},ca),zD={style:Z({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},cu.style)};function VD(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var sS=function(r){bt(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return Zo(ND,e)},t.prototype._getSize=function(e){var i=this.style,a=i[e];if(a!=null)return a;var n=VD(i.image)?i.image:this.__image;if(!n)return 0;var o=e==="width"?"height":"width",s=i[o];return s==null?n[e]:n[e]/n[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return zD},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new st(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Ur);sS.prototype.type="image";var ce=sS;function FD(r,t){var e=t.x,i=t.y,a=t.width,n=t.height,o=t.r,s,l,u,f;a<0&&(e=e+a,a=-a),n<0&&(i=i+n,n=-n),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>n&&(h=l+u,l*=n/h,u*=n/h),s+f>n&&(h=s+f,s*=n/h,f*=n/h),r.moveTo(e+s,i),r.lineTo(e+a-l,i),l!==0&&r.arc(e+a-l,i+l,l,-Math.PI/2,0),r.lineTo(e+a,i+n-u),u!==0&&r.arc(e+a-u,i+n-u,u,0,Math.PI/2),r.lineTo(e+f,i+n),f!==0&&r.arc(e+f,i+n-f,f,Math.PI/2,Math.PI),r.lineTo(e,i+s),s!==0&&r.arc(e+s,i+s,s,Math.PI,Math.PI*1.5)}var Qa=Math.round;function lS(r,t,e){if(!!t){var i=t.x1,a=t.x2,n=t.y1,o=t.y2;r.x1=i,r.x2=a,r.y1=n,r.y2=o;var s=e&&e.lineWidth;return s&&(Qa(i*2)===Qa(a*2)&&(r.x1=r.x2=sa(i,s,!0)),Qa(n*2)===Qa(o*2)&&(r.y1=r.y2=sa(n,s,!0))),r}}function uS(r,t,e){if(!!t){var i=t.x,a=t.y,n=t.width,o=t.height;r.x=i,r.y=a,r.width=n,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=sa(i,s,!0),r.y=sa(a,s,!0),r.width=Math.max(sa(i+n,s,!1)-r.x,n===0?0:1),r.height=Math.max(sa(a+o,s,!1)-r.y,o===0?0:1)),r}}function sa(r,t,e){if(!t)return r;var i=Qa(r*2);return(i+Qa(t))%2===0?i/2:(i+(e?1:-1))/2}var GD=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),HD={},fS=function(r){bt(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new GD},t.prototype.buildPath=function(e,i){var a,n,o,s;if(this.subPixelOptimize){var l=uS(HD,i,this.style);a=l.x,n=l.y,o=l.width,s=l.height,l.r=i.r,i=l}else a=i.x,n=i.y,o=i.width,s=i.height;i.r?FD(e,i):e.rect(a,n,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(gt);fS.prototype.type="rect";var pt=fS,Kd={fill:"#000"},jd=2,WD={style:Z({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},cu.style)},hS=function(r){bt(t,r);function t(e){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=Kd,i.attr(e),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,P=e.width!=null&&(e.overflow==="truncate"||e.overflow==="break"||e.overflow==="breakAll"),L=o.calculatedLineHeight,I=0;I=0&&(I=x[L],I.align==="right");)this._placeToken(I,e,C,y,P,"right",_),A-=I.width,P-=I.width,L--;for(M+=(n-(M-g)-(m-P)-A)/2;D<=L;)I=x[D],this._placeToken(I,e,C,y,M+I.width/2,"center",_),M+=I.width,D++;y+=C}},t.prototype._placeToken=function(e,i,a,n,o,s,l){var u=i.rich[e.styleName]||{};u.text=e.text;var f=e.verticalAlign,h=n+a/2;f==="top"?h=n+e.height/2:f==="bottom"&&(h=n+a-e.height/2);var c=!e.isLineHolder&&Df(u);c&&this._renderBackground(u,i,s==="right"?o-e.width:s==="center"?o-e.width/2:o,h-e.height/2,e.width,e.height);var v=!!u.backgroundColor,p=e.textPadding;p&&(o=ig(o,s,p),h-=e.height/2-p[0]-e.innerHeight/2);var d=this._getOrCreateChild(Po),g=d.createStyle();d.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=rg("fill"in u?u.fill:"fill"in i?i.fill:(m=!0,y.fill)),b=eg("stroke"in u?u.stroke:"stroke"in i?i.stroke:!v&&!l&&(!y.autoStroke||m)?(_=jd,y.stroke):null),x=u.textShadowBlur>0||i.textShadowBlur>0;g.text=e.text,g.x=o,g.y=h,x&&(g.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,g.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||_i,g.opacity=tn(u.opacity,i.opacity,1),Qd(g,u),b&&(g.lineWidth=tn(u.lineWidth,i.lineWidth,_),g.lineDash=rt(u.lineDash,i.lineDash),g.lineDashOffset=i.lineDashOffset||0,g.stroke=b),S&&(g.fill=S);var T=e.contentWidth,C=e.contentHeight;d.setBoundingRect(new st(to(g.x,T,g.textAlign),qa(g.y,C,g.textBaseline),T,C))},t.prototype._renderBackground=function(e,i,a,n,o,s){var l=e.backgroundColor,u=e.borderWidth,f=e.borderColor,h=l&&l.image,c=l&&!h,v=e.borderRadius,p=this,d,g;if(c||e.lineHeight||u&&f){d=this._getOrCreateChild(pt),d.useStyle(d.createStyle()),d.style.fill=null;var y=d.shape;y.x=a,y.y=n,y.width=o,y.height=s,y.r=v,d.dirtyShape()}if(c){var m=d.style;m.fill=l||null,m.fillOpacity=rt(e.fillOpacity,1)}else if(h){g=this._getOrCreateChild(ce),g.onload=function(){p.dirtyStyle()};var _=g.style;_.image=l.image,_.x=a,_.y=n,_.width=o,_.height=s}if(u&&f){var m=d.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=rt(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,d.strokeContainThreshold=0,d.hasFill()&&d.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(d||g).style;S.shadowBlur=e.shadowBlur||0,S.shadowColor=e.shadowColor||"transparent",S.shadowOffsetX=e.shadowOffsetX||0,S.shadowOffsetY=e.shadowOffsetY||0,S.opacity=tn(e.opacity,i.opacity,1)},t.makeFont=function(e){var i="";return cS(e)&&(i=[e.fontStyle,e.fontWeight,vS(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),i&&ze(i)||e.textFont||e.font},t}(Ur),$D={left:!0,right:1,center:1},UD={top:1,bottom:1,middle:1},Jd=["fontStyle","fontWeight","fontSize","fontFamily"];function vS(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?nc+"px":r+"px"}function Qd(r,t){for(var e=0;e=0,n=!1;if(r instanceof gt){var o=pS(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(Ba(s)||Ba(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(n=!0,i=k({},i),u=k({},u),u.fill=s):!Ba(u.fill)&&Ba(s)?(n=!0,i=k({},i),u=k({},u),u.fill=lg(s)):!Ba(u.stroke)&&Ba(l)&&(n||(i=k({},i),u=k({},u)),u.stroke=lg(l)),i.style=u}}if(i&&i.z2==null){n||(i=k({},i));var f=r.z2EmphasisLift;i.z2=r.z2+(f!=null?f:dS)}return i}function QD(r,t,e){if(e&&e.z2==null){e=k({},e);var i=r.z2SelectLift;e.z2=r.z2+(i!=null?i:ZD)}return e}function t2(r,t,e){var i=ot(r.currentStates,t)>=0,a=r.style.opacity,n=i?null:jD(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=k({},e),o=k({opacity:i?a:n.opacity*.1},o),e.style=o),e}function Pf(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return JD(this,r,t,e);if(r==="blur")return t2(this,r,e);if(r==="select")return QD(this,r,e)}return e}function Rc(r){r.stateProxy=Pf;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=Pf),e&&(e.stateProxy=Pf)}function fg(r,t){!bS(r,t)&&!r.__highByOuter&&Zr(r,gS)}function hg(r,t){!bS(r,t)&&!r.__highByOuter&&Zr(r,yS)}function un(r,t){r.__highByOuter|=1<<(t||0),Zr(r,gS)}function fn(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&Zr(r,yS)}function e2(r){Zr(r,Ic)}function _S(r){Zr(r,mS)}function SS(r){Zr(r,qD)}function xS(r){Zr(r,KD)}function bS(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function wS(r){var t=r.getModel(),e=[],i=[];t.eachComponent(function(a,n){var o=Pc(n),s=a==="series",l=s?r.getViewOfSeriesModel(n):r.getViewOfComponentModel(n);!s&&i.push(l),o.isBlured&&(l.group.traverse(function(u){mS(u)}),s&&e.push(n)),o.isBlured=!1}),w(i,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(e,!1,t)})}function lv(r,t,e,i){var a=i.getModel();e=e||"coordinateSystem";function n(u,f){for(var h=0;h0){var s={dataIndex:o,seriesIndex:e.seriesIndex};n!=null&&(s.dataType=n),t.push(s)}})}),t}function gi(r,t,e){kc(r,!0),Zr(r,Rc),l2(r,t,e)}function s2(r){kc(r,!1)}function xi(r,t,e,i){i?s2(r):gi(r,t,e)}function l2(r,t,e){var i=nt(r);t!=null?(i.focus=t,i.blurScope=e):i.focus&&(i.focus=null)}var cg=["emphasis","blur","select"],u2={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function hn(r,t,e,i){e=e||"itemStyle";for(var a=0;a1&&(o*=Lf(p),s*=Lf(p));var d=(a===n?-1:1)*Lf((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+e)/2+ws(h)*g-bs(h)*y,_=(t+i)/2+bs(h)*g+ws(h)*y,S=yg([1,0],[(c-g)/o,(v-y)/s]),b=[(c-g)/o,(v-y)/s],x=[(-1*c-g)/o,(-1*v-y)/s],T=yg(b,x);if(vv(b,x)<=-1&&(T=Rn),vv(b,x)>=1&&(T=0),T<0){var C=Math.round(T/Rn*1e6)/1e6;T=Rn*2+C%2*Rn}f.addData(u,m,_,o,s,S,T,h,n)}var d2=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,g2=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function y2(r){var t=new Yr;if(!r)return t;var e=0,i=0,a=e,n=i,o,s=Yr.CMD,l=r.match(d2);if(!l)return t;for(var u=0;uI*I+R*R&&(C=D,A=M),{cx:C,cy:A,x0:-f,y0:-h,x1:C*(a/b-1),y1:A*(a/b-1)}}function T2(r){var t;if(N(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function C2(r,t){var e,i=eo(t.r,0),a=eo(t.r0||0,0),n=i>0,o=a>0;if(!(!n&&!o)){if(n||(i=a,a=0),a>i){var s=i;i=a,a=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,h=t.cy,c=!!t.clockwise,v=_g(u-l),p=v>If&&v%If;if(p>qe&&(v=p),!(i>qe))r.moveTo(f,h);else if(v>If-qe)r.moveTo(f+i*za(l),h+i*Hi(l)),r.arc(f,h,i,l,u,!c),a>qe&&(r.moveTo(f+a*za(u),h+a*Hi(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,b=void 0,x=void 0,T=void 0,C=void 0,A=void 0,D=void 0,M=void 0,P=void 0,L=void 0,I=void 0,R=i*za(l),E=i*Hi(l),W=a*za(u),B=a*Hi(u),F=v>qe;if(F){var Y=t.cornerRadius;Y&&(e=T2(Y),d=e[0],g=e[1],y=e[2],m=e[3]);var tt=_g(i-a)/2;if(_=cr(tt,y),S=cr(tt,m),b=cr(tt,d),x=cr(tt,g),A=T=eo(_,S),D=C=eo(b,x),(T>qe||C>qe)&&(M=i*za(u),P=i*Hi(u),L=a*za(l),I=a*Hi(l),vqe){var Lt=cr(y,A),Tt=cr(m,A),j=Ts(L,I,R,E,i,Lt,c),ut=Ts(M,P,W,B,i,Tt,c);r.moveTo(f+j.cx+j.x0,h+j.cy+j.y0),A0&&r.arc(f+j.cx,h+j.cy,Lt,qt(j.y0,j.x0),qt(j.y1,j.x1),!c),r.arc(f,h,i,qt(j.cy+j.y1,j.cx+j.x1),qt(ut.cy+ut.y1,ut.cx+ut.x1),!c),Tt>0&&r.arc(f+ut.cx,h+ut.cy,Tt,qt(ut.y1,ut.x1),qt(ut.y0,ut.x0),!c))}else r.moveTo(f+R,h+E),r.arc(f,h,i,l,u,!c);if(!(a>qe)||!F)r.lineTo(f+W,h+B);else if(D>qe){var Lt=cr(d,D),Tt=cr(g,D),j=Ts(W,B,M,P,a,-Tt,c),ut=Ts(R,E,L,I,a,-Lt,c);r.lineTo(f+j.cx+j.x0,h+j.cy+j.y0),D0&&r.arc(f+j.cx,h+j.cy,Tt,qt(j.y0,j.x0),qt(j.y1,j.x1),!c),r.arc(f,h,a,qt(j.cy+j.y1,j.cx+j.x1),qt(ut.cy+ut.y1,ut.cx+ut.x1),c),Lt>0&&r.arc(f+ut.cx,h+ut.cy,Lt,qt(ut.y1,ut.x1),qt(ut.y0,ut.x0),!c))}else r.lineTo(f+W,h+B),r.arc(f,h,a,u,l,c)}r.closePath()}}}var A2=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}(),RS=function(r){bt(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new A2},t.prototype.buildPath=function(e,i){C2(e,i)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(gt);RS.prototype.type="sector";var Mr=RS,M2=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),ES=function(r){bt(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new M2},t.prototype.buildPath=function(e,i){var a=i.cx,n=i.cy,o=Math.PI*2;e.moveTo(a+i.r,n),e.arc(a,n,i.r,0,o,!1),e.moveTo(a+i.r0,n),e.arc(a,n,i.r0,0,o,!0)},t}(gt);ES.prototype.type="ring";var Qo=ES;function D2(r,t,e,i){var a=[],n=[],o=[],s=[],l,u,f,h;if(i){f=[1/0,1/0],h=[-1/0,-1/0];for(var c=0,v=r.length;c=2){if(i){var n=D2(a,i,e,t.smoothConstraint);r.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(e?o:o-1);s++){var l=n[s*2],u=n[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;s$i[1]){if(s=!1,n)return s;var f=Math.abs($i[0]-Wi[1]),h=Math.abs(Wi[0]-$i[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:n,force:!!n||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,p):t.animateTo(e,p)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),n&&n()}function Dt(r,t,e,i,a,n){zc("update",r,t,e,i,a,n)}function te(r,t,e,i,a,n){zc("enter",r,t,e,i,a,n)}function go(r){if(!r.__zr)return!0;for(var t=0;tMath.abs(n[1])?n[0]>0?"right":"left":n[1]>0?"bottom":"top"}function bg(r){return!r.isGroup}function U2(r){return r.shape!=null}function bu(r,t,e){if(!r||!t)return;function i(o){var s={};return o.traverse(function(l){bg(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return U2(o)&&(s.shape=k({},o.shape)),s}var n=i(r);t.traverse(function(o){if(bg(o)&&o.anid){var s=n[o.anid];if(s){var l=a(o);o.attr(a(s)),Dt(o,l,e,nt(o).dataIndex)}}})}function Hc(r,t){return z(r,function(e){var i=e[0];i=kl(i,t.x),i=Ol(i,t.x+t.width);var a=e[1];return a=kl(a,t.y),a=Ol(a,t.y+t.height),[i,a]})}function YS(r,t){var e=kl(r.x,t.x),i=Ol(r.x+r.width,t.x+t.width),a=kl(r.y,t.y),n=Ol(r.y+r.height,t.y+t.height);if(i>=e&&n>=a)return{x:e,y:a,width:i-e,height:n-a}}function _n(r,t,e){var i=k({rectHover:!0},t),a=i.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(a.image=r.slice(8),Z(a,e),new ce(i)):Su(r.replace("path://",""),i,e,"center")}function Y2(r,t,e,i,a){for(var n=0,o=a[a.length-1];n1)return!1;var g=Rf(v,p,f,h)/c;return!(g<0||g>1)}function Rf(r,t,e,i){return r*i-e*t}function X2(r){return r<=1e-6&&r>=-1e-6}function Sn(r){var t=r.itemTooltipOption,e=r.componentModel,i=r.itemName,a=V(t)?{formatter:t}:t,n=e.mainType,o=e.componentIndex,s={componentType:n,name:i,$vars:["name"]};s[n+"Index"]=o;var l=r.formatterParamsExtra;l&&w(at(l),function(f){G(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=nt(r.el);u.componentMainType=n,u.componentIndex=o,u.tooltipConfig={name:i,option:Z({content:i,formatterParams:s},a)}}function wg(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function wu(r,t){if(r)if(N(r))for(var e=0;e=0&&s.push(l)}),s}}function Mi(r,t){return Q(Q({},r,!0),t,!0)}var lP={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:". "}}}},uP={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}},Bl="ZH",Wc="EN",Eo=Wc,vl={},$c={},jS=ht.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return r.indexOf(Bl)>-1?Bl:Eo}():Eo;function Uc(r,t){r=r.toUpperCase(),$c[r]=new At(t),vl[r]=t}function fP(r){if(V(r)){var t=vl[r.toUpperCase()]||{};return r===Bl||r===Wc?X(t):Q(X(t),X(vl[Eo]),!1)}else return Q(X(r),X(vl[Eo]),!1)}function dv(r){return $c[r]}function hP(){return $c[Eo]}Uc(Wc,lP);Uc(Bl,uP);var Yc=1e3,Xc=Yc*60,yo=Xc*60,Ne=yo*24,Pg=Ne*365,ro={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}"},Ms="{yyyy}-{MM}-{dd}",Lg={year:"{yyyy}",month:"{yyyy}-{MM}",day:Ms,hour:Ms+" "+ro.hour,minute:Ms+" "+ro.minute,second:Ms+" "+ro.second,millisecond:ro.none},Of=["year","month","day","hour","minute","second","millisecond"],JS=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function ae(r,t){return r+="","0000".substr(0,t-r.length)+r}function an(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 vP(r){return r===an(r)}function cP(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function rs(r,t,e,i){var a=Ae(r),n=a[Zc(e)](),o=a[nn(e)]()+1,s=Math.floor((o-1)/3)+1,l=a[Au(e)](),u=a["get"+(e?"UTC":"")+"Day"](),f=a[ko(e)](),h=(f-1)%12+1,c=a[Mu(e)](),v=a[Du(e)](),p=a[Pu(e)](),d=i instanceof At?i:dv(i||jS)||hP(),g=d.getModel("time"),y=g.get("month"),m=g.get("monthAbbr"),_=g.get("dayOfWeek"),S=g.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,n+"").replace(/{yy}/g,ae(n%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[o-1]).replace(/{MMM}/g,m[o-1]).replace(/{MM}/g,ae(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,ae(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,ae(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,ae(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,ae(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,ae(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,ae(p,3)).replace(/{S}/g,p+"")}function pP(r,t,e,i,a){var n=null;if(V(e))n=e;else if(q(e))n=e(r.value,t,{level:r.level});else{var o=k({},ro);if(r.level>0)for(var s=0;s=0;--s)if(l[u]){n=l[u];break}n=n||o.none}if(N(n)){var h=r.level==null?0:r.level>=0?r.level:n.length+r.level;h=Math.min(h,n.length-1),n=n[h]}}return rs(new Date(r.value),n,a,i)}function QS(r,t){var e=Ae(r),i=e[nn(t)]()+1,a=e[Au(t)](),n=e[ko(t)](),o=e[Mu(t)](),s=e[Du(t)](),l=e[Pu(t)](),u=l===0,f=u&&s===0,h=f&&o===0,c=h&&n===0,v=c&&a===1,p=v&&i===1;return p?"year":v?"month":c?"day":h?"hour":f?"minute":u?"second":"millisecond"}function Ig(r,t,e){var i=yt(r)?Ae(r):r;switch(t=t||QS(r,e),t){case"year":return i[Zc(e)]();case"half-year":return i[nn(e)]()>=6?1:0;case"quarter":return Math.floor((i[nn(e)]()+1)/4);case"month":return i[nn(e)]();case"day":return i[Au(e)]();case"half-day":return i[ko(e)]()/24;case"hour":return i[ko(e)]();case"minute":return i[Mu(e)]();case"second":return i[Du(e)]();case"millisecond":return i[Pu(e)]()}}function Zc(r){return r?"getUTCFullYear":"getFullYear"}function nn(r){return r?"getUTCMonth":"getMonth"}function Au(r){return r?"getUTCDate":"getDate"}function ko(r){return r?"getUTCHours":"getHours"}function Mu(r){return r?"getUTCMinutes":"getMinutes"}function Du(r){return r?"getUTCSeconds":"getSeconds"}function Pu(r){return r?"getUTCMilliseconds":"getMilliseconds"}function dP(r){return r?"setUTCFullYear":"setFullYear"}function tx(r){return r?"setUTCMonth":"setMonth"}function ex(r){return r?"setUTCDate":"setDate"}function rx(r){return r?"setUTCHours":"setHours"}function ix(r){return r?"setUTCMinutes":"setMinutes"}function ax(r){return r?"setUTCSeconds":"setSeconds"}function nx(r){return r?"setUTCMilliseconds":"setMilliseconds"}function gP(r,t,e,i,a,n,o,s){var l=new dt({style:{text:r,font:t,align:e,verticalAlign:i,padding:a,rich:n,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function qc(r){if(!Tc(r))return V(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Kc(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,i){return i.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Ma=hc;function gv(r,t,e){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(f){return f&&ze(f)?f:"-"}function n(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?Ae(r):r;if(isNaN(+l)){if(s)return"-"}else return rs(l,i,e)}if(t==="ordinal")return Sl(r)?a(r):yt(r)&&n(r)?r+"":"-";var u=$r(r);return n(u)?qc(u):Sl(r)?a(r):typeof r=="boolean"?r+"":"-"}var Rg=["a","b","c","d","e","f","g"],Bf=function(r,t){return"{"+r+(t==null?"":t)+"}"};function jc(r,t,e){N(t)||(t=[t]);var i=t.length;if(!i)return"";for(var a=t[0].$vars||[],n=0;n':'';var o=e.markerId||"markerX";return{renderMode:n,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function mP(r,t,e){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd yyyy`);var i=Ae(t),a=e?"getUTC":"get",n=i[a+"FullYear"](),o=i[a+"Month"]()+1,s=i[a+"Date"](),l=i[a+"Hours"](),u=i[a+"Minutes"](),f=i[a+"Seconds"](),h=i[a+"Milliseconds"]();return r=r.replace("MM",ae(o,2)).replace("M",o).replace("yyyy",n).replace("yy",ae(n%100+"",2)).replace("dd",ae(s,2)).replace("d",s).replace("hh",ae(l,2)).replace("h",l).replace("mm",ae(u,2)).replace("m",u).replace("ss",ae(f,2)).replace("s",f).replace("SSS",ae(h,3)),r}function _P(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function xa(r,t){return t=t||"transparent",V(r)?r:U(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function Eg(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var cl=w,sx=["left","right","top","bottom","width","height"],la=[["width","left","right"],["height","top","bottom"]];function Jc(r,t,e,i,a){var n=0,o=0;i==null&&(i=1/0),a==null&&(a=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),h=t.childAt(u+1),c=h&&h.getBoundingRect(),v,p;if(r==="horizontal"){var d=f.width+(c?-c.x+f.x:0);v=n+d,v>i||l.newline?(n=0,v=d,o+=s+e,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?(n+=s+e,o=0,p=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=n,l.y=o,l.markRedraw(),r==="horizontal"?n=v+e:o=p+e)})}var da=Jc;vt(Jc,"vertical");vt(Jc,"horizontal");function KG(r,t,e){var i=t.width,a=t.height,n=K(r.left,i),o=K(r.top,a),s=K(r.right,i),l=K(r.bottom,a);return(isNaN(n)||isNaN(parseFloat(r.left)))&&(n=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=i),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=a),e=Ma(e||0),{width:Math.max(s-n-e[1]-e[3],0),height:Math.max(l-o-e[0]-e[2],0)}}function ve(r,t,e){e=Ma(e||0);var i=t.width,a=t.height,n=K(r.left,i),o=K(r.top,a),s=K(r.right,i),l=K(r.bottom,a),u=K(r.width,i),f=K(r.height,a),h=e[2]+e[0],c=e[1]+e[3],v=r.aspect;switch(isNaN(u)&&(u=i-s-c-n),isNaN(f)&&(f=a-l-h-o),v!=null&&(isNaN(u)&&isNaN(f)&&(v>i/a?u=i*.8:f=a*.8),isNaN(u)&&(u=v*f),isNaN(f)&&(f=u/v)),isNaN(n)&&(n=i-s-u-c),isNaN(o)&&(o=a-l-f-h),r.left||r.right){case"center":n=i/2-u/2-e[3];break;case"right":n=i-u-c;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-f/2-e[0];break;case"bottom":o=a-f-h;break}n=n||0,o=o||0,isNaN(u)&&(u=i-c-n-(s||0)),isNaN(f)&&(f=a-h-o-(l||0));var p=new st(n+e[3],o+e[0],u,f);return p.margin=e,p}function Qc(r,t,e,i,a,n){var o=!a||!a.hv||a.hv[0],s=!a||!a.hv||a.hv[1],l=a&&a.boundingMode||"all";if(n=n||r,n.x=r.x,n.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new st(0,0,+t.width||0,+t.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var f=r.getLocalTransform();u=u.clone(),u.applyTransform(f)}var h=ve(Z({width:u.width,height:u.height},t),e,i),c=o?h.x-u.x:0,v=s?h.y-u.y:0;return l==="raw"?(n.x=c,n.y=v):(n.x+=c,n.y+=v),n===r&&r.markRedraw(),!0}function SP(r,t){return r[la[t][0]]!=null||r[la[t][1]]!=null&&r[la[t][2]]!=null}function Oo(r){var t=r.layoutMode||r.constructor.layoutMode;return U(t)?t:t?{type:t}:null}function bi(r,t,e){var i=e&&e.ignoreSize;!N(i)&&(i=[i,i]);var a=o(la[0],0),n=o(la[1],1);u(la[0],r,a),u(la[1],r,n);function o(f,h){var c={},v=0,p={},d=0,g=2;if(cl(f,function(_){p[_]=r[_]}),cl(f,function(_){s(t,_)&&(c[_]=p[_]=t[_]),l(c,_)&&v++,l(p,_)&&d++}),i[h])return l(t,f[1])?p[f[2]]=null:l(t,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=Q(s,a[l],!0);i.defaultOption=s}return i.defaultOption},t.prototype.getReferringComponents=function(e,i){var a=e+"Index",n=e+"Id";return Jo(this.ecModel,e,{index:this.get(a,!0),id:this.get(n,!0)},i)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(At);tS(wn,At);hu(wn);oP(wn);sP(wn,bP);function bP(r){var t=[];return w(wn.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=z(t,function(e){return br(e).main}),r!=="dataset"&&ot(t,"dataset")<=0&&t.unshift("dataset"),t}var ft=wn,ux="";typeof navigator!="undefined"&&(ux=navigator.platform||"");var Va="rgba(0, 0, 0, 0.2)",wP={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Va,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Va,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Va,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Va,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Va,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Va,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:ux.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},fx=$(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),$e="original",be="arrayRows",sr="objectRows",Pr="keyedColumns",mi="typedArray",hx="unknown",Fr="column",Tn="row",$t={Must:1,Might:2,Not:3},vx=St();function TP(r){vx(r).datasetMap=$()}function CP(r,t,e){var i={},a=tp(t);if(!a||!r)return i;var n=[],o=[],s=t.ecModel,l=vx(s).datasetMap,u=a.uid+"_"+e.seriesLayoutBy,f,h;r=r.slice(),w(r,function(d,g){var y=U(d)?d:r[g]={name:d};y.type==="ordinal"&&f==null&&(f=g,h=p(y)),i[y.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});w(r,function(d,g){var y=d.name,m=p(d);if(f==null){var _=c.valueWayDim;v(i[y],_,m),v(o,_,m),c.valueWayDim+=m}else if(f===g)v(i[y],0,m),v(n,0,m);else{var _=c.categoryWayDim;v(i[y],_,m),v(o,_,m),c.categoryWayDim+=m}});function v(d,g,y){for(var m=0;mt)return r[i];return r[e-1]}function gx(r,t,e,i,a,n,o){n=n||r;var s=t(n),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var f=o==null||!i?e:LP(i,o);if(f=f||e,!(!f||!f.length)){var h=f[l];return a&&(u[a]=h),s.paletteIdx=(l+1)%f.length,h}}function IP(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var Ds,En,Bg,Ng="\0_ec_inner",RP=1,yx=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,i,a,n,o,s){n=n||{},this.option=null,this._theme=new At(n),this._locale=new At(o),this._optionManager=s},t.prototype.setOption=function(e,i,a){var n=Fg(i);this._optionManager.setOption(e,a,n),this._resetOption(null,n)},t.prototype.resetOption=function(e,i){return this._resetOption(e,Fg(i))},t.prototype._resetOption=function(e,i){var a=!1,n=this._optionManager;if(!e||e==="recreate"){var o=n.mountOption(e==="recreate");!this.option||e==="recreate"?Bg(this,o):(this.restoreData(),this._mergeOption(o,i)),a=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=n.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,i))}if(!e||e==="recreate"||e==="media"){var l=n.getMediaOption(this);l.length&&w(l,function(u){a=!0,this._mergeOption(u,i)},this)}return a},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,i){var a=this.option,n=this._componentsMap,o=this._componentsCount,s=[],l=$(),u=i&&i.replaceMergeMainTypeMap;TP(this),w(e,function(h,c){h!=null&&(ft.hasClass(c)?c&&(s.push(c),l.set(c,!0)):a[c]=a[c]==null?X(h):Q(a[c],h,!0))}),u&&u.each(function(h,c){ft.hasClass(c)&&!l.get(c)&&(s.push(c),l.set(c,!0))}),ft.topologicalTravel(s,ft.getAllClassMainTypes(),f,this);function f(h){var c=DP(this,h,Mt(e[h])),v=n.get(h),p=v?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",d=q1(v,c,p);HM(d,h,ft),a[h]=null,n.set(h,null),o.set(h,0);var g=[],y=[],m=0,_;w(d,function(S,b){var x=S.existing,T=S.newOption;if(!T)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var C=h==="series",A=ft.getClass(h,S.keyInfo.subType,!C);if(!A)return;if(h==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===A)x.name=S.keyInfo.name,x.mergeOption(T,this),x.optionUpdated(T,!1);else{var D=k({componentIndex:b},S.keyInfo);x=new A(T,this,this,D),k(x,D),S.brandNew&&(x.__requireNewView=!0),x.init(T,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),y.push(x),m++):(g.push(void 0),y.push(void 0))},this),a[h]=g,n.set(h,y),o.set(h,m),h==="series"&&Ds(this)}this._seriesIndices||Ds(this)},t.prototype.getOption=function(){var e=X(this.option);return w(e,function(i,a){if(ft.hasClass(a)){for(var n=Mt(i),o=n.length,s=!1,l=o-1;l>=0;l--)n[l]&&!Do(n[l])?s=!0:(n[l]=null,!s&&o--);n.length=o,e[a]=n}}),delete e[Ng],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,i){var a=this._componentsMap.get(e);if(a){var n=a[i||0];if(n)return n;if(i==null){for(var o=0;o=t:e==="max"?r<=t:r===t}function WP(r,t){return r.join(",")===t.join(",")}var $P=VP,Xe=w,Bo=U,Gg=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function zf(r){var t=r&&r.itemStyle;if(!!t)for(var e=0,i=Gg.length;e=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=LM(c,m),d=m;break}}}return i[0]=c,i[1]=d,i})})}var Iu=function(){function r(t){this.data=t.data||(t.sourceFormat===Pr?{}:[]),this.sourceFormat=t.sourceFormat||hx,this.seriesLayoutBy=t.seriesLayoutBy||Fr,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var i=0;id&&(d=_)}v[0]=p,v[1]=d}},a=function(){return this._data?this._data.length/this._dimSize:0};Zg=(t={},t[be+"_"+Fr]={pure:!0,appendData:n},t[be+"_"+Tn]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[sr]={pure:!0,appendData:n},t[Pr]={pure:!0,appendData:function(o){var s=this._data;w(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},t[$e]={appendData:n},t[mi]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function n(o){for(var s=0;s=0&&(d=o.interpolatedValue[g])}return d!=null?d+"":""})}},r.prototype.getRawValue=function(t,e){return vn(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,i){},r}();function Jg(r){var t,e;return U(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function mo(r){return new sL(r)}var sL=function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,i=t&&t.skip;if(this._dirty&&e){var a=this.context;a.data=a.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var n;this._plan&&!i&&(n=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(n="reset");function f(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||n==="reset")&&(this._dirty=!1,h=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,p=Math.min(c!=null?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(h||v1&&i>0?s:o}};return n;function o(){return t=r?null:lt},gte:function(r,t){return r>=t}},uL=function(){function r(t,e){if(!yt(e)){var i="";se(i)}this._opFn=Lx[t],this._rvalFloat=$r(e)}return r.prototype.evaluate=function(t){return yt(t)?this._opFn(t,this._rvalFloat):this._opFn($r(t),this._rvalFloat)},r}(),fL=function(){function r(t,e){var i=t==="desc";this._resultLT=i?1:-1,e==null&&(e=i?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var i=yt(t)?t:$r(t),a=yt(e)?e:$r(e),n=isNaN(i),o=isNaN(a);if(n&&(i=this._incomparable),o&&(a=this._incomparable),n&&o){var s=V(t),l=V(e);s&&(i=l?t:0),l&&(a=s?e:0)}return ia?-this._resultLT:0},r}(),hL=function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=$r(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var i=typeof t;i!==this._rvalTypeof&&(i==="number"||this._rvalTypeof==="number")&&(e=$r(t)===this._rvalFloat)}return this._isEQ?e:!e},r}();function JG(r,t){return r==="eq"||r==="ne"?new hL(r==="eq",t):G(Lx,r)?new uL(r,t):null}var vL=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return pl(t,e)},r}();function cL(r,t){var e=new vL,i=r.data,a=e.sourceFormat=r.sourceFormat,n=r.startIndex,o="";r.seriesLayoutBy!==Fr&&se(o);var s=[],l={},u=r.dimensionsDefine;if(u)w(u,function(d,g){var y=d.name,m={index:g,name:y,displayName:d.displayName};if(s.push(m),y!=null){var _="";G(l,y)&&se(_),l[y]=m}});else for(var f=0;f65535?xL:bL}function Fa(){return[1/0,-1/0]}function wL(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function ey(r,t,e,i,a){var n=Ex[e||"float"];if(a){var o=r[t],s=o&&o.length;if(s!==i){for(var l=new n(i),u=0;ug[1]&&(g[1]=d)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,i){for(var a=this._provider,n=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=z(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=g)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(i!=null&&it)n=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(t,e,i){var a=this._chunks,n=a[t],o=[];if(!n)return o;i==null&&(i=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 t,e=this._indices;if(e){var i=e.constructor,a=this._count;if(i===Array){t=new i(a);for(var n=0;n=h&&m<=c||isNaN(m))&&(l[u++]=d),d++}p=!0}else if(n===2){for(var g=v[a[0]],_=v[a[1]],S=t[a[1]][0],b=t[a[1]][1],y=0;y=h&&m<=c||isNaN(m))&&(x>=S&&x<=b||isNaN(x))&&(l[u++]=d),d++}p=!0}}if(!p)if(n===1)for(var y=0;y=h&&m<=c||isNaN(m))&&(l[u++]=T)}else for(var y=0;yt[D][1])&&(C=!1)}C&&(l[u++]=e.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var i=this.clone([t],!0),a=i._chunks,n=a[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,h,c,v=new(On(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 n._count=v,n._indices=c,n._updateGetRawIdx(),n},r.prototype.each=function(t,e){if(!!this._count)for(var i=t.length,a=this._chunks,n=0,o=this.count();nl&&(l=h)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var i=[],a=this._chunks,n=0;n=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function t(e,i,a,n){return pl(e[n],this._dimensions[n])}Gf={arrayRows:t,objectRows:function(e,i,a,n){return pl(e[i],this._dimensions[n])},keyedColumns:t,original:function(e,i,a,n){var o=e&&(e.value==null?e:e.value);return pl(o instanceof Array?o[n]:o,this._dimensions[n])},typedArray:function(e,i,a,n){return e[n]}}}(),r}(),_v=TL,CL=function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,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 t=this._sourceHost,e=this._getUpstreamSourceManagers(),i=!!e.length,a,n;if(Ps(t)){var o=t,s=void 0,l=void 0,u=void 0;if(i){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,n=[f._getVersionSign()]}else s=o.get("data",!0),l=xe(s)?mi:$e,n=[];var h=this._getSourceMetaRawOption()||{},c=u&&u.metaRawOption||{},v=rt(h.seriesLayoutBy,c.seriesLayoutBy)||null,p=rt(h.sourceHeader,c.sourceHeader),d=rt(h.dimensions,c.dimensions),g=v!==c.seriesLayoutBy||!!p!=!!c.sourceHeader||d;a=g?[mv(s,{seriesLayoutBy:v,sourceHeader:p,dimensions:d},l)]:[]}else{var y=t;if(i){var m=this._applyTransform(e);a=m.sourceList,n=m.upstreamSignList}else{var _=y.get("source",!0);a=[mv(_,this._getSourceMetaRawOption(),null)],n=[]}}this._setLocalSource(a,n)},r.prototype._applyTransform=function(t){var e=this._sourceHost,i=e.get("transform",!0),a=e.get("fromTransformResult",!0);if(a!=null){var n="";t.length!==1&&ry(n)}var o,s=[],l=[];return w(t,function(u){u.prepareSource();var f=u.getSource(a||0),h="";a!=null&&!f&&ry(h),s.push(f),l.push(u._getVersionSign())}),i?o=_L(i,s,{datasetIndex:e.componentIndex}):a!=null&&(o=[tL(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e1||e>0&&!r.noHeader;return w(r.blocks,function(a){var n=Nx(a);n>=t&&(t=n+ +(i&&(!n||Sv(a)&&!a.noHeader)))}),t}return 0}function DL(r,t,e,i){var a=t.noHeader,n=LL(Nx(t)),o=[],s=t.blocks||[];he(!s||N(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(G(u,l)){var f=new fL(u[l],null);s.sort(function(p,d){return f.evaluate(p.sortParam,d.sortParam)})}else l==="seriesDesc"&&s.reverse()}w(s,function(p,d){var g=t.valueFormatter,y=Bx(p)(g?k(k({},r),{valueFormatter:g}):r,p,d>0?n.html:0,i);y!=null&&o.push(y)});var h=r.renderMode==="richText"?o.join(n.richText):xv(o.join(""),a?e:n.html);if(a)return h;var c=gv(t.header,"ordinal",r.useUTC),v=Ox(i,r.renderMode).nameStyle;return r.renderMode==="richText"?zx(r,c,v)+n.richText+h:xv('
'+oe(c)+"
"+h,e)}function PL(r,t,e,i){var a=r.renderMode,n=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=N(S)?S:[S],z(S,function(b,x){return gv(b,N(v)?v[x]:v,u)})};if(!(n&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",a),c=n?"":gv(l,"ordinal",u),v=t.valueType,p=o?[]:f(t.value),d=!s||!n,g=!s&&n,y=Ox(i,a),m=y.nameStyle,_=y.valueStyle;return a==="richText"?(s?"":h)+(n?"":zx(r,c,m))+(o?"":EL(r,p,d,g,_)):xv((s?"":h)+(n?"":IL(c,!s,m))+(o?"":RL(p,d,g,_)),e)}}function iy(r,t,e,i,a,n){if(!!r){var o=Bx(r),s={useUTC:a,renderMode:e,orderMode:i,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,n)}}function LL(r){return{html:AL[r],richText:ML[r]}}function xv(r,t){var e='
',i="margin: "+t+"px 0 0";return'
'+r+e+"
"}function IL(r,t,e){var i=t?"margin-left:2px":"";return''+oe(r)+""}function RL(r,t,e,i){var a=e?"10px":"20px",n=t?"float:right;margin-left:"+a:"";return r=N(r)?r:[r],''+z(r,function(o){return oe(o)}).join("  ")+""}function zx(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function EL(r,t,e,i,a){var n=[a],o=i?10:20;return e&&n.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(N(t)?t.join(" "):t,n)}function Vx(r,t){var e=r.getData().getItemVisual(t,"style"),i=e[r.visualDrawType];return xa(i)}function Fx(r,t){var e=r.get("padding");return e!=null?e:t==="richText"?[8,10]:10}var Hf=function(){function r(){this.richTextStyles={},this._nextStyleNameId=U1()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,i){var a=i==="richText"?this._generateStyleName():null,n=ox({color:e,type:t,renderMode:i,markerId:a});return V(n)?n:(this.richTextStyles[a]=n.style,n.content)},r.prototype.wrapRichTextStyle=function(t,e){var i={};N(e)?w(e,function(n){return k(i,n)}):k(i,e);var a=this._generateStyleName();return this.richTextStyles[a]=i,"{"+a+"|"+t+"}"},r}();function kL(r){var t=r.series,e=r.dataIndex,i=r.multipleSeries,a=t.getData(),n=a.mapDimensionsAll("defaultedTooltip"),o=n.length,s=t.getRawValue(e),l=N(s),u=Vx(t,e),f,h,c,v;if(o>1||l&&!o){var p=OL(s,t,e,n,u);f=p.inlineValues,h=p.inlineValueTypes,c=p.blocks,v=p.inlineValues[0]}else if(o){var d=a.getDimensionInfo(n[0]);v=f=vn(a,e,n[0]),h=d.type}else v=f=l?s[0]:s;var g=Cc(t),y=g&&t.name||"",m=a.getName(e),_=i?y:m;return Ar("section",{header:y,noHeader:i||!g,sortParam:v,blocks:[Ar("nameValue",{markerType:"item",markerColor:u,name:_,noName:!ze(_),value:f,valueType:h})].concat(c||[])})}function OL(r,t,e,i,a){var n=t.getData(),o=Ve(r,function(h,c,v){var p=n.getDimensionInfo(v);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];i.length?w(i,function(h){f(vn(n,e,h),h)}):w(r,f);function f(h,c){var v=n.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?u.push(Ar("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 ei=St();function Ls(r,t){return r.getName(t)||r.getId(t)}var BL="__universalTransitionEnabled",Eu=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,i,a){this.seriesIndex=this.componentIndex,this.dataTask=mo({count:zL,reset:VL}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,a);var n=ei(this).sourceManager=new CL(this);n.prepareSource();var o=this.getInitialData(e,a);ny(o,this),this.dataTask.context.data=o,ei(this).dataBeforeProcessed=o,ay(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,i){var a=Oo(this),n=a?bn(e):{},o=this.subType;ft.hasClass(o)&&(o+="Series"),Q(e,i.getTheme().get(this.subType)),Q(e,this.getDefaultOption()),Pl(e,"label",["show"]),this.fillDataTextStyle(e.data),a&&bi(e,n,a)},t.prototype.mergeOption=function(e,i){e=Q(this.option,e,!0),this.fillDataTextStyle(e.data);var a=Oo(this);a&&bi(this.option,e,a);var n=ei(this).sourceManager;n.dirty(),n.prepareSource();var o=this.getInitialData(e,i);ny(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,ei(this).dataBeforeProcessed=o,ay(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!xe(e))for(var i=["show"],a=0;athis.getShallow("animationThreshold")&&(i=!1),!!i},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,i,a){var n=this.ecModel,o=ep.prototype.getColorFromPalette.call(this,e,i,a);return o||(o=n.getColorFromPalette(e,i,a)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,i){this._innerSelect(this.getData(i),e)},t.prototype.unselect=function(e,i){var a=this.option.selectedMap;if(!!a){var n=this.option.selectedMode,o=this.getData(i);if(n==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&a.push(o)}return a},t.prototype.isSelected=function(e,i){var a=this.option.selectedMap;if(!a)return!1;var n=this.getData(i);return(a==="all"||a[Ls(n,e)])&&!n.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[BL])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,i){var a,n,o=this.option,s=o.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){U(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(e,i)}},t.registerClass=function(e){return ft.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(ft);Xt(Eu,Px);Xt(Eu,ep);tS(Eu,ft);function ay(r){var t=r.name;Cc(r)||(r.name=NL(r)||t)}function NL(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),i=[];return w(e,function(a){var n=t.getDimensionInfo(a);n.displayName&&i.push(n.displayName)}),i.join(" ")}function zL(r){return r.model.getRawData().count()}function VL(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),FL}function FL(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function ny(r,t){w(n1(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,vt(GL,t))})}function GL(r,t){var e=bv(r);return e&&e.setOutputEnd((t||this).count()),t}function bv(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var i=e.currentTask;if(i){var a=i.agentStubMap;a&&(i=a.get(r.uid))}return i}}var we=Eu,op=function(){function r(){this.group=new it,this.uid=xn("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,a){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,a){},r.prototype.updateLayout=function(t,e,i,a){},r.prototype.updateVisual=function(t,e,i,a){},r.prototype.toggleBlurSeries=function(t,e,i){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();Mc(op);hu(op);var Pt=op;function sp(){var r=St();return function(t){var e=r(t),i=t.pipelineContext,a=!!e.large,n=!!e.progressiveRender,o=e.large=!!(i&&i.large),s=e.progressiveRender=!!(i&&i.progressiveRender);return(a!==o||n!==s)&&"reset"}}var Gx=St(),HL=sp(),lp=function(){function r(){this.group=new it,this.uid=xn("viewChart"),this.renderTask=mo({plan:WL,reset:$L}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,a){},r.prototype.highlight=function(t,e,i,a){var n=t.getData(a&&a.dataType);!n||sy(n,a,"emphasis")},r.prototype.downplay=function(t,e,i,a){var n=t.getData(a&&a.dataType);!n||sy(n,a,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,a){this.render(t,e,i,a)},r.prototype.updateLayout=function(t,e,i,a){this.render(t,e,i,a)},r.prototype.updateVisual=function(t,e,i,a){this.render(t,e,i,a)},r.prototype.eachRendered=function(t){wu(this.group,t)},r.markUpdateMethod=function(t,e){Gx(t).updateMethod=e},r.protoInitialize=function(){var t=r.prototype;t.type="chart"}(),r}();function oy(r,t,e){r&&fv(r)&&(t==="emphasis"?un:fn)(r,e)}function sy(r,t,e){var i=Sa(r,t),a=t&&t.highlightKey!=null?h2(t.highlightKey):null;i!=null?w(Mt(i),function(n){oy(r.getItemGraphicEl(n),e,a)}):r.eachItemGraphicEl(function(n){oy(n,e,a)})}Mc(lp);hu(lp);function WL(r){return HL(r.model)}function $L(r){var t=r.model,e=r.ecModel,i=r.api,a=r.payload,n=t.pipelineContext.progressiveRender,o=r.view,s=a&&Gx(a).updateMethod,l=n?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,i,a),UL[l]}var UL={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Ut=lp,Nl="\0__throttleOriginMethod",ly="\0__throttleRate",uy="\0__throttleType";function ku(r,t,e){var i,a=0,n=0,o=null,s,l,u,f;t=t||0;function h(){n=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=i};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){f=v},c}function is(r,t,e,i){var a=r[t];if(!!a){var n=a[Nl]||a,o=a[uy],s=a[ly];if(s!==e||o!==i){if(e==null||!i)return r[t]=n;a=r[t]=ku(n,e,i==="debounce"),a[Nl]=n,a[uy]=i,a[ly]=e}return a}}function No(r,t){var e=r[t];e&&e[Nl]&&(e.clear&&e.clear(),r[t]=e[Nl])}var fy=St(),hy={itemStyle:ln(KS,!0),lineStyle:ln(qS,!0)},YL={lineStyle:"stroke",itemStyle:"fill"};function Hx(r,t){var e=r.visualStyleMapper||hy[t];return e||(console.warn("Unknown style type '"+t+"'."),hy.itemStyle)}function Wx(r,t){var e=r.visualDrawType||YL[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var XL={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",a=r.getModel(i),n=Hx(r,i),o=n(a),s=a.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=Wx(r,i),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,t.getSeriesCount());o[l]||(o[l]=c,e.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(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(v,p){var d=r.getDataParams(p),g=k({},o);g[l]=f(d),v.setItemVisual(p,"style",g)}}}},Bn=new At,ZL={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",a=Hx(r,i),n=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[i]){Bn.option=l[i];var u=a(Bn),f=o.ensureUniqueItemVisual(s,"style");k(f,u),Bn.option.decal&&(o.setItemVisual(s,"decal",Bn.option.decal),Bn.option.decal.dirty=!0),n in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},qL={performRawSeries:!0,overallReset:function(r){var t=$();r.eachSeries(function(e){var i=e.getColorBy();if(!e.isColorBySeries()){var a=e.type+"-"+i,n=t.get(a);n||(n={},t.set(a,n)),fy(e).scope=n}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var i=e.getRawData(),a={},n=e.getData(),o=fy(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=Wx(e,s);n.each(function(u){var f=n.getRawIndex(u);a[f]=u}),i.each(function(u){var f=a[u],h=n.getItemVisual(f,"colorFromPalette");if(h){var c=n.ensureUniqueItemVisual(f,"style"),v=i.getName(u)||u+"",p=i.count();c[l]=e.getColorFromPalette(v,o,p)}})}})}},Is=Math.PI;function KL(r,t){t=t||{},Z(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var e=new it,i=new pt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(i);var a=new dt({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),n=new pt({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(n);var o;return t.showSpinner&&(o=new mu({shape:{startAngle:-Is/2,endAngle:-Is/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Is*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Is*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=a.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),n.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var jL=function(){function r(t,e,i,a){this._stageTaskMap=$(),this.ecInstance=t,this.api=e,i=this._dataProcessorHandlers=i.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=i.concat(a)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(i){var a=i.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(t,e){if(!!t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),a=i.context,n=!e&&i.progressiveEnabled&&(!a||a.progressiveRender)&&t.__idxInPipeline>i.blockIndex,o=n?i.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(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),a=t.getData(),n=a.count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,s=t.get("large")&&n>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?n:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,i=e._pipelineMap=$();t.eachSeries(function(a){var n=a.getProgressive(),o=a.uid;i.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:n&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),e._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),i=this.api;w(this._allHandlers,function(a){var n=t.get(a.uid)||t.set(a.uid,{}),o="";he(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,n,e,i),a.overallReset&&this._createOverallStageTask(a,n,e,i)},this)},r.prototype.prepareView=function(t,e,i,a){var n=t.renderTask,o=n.context;o.model=e,o.ecModel=i,o.api=a,n.__block=!t.incrementalPrepareRender,this._pipe(e,n)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,i){this._performStageTasks(this._visualHandlers,t,e,i)},r.prototype._performStageTasks=function(t,e,i,a){a=a||{};var n=!1,o=this;w(t,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,i);var d=o.getPerformArgs(c,a.block);p.each(function(g){g.perform(d)}),c.perform(d)&&(n=!0)}else h&&h.each(function(g,y){s(a,g)&&g.dirty();var m=o.getPerformArgs(g,a.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,i),g.perform(m)&&(n=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=n||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(i){e=i.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,i,a){var n=this,o=e.seriesTaskMap,s=e.seriesTaskMap=$(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?i.eachRawSeries(f):l?i.eachRawSeriesByType(l,f):u&&u(i,a).each(f);function f(h){var c=h.uid,v=s.set(c,o&&o.get(c)||mo({plan:rI,reset:iI,count:nI}));v.context={model:h,ecModel:i,api:a,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:n},n._pipe(h,v)}},r.prototype._createOverallStageTask=function(t,e,i,a){var n=this,o=e.overallTask=e.overallTask||mo({reset:JL});o.context={ecModel:i,api:a,overallReset:t.overallReset,scheduler:n};var s=o.agentStubMap,l=o.agentStubMap=$(),u=t.seriesType,f=t.getTargetSeries,h=!0,c=!1,v="";he(!t.createOnAllSeries,v),u?i.eachRawSeriesByType(u,p):f?f(i,a).each(p):(h=!1,w(i.getSeries(),p));function p(d){var g=d.uid,y=l.set(g,s&&s.get(g)||(c=!0,mo({reset:QL,onDirty:eI})));y.context={model:d,overallProgress:h},y.agent=o,y.__block=h,n._pipe(d,y)}c&&o.dirty()},r.prototype._pipe=function(t,e){var i=t.uid,a=this._pipelineMap.get(i);!a.head&&(a.head=e),a.tail&&a.tail.pipe(e),a.tail=e,e.__idxInPipeline=a.count++,e.__pipeline=a},r.wrapStageHandler=function(t,e){return q(t)&&(t={overallReset:t,seriesType:oI(t)}),t.uid=xn("stageHandler"),e&&(t.visualType=e),t},r}();function JL(r){r.overallReset(r.ecModel,r.api,r.payload)}function QL(r){return r.overallProgress&&tI}function tI(){this.agent.dirty(),this.getDownstream().dirty()}function eI(){this.agent&&this.agent.dirty()}function rI(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function iI(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Mt(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?z(t,function(e,i){return $x(i)}):aI}var aI=$x(0);function $x(r){return function(t,e){var i=e.data,a=e.resetDefines[r];if(a&&a.dataEach)for(var n=t.start;n0&&v===u.length-c.length){var p=u.slice(0,v);p!=="data"&&(e.mainType=p,e[c.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(i[u]=l,f=!0),f||(a[u]=l)})}return{cptQuery:e,dataQuery:i,otherQuery:a}},r.prototype.filter=function(t,e){var i=this.eventInfo;if(!i)return!0;var a=i.targetEl,n=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.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,n,"name")&&f(u,n,"dataIndex")&&f(u,n,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,a,n));function f(h,c,v,p){return h[v]==null||c[p||v]===h[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),wv=["symbol","symbolSize","symbolRotate","symbolOffset"],dy=wv.concat(["symbolKeepAspect"]),fI={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var i={},a={},n=!1,o=0;o=0&&fa(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function gy(r,t,e){for(var i=t.type==="radial"?AI(r,t,e):CI(r,t,e),a=t.colorStops,n=0;n0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:yt(r)?[r]:N(r)?r:null}function hp(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&DI(t.lineDash,t.lineWidth),i=t.lineDashOffset;if(e){var a=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;a&&a!==1&&(e=z(e,function(n){return n/a}),i/=a)}return[e,i]}var PI=new Yr(!0);function Fl(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function my(r){return typeof r=="string"&&r!=="none"}function Gl(r){var t=r.fill;return t!=null&&t!=="none"}function _y(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function Sy(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function xy(r,t,e){var i=Dc(t.image,t.__image,e);if(vu(i)){var a=r.createPattern(i,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var n=new DOMMatrix;n.translateSelf(t.x||0,t.y||0),n.rotateSelf(0,0,(t.rotation||0)*so),n.scaleSelf(t.scaleX||1,t.scaleY||1),a.setTransform(n)}return a}}function LI(r,t,e,i){var a,n=Fl(e),o=Gl(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||PI,h=t.__dirty;if(!i){var c=e.fill,v=e.stroke,p=o&&!!c.colorStops,d=n&&!!v.colorStops,g=o&&!!c.image,y=n&&!!v.image,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0;(p||d)&&(x=t.getBoundingRect()),p&&(m=h?gy(r,c,x):t.__canvasFillGradient,t.__canvasFillGradient=m),d&&(_=h?gy(r,v,x):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(S=h||!t.__canvasFillPattern?xy(r,c,t):t.__canvasFillPattern,t.__canvasFillPattern=S),y&&(b=h||!t.__canvasStrokePattern?xy(r,v,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),p?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),d?r.strokeStyle=_:y&&(b?r.strokeStyle=b:n=!1)}var T=t.getGlobalScale();f.setScale(T[0],T[1],t.segmentIgnoreThreshold);var C,A;r.setLineDash&&e.lineDash&&(a=hp(t),C=a[0],A=a[1]);var D=!0;(u||h&Za)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),D=!1),f.reset(),t.buildPath(f,t.shape,i),f.toStatic(),t.pathUpdated()),D&&f.rebuildPath(r,l?s:1),C&&(r.setLineDash(C),r.lineDashOffset=A),i||(e.strokeFirst?(n&&Sy(r,e),o&&_y(r,e)):(o&&_y(r,e),n&&Sy(r,e))),C&&r.setLineDash([])}function II(r,t,e){var i=t.__image=Dc(e.image,t.__image,t,t.onload);if(!(!i||!vu(i))){var a=e.x||0,n=e.y||0,o=t.getWidth(),s=t.getHeight(),l=i.width/i.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=i.width,s=i.height),e.sWidth&&e.sHeight){var u=e.sx||0,f=e.sy||0;r.drawImage(i,u,f,e.sWidth,e.sHeight,a,n,o,s)}else if(e.sx&&e.sy){var u=e.sx,f=e.sy,h=o-u,c=s-f;r.drawImage(i,u,f,h,c,a,n,o,s)}else r.drawImage(i,a,n,o,s)}}function RI(r,t,e){var i,a=e.text;if(a!=null&&(a+=""),a){r.font=e.font||_i,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var n=void 0,o=void 0;r.setLineDash&&e.lineDash&&(i=hp(t),n=i[0],o=i[1]),n&&(r.setLineDash(n),r.lineDashOffset=o),e.strokeFirst?(Fl(e)&&r.strokeText(a,e.x,e.y),Gl(e)&&r.fillText(a,e.x,e.y)):(Gl(e)&&r.fillText(a,e.x,e.y),Fl(e)&&r.strokeText(a,e.x,e.y)),n&&r.setLineDash([])}}var by=["shadowBlur","shadowOffsetX","shadowOffsetY"],wy=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Jx(r,t,e,i,a){var n=!1;if(!i&&(e=e||{},t===e))return!1;if(i||t.opacity!==e.opacity){Se(r,a),n=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?ca.opacity:o}(i||t.blend!==e.blend)&&(n||(Se(r,a),n=!0),r.globalCompositeOperation=t.blend||ca.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,i,a){if(!this[Kt]){if(this._disposed){this.id;return}var n,o,s;if(U(i)&&(a=i.lazyUpdate,n=i.silent,o=i.replaceMerge,s=i.transition,i=i.notMerge),this[Kt]=!0,!this._model||i){var l=new $P(this._api),u=this._theme,f=this._model=new mx;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},Av);var h={seriesTransition:s,optionChanged:!0};if(a)this[ye]={silent:n,updateParams:h},this[Kt]=!1,this.getZr().wakeUp();else{try{Ha(this),ri.update.call(this,null,h)}catch(c){throw this[ye]=null,this[Kt]=!1,c}this._ssr||this._zr.flush(),this[ye]=null,this[Kt]=!1,Nn.call(this,n),zn.call(this,n)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ht.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var i=this._zr.painter;return i.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(!!ht.svgSupported){var e=this._zr,i=e.storage.getDisplayList();return w(i,function(a){a.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var i=e.excludeComponents,a=this._model,n=[],o=this;w(i,function(l){a.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(n.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return w(n,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var i=e.type==="svg",a=this.group,n=Math.min,o=Math.max,s=1/0;if(Yl[a]){var l=s,u=s,f=-s,h=-s,c=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();w(ga,function(_,S){if(_.group===a){var b=i?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(X(e)),x=_.getDom().getBoundingClientRect();l=n(x.left,l),u=n(x.top,u),f=o(x.right,f),h=o(x.bottom,h),c.push({dom:b,left:x.left,top:x.top})}}),l*=v,u*=v,f*=v,h*=v;var p=f-l,d=h-u,g=Si.createCanvas(),y=rv(g,{renderer:i?"svg":"canvas"});if(y.resize({width:p,height:d}),i){var m="";return w(c,function(_){var S=_.left-l,b=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return e.connectedBackgroundColor&&y.add(new pt({shape:{x:0,y:0,width:p,height:d},style:{fill:e.connectedBackgroundColor}})),w(c,function(_){var S=new ce({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,i){return Xf(this,"convertToPixel",e,i)},t.prototype.convertFromPixel=function(e,i){return Xf(this,"convertFromPixel",e,i)},t.prototype.containPixel=function(e,i){if(this._disposed){this.id;return}var a=this._model,n,o=ho(a,e);return w(o,function(s,l){l.indexOf("Models")>=0&&w(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)n=n||!!f.containPoint(i);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(n=n||h.containPoint(i,u))}},this)},this),!!n},t.prototype.getVisual=function(e,i){var a=this._model,n=ho(a,e,{defaultMainType:"series"}),o=n.seriesModel,s=o.getData(),l=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?s.indexOfRawIndex(n.dataIndex):null;return l!=null?up(s,l,i):qx(s,i)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;w(aR,function(i){var a=function(n){var o=e.getModel(),s=n.target,l,u=i==="globalout";if(u?l={}:s&&ua(s,function(p){var d=nt(p);if(d&&d.dataIndex!=null){var g=d.dataModel||o.getSeriesByIndex(d.seriesIndex);return l=g&&g.getDataParams(d.dataIndex,d.dataType,s)||{},!0}else if(d.eventData)return l=k({},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&&e[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];l.event=n,l.type=i,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:c,view:v},e.trigger(i,l)}};a.zrEventfulCallAtLast=!0,e._zr.on(i,a,e)}),w(_o,function(i,a){e._messageCenter.on(a,function(n){this.trigger(a,n)},e)}),w(["selectchanged"],function(i){e._messageCenter.on(i,function(a){this.trigger(i,a)},e)}),vI(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&j1(this.getDom(),pp,"");var i=this,a=i._api,n=i._model;w(i._componentsViews,function(o){o.dispose(n,a)}),w(i._chartsViews,function(o){o.dispose(n,a)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete ga[i.id]},t.prototype.resize=function(e){if(!this[Kt]){if(this._disposed){this.id;return}this._zr.resize(e);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var a=i.resetOption("media"),n=e&&e.silent;this[ye]&&(n==null&&(n=this[ye].silent),a=!0,this[ye]=null),this[Kt]=!0;try{a&&Ha(this),ri.update.call(this,{type:"resize",animation:k({duration:0},e&&e.animation)})}catch(o){throw this[Kt]=!1,o}this[Kt]=!1,Nn.call(this,n),zn.call(this,n)}}},t.prototype.showLoading=function(e,i){if(this._disposed){this.id;return}if(U(e)&&(i=e,e=""),e=e||"default",this.hideLoading(),!!Mv[e]){var a=Mv[e](this._api,i),n=this._zr;this._loadingFX=a,n.add(a)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var i=k({},e);return i.type=_o[e.type],i},t.prototype.dispatchAction=function(e,i){if(this._disposed){this.id;return}if(U(i)||(i={silent:!!i}),!!$l[e.type]&&!!this._model){if(this[Kt]){this._pendingActions.push(e);return}var a=i.silent;qf.call(this,e,a);var n=i.flush;n?this._zr.flush():n!==!1&&ht.browser.weChat&&this._throttledZrFlush(),Nn.call(this,a),zn.call(this,a)}},t.prototype.updateLabelLayout=function(){je.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var i=e.seriesIndex,a=this.getModel(),n=a.getSeriesByIndex(i);n.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){Ha=function(h){var c=h._scheduler;c.restorePipelines(h._model),c.prepareStageTasks(),Yf(h,!0),Yf(h,!1),c.plan()},Yf=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")&&!ht.node&&!ht.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(go(y))return;if(y instanceof gt&&v2(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)}})}By=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){un(p,d),Me(h)},v.prototype.leaveEmphasis=function(p,d){fn(p,d),Me(h)},v.prototype.enterBlur=function(p){e2(p),Me(h)},v.prototype.leaveBlur=function(p){_S(p),Me(h)},v.prototype.enterSelect=function(p){SS(p),Me(h)},v.prototype.leaveSelect=function(p){xS(p),Me(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}(_x))(h)},db=function(h){function c(v,p){for(var d=0;d=0)){zy.push(e);var n=Xx.wrapStageHandler(e,a);n.__prio=t,n.__raw=e,r.push(n)}}function Sp(r,t){Mv[r]=t}function cR(r){j_({createCanvas:r})}function bb(r,t,e){var i=nb("registerMap");i&&i(r,t,e)}function pR(r){var t=nb("getMap");return t&&t(r)}var wb=mL;Di(vp,XL);Di(Bu,ZL);Di(Bu,qL);Di(vp,fI);Di(Bu,hI);Di(lb,FI);yp(xx);mp(XI,JP);Sp("default",KL);lr({type:pa,event:pa,update:pa},Gt);lr({type:fl,event:fl,update:fl},Gt);lr({type:vo,event:vo,update:vo},Gt);lr({type:hl,event:hl,update:hl},Gt);lr({type:co,event:co,update:co},Gt);gp("light",sI);gp("dark",lI);var dR={};function Vn(r){return r==null?0:r.length||1}function Vy(r){return r}var gR=function(){function r(t,e,i,a,n,o){this._old=t,this._new=e,this._oldKeyGetter=i||Vy,this._newKeyGetter=a||Vy,this.context=n,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,i={},a=new Array(t.length),n=new Array(e.length);this._initIndexMap(t,null,a,"_oldKeyGetter"),this._initIndexMap(e,i,n,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(f,o)}else u===1?(i[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(n,i)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,i={},a={},n=[],o=[];this._initIndexMap(t,i,n,"_oldKeyGetter"),this._initIndexMap(e,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 Fn=U,ii=z,TR=typeof Int32Array=="undefined"?Array:Int32Array,CR="e\0\0",Fy=-1,AR=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],MR=["_approximateExtent"],Gy,Bs,Gn,Hn,Jf,Ns,Qf,DR=function(){function r(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i,a=!1;Cb(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(a=!0,i=t),i=i||["x","y"];for(var n={},o=[],s={},l=!1,u={},f=0;f=e)){var i=this._store,a=i.getProvider();this._updateOrdinalMeta();var n=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===$e;if(l&&!a.pure)for(var u=[],f=t;f0},r.prototype.ensureUniqueItemVisual=function(t,e){var i=this._itemVisuals,a=i[t];a||(a=i[t]={});var n=a[e];return n==null&&(n=this.getVisual(e),N(n)?n=n.slice():Fn(n)&&(n=k({},n)),a[e]=n),n},r.prototype.setItemVisual=function(t,e,i){var a=this._itemVisuals[t]||{};this._itemVisuals[t]=a,Fn(e)?k(a,e):a[e]=i},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){Fn(t)?k(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?k(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var i=this.hostModel&&this.hostModel.seriesIndex;XD(i,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){w(this._graphicEls,function(i,a){i&&t&&t.call(e,i,a)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:ii(this.dimensions,this._getDimInfo,this),this.hostModel)),Jf(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var i=this[t];!q(i)||(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var a=i.apply(this,arguments);return e.apply(this,[a].concat(ou(arguments)))})},r.internalField=function(){Gy=function(t){var e=t._invertedIndicesMap;w(e,function(i,a){var n=t._dimInfos[a],o=n.ordinalMeta,s=t._store;if(o){i=e[a]=new TR(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),a[e]=l}}}(),r}(),zu=DR;function PR(r,t){return bp(r,t).dimensions}function bp(r,t){rp(r)||(r=ip(r)),t=t||{};var e=t.coordDimensions||[],i=t.dimensionsDefine||r.dimensionsDefine||[],a=$(),n=[],o=IR(r,e,i,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Db(o),l=i===r.dimensionsDefine,u=l?Mb(r):Ab(i),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var h=$(f),c=new Rx(o),v=0;v0&&(i.name=a+(n-1)),n++,t.set(a,n)}}function IR(r,t,e,i){var a=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,i||0);return w(t,function(n){var o;U(n)&&(o=n.dimsDef)&&(a=Math.max(a,o.length))}),a}function RR(r,t,e){if(e||t.hasKey(r)){for(var i=0;t.hasKey(r+i);)i++;r+=i}return t.set(r,!0),r}var ER=function(){function r(t){this.coordSysDims=[],this.axisMap=$(),this.categoryAxisMap=$(),this.coordSysName=t}return r}();function kR(r){var t=r.get("coordinateSystem"),e=new ER(t),i=OR[t];if(i)return i(r,e,e.axisMap,e.categoryAxisMap),e}var OR={cartesian2d:function(r,t,e,i){var a=r.getReferringComponents("xAxis",zt).models[0],n=r.getReferringComponents("yAxis",zt).models[0];t.coordSysDims=["x","y"],e.set("x",a),e.set("y",n),Wa(a)&&(i.set("x",a),t.firstCategoryDimIndex=0),Wa(n)&&(i.set("y",n),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,i){var a=r.getReferringComponents("singleAxis",zt).models[0];t.coordSysDims=["single"],e.set("single",a),Wa(a)&&(i.set("single",a),t.firstCategoryDimIndex=0)},polar:function(r,t,e,i){var a=r.getReferringComponents("polar",zt).models[0],n=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",n),e.set("angle",o),Wa(n)&&(i.set("radius",n),t.firstCategoryDimIndex=0),Wa(o)&&(i.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,i){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,i){var a=r.ecModel,n=a.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=n.dimensions.slice();w(n.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),f=o[l];e.set(f,u),Wa(u)&&(i.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function Wa(r){return r.get("type")==="category"}function Pb(r,t,e){e=e||{};var i=e.byIndex,a=e.stackedCoordDimension,n,o,s;BR(t)?n=t:(o=t.schema,n=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,h,c;if(w(n,function(m,_){V(m)&&(n[_]=m={name:m}),l&&!m.isExtraCoord&&(!i&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!a||a===m.coordDim)&&(f=m))}),f&&!i&&!u&&(i=!0),f){h="__\0ecstackresult_"+r.id,c="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=f.coordDim,p=f.type,d=0;w(n,function(m){m.coordDim===v&&d++});var g={name:h,coordDim:v,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length},y={name:c,coordDim:c,coordDimIndex:d+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(c,p),y.storeDimIndex=s.ensureCalculationDimension(h,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(n.push(g),n.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:c,stackResultDimension:h}}function BR(r){return!Cb(r.schema)}function wi(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function Lb(r,t){return wi(r,t)?r.getCalculationInfo("stackResultDimension"):t}function NR(r,t){var e=r.get("coordinateSystem"),i=Lu.get(e),a;return t&&t.coordSysDims&&(a=z(t.coordSysDims,function(n){var o={name:n},s=t.axisMap.get(n);if(s){var l=s.get("type");o.type=_R(l)}return o})),a||(a=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),a}function zR(r,t,e){var i,a;return e&&w(r,function(n,o){var s=n.coordDim,l=e.categoryAxisMap.get(s);l&&(i==null&&(i=o),n.ordinalMeta=l.getOrdinalMeta(),t&&(n.createInvertedIndices=!0)),n.otherDims.itemName!=null&&(a=!0)}),!a&&i!=null&&(r[i].otherDims.itemName=0),i}function as(r,t,e){e=e||{};var i=t.getSourceManager(),a,n=!1;r?(n=!0,a=ip(r)):(a=i.getSource(),n=a.sourceFormat===$e);var o=kR(t),s=NR(t,o),l=e.useEncodeDefaulter,u=q(l)?l:l?vt(CP,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!n},h=bp(a,f),c=zR(h.dimensions,e.createInvertedIndices,o),v=n?null:i.getSharedDataStore(h),p=Pb(t,{schema:h,store:v}),d=new zu(h,t);d.setCalculationInfo(p);var g=c!=null&&VR(a)?function(y,m,_,S){return S===c?_:this.defaultDimValueGetter(y,m,_,S)}:null;return d.hasItemOption=!1,d.initData(n?a:v,null,g),d}function VR(r){if(r.sourceFormat===$e){var t=FR(r.data||[]);return!N(mn(t))}}function FR(r){for(var t=0;te[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r}();hu(Ib);var jr=Ib,GR=0,HR=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++GR}return r.createByAxisModel=function(t){var e=t.option,i=e.data,a=i&&z(i,WR);return new r({categories:a,needCollect:!a,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,i=this._needCollect;if(!V(t)&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var a=this._getOrCreateMap();return e=a.get(t),e==null&&(i?(e=this.categories.length,this.categories[e]=t,a.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=$(this.categories))},r}();function WR(r){return U(r)&&r.value!=null?r.value:r+""}var Dv=HR;function Pv(r){return r.type==="interval"||r.type==="log"}function $R(r,t,e,i){var a={},n=r[1]-r[0],o=a.interval=wc(n/t,!0);e!=null&&oi&&(o=a.interval=i);var s=a.intervalPrecision=Rb(o),l=a.niceTickExtent=[Et(Math.ceil(r[0]/o)*o,s),Et(Math.floor(r[1]/o)*o,s)];return UR(l,r),a}function th(r){var t=Math.pow(10,fu(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Et(e*t)}function Rb(r){return xr(r)+2}function Hy(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function UR(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),Hy(r,0,t),Hy(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function Vu(r,t){return r>=t[0]&&r<=t[1]}function Fu(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function Gu(r,t){return r*(t[1]-t[0])+t[0]}var Eb=function(r){O(t,r);function t(e){var i=r.call(this,e)||this;i.type="ordinal";var a=i.getSetting("ordinalMeta");return a||(a=new Dv({})),N(a)&&(a=new Dv({categories:z(a,function(n){return U(n)?n.value:n})})),i._ordinalMeta=a,i._extent=i.getSetting("extent")||[0,a.categories.length-1],i}return t.prototype.parse=function(e){return e==null?NaN:V(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),Vu(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),Fu(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(Gu(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],i=this._extent,a=i[0];a<=i[1];)e.push({value:a}),a++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=e.ordinalNumbers,a=this._ordinalNumbersByTick=[],n=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,i.length);o=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(jr);jr.registerClass(Eb);var wp=Eb,Zi=Et,kb=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Vu(e,this._extent)},t.prototype.normalize=function(e){return Fu(e,this._extent)},t.prototype.scale=function(e){return Gu(e,this._extent)},t.prototype.setExtent=function(e,i){var a=this._extent;isNaN(e)||(a[0]=parseFloat(e)),isNaN(i)||(a[1]=parseFloat(i))},t.prototype.unionExtent=function(e){var i=this._extent;e[0]i[1]&&(i[1]=e[1]),this.setExtent(i[0],i[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=Rb(e)},t.prototype.getTicks=function(e){var i=this._interval,a=this._extent,n=this._niceExtent,o=this._intervalPrecision,s=[];if(!i)return s;var l=1e4;a[0]l)return[];var f=s.length?s[s.length-1].value:n[1];return a[1]>f&&(e?s.push({value:Zi(f+i,o)}):s.push({value:a[1]})),s},t.prototype.getMinorTicks=function(e){for(var i=this.getTicks(!0),a=[],n=this.getExtent(),o=1;on[0]&&v0&&(n=n===null?s:Math.min(n,s))}e[i]=n}}return e}function Nb(r){var t=XR(r),e=[];return w(r,function(i){var a=i.coordinateSystem,n=a.getBaseAxis(),o=n.getExtent(),s;if(n.type==="category")s=n.getBandWidth();else if(n.type==="value"||n.type==="time"){var l=n.dim+"_"+n.index,u=t[l],f=Math.abs(o[1]-o[0]),h=n.scale.getExtent(),c=Math.abs(h[1]-h[0]);s=u?f/c*u:f}else{var v=i.getData();s=Math.abs(o[1]-o[0])/v.count()}var p=K(i.get("barWidth"),s),d=K(i.get("barMaxWidth"),s),g=K(i.get("barMinWidth")||(Hb(i)?.5:1),s),y=i.get("barGap"),m=i.get("barCategoryGap");e.push({bandWidth:s,barWidth:p,barMaxWidth:d,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:Cp(n),stackId:Tp(i)})}),zb(e)}function zb(r){var t={};w(r,function(i,a){var n=i.axisKey,o=i.bandWidth,s=t[n]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[n]=s;var u=i.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=i.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=i.barMaxWidth;h&&(l[u].maxWidth=h);var c=i.barMinWidth;c&&(l[u].minWidth=c);var v=i.barGap;v!=null&&(s.gap=v);var p=i.barCategoryGap;p!=null&&(s.categoryGap=p)});var e={};return w(t,function(i,a){e[a]={};var n=i.stacks,o=i.bandWidth,s=i.categoryGap;if(s==null){var l=at(n).length;s=Math.max(35-l*4,15)+"%"}var u=K(s,o),f=K(i.gap,1),h=i.remainedWidth,c=i.autoWidthCount,v=(h-u)/(c+(c-1)*f);v=Math.max(v,0),w(n,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;w(n,function(y,m){y.width||(y.width=v),d=y,p+=y.width*(1+f)}),d&&(p-=d.width*f);var g=-p/2;w(n,function(y,m){e[a][m]=e[a][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),e}function ZR(r,t,e){if(r&&t){var i=r[Cp(t)];return i!=null&&e!=null?i[Tp(e)]:i}}function Vb(r,t){var e=Bb(r,t),i=Nb(e);w(e,function(a){var n=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=Tp(a),u=i[Cp(s)][l],f=u.offset,h=u.width;n.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function Fb(r){return{seriesType:r,plan:sp(),reset:function(t){if(!!Gb(t)){var e=t.getData(),i=t.coordinateSystem,a=i.getBaseAxis(),n=i.getOtherAxis(a),o=e.getDimensionIndex(e.mapDimension(n.dim)),s=e.getDimensionIndex(e.mapDimension(a.dim)),l=t.get("showBackground",!0),u=e.mapDimension(n.dim),f=e.getCalculationInfo("stackResultDimension"),h=wi(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),c=n.isHorizontal(),v=qR(a,n),p=Hb(t),d=t.get("barMinHeight")||0,g=f&&e.getDimensionIndex(f),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,S){for(var b=_.count,x=p&&zr(b*3),T=p&&l&&zr(b*3),C=p&&zr(b),A=i.master.getRect(),D=c?A.width:A.height,M,P=S.getStore(),L=0;(M=_.next())!=null;){var I=P.get(h?g:o,M),R=P.get(s,M),E=v,W=void 0;h&&(W=+I-P.get(o,M));var B=void 0,F=void 0,Y=void 0,tt=void 0;if(c){var J=i.dataToPoint([I,R]);if(h){var lt=i.dataToPoint([W,R]);E=lt[0]}B=E,F=J[1]+m,Y=J[0]-E,tt=y,Math.abs(Y)>>1;r[a][1]a&&(this._approxInterval=a);var s=zs.length,l=Math.min(KR(zs,this._approxInterval,0,s),s-1);this._interval=zs[l][1],this._minLevelUnit=zs[Math.max(l-1,0)][0]},t.prototype.parse=function(e){return yt(e)?e:+Ae(e)},t.prototype.contain=function(e){return Vu(this.parse(e),this._extent)},t.prototype.normalize=function(e){return Fu(this.parse(e),this._extent)},t.prototype.scale=function(e){return Gu(e,this._extent)},t.type="time",t}(Ti),zs=[["second",Yc],["minute",Xc],["hour",yo],["quarter-day",yo*6],["half-day",yo*12],["day",Ne*1.2],["half-week",Ne*3.5],["week",Ne*7],["month",Ne*31],["quarter",Ne*95],["half-year",Pg/2],["year",Pg]];function jR(r,t,e,i){var a=Ae(t),n=Ae(e),o=function(p){return Ig(a,p,i)===Ig(n,p,i)},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 JR(r,t){return r/=Ne,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function QR(r){var t=30*Ne;return r/=t,r>6?6:r>3?3:r>2?2:1}function tE(r){return r/=yo,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function Wy(r,t){return r/=t?Xc:Yc,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function eE(r){return wc(r,!0)}function rE(r,t,e){var i=new Date(r);switch(an(t)){case"year":case"month":i[tx(e)](0);case"day":i[ex(e)](1);case"hour":i[rx(e)](0);case"minute":i[ix(e)](0);case"second":i[ax(e)](0),i[nx(e)](0)}return i.getTime()}function iE(r,t,e,i){var a=1e4,n=JS,o=0;function s(D,M,P,L,I,R,E){for(var W=new Date(M),B=M,F=W[L]();B1&&R===0&&P.unshift({value:P[0].value-B})}}for(var R=0;R=i[0]&&m<=i[1]&&h++)}var _=(i[1]-i[0])/t;if(h>_*1.5&&c>_/1.5||(u.push(g),h>_||r===n[v]))break}f=[]}}}for(var S=Ct(z(u,function(D){return Ct(D,function(M){return M.value>=i[0]&&M.value<=i[1]&&!M.notAdd})}),function(D){return D.length>0}),b=[],x=S.length-1,v=0;v0;)n*=10;var s=[Et(oE(i[0]/n)*n),Et(nE(i[1]/n)*n)];this._interval=n,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){So.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=Ze(e)/Ze(this.base),Vu(e,this._extent)},t.prototype.normalize=function(e){return e=Ze(e)/Ze(this.base),Fu(e,this._extent)},t.prototype.scale=function(e){return e=Gu(e,this._extent),Vs(this.base,e)},t.type="log",t}(jr),Ub=Ap.prototype;Ub.getMinorTicks=So.getMinorTicks;Ub.getLabel=So.getLabel;function Fs(r,t){return aE(r,xr(t))}jr.registerClass(Ap);var sE=Ap,lE=function(){function r(t,e,i){this._prepareParams(t,e,i)}return r.prototype._prepareParams=function(t,e,i){i[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(t,e){this[fE[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var i=uE[t];this[i]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),uE={min:"_determinedMin",max:"_determinedMax"},fE={min:"_dataMin",max:"_dataMax"};function Yb(r,t,e){var i=r.rawExtentInfo;return i||(i=new lE(r,t,e),r.rawExtentInfo=i,i)}function Gs(r,t){return t==null?null:bo(t)?NaN:r.parse(t)}function Xb(r,t){var e=r.type,i=Yb(r,t,r.getExtent()).calculate();r.setBlank(i.isBlank);var a=i.min,n=i.max,o=t.ecModel;if(o&&e==="time"){var s=Bb("bar",o),l=!1;if(w(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=Nb(s),f=hE(a,n,t,u);a=f.min,n=f.max}}return{extent:[a,n],fixMin:i.minFixed,fixMax:i.maxFixed}}function hE(r,t,e,i){var a=e.axis.getExtent(),n=a[1]-a[0],o=ZR(i,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;w(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;w(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-r,h=1-(s+l)/n,c=f/h-f;return t+=c*(l/u),r-=c*(s/u),{min:r,max:t}}function cn(r,t){var e=t,i=Xb(r,e),a=i.extent,n=e.get("splitNumber");r instanceof sE&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:n,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Hu(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new wp({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new $b({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(jr.getClass(t)||Ti)}}function vE(r){var t=r.scale.getExtent(),e=t[0],i=t[1];return!(e>0&&i>0||e<0&&i<0)}function ns(r){var t=r.getLabelModel().get("formatter"),e=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(i){return function(a,n){return r.scale.getFormattedLabel(a,n,i)}}(t):V(t)?function(i){return function(a){var n=r.scale.getLabel(a),o=i.replace("{value}",n!=null?n:"");return o}}(t):q(t)?function(i){return function(a,n){return e!=null&&(n=a.value-e),i(Mp(r,a),n,a.level!=null?{level:a.level}:null)}}(t):function(i){return r.scale.getLabel(i)}}function Mp(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function cE(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var i,a,n=e.getExtent();e instanceof wp?a=e.count():(i=e.getTicks(),a=i.length);var o=r.getLabelModel(),s=ns(r),l,u=1;a>40&&(u=Math.ceil(a/40));for(var f=0;fr[1]&&(r[1]=a[1])})}var os=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}();function gE(r){return as(null,r)}var yE={isDimensionStacked:wi,enableDataStack:Pb,getStackedDimension:Lb};function mE(r,t){var e=t;t instanceof At||(e=new At(t));var i=Hu(e);return i.setExtent(r[0],r[1]),cn(i,e),i}function _E(r){Xt(r,os)}function SE(r,t){return t=t||{},Bt(r,null,null,t.state!=="normal")}var xE=Object.freeze(Object.defineProperty({__proto__:null,createList:gE,getLayoutRect:ve,dataStack:yE,createScale:mE,mixinAxisModelCommonMethods:_E,getECData:nt,createTextStyle:SE,createDimensions:PR,createSymbol:Yt,enableHoverEmphasis:gi},Symbol.toStringTag,{value:"Module"})),Uy=[],bE={registerPreprocessor:yp,registerProcessor:mp,registerPostInit:mb,registerPostUpdate:_b,registerUpdateLifecycle:Nu,registerAction:lr,registerCoordinateSystem:Sb,registerLayout:xb,registerVisual:Di,registerTransform:wb,registerLoading:Sp,registerMap:bb,registerImpl:HI,PRIORITY:ub,ComponentModel:ft,ComponentView:Pt,SeriesModel:we,ChartView:Ut,registerComponentModel:function(r){ft.registerClass(r)},registerComponentView:function(r){Pt.registerClass(r)},registerSeriesModel:function(r){we.registerClass(r)},registerChartView:function(r){Ut.registerClass(r)},registerSubTypeDefaulter:function(r,t){ft.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){F1(r,t)}};function Wt(r){if(N(r)){w(r,function(t){Wt(t)});return}ot(Uy,r)>=0||(Uy.push(r),q(r)&&(r={install:r}),r.install(bE))}var wE=1e-8;function Yy(r,t){return Math.abs(r-t)a&&(i=o,a=l)}if(i)return CE(i.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var i=this._rect;if(i&&!e)return i;var a=[1/0,1/0],n=[-1/0,-1/0],o=this.geometries;return w(o,function(s){s.type==="polygon"?Zy(s.exterior,a,n,e):w(s.points,function(l){Zy(l,a,n,e)})}),isFinite(a[0])&&isFinite(a[1])&&isFinite(n[0])&&isFinite(n[1])||(a[0]=a[1]=n[0]=n[1]=0),i=new st(a[0],a[1],n[0]-a[0],n[1]-a[1]),e||(this._rect=i),i},t.prototype.contain=function(e){var i=this.getBoundingRect(),a=this.geometries;if(!i.contain(e[0],e[1]))return!1;t:for(var n=0,o=a.length;n>1^-(s&1),l=l>>1^-(l&1),s+=a,l+=n,a=s,n=l,i.push([s/e,l/e])}return i}function Iv(r,t){return r=ME(r),z(Ct(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var i=e.properties,a=e.geometry,n=[];switch(a.type){case"Polygon":var o=a.coordinates;n.push(new qy(o[0],o.slice(1)));break;case"MultiPolygon":w(a.coordinates,function(l){l[0]&&n.push(new qy(l[0],l.slice(1)))});break;case"LineString":n.push(new Ky([a.coordinates]));break;case"MultiLineString":n.push(new Ky(a.coordinates))}var s=new Kb(i[t||"name"],n,i.cp);return s.properties=i,s})}var DE=Object.freeze(Object.defineProperty({__proto__:null,linearMap:wt,round:Et,asc:Sr,getPrecision:xr,getPrecisionSafe:H1,getPixelPrecision:xc,getPercentWithPrecision:PM,MAX_SAFE_INTEGER:IM,remRadian:bc,isRadianAroundZero:Mo,parseDate:Ae,quantity:$1,quantityExponent:fu,nice:wc,quantile:EM,reformIntervals:iv,isNumeric:Tc,numericToNumber:$r},Symbol.toStringTag,{value:"Module"})),PE=Object.freeze(Object.defineProperty({__proto__:null,parse:Ae,format:rs},Symbol.toStringTag,{value:"Module"})),LE=Object.freeze(Object.defineProperty({__proto__:null,extendShape:WS,extendPath:$S,makePath:Su,makeImage:Fc,mergePath:Be,resizePath:Gc,createIcon:_n,updateProps:Dt,initProps:te,getTransform:yi,clipPointsByRect:Hc,clipRectByRect:YS,registerShape:We,getShapeClass:Vc,Group:it,Image:ce,Text:dt,Circle:nr,Ellipse:yu,Sector:Mr,Ring:Qo,Polygon:Dr,Polyline:He,Rect:pt,Line:le,BezierCurve:Oc,Arc:mu,IncrementalDisplayable:GS,CompoundPath:_u,LinearGradient:ts,RadialGradient:Bc,BoundingRect:st},Symbol.toStringTag,{value:"Module"})),IE=Object.freeze(Object.defineProperty({__proto__:null,addCommas:qc,toCamelCase:Kc,normalizeCssArray:Ma,encodeHTML:oe,formatTpl:jc,getTooltipMarker:ox,formatTime:mP,capitalFirst:_P,truncateText:eS,getTextRect:gP},Symbol.toStringTag,{value:"Module"})),RE=Object.freeze(Object.defineProperty({__proto__:null,map:z,each:w,indexOf:ot,inherits:fc,reduce:Ve,filter:Ct,bind:H,curry:vt,isArray:N,isString:V,isObject:U,isFunction:q,extend:k,defaults:Z,clone:X,merge:Q},Symbol.toStringTag,{value:"Module"})),Fo=St();function EE(r){return r.type==="category"?OE(r):NE(r)}function kE(r,t){return r.type==="category"?BE(r,t):{ticks:z(r.scale.getTicks(),function(e){return e.value})}}function OE(r){var t=r.getLabelModel(),e=Jb(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function Jb(r,t){var e=Qb(r,"labels"),i=Dp(t),a=tw(e,i);if(a)return a;var n,o;return q(i)?n=iw(r,i):(o=i==="auto"?zE(r):i,n=rw(r,o)),ew(e,i,{labels:n,labelCategoryInterval:o})}function BE(r,t){var e=Qb(r,"ticks"),i=Dp(t),a=tw(e,i);if(a)return a;var n,o;if((!t.get("show")||r.scale.isBlank())&&(n=[]),q(i))n=iw(r,i,!0);else if(i==="auto"){var s=Jb(r,r.getLabelModel());o=s.labelCategoryInterval,n=z(s.labels,function(l){return l.tickValue})}else o=i,n=rw(r,o,!0);return ew(e,i,{ticks:n,tickCategoryInterval:o})}function NE(r){var t=r.scale.getTicks(),e=ns(r);return{labels:z(t,function(i,a){return{level:i.level,formattedLabel:e(i,a),rawLabel:r.scale.getLabel(i),tickValue:i.value}})}}function Qb(r,t){return Fo(r)[t]||(Fo(r)[t]=[])}function tw(r,t){for(var e=0;e40&&(s=Math.max(1,Math.floor(o/40)));for(var l=n[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(i)),h=Math.abs(u*Math.sin(i)),c=0,v=0;l<=n[1];l+=s){var p=0,d=0,g=jo(e({value:l}),t.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=Fo(r.model),b=r.getExtent(),x=S.lastAutoInterval,T=S.lastTickCount;return x!=null&&T!=null&&Math.abs(x-_)<=1&&Math.abs(T-o)<=1&&x>_&&S.axisExtent0===b[0]&&S.axisExtent1===b[1]?_=x:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=b[0],S.axisExtent1=b[1]),_}function FE(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function rw(r,t,e){var i=ns(r),a=r.scale,n=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=n[0],f=a.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=Zb(r),c=o.get("showMinLabel")||h,v=o.get("showMaxLabel")||h;c&&u!==n[0]&&d(n[0]);for(var p=u;p<=n[1];p+=l)d(p);v&&p-l!==n[1]&&d(n[1]);function d(g){var y={value:g};s.push(e?g:{formattedLabel:i(y),rawLabel:a.getLabel(y),tickValue:g})}return s}function iw(r,t,e){var i=r.scale,a=ns(r),n=[];return w(i.getTicks(),function(o){var s=i.getLabel(o),l=o.value;t(o.value,s)&&n.push(e?l:{formattedLabel:a(o),rawLabel:s,tickValue:l})}),n}var jy=[0,1],GE=function(){function r(t,e,i){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=i||[0,0]}return r.prototype.contain=function(t){var e=this._extent,i=Math.min(e[0],e[1]),a=Math.max(e[0],e[1]);return t>=i&&t<=a},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return xc(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var i=this._extent;i[0]=t,i[1]=e},r.prototype.dataToCoord=function(t,e){var i=this._extent,a=this.scale;return t=a.normalize(t),this.onBand&&a.type==="ordinal"&&(i=i.slice(),Jy(i,a.count())),wt(t,jy,i,e)},r.prototype.coordToData=function(t,e){var i=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(i=i.slice(),Jy(i,a.count()));var n=wt(t,i,jy,e);return this.scale.scale(n)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=kE(this,e),a=i.ticks,n=z(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return HE(this,n,o,t.clamp),n},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var i=this.scale.getMinorTicks(e),a=z(i,function(n){return z(n,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(){return EE(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);i===0&&(i=1);var a=Math.abs(t[1]-t[0]);return Math.abs(a)/i},r.prototype.calculateCategoryInterval=function(){return VE(this)},r}();function Jy(r,t){var e=r[1]-r[0],i=t,a=e/i/2;r[0]+=a,r[1]-=a}function HE(r,t,e,i){var a=t.length;if(!r.onBand||e||!a)return;var n=r.getExtent(),o,s;if(a===1)t[0].coord=n[0],o=t[1]={coord:n[1]};else{var l=t[a-1].tickValue-t[0].tickValue,u=(t[a-1].coord-t[0].coord)/l;w(t,function(v){v.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-t[a-1].tickValue,o={coord:t[a-1].coord+u*s},t.push(o)}var h=n[0]>n[1];c(t[0].coord,n[0])&&(i?t[0].coord=n[0]:t.shift()),i&&c(n[0],t[0].coord)&&t.unshift({coord:n[0]}),c(n[1],o.coord)&&(i?o.coord=n[1]:t.pop()),i&&c(o.coord,n[1])&&t.push({coord:n[1]});function c(v,p){return v=Et(v),p=Et(p),h?v>p:va&&(a+=Wn);var v=Math.atan2(s,o);if(v<0&&(v+=Wn),v>=i&&v<=a||v+Wn>=i&&v+Wn<=a)return l[0]=f,l[1]=h,u-e;var p=e*Math.cos(i)+r,d=e*Math.sin(i)+t,g=e*Math.cos(a)+r,y=e*Math.sin(a)+t,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 Zl(r,t,e,i,a,n,o,s){var l=a-r,u=n-t,f=e-r,h=i-t,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]=t+p*h;return Math.sqrt((d-a)*(d-a)+(g-n)*(g-n))}function aw(r,t,e,i,a,n,o){e<0&&(r=r+e,e=-e),i<0&&(t=t+i,i=-i);var s=r+e,l=t+i,u=o[0]=Math.min(Math.max(a,r),s),f=o[1]=Math.min(Math.max(n,t),l);return Math.sqrt((u-a)*(u-a)+(f-n)*(f-n))}var Je=[];function KE(r,t,e){var i=aw(t.x,t.y,t.width,t.height,r.x,r.y,Je);return e.set(Je[0],Je[1]),i}function jE(r,t,e){for(var i=0,a=0,n=0,o=0,s,l,u=1/0,f=t.data,h=r.x,c=r.y,v=0;v0){t=t/180*Math.PI,tr.fromArray(r[0]),_t.fromArray(r[1]),Rt.fromArray(r[2]),et.sub(wr,tr,_t),et.sub(_r,Rt,_t);var e=wr.len(),i=_r.len();if(!(e<.001||i<.001)){wr.scale(1/e),_r.scale(1/i);var a=wr.dot(_r),n=Math.cos(t);if(n1&&et.copy(ne,Rt),ne.toArray(r[1])}}}}function JE(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,tr.fromArray(r[0]),_t.fromArray(r[1]),Rt.fromArray(r[2]),et.sub(wr,_t,tr),et.sub(_r,Rt,_t);var i=wr.len(),a=_r.len();if(!(i<.001||a<.001)){wr.scale(1/i),_r.scale(1/a);var n=wr.dot(t),o=Math.cos(e);if(n=l)et.copy(ne,Rt);else{ne.scaleAndAdd(_r,s/Math.tan(Math.PI/2-f));var h=Rt.x!==_t.x?(ne.x-_t.x)/(Rt.x-_t.x):(ne.y-_t.y)/(Rt.y-_t.y);if(isNaN(h))return;h<0?et.copy(ne,_t):h>1&&et.copy(ne,Rt)}ne.toArray(r[1])}}}}function Qy(r,t,e,i){var a=e==="normal",n=a?r:r.ensureState(e);n.ignore=t;var o=i.get("smooth");o&&o===!0&&(o=.3),n.shape=n.shape||{},o>0&&(n.shape.smooth=o);var s=i.getModel("lineStyle").getLineStyle();a?r.useStyle(s):n.style=s}function QE(r,t){var e=t.smooth,i=t.points;if(!!i)if(r.moveTo(i[0][0],i[0][1]),e>0&&i.length>=3){var a=bl(i[0],i[1]),n=bl(i[1],i[2]);if(!a||!n){r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]);return}var o=Math.min(a,n)*e,s=rl([],i[1],i[0],o/a),l=rl([],i[1],i[2],o/n),u=rl([],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],i[2][0],i[2][1])}else for(var f=1;f0&&n&&b(-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&&T(-y),m<0&&T(m);function _(){y=d.rect[t]-i,m=a-g.rect[t]-g.rect[e]}function S(C,A,D){if(C<0){var M=Math.min(A,-C);if(M>0){b(M*D,0,o);var P=M+C;P<0&&x(-P*D,1)}else x(-C*D,1)}}function b(C,A,D){C!==0&&(u=!0);for(var M=A;M0)for(var P=0;P0;P--){var E=D[P-1]*R;b(-E,P,o)}}}function T(C){var A=C<0?-1:1;C=Math.abs(C);for(var D=Math.ceil(C/(o-1)),M=0;M0?b(D,0,M+1):b(-D,o-M-1,o),C-=D,C<=0)return}return u}function rH(r,t,e,i){return ow(r,"x","width",t,e,i)}function ik(r,t,e,i){return ow(r,"y","height",t,e,i)}function ak(r){var t=[];r.sort(function(d,g){return g.priority-d.priority});var e=new st(0,0,0,0);function i(d){if(!d.ignore){var g=d.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}d.ignore=!0}for(var a=0;a-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),i},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(we),ok=nk;function Wu(r,t){var e=r.mapDimensionsAll("defaultedLabel"),i=e.length;if(i===1){var a=vn(r,t,e[0]);return a!=null?a+"":null}else if(i){for(var n=[],o=0;o=0&&i.push(t[n])}return i.join(" ")}var sk=function(r){O(t,r);function t(e,i,a,n){var o=r.call(this)||this;return o.updateData(e,i,a,n),o}return t.prototype._createSymbol=function(e,i,a,n,o){this.removeAll();var s=Yt(e,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),s.drift=lk,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){un(this.childAt(0))},t.prototype.downplay=function(){fn(this.childAt(0))},t.prototype.setZ=function(e,i){var a=this.childAt(0);a.zlevel=e,a.z=i},t.prototype.setDraggable=function(e,i){var a=this.childAt(0);a.draggable=e,a.cursor=!i&&e?"move":a.cursor},t.prototype.updateData=function(e,i,a,n){this.silent=!1;var o=e.getItemVisual(i,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,i),u=o!==this._symbolType,f=n&&n.disableAnimation;if(u){var h=e.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,e,i,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):Dt(c,v,s,i),Io(c)}if(this._updateCommon(e,i,l,a,n),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,te(c,v,s,i)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,i,a,n,o){var s=this.childAt(0),l=e.hostModel,u,f,h,c,v,p,d,g,y;if(n&&(u=n.emphasisItemStyle,f=n.blurItemStyle,h=n.selectItemStyle,c=n.focus,v=n.blurScope,d=n.labelStatesModels,g=n.hoverScale,y=n.cursorStyle,p=n.emphasisDisabled),!n||e.hasItemOption){var m=n&&n.itemModel?n.itemModel:e.getItemModel(i),_=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=Kr(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=e.getItemVisual(i,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var b=Ou(e.getItemVisual(i,"symbolOffset"),a);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var x=e.getItemVisual(i,"style"),T=x.fill;if(s instanceof ce){var C=s.style;s.useStyle(k({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},x))}else s.__isEmptyBrush?s.useStyle(k({},x)):s.useStyle(x),s.style.decal=null,s.setColor(T,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var A=e.getItemVisual(i,"liftZ"),D=this._z2;A!=null?D==null&&(this._z2=s.z2,s.z2+=A):D!=null&&(s.z2=D,this._z2=null);var M=o&&o.useNameLabel;qr(s,d,{labelFetcher:l,labelDataIndex:i,defaultText:P,inheritColor:T,defaultOpacity:x.opacity});function P(R){return M?e.getName(R):Wu(e,R)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f;var I=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;L.scaleX=this._sizeX*I,L.scaleY=this._sizeY*I,this.setSymbolScale(1),xi(this,c,v,p)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,i,a){var n=this.childAt(0),o=nt(this).dataIndex,s=a&&a.animation;if(this.silent=n.silent=!0,a&&a.fadeLabel){var l=n.getTextContent();l&&Lo(l,{style:{opacity:0}},i,{dataIndex:o,removeOpt:s,cb:function(){n.removeTextContent()}})}else n.removeTextContent();Lo(n,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,i){return fp(e.getItemVisual(i,"symbolSize"))},t}(it);function lk(r,t){this.parent.drift(r,t)}var Pp=sk;function ih(r,t,e,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i.isIgnore&&i.isIgnore(e))&&!(i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function em(r){return r!=null&&!U(r)&&(r={isIgnore:r}),r||{}}function rm(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:Kr(t),cursorStyle:t.get("cursor")}}var uk=function(){function r(t){this.group=new it,this._SymbolCtor=t||Pp}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=em(e);var i=this.group,a=t.hostModel,n=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=rm(t),u={disableAnimation:s},f=e.getSymbolPoint||function(h){return t.getItemLayout(h)};n||i.removeAll(),t.diff(n).add(function(h){var c=f(h);if(ih(t,c,h,e)){var v=new o(t,h,l,u);v.setPosition(c),t.setItemGraphicEl(h,v),i.add(v)}}).update(function(h,c){var v=n.getItemGraphicEl(c),p=f(h);if(!ih(t,p,h,e)){i.remove(v);return}var d=t.getItemVisual(h,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==d)i.remove(v),v=new o(t,h,l,u),v.setPosition(p);else{v.updateData(t,h,l,u);var y={x:p[0],y:p[1]};s?v.attr(y):Dt(v,y,a)}i.add(v),t.setItemGraphicEl(h,v)}).remove(function(h){var c=n.getItemGraphicEl(h);c&&c.fadeOut(function(){i.remove(c)},a)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(i,a){var n=t._getSymbolPoint(a);i.setPosition(n),i.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=rm(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,i){this._progressiveEls=[],i=em(i);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var n=t.start;n0?e=i[0]:i[1]<0&&(e=i[1]),e}function fw(r,t,e,i){var a=NaN;r.stacked&&(a=e.get(e.getCalculationInfo("stackedOverDimension"),i)),isNaN(a)&&(a=r.valueStart);var n=r.baseDataOffset,o=[];return o[n]=e.get(r.baseDim,i),o[1-n]=a,t.dataToPoint(o)}function hk(r,t){var e=[];return t.diff(r).add(function(i){e.push({cmd:"+",idx:i})}).update(function(i,a){e.push({cmd:"=",idx:a,idx1:i})}).remove(function(i){e.push({cmd:"-",idx:i})}).execute(),e}function vk(r,t,e,i,a,n,o,s){for(var l=hk(r,t),u=[],f=[],h=[],c=[],v=[],p=[],d=[],g=uw(a,t,o),y=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_=a||d<0)break;if(ya(y,m)){if(l){d+=n;continue}break}if(d===e)r[n>0?"moveTo":"lineTo"](y,m),h=y,c=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){d+=n;continue}if(o>0){for(var b=d+n,x=t[b*2],T=t[b*2+1];x===y&&T===m&&g=i||ya(x,T))v=y,p=m;else{D=x-u,M=T-f;var I=y-u,R=x-y,E=m-f,W=T-m,B=void 0,F=void 0;if(s==="x"){B=Math.abs(I),F=Math.abs(R);var Y=D>0?1:-1;v=y-Y*B*o,p=m,P=y+Y*F*o,L=m}else if(s==="y"){B=Math.abs(E),F=Math.abs(W);var tt=M>0?1:-1;v=y,p=m-tt*B*o,P=y,L=m+tt*F*o}else B=Math.sqrt(I*I+E*E),F=Math.sqrt(R*R+W*W),A=F/(F+B),v=y-D*o*(1-A),p=m-M*o*(1-A),P=y+D*o*A,L=m+M*o*A,P=ai(P,ni(x,y)),L=ai(L,ni(T,m)),P=ni(P,ai(x,y)),L=ni(L,ai(T,m)),D=P-y,M=L-m,v=y-D*B/F,p=m-M*B/F,v=ai(v,ni(u,y)),p=ai(p,ni(f,m)),v=ni(v,ai(u,y)),p=ni(p,ai(f,m)),D=y-v,M=m-p,P=y+D*F/B,L=m+M*F/B}r.bezierCurveTo(h,c,v,p,y,m),h=P,c=L}else r.lineTo(y,m)}u=y,f=m,d+=n}return g}var hw=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),ck=function(r){O(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polyline",i}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new hw},t.prototype.buildPath=function(e,i){var a=i.points,n=0,o=a.length/2;if(i.connectNulls){for(;o>0&&ya(a[o*2-2],a[o*2-1]);o--);for(;n=0){var S=u?(p-l)*_+l:(v-s)*_+s;return u?[e,S]:[S,e]}s=v,l=p;break;case o.C:v=n[h++],p=n[h++],d=n[h++],g=n[h++],y=n[h++],m=n[h++];var b=u?Tl(s,v,d,y,e,f):Tl(l,p,g,m,e,f);if(b>0)for(var x=0;x=0){var S=u?Nt(l,p,g,m,T):Nt(s,v,d,y,T);return u?[e,S]:[S,e]}}s=y,l=m;break}}},t}(gt),pk=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(hw),dk=function(r){O(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polygon",i}return t.prototype.getDefaultShape=function(){return new pk},t.prototype.buildPath=function(e,i){var a=i.points,n=i.stackedOnPoints,o=0,s=a.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&ya(a[s*2-2],a[s*2-1]);s--);for(;ot){n?e.push(o(n,l,t)):a&&e.push(o(a,l,0),o(a,l,t));break}else a&&(e.push(o(a,l,0)),a=null),e.push(l),n=l}return e}function _k(r,t,e){var i=r.getVisual("visualMeta");if(!(!i||!i.length||!r.count())&&t.type==="cartesian2d"){for(var a,n,o=i.length-1;o>=0;o--){var s=r.getDimensionInfo(i[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){n=i[o];break}}if(!!n){var l=t.getAxis(a),u=z(n.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=n.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var c=mk(u,a==="x"?e.getWidth():e.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";w(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 ts(0,0,0,0,c,!0);return m[a]=d,m[a+"2"]=g,m}}}function Sk(r,t,e){var i=r.get("showAllSymbol"),a=i==="auto";if(!(i&&!a)){var n=e.getAxesByScale("ordinal")[0];if(!!n&&!(a&&xk(n,t))){var o=t.mapDimension(n.dim),s={};return w(n.getViewLabels(),function(l){var u=n.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function xk(r,t){var e=r.getExtent(),i=Math.abs(e[1]-e[0])/r.scale.count();isNaN(i)&&(i=0);for(var a=t.count(),n=Math.max(1,Math.round(a/5)),o=0;oi)return!1;return!0}function bk(r,t){return isNaN(r)||isNaN(t)}function wk(r){for(var t=r.length/2;t>0&&bk(r[t*2-2],r[t*2-1]);t--);return t-1}function sm(r,t){return[r[t*2],r[t*2+1]]}function Tk(r,t,e){for(var i=r.length/2,a=e==="x"?0:1,n,o,s=0,l=-1,u=0;u=t||n>=t&&o<=t){l=u;break}s=u,n=o}return{range:[s,l],t:(t-n)/(o-n)}}function pw(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var Y=d.getState("emphasis").style;Y.lineWidth=+d.style.lineWidth+1}nt(d).seriesIndex=e.seriesIndex,xi(d,W,B,F);var tt=om(e.get("smooth")),J=e.get("smoothMonotone");if(d.setShape({smooth:tt,smoothMonotone:J,connectNulls:C}),g){var lt=l.getCalculationInfo("stackedOnSeries"),ct=0;g.useStyle(Z(f.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),lt&&(ct=om(lt.get("smooth"))),g.setShape({smooth:tt,stackedOnSmooth:ct,smoothMonotone:J,connectNulls:C}),hn(g,e,"areaStyle"),nt(g).seriesIndex=e.seriesIndex,xi(g,W,B,F)}var kt=function(xt){n._changePolyState(xt)};l.eachItemGraphicEl(function(xt){xt&&(xt.onHoverStateChange=kt)}),this._polyline.onHoverStateChange=kt,this._data=l,this._coordSys=o,this._stackedOnPoints=x,this._points=h,this._step=M,this._valueOrigin=S,e.get("triggerLineEvent")&&(this.packEventData(e,d),g&&this.packEventData(e,g))},t.prototype.packEventData=function(e,i){nt(i).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,i,a,n){var o=e.getData(),s=Sa(o,n);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=e.get("zlevel")||0,v=e.get("z")||0;u=new Pp(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 Ut.prototype.highlight.call(this,e,i,a,n)},t.prototype.downplay=function(e,i,a,n){var o=e.getData(),s=Sa(o,n);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 Ut.prototype.downplay.call(this,e,i,a,n)},t.prototype._changePolyState=function(e){var i=this._polygon;sv(this._polyline,e),i&&sv(i,e)},t.prototype._newPolyline=function(e){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new ck({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},t.prototype._newPolygon=function(e,i){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new dk({shape:{points:e,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},t.prototype._initSymbolLabelAnimation=function(e,i,a){var n,o,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(n=s.isHorizontal(),o=!1):i.type==="polar"&&(n=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");q(f)&&(f=f(null));var h=u.get("animationDelay")||0,c=q(h)?h(null):h;e.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,b=i.pointToCoord(g);n?(y=S.startAngle,m=S.endAngle,_=-b[1]/180*Math.PI):(y=S.r0,m=S.r,_=b[0])}else{var x=a;n?(y=x.x,m=x.x+x.width,_=v.x):(y=x.y+x.height,m=x.y,_=v.y)}var T=m===y?0:(_-y)/(m-y);l&&(T=1-T);var C=q(h)?h(p):f*T+c,A=d.getSymbolPath(),D=A.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),D&&D.animateFrom({style:{opacity:0}},{duration:300,delay:C}),A.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,i,a){var n=e.getModel("endLabel");if(pw(e)){var o=e.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 dt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=wk(l);f>=0&&(qr(s,Kr(e,"endLabel"),{inheritColor:a,labelFetcher:e,labelDataIndex:f,defaultText:function(h,c,v){return v!=null?sw(o,v):Wu(o,h)},enableTextSetter:!0},Ck(n,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,i,a,n,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&n.originalX==null&&(n.originalX=u.x,n.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,_=i.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,b=(y?d:0)*(m?-1:1),x=(y?0:-d)*(m?-1:1),T=y?"x":"y",C=Tk(h,S,T),A=C.range,D=A[1]-A[0],M=void 0;if(D>=1){if(D>1&&!v){var P=sm(h,A[0]);u.attr({x:P[0]+b,y:P[1]+x}),o&&(M=c.getRawValue(A[0]))}else{var P=f.getPointOn(S,T);P&&u.attr({x:P[0]+b,y:P[1]+x});var L=c.getRawValue(A[0]),I=c.getRawValue(A[1]);o&&(M=J1(a,p,L,I,C.t))}n.lastFrameIndex=A[0]}else{var R=e===1||n.lastFrameIndex>0?A[0]:0,P=sm(h,R);o&&(M=c.getRawValue(R)),u.attr({x:P[0]+b,y:P[1]+x})}if(o){var E=es(u);typeof E.setLabelText=="function"&&E.setLabelText(M)}}},t.prototype._doUpdateAnimation=function(e,i,a,n,o,s,l){var u=this._polyline,f=this._polygon,h=e.hostModel,c=vk(this._data,e,this._stackedOnPoints,i,this._coordSys,a,this._valueOrigin),v=c.current,p=c.stackedOnCurrent,d=c.next,g=c.stackedOnNext;if(o&&(v=oi(c.current,a,o,l),p=oi(c.stackedOnCurrent,a,o,l),d=oi(c.next,a,o,l),g=oi(c.stackedOnNext,a,o,l)),nm(v,d)>3e3||f&&nm(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(),Dt(u,y,h),f&&(f.setShape({points:v,stackedOnPoints:p}),f.stopAnimation(),Dt(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 b=_[S].cmd;if(b==="="){var x=e.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 T=u.shape.__points,C=0;Ct&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&n){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=i.getDevicePixelRatio(),c=Math.abs(f[1]-f[0])*(h||1),v=Math.round(s/c);if(isFinite(v)&&v>1){n==="lttb"&&t.setData(a.lttbDownSample(a.mapDimension(u.dim),1/v));var p=void 0;V(n)?p=Dk[n]:q(n)&&(p=n),p&&t.setData(a.downSample(a.mapDimension(u.dim),1/v,p,Pk))}}}}}function Lk(r){r.registerChartView(Mk),r.registerSeriesModel(ok),r.registerLayout(Ip("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),i=t.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",i)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,dw("line"))}var gw=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,i){return as(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,i,a){var n=this.coordinateSystem;if(n&&n.clampData){var o=n.clampData(e),s=n.dataToPoint(o);if(a)w(n.getAxes(),function(c,v){if(c.type==="category"&&i!=null){var p=c.getTicksCoords(),d=o[v],g=i[v]==="x1"||i[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=(b+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=n.getBaseAxis().isHorizontal()?0:1;s[h]+=u+f/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(we);we.registerClass(gw);var Kl=gw,Ik=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return as(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),i=this.get("largeThreshold");return i>e&&(e=i),e},t.prototype.brushSelector=function(e,i,a){return a.rect(i.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Mi(Kl.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(Kl),Rk=Ik,Ek=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}(),kk=function(r){O(t,r);function t(e){var i=r.call(this,e)||this;return i.type="sausage",i}return t.prototype.getDefaultShape=function(){return new Ek},t.prototype.buildPath=function(e,i){var a=i.cx,n=i.cy,o=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=(s-o)*.5,u=o+l,f=i.startAngle,h=i.endAngle,c=i.clockwise,v=Math.PI*2,p=c?h-fMath.PI/2&&fs)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(e,i){for(var a=i.scale,n=a.getExtent(),o=Math.max(0,n[0]),s=Math.min(n[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,i,a,n){if(!!this._isOrderChangedWithinSameData(e,i,a)){var o=this._dataSort(e,a,i);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,i,a){var n=i.baseAxis,o=this._dataSort(e,n,function(s){return e.get(e.mapDimension(i.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:o})},t.prototype.remove=function(e,i){this._clear(this._model),this._removeOnRenderedListener(i)},t.prototype.dispose=function(e,i){this._removeOnRenderedListener(i)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var i=this.group,a=this._data;e&&e.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(n){El(n,e,nt(n).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Ut),um={cartesian2d:function(r,t){var e=t.width<0?-1:1,i=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var a=r.x+r.width,n=r.y+r.height,o=nh(t.x,r.x),s=oh(t.x+t.width,a),l=nh(t.y,r.y),u=oh(t.y+t.height,n),f=sa?s:o,t.y=h&&l>n?u:l,t.width=f?0:s-o,t.height=h?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),f||h},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}var a=oh(t.r,r.r),n=nh(t.r0,r.r0);t.r=a,t.r0=n;var o=a-n<0;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}return o}},fm={cartesian2d:function(r,t,e,i,a,n,o,s,l){var u=new pt({shape:k({},i),z2:1});if(u.__dataIndex=e,u.name="item",n){var f=u.shape,h=a?"height":"width";f[h]=0}return u},polar:function(r,t,e,i,a,n,o,s,l){var u=!a&&l?lm:Mr,f=new u({shape:i,z2:1});f.name="item";var h=yw(a);if(f.calculateTextPosition=Ok(h,{isRoundCap:u===lm}),n){var c=f.shape,v=a?"r":"endAngle",p={};c[v]=a?i.r0:i.startAngle,p[v]=i[v],(s?Dt:te)(f,{shape:p},n)}return f}};function Vk(r,t){var e=r.get("realtimeSort",!0),i=t.getBaseAxis();if(e&&i.type==="category"&&t.type==="cartesian2d")return{baseAxis:i,otherAxis:t.getOtherAxis(i)}}function hm(r,t,e,i,a,n,o,s){var l,u;n?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(o?Dt:te)(e,{shape:l},t,a,null);var f=t?r.baseAxis.model:null;(o?Dt:te)(e,{shape:u},f,a)}function vm(r,t){for(var e=0;e0?1:-1,o=i.height>0?1:-1;return{x:i.x+n*a/2,y:i.y+o*a/2,width:i.width-n*a,height:i.height-o*a}},polar:function(r,t,e){var i=r.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function Hk(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function yw(r){return function(t){var e=t?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+e;default:return i}}}(r)}function pm(r,t,e,i,a,n,o,s){var l=t.getItemVisual(e,"style");if(s){if(!n.get("roundCap")){var f=r.shape,h=ao(i.getModel("itemStyle"),f,!0);k(f,h),r.setShape(f)}}else{var u=i.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var c=i.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=Kr(i);qr(r,p,{labelFetcher:n,labelDataIndex:e,defaultText:Wu(n.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var d=r.getTextContent();if(s&&d){var g=i.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,Bk(r,g==="outside"?v:g,yw(o),i.get(["label","rotate"]))}j2(d,p,n.getRawValue(e),function(m){return sw(t,m)});var y=i.getModel(["emphasis"]);xi(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),hn(r,i),Hk(a)&&(r.style.fill="none",r.style.stroke="none",w(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function Wk(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var i=r.get(["itemStyle","borderWidth"])||0,a=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),n=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(i,a,n)}var $k=function(){function r(){}return r}(),dm=function(r){O(t,r);function t(e){var i=r.call(this,e)||this;return i.type="largeBar",i}return t.prototype.getDefaultShape=function(){return new $k},t.prototype.buildPath=function(e,i){for(var a=i.points,n=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?e:null},30,!1);function Uk(r,t,e){for(var i=r.baseDimIdx,a=1-i,n=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=n.length/3;f=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function mw(r,t,e){if(Lp(e,"cartesian2d")){var i=t,a=e.getArea();return{x:r?i.x:a.x,y:r?a.y:i.y,width:r?i.width:a.width,height:r?a.height:i.height}}else{var a=e.getArea(),n=t;return{cx:a.cx,cy:a.cy,r0:r?a.r0:n.r0,r:r?a.r:n.r,startAngle:r?n.startAngle:0,endAngle:r?n.endAngle:Math.PI*2}}}function Yk(r,t,e){var i=r.type==="polar"?Mr:pt;return new i({shape:mw(t,e,r),silent:!0,z2:0})}var Xk=zk;function Zk(r){r.registerChartView(Xk),r.registerSeriesModel(Rk),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,vt(Vb,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Fb("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,dw("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(a){t.sortInfo&&a.axis.setCategorySortInfo(t.sortInfo)})})}var Us=Math.PI*2,mm=Math.PI/180;function _w(r,t){return ve(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Sw(r,t){var e=_w(r,t),i=r.get("center"),a=r.get("radius");N(a)||(a=[0,a]);var n=K(e.width,t.getWidth()),o=K(e.height,t.getHeight()),s=Math.min(n,o),l=K(a[0],s/2),u=K(a[1],s/2),f,h,c=r.coordinateSystem;if(c){var v=c.dataToPoint(i);f=v[0]||0,h=v[1]||0}else N(i)||(i=[i,i]),f=K(i[0],n)+e.x,h=K(i[1],o)+e.y;return{cx:f,cy:h,r0:l,r:u}}function qk(r,t,e){t.eachSeriesByType(r,function(i){var a=i.getData(),n=a.mapDimension("value"),o=_w(i,e),s=Sw(i,e),l=s.cx,u=s.cy,f=s.r,h=s.r0,c=-i.get("startAngle")*mm,v=i.get("minAngle")*mm,p=0;a.each(n,function(D){!isNaN(D)&&p++});var d=a.getSum(n),g=Math.PI/(d||p)*2,y=i.get("clockwise"),m=i.get("roseType"),_=i.get("stillShowZeroSum"),S=a.getDataExtent(n);S[0]=0;var b=Us,x=0,T=c,C=y?1:-1;if(a.setLayout({viewRect:o,r:f}),a.each(n,function(D,M){var P;if(isNaN(D)){a.setItemLayout(M,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:l,cy:u,r0:h,r:m?NaN:f});return}m!=="area"?P=d===0&&_?g:D*g:P=Us/p,Pe?y:g,b=Math.abs(_.label.y-e);if(b>=S.maxY){var x=_.label.x-t-_.len2*a,T=i+_.len,C=Math.abs(x)r.unconstrainedWidth?null:v:null;i.setStyle("width",p)}var d=i.getBoundingRect();n.width=d.width;var g=(i.style.margin||0)+2.1;n.height=d.height+g,n.y-=(n.height-h)/2}}}function sh(r){return r.position==="center"}function Jk(r){var t=r.getData(),e=[],i,a,n=!1,o=(r.get("minShowLabelAngle")||0)*Kk,s=t.getLayout("viewRect"),l=t.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 T in x.states)if(x.states[T].ignore===!1)return!0;return!1}t.each(function(x){var T=t.getItemGraphicEl(x),C=T.shape,A=T.getTextContent(),D=T.getTextGuideLine(),M=t.getItemModel(x),P=M.getModel("label"),L=P.get("position")||M.get(["emphasis","label","position"]),I=P.get("distanceToLabelLine"),R=P.get("alignTo"),E=K(P.get("edgeDistance"),u),W=P.get("bleedMargin"),B=M.getModel("labelLine"),F=B.get("length");F=K(F,u);var Y=B.get("length2");if(Y=K(Y,u),Math.abs(C.endAngle-C.startAngle)0?"right":"left":J>0?"left":"right"}var Ue=Math.PI,de=0,Lr=P.get("rotate");if(yt(Lr))de=Lr*(Ue/180);else if(L==="center")de=0;else if(Lr==="radial"||Lr===!0){var Pa=J<0?-tt+Ue:-tt;de=Pa}else if(Lr==="tangential"&&L!=="outside"&&L!=="outer"){var Ye=Math.atan2(J,lt);Ye<0&&(Ye=Ue*2+Ye);var ls=lt>0;ls&&(Ye=Ue+Ye),de=Ye-Ue}if(n=!!de,A.x=ct,A.y=kt,A.rotation=de,A.setStyle({verticalAlign:"middle"}),Ft){A.setStyle({align:Zt});var Zu=A.states.select;Zu&&(Zu.x+=A.x,Zu.y+=A.y)}else{var Jr=A.getBoundingRect().clone();Jr.applyTransform(A.getComputedTransform());var od=(A.style.margin||0)+2.1;Jr.y-=od/2,Jr.height+=od,e.push({label:A,labelLine:D,position:L,len:F,len2:Y,minTurnAngle:B.get("minTurnAngle"),maxSurfaceAngle:B.get("maxSurfaceAngle"),surfaceNormal:new et(J,lt),linePoints:xt,textAlign:Zt,labelDistance:I,labelAlignTo:R,edgeDistance:E,bleedMargin:W,rect:Jr,unconstrainedWidth:Jr.width,labelStyleWidth:A.style.width})}T.setTextConfig({inside:Ft})}}),!n&&r.get("avoidLabelOverlap")&&jk(e,i,a,l,u,c,f,h);for(var d=0;d0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h=n.r0}},t.type="pie",t}(Ut),eO=tO;function Rp(r,t,e){t=N(t)&&{coordDimensions:t}||k({encodeDefine:r.getEncode()},t);var i=r.getSource(),a=bp(i,t).dimensions,n=new zu(a,r);return n.initData(i,e),n}var rO=function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var i=this._getDataWithEncodedVisual();return i.getItemVisual(t,e)},r}(),ww=rO,iO=St(),aO=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ww(H(this.getData,this),H(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Rp(this,{coordDimensions:["value"],encodeDefaulter:vt(cx,this)})},t.prototype.getDataParams=function(e){var i=this.getData(),a=iO(i),n=a.seats;if(!n){var o=[];i.each(i.mapDimension("value"),function(l){o.push(l)}),n=a.seats=W1(o,i.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=n[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){Pl(e,"labelLine",["show"]);var i=e.labelLine,a=e.emphasis.labelLine;i.show=i.show&&e.label.show,a.show=a.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(we),nO=aO;function oO(r){return{seriesType:r,reset:function(t,e){var i=t.getData();i.filterSelf(function(a){var n=i.mapDimension("value"),o=i.get(n,a);return!(yt(o)&&!isNaN(o)&&o<0)})}}}function sO(r){r.registerChartView(eO),r.registerSeriesModel(nO),jx("pie",r.registerAction),r.registerLayout(vt(qk,"pie")),r.registerProcessor(xw("pie")),r.registerProcessor(oO("pie"))}var lO=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,i){return as(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e==null?this.option.large?5e3:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e==null?this.option.large?1e4:this.get("progressiveThreshold"):e},t.prototype.brushSelector=function(e,i,a){return a.point(i.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.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"}},t}(we),uO=lO,Tw=4,fO=function(){function r(){}return r}(),hO=function(r){O(t,r);function t(e){var i=r.call(this,e)||this;return i._off=0,i.hoverDataIdx=-1,i}return t.prototype.getDefaultShape=function(){return new fO},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,i){var a=i.points,n=i.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&n[0]=0;u--){var f=u*2,h=n[f]-s/2,c=n[f+1]-l/2;if(e>=h&&i>=c&&e<=h+s&&i<=c+l)return u}return-1},t.prototype.contain=function(e,i){var a=this.transformCoordToLocal(e,i),n=this.getBoundingRect();if(e=a[0],i=a[1],n.contain(e,i)){var o=this.hoverDataIdx=this.findDataIndex(e,i);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var i=this.shape,a=i.points,n=i.size,o=n[0],s=n[1],l=1/0,u=1/0,f=-1/0,h=-1/0,c=0;c=0&&(u.dataIndex=h+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),cO=vO,pO=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,a){var n=e.getData(),o=this._updateSymbolDraw(n,e);o.updateData(n,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,i,a){var n=e.getData(),o=this._updateSymbolDraw(n,e);o.incrementalPrepareUpdate(n),this._finished=!1},t.prototype.incrementalRender=function(e,i,a){this._symbolDraw.incrementalUpdate(e,i.getData(),{clipShape:this._getClipShape(i)}),this._finished=e.end===i.getData().count()},t.prototype.updateTransform=function(e,i,a){var n=e.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var o=Ip("").reset(e,i,a);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout(n)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){var i=e.coordinateSystem,a=i&&i.getArea&&i.getArea();return e.get("clip",!0)?a:null},t.prototype._updateSymbolDraw=function(e,i){var a=this._symbolDraw,n=i.pipelineContext,o=n.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new cO:new lw,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},t.prototype.remove=function(e,i){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(Ut),dO=pO,gO=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(ft),yO=gO,Ev=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",zt).models[0]},t.type="cartesian2dAxis",t}(ft);Xt(Ev,os);var Cw={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)"]}}},mO=Q({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Cw),Ep=Q({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}}},Cw),_O=Q({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Ep),SO=Z({logBase:10},Ep),Aw={category:mO,value:Ep,time:_O,log:SO},xO={value:1,category:1,time:1,log:1};function Go(r,t,e,i){w(xO,function(a,n){var o=Q(Q({},Aw[n],!0),i,!0),s=function(l){O(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+n,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var c=Oo(this),v=c?bn(f):{},p=h.getTheme();Q(f,p.get(n+"Axis")),Q(f,this.getDefaultOption()),f.type=Sm(f),c&&bi(f,v,c)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Dv.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=t+"Axis."+n,u.defaultOption=o,u}(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",Sm)}function Sm(r){return r.type||(r.data?"category":"value")}var bO=function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return z(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Ct(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r}(),wO=bO,kv=["x","y"];function xm(r){return r.type==="interval"||r.type==="time"}var TO=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=kv,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!xm(e)||!xm(i))){var a=e.getExtent(),n=i.getExtent(),o=this.dataToPoint([a[0],n[0]]),s=this.dataToPoint([a[1],n[1]]),l=a[1]-a[0],u=n[1]-n[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]-n[0]*h,p=this._transform=[f,0,0,h,c,v];this._invTransform=Ca([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var i=this.getAxis("x"),a=this.getAxis("y");return i.contain(i.toLocalCoord(e[0]))&&a.contain(a.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,i){var a=this.dataToPoint(e),n=this.dataToPoint(i),o=this.getArea(),s=new st(a[0],a[1],n[0]-a[0],n[1]-a[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,i,a){a=a||[];var n=e[0],o=e[1];if(this._transform&&n!=null&&isFinite(n)&&o!=null&&isFinite(o))return Ht(a,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(n,i)),a[1]=l.toGlobalCoord(l.dataToCoord(o,i)),a},t.prototype.clampData=function(e,i){var a=this.getAxis("x").scale,n=this.getAxis("y").scale,o=a.getExtent(),s=n.getExtent(),l=a.parse(e[0]),u=n.parse(e[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),i[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),i},t.prototype.pointToData=function(e,i){var a=[];if(this._invTransform)return Ht(a,e,this._invTransform);var n=this.getAxis("x"),o=this.getAxis("y");return a[0]=n.coordToData(n.toLocalCoord(e[0]),i),a[1]=o.coordToData(o.toLocalCoord(e[1]),i),a},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(){var e=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(e[0],e[1]),n=Math.min(i[0],i[1]),o=Math.max(e[0],e[1])-a,s=Math.max(i[0],i[1])-n;return new st(a,n,o,s)},t}(wO),CO=function(r){O(t,r);function t(e,i,a,n,o){var s=r.call(this,e,i,a)||this;return s.index=0,s.type=n||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),e&&i[0]>i[1]&&i.reverse(),i},t.prototype.pointToData=function(e,i){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),i)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(ur),AO=CO;function Ov(r,t,e){e=e||{};var i=r.coordinateSystem,a=t.axis,n={},o=a.getAxesOnZeroOf()[0],s=a.position,l=o?"onZero":s,u=a.dim,f=i.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],c={left:0,right:1,top:0,bottom:1,onZero:2},v=t.get("offset")||0,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])}n.position=[u==="y"?p[c[l]]:h[0],u==="x"?p[c[l]]:h[3]],n.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=g[s],n.labelOffset=o?p[c[s]]-p[c.onZero]:0,t.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),Gr(e.labelInside,t.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var y=t.get(["axisLabel","rotate"]);return n.labelRotate=l==="top"?-y:y,n.z2=1,n}function bm(r){return r.get("coordinateSystem")==="cartesian2d"}function wm(r){var t={xAxisModel:null,yAxisModel:null};return w(t,function(e,i){var a=i.replace(/Model$/,""),n=r.getReferringComponents(a,zt).models[0];t[i]=n}),t}var lh=Math.log;function Mw(r,t,e){var i=Ti.prototype,a=i.getTicks.call(e),n=i.getTicks.call(e,!0),o=a.length-1,s=i.getInterval.call(e),l=Xb(r,t),u=l.extent,f=l.fixMin,h=l.fixMax;if(r.type==="log"){var c=lh(r.base);u=[lh(u[0])/c,lh(u[1])/c]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var v=i.getExtent.call(r);f&&(u[0]=v[0]),h&&(u[1]=v[1]);var p=i.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=th(p),d=u[1]-p*o;else{var y=r.getTicks().length-1;y>o&&(p=th(p));var m=p*o;g=Math.ceil(u[1]/p)*p,d=Et(g-m),d<0&&u[0]>=0?(d=0,g=Et(m)):g>0&&u[1]<=0&&(g=0,d=-Et(m))}var _=(a[0].value-n[0].value)/s,S=(a[o].value-n[o].value)/s;i.setExtent.call(r,d+p*_,g+p*S),i.setInterval.call(r,p),(_||S)&&i.setNiceExtent.call(r,d+p,g-p)}var MO=function(){function r(t,e,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=kv,this._initCartesian(t,e,i),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model);function a(o){var s,l=at(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;Pv(d)&&p.get("alignTicks")&&p.get("interval")==null?f.push(v):(cn(d,p),Pv(d)&&(s=v))}f.length&&(s||(s=f.pop(),cn(s.scale,s.model)),w(f,function(g){Mw(g.scale,g.model,s.scale)}))}}a(i.x),a(i.y);var n={};w(i.x,function(o){Tm(i,"y",o,n)}),w(i.y,function(o){Tm(i,"x",o,n)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,i){var a=t.getBoxLayoutParams(),n=!i&&t.get("containLabel"),o=ve(a,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var s=this._axesList;l(),n&&(w(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=cE(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()),w(this._coordsList,function(u){u.calcAffineTransform()});function l(){w(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]),DO(u,f?o.x:o.y)})}},r.prototype.getAxis=function(t,e){var i=this._axesMap[t];if(i!=null)return i[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var i="x"+t+"y"+e;return this._coordsMap[i]}U(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var a=0,n=this._coordsList;a0?"top":"bottom",n="center"):Mo(a-ci)?(o=i>0?"bottom":"top",n="center"):(o="middle",a>0&&a0?"right":"left":n=i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r}(),Am={axisLine:function(r,t,e,i){var a=t.get(["axisLine","show"]);if(a==="auto"&&r.handleAutoShown&&(a=r.handleAutoShown("axisLine")),!!a){var n=t.axis.getExtent(),o=i.transform,s=[n[0],0],l=[n[1],0],u=s[0]>l[0];o&&(Ht(s,s,o),Ht(l,l,o));var f=k({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new le({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Ro(h.shape,h.style.lineWidth),h.anid="line",e.add(h);var c=t.get(["axisLine","symbol"]);if(c!=null){var v=t.get(["axisLine","symbolSize"]);V(c)&&(c=[c,c]),(V(v)||yt(v))&&(v=[v,v]);var p=Ou(t.get(["axisLine","symbolOffset"])||0,v),d=v[0],g=v[1];w([{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 _=Yt(c[m],-d/2,-g/2,d,g,f.stroke,!0),S=y.r+y.offset,b=u?l:s;_.attr({rotation:y.rotate,x:b[0]+S*Math.cos(r.rotation),y:b[1]-S*Math.sin(r.rotation),silent:!0,z2:11}),e.add(_)}})}}},axisTickLabel:function(r,t,e,i){var a=RO(e,i,t,r),n=kO(e,i,t,r);if(IO(t,n,a),EO(e,i,t,r.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=rk(z(n,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));ak(o)}},axisName:function(r,t,e,i){var a=Gr(r.axisName,t.get("name"));if(!!a){var n=t.get("nameLocation"),o=r.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),f=u[0]>u[1]?-1:1,h=[n==="start"?u[0]-f*l:n==="end"?u[1]+f*l:(u[0]+u[1])/2,Dm(n)?r.labelOffset+o*l:0],c,v=t.get("nameRotate");v!=null&&(v=v*ci/180);var p;Dm(n)?c=ma.innerTextLayout(r.rotation,v!=null?v:r.rotation,o):(c=LO(r.rotation,n,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=t.get("nameTruncate",!0)||{},y=g.ellipsis,m=Gr(r.nameTruncateMaxWidth,g.maxWidth,p),_=new dt({x:h[0],y:h[1],rotation:c.rotation,silent:ma.isLabelSilent(t),style:Bt(s,{text:a,font:d,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(Sn({el:_,componentModel:t,itemName:a}),_.__fullText=a,_.anid="name",t.get("triggerEvent")){var S=ma.makeAxisEventDataBase(t);S.targetType="axisName",S.name=a,nt(_).eventData=S}i.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function LO(r,t,e,i){var a=bc(e-r),n,o,s=i[0]>i[1],l=t==="start"&&!s||t!=="start"&&s;return Mo(a-ci/2)?(o=l?"bottom":"top",n="center"):Mo(a-ci*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",aci/2?n=l?"left":"right":n=l?"right":"left"),{rotation:a,textAlign:n,textVerticalAlign:o}}function IO(r,t,e){if(!Zb(r.axis)){var i=r.get(["axisLabel","showMinLabel"]),a=r.get(["axisLabel","showMaxLabel"]);t=t||[],e=e||[];var n=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=e[0],f=e[1],h=e[e.length-1],c=e[e.length-2];i===!1?(De(n),De(u)):Mm(n,o)&&(i?(De(o),De(f)):(De(n),De(u))),a===!1?(De(s),De(h)):Mm(l,s)&&(a?(De(l),De(c)):(De(s),De(h)))}}function De(r){r&&(r.ignore=!0)}function Mm(r,t){var e=r&&r.getBoundingRect().clone(),i=t&&t.getBoundingRect().clone();if(!(!e||!i)){var a=qo([]);return Ai(a,a,-r.rotation),e.applyTransform(Tr([],a,r.getLocalTransform())),i.applyTransform(Tr([],a,t.getLocalTransform())),e.intersect(i)}}function Dm(r){return r==="middle"||r==="center"}function Dw(r,t,e,i,a){for(var n=[],o=[],s=[],l=0;l=0||r===t}function FO(r){var t=kp(r);if(!!t){var e=t.axisPointerModel,i=t.axis.scale,a=e.option,n=e.get("status"),o=e.get("value");o!=null&&(o=i.parse(o));var s=Bv(e);n==null&&(a.status=s?"show":"hide");var l=i.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=Z({color:p.color},l));var g=Q(X(p),{boundaryGap:e,splitNumber:i,scale:a,axisLine:n,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:c},!1);if(V(f)){var y=g.name;g.name=f.replace("{value}",y!=null?y:"")}else q(f)&&(g.name=f(g.name,g));var m=new At(g,null,this.ecModel);return Xt(m,os.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=v},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Q({lineStyle:{color:"#bbb"}},$n.axisLine),axisLabel:Ys($n.axisLabel,!1),axisTick:Ys($n.axisTick,!1),splitLine:Ys($n.splitLine,!0),splitArea:Ys($n.splitArea,!0),indicator:[]},t}(ft),aB=iB,nB=["axisLine","axisTickLabel","axisName"],oB=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,a){var n=this.group;n.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var i=e.coordinateSystem,a=i.getIndicatorAxes(),n=z(a,function(o){var s=o.model.get("showName")?o.name:"",l=new Ci(o.model,{axisName:s,position:[i.cx,i.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});w(n,function(o){w(nB,o.add,o),this.group.add(o.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(e){var i=e.coordinateSystem,a=i.getIndicatorAxes();if(!a.length)return;var n=e.get("shape"),o=e.getModel("splitLine"),s=e.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=N(c)?c:[c],d=N(v)?v:[v],g=[],y=[];function m(R,E,W){var B=W%E.length;return R[B]=R[B]||[],B}if(n==="circle")for(var _=a[0].getTicksCoords(),S=i.cx,b=i.cy,x=0;x<_.length;x++){if(f){var T=m(g,p,x);g[T].push(new nr({shape:{cx:S,cy:b,r:_[x].coord}}))}if(h&&x<_.length-1){var T=m(y,d,x);y[T].push(new Qo({shape:{cx:S,cy:b,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var C,A=z(a,function(R,E){var W=R.getTicksCoords();return C=C==null?W.length-1:Math.min(W.length-1,C),z(W,function(B){return i.coordToPoint(B.coord,E)})}),D=[],x=0;x<=C;x++){for(var M=[],P=0;P3?1.4:o>1?1.2:1.1,f=n>0?u:1/u;hh(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(a){var h=Math.abs(n),c=(n>0?1:-1)*(h>3?.4:h>1?.15:.05);hh(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:c,originX:s,originY:l,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!km(this._zr,"globalPan")){var i=e.pinchScale>1?1.1:1/1.1;hh(this,"zoom",null,e,{scale:i,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}(or);function hh(r,t,e,i,a){r.pointerChecker&&r.pointerChecker(i,a.originX,a.originY)&&(Hr(i.event),Ew(r,t,e,i,a))}function Ew(r,t,e,i,a){a.isAvailableBehavior=H(gl,null,e,i),r.trigger(t,a)}function gl(r,t,e){var i=e[r];return!r||i&&(!V(i)||t.event[i+"Key"])}var kw=dB;function gB(r,t,e){var i=r.target;i.x+=t,i.y+=e,i.dirty()}function yB(r,t,e,i){var a=r.target,n=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=t,n){var s=n.min||0,l=n.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,a.x-=(e-a.x)*(u-1),a.y-=(i-a.y)*(u-1),a.scaleX*=u,a.scaleY*=u,a.dirty()}var mB={axisPointer:1,tooltip:1,brush:1};function Ow(r,t,e){var i=t.getComponentByElement(r.topTarget),a=i&&i.coordinateSystem;return i&&i!==e&&!mB.hasOwnProperty(i.mainType)&&a&&a.model!==e}function Bw(r){if(V(r)){var t=new DOMParser;r=t.parseFromString(r,"text/xml")}var e=r;for(e.nodeType===9&&(e=e.firstChild);e.nodeName.toLowerCase()!=="svg"||e.nodeType!==1;)e=e.nextSibling;return e}var vh,jl={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"},Om=at(jl),Jl={"alignment-baseline":"textBaseline","stop-color":"stopColor"},Bm=at(Jl),_B=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(t,e){e=e||{};var i=Bw(t);this._defsUsePending=[];var a=new it;this._root=a;var n=[],o=i.getAttribute("viewBox")||"",s=parseFloat(i.getAttribute("width")||e.width),l=parseFloat(i.getAttribute("height")||e.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Te(i,a,null,!0,!1);for(var u=i.firstChild;u;)this._parseNode(u,a,n,null,!1,!1),u=u.nextSibling;bB(this._defs,this._defsUsePending),this._defsUsePending=[];var f,h;if(o){var c=$u(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=zw(f,{x:0,y:0,width:s,height:l}),!e.ignoreViewBox)){var v=a;a=new it,a.add(v),v.scaleX=v.scaleY=h.scale,v.x=h.x,v.y=h.y}return!e.ignoreRootClip&&s!=null&&l!=null&&a.setClipPath(new pt({shape:{x:0,y:0,width:s,height:l}})),{root:a,width:s,height:l,viewBoxRect:f,viewBoxTransform:h,named:n}},r.prototype._parseNode=function(t,e,i,a,n,o){var s=t.nodeName.toLowerCase(),l,u=a;if(s==="defs"&&(n=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=e;else{if(!n){var f=vh[s];if(f&&G(vh,s)){l=f.call(this,t,e);var h=t.getAttribute("name");if(h){var c={name:h,namedFrom:null,svgNodeTagLower:s,el:l};i.push(c),s==="g"&&(u=c)}else a&&i.push({name:a.name,namedFrom:a,svgNodeTagLower:s,el:l});e.add(l)}}var v=Nm[s];if(v&&G(Nm,s)){var p=v.call(this,t),d=t.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=t.firstChild;g;)g.nodeType===1?this._parseNode(g,l,i,u,n,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(t,e){var i=new Po({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Pe(e,i),Te(t,i,this._defsUsePending,!1,!1),SB(i,e);var a=i.style,n=a.fontSize;n&&n<9&&(a.fontSize=9,i.scaleX*=n/9,i.scaleY*=n/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=i.getBoundingRect();return this._textX+=s.width,e.add(i),i},r.internalField=function(){vh={g:function(t,e){var i=new it;return Pe(e,i),Te(t,i,this._defsUsePending,!1,!1),i},rect:function(t,e){var i=new pt;return Pe(e,i),Te(t,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(t,e){var i=new nr;return Pe(e,i),Te(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),i.silent=!0,i},line:function(t,e){var i=new le;return Pe(e,i),Te(t,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(t,e){var i=new yu;return Pe(e,i),Te(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(t,e){var i=t.getAttribute("points"),a;i&&(a=Fm(i));var n=new Dr({shape:{points:a||[]},silent:!0});return Pe(e,n),Te(t,n,this._defsUsePending,!1,!1),n},polyline:function(t,e){var i=t.getAttribute("points"),a;i&&(a=Fm(i));var n=new He({shape:{points:a||[]},silent:!0});return Pe(e,n),Te(t,n,this._defsUsePending,!1,!1),n},image:function(t,e){var i=new ce;return Pe(e,i),Te(t,i,this._defsUsePending,!1,!1),i.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),i.silent=!0,i},text:function(t,e){var i=t.getAttribute("x")||"0",a=t.getAttribute("y")||"0",n=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(n),this._textY=parseFloat(a)+parseFloat(o);var s=new it;return Pe(e,s),Te(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,e){var i=t.getAttribute("x"),a=t.getAttribute("y");i!=null&&(this._textX=parseFloat(i)),a!=null&&(this._textY=parseFloat(a));var n=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new it;return Pe(e,s),Te(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(o),s},path:function(t,e){var i=t.getAttribute("d")||"",a=DS(i);return Pe(e,a),Te(t,a,this._defsUsePending,!1,!1),a.silent=!0,a}}}(),r}(),Nm={lineargradient:function(r){var t=parseInt(r.getAttribute("x1")||"0",10),e=parseInt(r.getAttribute("y1")||"0",10),i=parseInt(r.getAttribute("x2")||"10",10),a=parseInt(r.getAttribute("y2")||"0",10),n=new ts(t,e,i,a);return zm(r,n),Vm(r,n),n},radialgradient:function(r){var t=parseInt(r.getAttribute("cx")||"0",10),e=parseInt(r.getAttribute("cy")||"0",10),i=parseInt(r.getAttribute("r")||"0",10),a=new Bc(t,e,i);return zm(r,a),Vm(r,a),a}};function zm(r,t){var e=r.getAttribute("gradientUnits");e==="userSpaceOnUse"&&(t.global=!0)}function Vm(r,t){for(var e=r.firstChild;e;){if(e.nodeType===1&&e.nodeName.toLocaleLowerCase()==="stop"){var i=e.getAttribute("offset"),a=void 0;i&&i.indexOf("%")>0?a=parseInt(i,10)/100:i?a=parseFloat(i):a=0;var n={};Nw(e,n,n);var o=n.stopColor||e.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:a,color:o})}e=e.nextSibling}}function Pe(r,t){r&&r.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),Z(t.__inheritedStyle,r.__inheritedStyle))}function Fm(r){for(var t=$u(r),e=[],i=0;i0;n-=2){var o=i[n],s=i[n-1],l=$u(o);switch(a=a||Fe(),s){case"translate":Wr(a,a,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":dc(a,a,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Ai(a,a,-parseFloat(l[0])*ch);break;case"skewX":var u=Math.tan(parseFloat(l[0])*ch);Tr(a,[1,0,u,1,0,0],a);break;case"skewY":var f=Math.tan(parseFloat(l[0])*ch);Tr(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}}t.setLocalTransform(a)}}var Hm=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Nw(r,t,e){var i=r.getAttribute("style");if(!!i){Hm.lastIndex=0;for(var a;(a=Hm.exec(i))!=null;){var n=a[1],o=G(jl,n)?jl[n]:null;o&&(t[o]=a[2]);var s=G(Jl,n)?Jl[n]:null;s&&(e[s]=a[2])}}}function AB(r,t,e){for(var i=0;i0,g={api:i,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:c};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(t,e,i),this._updateMapSelectHandler(t,u,i,a)},r.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=$(),i=$(),a=this._regionsGroup,n=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function f(v,p){return p&&(v=p(v)),v&&[v[0]*n.scaleX+n.x,v[1]*n.scaleY+n.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;qr(t,Kr(i),{labelFetcher:c,labelDataIndex:h,defaultText:e},v);var p=t.getTextContent();if(p&&(Vw(p).ignore=p.ignore,t.textConfig&&o)){var d=t.getBoundingRect().clone();t.textConfig.layoutRect=d,t.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function Xm(r,t,e,i,a,n){r.data?r.data.setItemGraphicEl(n,t):nt(t).eventData={componentType:"geo",componentIndex:a.componentIndex,geoIndex:a.componentIndex,name:e,region:i&&i.option||{}}}function Zm(r,t,e,i,a){r.data||Sn({el:t,componentModel:a,itemName:e,itemTooltipOption:i.get("tooltip")})}function qm(r,t,e,i,a){t.highDownSilentOnTouch=!!a.get("selectedMode");var n=i.getModel("emphasis"),o=n.get("focus");return xi(t,o,n.get("blurScope"),n.get("disabled")),r.isGeo&&f2(t,a,e),o}function Km(r,t,e){var i=[],a;function n(){a=[]}function o(){a.length&&(i.push(a),a=[])}var s=t({polygonStart:n,polygonEnd:o,lineStart:n,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&a.push([l,u])},sphere:function(){}});return!e&&s.polygonStart(),w(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},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.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"},t}(we),ZB=XB;function qB(r,t){var e={};return w(r,function(i){i.each(i.mapDimension("value"),function(a,n){var o="ec-"+i.getName(n);e[o]=e[o]||[],isNaN(a)||e[o].push(a)})}),r[0].map(r[0].mapDimension("value"),function(i,a){for(var n="ec-"+r[0].getName(a),o=0,s=1/0,l=-1/0,u=e[n].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 b=r.getBoxLayoutParams();b.aspect=g,S=ve(b,{width:p,height:d})}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(r.get("center"),t),this.setZoom(r.get("zoom"))}function tN(r,t){w(t.get("geoCoord"),function(e,i){r.addGeoCoord(i,e)})}var eN=function(){function r(){this.dimensions=Hw}return r.prototype.create=function(t,e){var i=[];function a(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new t0(l+s,l,k({nameMap:o.get("nameMap")},a(o)));u.zoomLimit=o.get("scaleLimit"),i.push(u),o.coordinateSystem=u,u.model=o,u.resize=e0,u.resize(o,e)}),t.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=i[l]}});var n={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();n[s]=n[s]||[],n[s].push(o)}}),w(n,function(o,s){var l=z(o,function(f){return f.get("nameMap")}),u=new t0(s,s,k({nameMap:t1(l)},a(o[0])));u.zoomLimit=Gr.apply(null,z(o,function(f){return f.get("scaleLimit")})),i.push(u),u.resize=e0,u.resize(o[0],e),w(o,function(f){f.coordinateSystem=u,tN(u,f)})}),i},r.prototype.getFilledRegions=function(t,e,i,a){for(var n=(t||[]).slice(),o=$(),s=0;s=0;n--)i[n]==null&&(delete e[t[n]],t.pop())}function ph(r,t){var e=r.visual,i=[];U(e)?Wo(e,function(n){i.push(n)}):e!=null&&i.push(e);var a={color:1,symbol:1};!t&&i.length===1&&!a.hasOwnProperty(r.type)&&(i[1]=i[0]),Uw(r,i)}function Zs(r){return{applyVisual:function(t,e,i){var a=this.mapValueToVisual(t);i("color",r(e("color"),a))},_normalizedToVisual:Vv([0,1])}}function i0(r){var t=this.option.visual;return t[Math.round(wt(r,[0,1],[0,t.length-1],!0))]||{}}function Yn(r){return function(t,e,i){i(r,this.mapValueToVisual(t))}}function no(r){var t=this.option.visual;return t[this.option.loop&&r!==Ql?r%t.length:r]}function ta(){return this.option.visual[0]}function Vv(r){return{linear:function(t){return wt(t,r,this.option.visual,!0)},category:no,piecewise:function(t,e){var i=Fv.call(this,e);return i==null&&(i=wt(t,r,this.option.visual,!0)),i},fixed:ta}}function Fv(r){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var i=Np.findPieceIndex(r,e),a=e[i];if(a&&a.visual)return a.visual[this.type]}}function Uw(r,t){return r.visual=t,r.type==="color"&&(r.parsedVisual=z(t,function(e){var i=ue(e);return i||[0,0,0,1]})),t}var pN={linear:function(r){return wt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var t=this.option.pieceList,e=Np.findPieceIndex(r,t,!0);if(e!=null)return wt(e,[0,t.length-1],[0,1],!0)},category:function(r){var t=this.option.categories?this.option.categoryMap[r]:r;return t==null?Ql:t},fixed:Gt};function qs(r,t,e){return r?t<=e:tmN)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||!dh(this,"mousemove"))){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),i=e.behavior;i==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(i==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:i==="jump"?null:{duration:0}})}}};function dh(r,t){var e=r._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}var xN=_N,bN=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var i=this.option;e&&Q(i,e,!0),this._initDimensions()},t.prototype.contains=function(e,i){var a=e.get("parallelIndex");return a!=null&&i.getComponent("parallel",a)===this},t.prototype.setAxisExpand=function(e){w(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(i){e.hasOwnProperty(i)&&(this.option[i]=e[i])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],i=this.parallelAxisIndex=[],a=Ct(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(n){return(n.get("parallelIndex")||0)===this.componentIndex},this);w(a,function(n){e.push("dim"+n.get("dim")),i.push(n.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.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},t}(ft),wN=bN,TN=function(r){O(t,r);function t(e,i,a,n,o){var s=r.call(this,e,i,a)||this;return s.type=n||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(ur),CN=TN;function Da(r,t,e,i,a,n){r=r||0;var o=e[1]-e[0];if(a!=null&&(a=Ua(a,[0,o])),n!=null&&(n=Math.max(n,a!=null?a:0)),i==="all"){var s=Math.abs(t[1]-t[0]);s=Ua(s,[0,o]),a=n=Ua(s,[a,n]),i=0}t[0]=Ua(t[0],e),t[1]=Ua(t[1],e);var l=gh(t,i);t[i]+=r;var u=a||0,f=e.slice();l.sign<0?f[0]+=u:f[1]-=u,t[i]=Ua(t[i],f);var h;return h=gh(t,i),a!=null&&(h.sign!==l.sign||h.spann&&(t[1-i]=t[i]+h.sign*n),t}function gh(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function Ua(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var yh=w,Yw=Math.min,Xw=Math.max,a0=Math.floor,AN=Math.ceil,n0=Et,MN=Math.PI,DN=function(){function r(t,e,i){this.type="parallel",this._axesMap=$(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,i)}return r.prototype._init=function(t,e,i){var a=t.dimensions,n=t.parallelAxisIndex;yh(a,function(o,s){var l=n[s],u=e.getComponent("parallelAxis",l),f=this._axesMap.set(o,new CN(o,Hu(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(t,e){this._updateAxesFromSeries(this._model,t)},r.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),i=e.axisBase,a=e.layoutBase,n=e.pixelDimIndex,o=t[1-n],s=t[n];return o>=i&&o<=i+e.axisLength&&s>=a&&s<=a+e.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(i){if(!!t.contains(i,e)){var a=i.getData();yh(this.dimensions,function(n){var o=this._axesMap.get(n);o.scale.unionExtentFromData(a,a.mapDimension(n)),cn(o.scale,o.model)},this)}},this)},r.prototype.resize=function(t,e){this._rect=ve(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,i=["x","y"],a=["width","height"],n=t.get("layout"),o=n==="horizontal"?0:1,s=e[a[o]],l=[0,s],u=this.dimensions.length,f=Ks(t.get("axisExpandWidth"),l),h=Ks(t.get("axisExpandCount")||0,[0,u]),c=t.get("axisExpandable")&&u>3&&u>h&&h>1&&f>0&&s>0,v=t.get("axisExpandWindow"),p;if(v)p=Ks(v[1]-v[0],l),v[1]=v[0]+p;else{p=Ks(f*(h-1),l);var d=t.get("axisExpandCenter")||a0(u/2);v=[f*d-p/2],v[1]=v[0]+p}var g=(s-p)/(u-h);g<3&&(g=0);var y=[a0(n0(v[0]/f,1))+1,AN(n0(v[1]/f,1))-1],m=g/f*v[0];return{layout:n,pixelDimIndex:o,layoutBase:e[i[o]],layoutLength:s,axisBase:e[i[1-o]],axisLength:e[a[1-o]],axisExpandable:c,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:v,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,i=this.dimensions,a=this._makeLayoutInfo(),n=a.layout;e.each(function(o){var s=[0,a.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),yh(i,function(o,s){var l=(a.axisExpandable?LN:PN)(s,a),u={horizontal:{x:l.position,y:a.axisLength},vertical:{x:0,y:l.position}},f={horizontal:MN/2,vertical:0},h=[u[n].x+t.x,u[n].y+t.y],c=f[n],v=Fe();Ai(v,v,c),Wr(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(t){return this._axesMap.get(t)},r.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},r.prototype.eachActiveState=function(t,e,i,a){i==null&&(i=0),a==null&&(a=t.count());var n=this._axesMap,o=this.dimensions,s=[],l=[];w(o,function(g){s.push(t.mapDimension(g)),l.push(n.get(g).model)});for(var u=this.hasAxisBrushed(),f=i;fn*(1-h[0])?(u="jump",l=s-n*(1-h[2])):(l=s-n*h[1])>=0&&(l=s-n*(1-h[1]))<=0&&(l=0),l*=e.axisExpandWidth/f,l?Da(l,a,o,"all"):u="none";else{var v=a[1]-a[0],p=o[1]*s/v;a=[Xw(0,p-v/2)],a[1]=Yw(o[1],a[0]+v),a[0]=a[1]-v}return{axisExpandWindow:a,behavior:u}},r}();function Ks(r,t){return Yw(Xw(r,t[0]),t[1])}function PN(r,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*r,axisNameAvailableWidth:e,axisLabelShow:!0}}function LN(r,t){var e=t.layoutLength,i=t.axisExpandWidth,a=t.axisCount,n=t.axisCollapseWidth,o=t.winInnerIndices,s,l=n,u=!1,f;return r=0;a--)Sr(i[a])},t.prototype.getActiveState=function(e){var i=this.activeIntervals;if(!i.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(i.length===1){var a=i[0];if(a[0]<=e&&e<=a[1])return"active"}else for(var n=0,o=i.length;nNN}function tT(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function eT(r,t,e,i){var a=new it;return a.add(new pt({name:"main",style:Gp(e),silent:!0,draggable:!0,cursor:"move",drift:vt(u0,r,t,a,["n","s","w","e"]),ondragend:vt(wa,t,{isEnd:!0})})),w(i,function(n){a.add(new pt({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:vt(u0,r,t,a,n),ondragend:vt(wa,t,{isEnd:!0})}))}),a}function rT(r,t,e,i){var a=i.brushStyle.lineWidth||0,n=pn(a,zN),o=e[0][0],s=e[1][0],l=o-a/2,u=s-a/2,f=e[0][1],h=e[1][1],c=f-n+a/2,v=h-n+a/2,p=f-o,d=h-s,g=p+a,y=d+a;Er(r,t,"main",o,s,p,d),i.transformable&&(Er(r,t,"w",l,u,n,y),Er(r,t,"e",c,u,n,y),Er(r,t,"n",l,u,g,n),Er(r,t,"s",l,v,g,n),Er(r,t,"nw",l,u,n,n),Er(r,t,"ne",c,u,n,n),Er(r,t,"sw",l,v,n,n),Er(r,t,"se",c,v,n,n))}function Hv(r,t){var e=t.__brushOption,i=e.transformable,a=t.childAt(0);a.useStyle(Gp(e)),a.attr({silent:!i,cursor:i?"move":"default"}),w([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var o=t.childOfName(n.join("")),s=n.length===1?Wv(r,n[0]):UN(r,n);o&&o.attr({silent:!i,invisible:!i,cursor:i?FN[s]+"-resize":null})})}function Er(r,t,e,i,a,n,o){var s=t.childOfName(e);s&&s.setShape(XN(Hp(r,t,[[i,a],[i+n,a+o]])))}function Gp(r){return Z({strokeNoScale:!0},r.brushStyle)}function iT(r,t,e,i){var a=[$o(r,e),$o(t,i)],n=[pn(r,e),pn(t,i)];return[[a[0],n[0]],[a[1],n[1]]]}function $N(r){return yi(r.group)}function Wv(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},a=xu(e[t],$N(r));return i[a]}function UN(r,t){var e=[Wv(r,t[0]),Wv(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function u0(r,t,e,i,a,n){var o=e.__brushOption,s=r.toRectRange(o.range),l=aT(t,a,n);w(i,function(u){var f=VN[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(iT(s[0][0],s[1][0],s[0][1],s[1][1])),zp(t,e),wa(t,{isEnd:!1})}function YN(r,t,e,i){var a=t.__brushOption.range,n=aT(r,e,i);w(a,function(o){o[0]+=n[0],o[1]+=n[1]}),zp(r,t),wa(r,{isEnd:!1})}function aT(r,t,e){var i=r.group,a=i.transformCoordToLocal(t,e),n=i.transformCoordToLocal(0,0);return[a[0]-n[0],a[1]-n[1]]}function Hp(r,t,e){var i=Qw(r,t);return i&&i!==ba?i.clipPath(e,r._transform):X(e)}function XN(r){var t=$o(r[0][0],r[1][0]),e=$o(r[0][1],r[1][1]),i=pn(r[0][0],r[1][0]),a=pn(r[0][1],r[1][1]);return{x:t,y:e,width:i-t,height:a-e}}function ZN(r,t,e){if(!(!r._brushType||KN(r,t.offsetX,t.offsetY))){var i=r._zr,a=r._covers,n=Fp(r,t,e);if(!r._dragging)for(var o=0;oi.getWidth()||e<0||e>i.getHeight()}var Uu={lineX:v0(0),lineY:v0(1),rect:{createCover:function(r,t){function e(i){return i}return eT({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=tT(r);return iT(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,i){rT(r,t,e,i)},updateCommon:Hv,contain:Uv},polygon:{createCover:function(r,t){var e=new it;return e.add(new He({name:"main",style:Gp(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new Dr({name:"main",draggable:!0,drift:vt(YN,r,t),ondragend:vt(wa,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,i){t.childAt(0).setShape({points:Hp(r,t,e)})},updateCommon:Hv,contain:Uv}};function v0(r){return{createCover:function(t,e){return eT({toRectRange:function(i){var a=[i,[0,100]];return r&&a.reverse(),a},fromRectRange:function(i){return i[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=tT(t),i=$o(e[0][r],e[1][r]),a=pn(e[0][r],e[1][r]);return[i,a]},updateCoverShape:function(t,e,i,a){var n,o=Qw(t,e);if(o!==ba&&o.getLinearBrushOtherExtent)n=o.getLinearBrushOtherExtent(r);else{var s=t._zr;n=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[i,n];r&&l.reverse(),rT(t,e,l,a)},updateCommon:Hv,contain:Uv}}var oT=HN;function sT(r){return r=Wp(r),function(t){return Hc(t,r)}}function lT(r,t){return r=Wp(r),function(e){var i=t!=null?t:e,a=i?r.width:r.height,n=i?r.x:r.y;return[n,n+(a||0)]}}function uT(r,t,e){var i=Wp(r);return function(a,n){return i.contain(n[0],n[1])&&!Ow(a,t,e)}}function Wp(r){return st.create(r)}var jN=["axisLine","axisTickLabel","axisName"],JN=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){r.prototype.init.apply(this,arguments),(this._brushController=new oT(i.getZr())).on("brush",H(this._onBrush,this))},t.prototype.render=function(e,i,a,n){if(!QN(e,i,n)){this.axisModel=e,this.api=a,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new it,this.group.add(this._axisGroup),!!e.get("show")){var s=e5(e,i),l=s.coordinateSystem,u=e.getAreaSelectStyle(),f=u.width,h=e.axis.dim,c=l.getAxisLayout(h),v=k({strokeContainThreshold:f},c),p=new Ci(e,v);w(jN,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(v,u,e,s,f,a),bu(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,i,a,n,o,s){var l=a.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),h=st.create({x:l[0],y:-o/2,width:u,height:o});h.x-=f,h.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:sT(h),isTargetByCursor:uT(h,s,n),getLinearBrushOtherExtent:lT(h,0)}]).enableBrush({brushType:"lineX",brushStyle:i,removeOnClick:!0}).updateCovers(t5(a))},t.prototype._onBrush=function(e){var i=e.areas,a=this.axisModel,n=a.axis,o=z(i,function(s){return[n.coordToData(s.range[0],!0),n.coordToData(s.range[1],!0)]});(!a.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:a.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(Pt);function QN(r,t,e){return e&&e.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:e})[0]===r}function t5(r){var t=r.axis;return z(r.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function e5(r,t){return t.getComponent("parallel",r.get("parallelIndex"))}var r5=JN,i5={type:"axisAreaSelect",event:"axisAreaSelected"};function a5(r){r.registerAction(i5,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(i){i.axis.model.setActiveIntervals(t.intervals)})}),r.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(i){i.setAxisExpand(t)})})}var n5={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function o5(r){r.registerComponentView(xN),r.registerComponentModel(wN),r.registerCoordinateSystem("parallel",kN),r.registerPreprocessor(dN),r.registerComponentModel(o0),r.registerComponentView(r5),Go(r,"parallel",o0,n5),a5(r)}var s5=["itemStyle","borderWidth"],c0=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],mh=new nr,l5=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,a){var n=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),h=l.master.getRect(),c={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:e,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:f,valueDim:c0[+f],categoryDim:c0[1-+f]};return o.diff(s).add(function(v){if(!!o.hasValue(v)){var p=d0(o,v),d=p0(o,v,p,c),g=g0(o,c,d);o.setItemGraphicEl(v,g),n.add(g),m0(g,c,d)}}).update(function(v,p){var d=s.getItemGraphicEl(p);if(!o.hasValue(v)){n.remove(d);return}var g=d0(o,v),y=p0(o,v,g,c),m=dT(o,y);d&&m!==d.__pictorialShapeStr&&(n.remove(d),o.setItemGraphicEl(v,null),d=null),d?d5(d,c,y):d=g0(o,c,y,!0),o.setItemGraphicEl(v,d),d.__pictorialSymbolMeta=y,n.add(d),m0(d,c,y)}).remove(function(v){var p=s.getItemGraphicEl(v);p&&y0(s,v,p.__pictorialSymbolMeta.animationModel,p)}).execute(),this._data=o,this.group},t.prototype.remove=function(e,i){var a=this.group,n=this._data;e.get("animation")?n&&n.eachItemGraphicEl(function(o){y0(n,nt(o).dataIndex,e,o)}):a.removeAll()},t.type="pictorialBar",t}(Ut);function p0(r,t,e,i){var a=r.getItemLayout(t),n=e.get("symbolRepeat"),o=e.get("symbolClip"),s=e.get("symbolPosition")||"start",l=e.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=e.get("symbolPatternSize")||2,h=e.isAnimationEnabled(),c={dataIndex:t,layout:a,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:n,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:h?e:null,hoverScale:h&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};u5(e,n,a,i,c),f5(r,t,a,n,o,c.boundingLength,c.pxSign,f,i,c),h5(e,c.symbolScale,u,i,c);var v=c.symbolSize,p=Ou(e.get("symbolOffset"),v);return v5(e,v,a,n,o,p,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,i,c),c}function u5(r,t,e,i,a){var n=i.valueDim,o=r.get("symbolBoundingData"),s=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(e[n.wh]<=0),f;if(N(o)){var h=[_h(s,o[0])-l,_h(s,o[1])-l];h[1]0?1:-1}function _h(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function f5(r,t,e,i,a,n,o,s,l,u){var f=l.valueDim,h=l.categoryDim,c=Math.abs(e[h.wh]),v=r.getItemVisual(t,"symbolSize"),p;N(v)?p=v.slice():v==null?p=["100%","100%"]:p=[v,v],p[h.index]=K(p[h.index],c),p[f.index]=K(p[f.index],i?c:Math.abs(n)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[f.index]*=(l.isHorizontal?-1:1)*o}function h5(r,t,e,i,a){var n=r.get(s5)||0;n&&(mh.attr({scaleX:t[0],scaleY:t[1],rotation:e}),mh.updateTransform(),n/=mh.getLineScale(),n*=t[i.valueDim.index]),a.valueLineWidth=n||0}function v5(r,t,e,i,a,n,o,s,l,u,f,h){var c=f.categoryDim,v=f.valueDim,p=h.pxSign,d=Math.max(t[v.index]+s,0),g=d;if(i){var y=Math.abs(l),m=Gr(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var S=K(m,t[v.index]),b=Math.max(d+S*2,0),x=_?0:S*2,T=Tc(i),C=T?i:_0((y+x)/b),A=y-C*d;S=A/2/(_?C:Math.max(C-1,1)),b=d+S*2,x=_?0:S*2,!T&&i!=="fixed"&&(C=u?_0((Math.abs(u)+x)/b):0),g=C*b-x,h.repeatTimes=C,h.symbolMargin=S}var D=p*(g/2),M=h.pathPosition=[];M[c.index]=e[c.wh]/2,M[v.index]=o==="start"?D:o==="end"?l-D:l/2,n&&(M[0]+=n[0],M[1]+=n[1]);var P=h.bundlePosition=[];P[c.index]=e[c.xy],P[v.index]=e[v.xy];var L=h.barRectShape=k({},e);L[v.wh]=p*Math.max(Math.abs(e[v.wh]),Math.abs(M[v.index]+D)),L[c.wh]=e[c.wh];var I=h.clipShape={};I[c.xy]=-e[c.xy],I[c.wh]=f.ecSize[c.wh],I[v.xy]=0,I[v.wh]=e[v.wh]}function fT(r){var t=r.symbolPatternSize,e=Yt(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function hT(r,t,e,i){var a=r.__pictorialBundle,n=e.symbolSize,o=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,f=0,h=n[t.valueDim.index]+o+e.symbolMargin*2;for($p(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:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function vT(r,t,e,i){var a=r.__pictorialBundle,n=r.__pictorialMainPath;n?on(n,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,i):(n=r.__pictorialMainPath=fT(e),a.add(n),on(n,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,i))}function cT(r,t,e){var i=k({},t.barRectShape),a=r.__pictorialBarRect;a?on(a,null,{shape:i},t,e):(a=r.__pictorialBarRect=new pt({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function pT(r,t,e,i){if(e.symbolClip){var a=r.__pictorialClipPath,n=k({},e.clipShape),o=t.valueDim,s=e.animationModel,l=e.dataIndex;if(a)Dt(a,{shape:n},s,l);else{n[o.wh]=0,a=new pt({shape:n}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=e.clipShape[o.wh],Tu[i?"updateProps":"initProps"](a,{shape:u},s,l)}}}function d0(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=c5,e.isAnimationEnabled=p5,e}function c5(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function p5(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function g0(r,t,e,i){var a=new it,n=new it;return a.add(n),a.__pictorialBundle=n,n.x=e.bundlePosition[0],n.y=e.bundlePosition[1],e.symbolRepeat?hT(a,t,e):vT(a,t,e),cT(a,e,i),pT(a,t,e,i),a.__pictorialShapeStr=dT(r,e),a.__pictorialSymbolMeta=e,a}function d5(r,t,e){var i=e.animationModel,a=e.dataIndex,n=r.__pictorialBundle;Dt(n,{x:e.bundlePosition[0],y:e.bundlePosition[1]},i,a),e.symbolRepeat?hT(r,t,e,!0):vT(r,t,e,!0),cT(r,e,!0),pT(r,t,e,!0)}function y0(r,t,e,i){var a=i.__pictorialBarRect;a&&a.removeTextContent();var n=[];$p(i,function(o){n.push(o)}),i.__pictorialMainPath&&n.push(i.__pictorialMainPath),i.__pictorialClipPath&&(e=null),w(n,function(o){Lo(o,{scaleX:0,scaleY:0},e,t,function(){i.parent&&i.parent.remove(i)})}),r.setItemGraphicEl(t,null)}function dT(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function $p(r,t,e){w(r.__pictorialBundle.children(),function(i){i!==r.__pictorialBarRect&&t.call(e,i)})}function on(r,t,e,i,a,n){t&&r.attr(t),i.symbolClip&&!a?e&&r.attr(e):e&&Tu[a?"updateProps":"initProps"](r,e,i.animationModel,i.dataIndex,n)}function m0(r,t,e){var i=e.dataIndex,a=e.itemModel,n=a.getModel("emphasis"),o=n.getModel("itemStyle").getItemStyle(),s=a.getModel(["blur","itemStyle"]).getItemStyle(),l=a.getModel(["select","itemStyle"]).getItemStyle(),u=a.getShallow("cursor"),f=n.get("focus"),h=n.get("blurScope"),c=n.get("scale");$p(r,function(d){if(d instanceof ce){var g=d.style;d.useStyle(k({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},e.style))}else d.useStyle(e.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=e.z2});var v=t.valueDim.posDesc[+(e.boundingLength>0)],p=r.__pictorialBarRect;qr(p,Kr(a),{labelFetcher:t.seriesModel,labelDataIndex:i,defaultText:Wu(t.seriesModel.getData(),i),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:v}),xi(r,f,h,n.get("disabled"))}function _0(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}var g5=l5,y5=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return t.prototype.getInitialData=function(e){return e.stack=null,r.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=Mi(Kl.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"}}}),t}(Kl),m5=y5;function _5(r){r.registerChartView(g5),r.registerSeriesModel(m5),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,vt(Vb,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Fb("pictorialBar"))}function S5(r,t,e,i){return r&&(r.legacy||r.legacy!==!1&&!e&&!i&&t!=="tspan"&&(t==="text"||G(r,"text")))}function x5(r,t,e){var i=r,a,n,o;if(t==="text")o=i;else{o={},G(i,"text")&&(o.text=i.text),G(i,"rich")&&(o.rich=i.rich),G(i,"textFill")&&(o.fill=i.textFill),G(i,"textStroke")&&(o.stroke=i.textStroke),G(i,"fontFamily")&&(o.fontFamily=i.fontFamily),G(i,"fontSize")&&(o.fontSize=i.fontSize),G(i,"fontStyle")&&(o.fontStyle=i.fontStyle),G(i,"fontWeight")&&(o.fontWeight=i.fontWeight),n={type:"text",style:o,silent:!0},a={};var s=G(i,"textPosition");e?a.position=s?i.textPosition:"inside":s&&(a.position=i.textPosition),G(i,"textPosition")&&(a.position=i.textPosition),G(i,"textOffset")&&(a.offset=i.textOffset),G(i,"textRotation")&&(a.rotation=i.textRotation),G(i,"textDistance")&&(a.distance=i.textDistance)}return S0(o,r),w(o.rich,function(l){S0(l,l)}),{textConfig:a,textContent:n}}function S0(r,t){!t||(t.font=t.textFont||t.font,G(t,"textStrokeWidth")&&(r.lineWidth=t.textStrokeWidth),G(t,"textAlign")&&(r.align=t.textAlign),G(t,"textVerticalAlign")&&(r.verticalAlign=t.textVerticalAlign),G(t,"textLineHeight")&&(r.lineHeight=t.textLineHeight),G(t,"textWidth")&&(r.width=t.textWidth),G(t,"textHeight")&&(r.height=t.textHeight),G(t,"textBackgroundColor")&&(r.backgroundColor=t.textBackgroundColor),G(t,"textPadding")&&(r.padding=t.textPadding),G(t,"textBorderColor")&&(r.borderColor=t.textBorderColor),G(t,"textBorderWidth")&&(r.borderWidth=t.textBorderWidth),G(t,"textBorderRadius")&&(r.borderRadius=t.textBorderRadius),G(t,"textBoxShadowColor")&&(r.shadowColor=t.textBoxShadowColor),G(t,"textBoxShadowBlur")&&(r.shadowBlur=t.textBoxShadowBlur),G(t,"textBoxShadowOffsetX")&&(r.shadowOffsetX=t.textBoxShadowOffsetX),G(t,"textBoxShadowOffsetY")&&(r.shadowOffsetY=t.textBoxShadowOffsetY))}function iH(r,t,e){var i=r;i.textPosition=i.textPosition||e.position||"inside",e.offset!=null&&(i.textOffset=e.offset),e.rotation!=null&&(i.textRotation=e.rotation),e.distance!=null&&(i.textDistance=e.distance);var a=i.textPosition.indexOf("inside")>=0,n=r.fill||"#000";x0(i,t);var o=i.textFill==null;return a?o&&(i.textFill=e.insideFill||"#fff",!i.textStroke&&e.insideStroke&&(i.textStroke=e.insideStroke),!i.textStroke&&(i.textStroke=n),i.textStrokeWidth==null&&(i.textStrokeWidth=2)):(o&&(i.textFill=r.fill||e.outsideFill||"#000"),!i.textStroke&&e.outsideStroke&&(i.textStroke=e.outsideStroke)),i.text=t.text,i.rich=t.rich,w(t.rich,function(s){x0(s,s)}),i}function x0(r,t){!t||(G(t,"fill")&&(r.textFill=t.fill),G(t,"stroke")&&(r.textStroke=t.fill),G(t,"lineWidth")&&(r.textStrokeWidth=t.lineWidth),G(t,"font")&&(r.font=t.font),G(t,"fontStyle")&&(r.fontStyle=t.fontStyle),G(t,"fontWeight")&&(r.fontWeight=t.fontWeight),G(t,"fontSize")&&(r.fontSize=t.fontSize),G(t,"fontFamily")&&(r.fontFamily=t.fontFamily),G(t,"align")&&(r.textAlign=t.align),G(t,"verticalAlign")&&(r.textVerticalAlign=t.verticalAlign),G(t,"lineHeight")&&(r.textLineHeight=t.lineHeight),G(t,"width")&&(r.textWidth=t.width),G(t,"height")&&(r.textHeight=t.height),G(t,"backgroundColor")&&(r.textBackgroundColor=t.backgroundColor),G(t,"padding")&&(r.textPadding=t.padding),G(t,"borderColor")&&(r.textBorderColor=t.borderColor),G(t,"borderWidth")&&(r.textBorderWidth=t.borderWidth),G(t,"borderRadius")&&(r.textBorderRadius=t.borderRadius),G(t,"shadowColor")&&(r.textBoxShadowColor=t.shadowColor),G(t,"shadowBlur")&&(r.textBoxShadowBlur=t.shadowBlur),G(t,"shadowOffsetX")&&(r.textBoxShadowOffsetX=t.shadowOffsetX),G(t,"shadowOffsetY")&&(r.textBoxShadowOffsetY=t.shadowOffsetY),G(t,"textShadowColor")&&(r.textShadowColor=t.textShadowColor),G(t,"textShadowBlur")&&(r.textShadowBlur=t.textShadowBlur),G(t,"textShadowOffsetX")&&(r.textShadowOffsetX=t.textShadowOffsetX),G(t,"textShadowOffsetY")&&(r.textShadowOffsetY=t.textShadowOffsetY))}var gT={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},b0=at(gT);Ve(Cr,function(r,t){return r[t]=1,r},{});Cr.join(", ");var tu=["","style","shape","extra"],dn=St();function Up(r,t,e,i,a){var n=r+"Animation",o=Nc(r,i,a)||{},s=dn(t).userDuring;return o.duration>0&&(o.during=s?H(M5,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=r),k(o,e[n]),o}function Sh(r,t,e,i){i=i||{};var a=i.dataIndex,n=i.isInit,o=i.clearStyle,s=e.isAnimationEnabled(),l=dn(r),u=t.style;l.userDuring=t.during;var f={},h={};if(P5(r,t,h),T0("shape",t,h),T0("extra",t,h),!n&&s&&(D5(r,t,f),w0("shape",r,t,f),w0("extra",r,t,f),L5(r,t,u,f)),h.style=u,w5(r,h,o),C5(r,t),s)if(n){var c={};w(tu,function(p){var d=p?t[p]:t;d&&d.enterFrom&&(p&&(c[p]=c[p]||{}),k(p?c[p]:c,d.enterFrom))});var v=Up("enter",r,t,e,a);v.duration>0&&r.animateFrom(c,v)}else T5(r,t,a||0,e,f);yT(r,t),u?r.dirty():r.markRedraw()}function yT(r,t){for(var e=dn(r).leaveToProps,i=0;i0&&r.animateFrom(a,n)}}function C5(r,t){G(t,"silent")&&(r.silent=t.silent),G(t,"ignore")&&(r.ignore=t.ignore),r instanceof Ur&&G(t,"invisible")&&(r.invisible=t.invisible),r instanceof gt&&G(t,"autoBatch")&&(r.autoBatch=t.autoBatch)}var pr={},A5={setTransform:function(r,t){return pr.el[r]=t,this},getTransform:function(r){return pr.el[r]},setShape:function(r,t){var e=pr.el,i=e.shape||(e.shape={});return i[r]=t,e.dirtyShape&&e.dirtyShape(),this},getShape:function(r){var t=pr.el.shape;if(t)return t[r]},setStyle:function(r,t){var e=pr.el,i=e.style;return i&&(i[r]=t,e.dirtyStyle&&e.dirtyStyle()),this},getStyle:function(r){var t=pr.el.style;if(t)return t[r]},setExtra:function(r,t){var e=pr.el.extra||(pr.el.extra={});return e[r]=t,this},getExtra:function(r){var t=pr.el.extra;if(t)return t[r]}};function M5(){var r=this,t=r.el;if(!!t){var e=dn(t).userDuring,i=r.userDuring;if(e!==i){r.el=r.userDuring=null;return}pr.el=t,i(A5)}}function w0(r,t,e,i){var a=e[r];if(!!a){var n=t[r],o;if(n){var s=e.transition,l=a.transition;if(l)if(!o&&(o=i[r]={}),_a(l))k(o,n);else for(var u=Mt(l),f=0;f=0){!o&&(o=i[r]={});for(var v=at(n),f=0;f=0)){var c=r.getAnimationStyleProps(),v=c?c.style:null;if(v){!n&&(n=i.style={});for(var p=at(e),u=0;us)return!0;if(o){var l=kp(t).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},r.prototype.makeElOption=function(t,e,i,a,n){},r.prototype.createPointerEl=function(t,e,i,a){var n=e.pointer;if(n){var o=ra(t).pointerEl=new Tu[n.type](C0(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,i,a){if(e.label){var n=ra(t).labelEl=new dt(C0(e.label));t.add(n),M0(n,a)}},r.prototype.updatePointerEl=function(t,e,i){var a=ra(t).pointerEl;a&&e.pointer&&(a.setStyle(e.pointer.style),i(a,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,i,a){var n=ra(t).labelEl;n&&(n.setStyle(e.label.style),i(n,{x:e.label.x,y:e.label.y}),M0(n,a))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,i=this._api.getZr(),a=this._handle,n=e.getModel("handle"),o=e.get("status");if(!n.get("show")||!o||o==="hide"){a&&i.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=_n(n.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Hr(u.event)},onmousedown:xh(this._onHandleDragMove,this,0,0),drift:xh(this._onHandleDragMove,this),ondragend:xh(this._onHandleDragEnd,this)}),i.add(a)),D0(a,e,!1),a.setStyle(n.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=n.get("size");N(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,is(this,"_doDispatchAxisPointer",n.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){A0(this._axisPointerModel,!e&&this._moveAnimation,this._handle,bh(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var i=this._handle;if(!!i){this._dragging=!0;var a=this.updateHandleTransform(bh(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=a,i.stopAnimation(),i.attr(bh(a)),ra(i).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(!!t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(!!t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,a=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),a&&e.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),No(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}},r}();function A0(r,t,e,i){_T(ra(e).lastProp,i)||(ra(e).lastProp=i,t?Dt(e,i,r):(e.stopAnimation(),e.attr(i)))}function _T(r,t){if(U(r)&&U(t)){var e=!0;return w(t,function(i,a){e=e&&_T(r[a],i)}),!!e}else return r===t}function M0(r,t){r[t.get(["label","show"])?"show":"hide"]()}function bh(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function D0(r,t,e){var i=t.get("z"),a=t.get("zlevel");r&&r.traverse(function(n){n.type!=="group"&&(i!=null&&(n.z=i),a!=null&&(n.zlevel=a),n.silent=e)})}var ST=k5;function xT(r){var t=r.get("type"),e=r.getModel(t+"Style"),i;return t==="line"?(i=e.getLineStyle(),i.fill=null):t==="shadow"&&(i=e.getAreaStyle(),i.stroke=null),i}function bT(r,t,e,i,a){var n=e.get("value"),o=wT(n,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=Ma(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),O5(h,c,v,i);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:Bt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function O5(r,t,e,i){var a=i.getWidth(),n=i.getHeight();r[0]=Math.min(r[0]+t,a)-t,r[1]=Math.min(r[1]+e,n)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function wT(r,t,e,i,a){r=t.scale.parse(r);var n=t.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:Mp(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};w(i,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),V(o)?n=o.replace("{value}",n):q(o)&&(n=o(s))}return n}function TT(r,t,e){var i=Fe();return Ai(i,i,e.rotation),Wr(i,i,e.position),ir([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],i)}function B5(r,t,e,i,a,n){var o=Ci.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=a.get(["label","margin"]),bT(t,i,a,n,{position:TT(i.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function CT(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function N5(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}function P0(r,t,e,i,a,n){return{cx:r,cy:t,r0:e,r:i,startAngle:a,endAngle:n,clockwise:!0}}var z5=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,i,a,n,o){var s=a.axis,l=s.grid,u=n.get("type"),f=L0(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var c=xT(n),v=V5[u](s,h,f);v.style=c,e.graphicKey=v.type,e.pointer=v}var p=Ov(l.model,a);B5(i,e,p,a,n,o)},t.prototype.getHandleTransform=function(e,i,a){var n=Ov(i.axis.grid.model,i,{labelInside:!1});n.labelMargin=a.get(["handle","margin"]);var o=TT(i.axis,e,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,i,a,n){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=L0(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[e.x,e.y];h[f]+=i[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:e.rotation,cursorPoint:v,tooltipOption:p[f]}},t}(ST);function L0(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var V5={line:function(r,t,e){var i=CT([t,e[0]],[t,e[1]],I0(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,t,e){var i=Math.max(1,r.getBandWidth()),a=e[1]-e[0];return{type:"Rect",shape:N5([t-i/2,e[0]],[i,a],I0(r))}}};function I0(r){return r.dim==="x"?0:1}var F5=z5,G5=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(ft),H5=G5,Vr=St(),W5=w;function AT(r,t,e){if(!ht.node){var i=t.getZr();Vr(i).records||(Vr(i).records={}),$5(i,t);var a=Vr(i).records[r]||(Vr(i).records[r]={});a.handler=e}}function $5(r,t){if(Vr(r).initialized)return;Vr(r).initialized=!0,e("click",vt(R0,"click")),e("mousemove",vt(R0,"mousemove")),e("globalout",Y5);function e(i,a){r.on(i,function(n){var o=X5(t);W5(Vr(r).records,function(s){s&&a(s,n,o.dispatchAction)}),U5(o.pendings,t)})}}function U5(r,t){var e=r.showTip.length,i=r.hideTip.length,a;e?a=r.showTip[e-1]:i&&(a=r.hideTip[i-1]),a&&(a.dispatchAction=null,t.dispatchAction(a))}function Y5(r,t,e){r.handler("leave",null,e)}function R0(r,t,e,i){t.handler(r,e,i)}function X5(r){var t={showTip:[],hideTip:[]},e=function(i){var a=t[i.type];a?a.push(i):(i.dispatchAction=e,r.dispatchAction(i))};return{dispatchAction:e,pendings:t}}function Xv(r,t){if(!ht.node){var e=t.getZr(),i=(Vr(e).records||{})[r];i&&(Vr(e).records[r]=null)}}var Z5=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,a){var n=i.getComponent("tooltip"),o=e.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";AT("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})})},t.prototype.remove=function(e,i){Xv("axisPointer",i)},t.prototype.dispose=function(e,i){Xv("axisPointer",i)},t.type="axisPointer",t}(Pt),q5=Z5;function MT(r,t){var e=[],i=r.seriesIndex,a;if(i==null||!(a=t.getSeriesByIndex(i)))return{point:[]};var n=a.getData(),o=Sa(n,r);if(o==null||o<0||N(o))return{point:[]};var s=n.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)e=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=n.mapDimension(c),d=[];d[v]=n.get(p,o),d[1-v]=n.get(n.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(d)||[]}else e=l.dataToPoint(n.getValues(z(l.dimensions,function(y){return n.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var E0=St();function K5(r,t,e){var i=r.currTrigger,a=[r.x,r.y],n=r,o=r.dispatchAction||H(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(!!s){yl(a)&&(a=MT({seriesIndex:n.seriesIndex,dataIndex:n.dataIndex},t).point);var l=yl(a),u=n.axesInfo,f=s.axesInfo,h=i==="leave"||yl(a),c={},v={},p={list:[],map:{}},d={showPointer:vt(J5,v),showTooltip:vt(Q5,p)};w(s.coordSysMap,function(y,m){var _=l||y.containPoint(a);w(s.coordSysAxesInfo[m],function(S,b){var x=S.axis,T=iz(u,S);if(!h&&_&&(!u||T)){var C=T&&T.value;C==null&&!l&&(C=x.pointToData(a)),C!=null&&k0(S,C,d,!1,c)}})});var g={};return w(f,function(y,m){var _=y.linkGroup;_&&!v[m]&&w(_.axesInfo,function(S,b){var x=v[b];if(S!==y&&x){var T=x.value;_.mapper&&(T=y.axis.scale.parse(_.mapper(T,O0(S),O0(y)))),g[y.key]=T}})}),w(g,function(y,m){k0(f[m],y,d,!0,c)}),tz(v,f,c),ez(p,a,r,o),rz(f,o,e),c}}function k0(r,t,e,i,a){var n=r.axis;if(!(n.scale.isBlank()||!n.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=j5(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&k(a,s[0]),!i&&r.snap&&n.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function j5(r,t){var e=t.axis,i=e.dim,a=r,n=[],o=Number.MAX_VALUE,s=-1;return w(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(i),h,c;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(f,r,e);c=v.dataIndices,h=v.nestestValue}else{if(c=l.getData().indicesOfNearest(f[0],r,e.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,n.length=0),w(c,function(g){n.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:n,snapToValue:a}}function J5(r,t,e,i){r[t.key]={value:e,payloadBatch:i}}function Q5(r,t,e,i){var a=e.payloadBatch,n=t.axis,o=n.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!a.length)){var l=t.coordSys.model,u=Ho(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:n.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function tz(r,t,e){var i=e.axesInfo=[];w(t,function(a,n){var o=a.axisPointerModel.option,s=r[n];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&i.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function ez(r,t,e,i){if(yl(t)||!r.list.length){i({type:"hideTip"});return}var a=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function rz(r,t,e){var i=e.getZr(),a="axisPointerLastHighlights",n=E0(i)[a]||{},o=E0(i)[a]={};w(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&w(h.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];w(n,function(u,f){!o[f]&&l.push(u)}),w(o,function(u,f){!n[f]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function iz(r,t){for(var e=0;e<(r||[]).length;e++){var i=r[e];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}function O0(r){var t=r.axis.model,e={},i=e.axisDim=r.axis.dim;return e.axisIndex=e[i+"AxisIndex"]=t.componentIndex,e.axisName=e[i+"AxisName"]=t.name,e.axisId=e[i+"AxisId"]=t.id,e}function yl(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Yp(r){ss.registerAxisPointerClass("CartesianAxisPointer",F5),r.registerComponentModel(H5),r.registerComponentView(q5),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!N(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=OO(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},K5)}function az(r){Wt(Iw),Wt(Yp)}var nz=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,i,a,n,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(i),c=n.get("type");if(c&&c!=="none"){var v=xT(n),p=sz[c](s,l,h,f);p.style=v,e.graphicKey=p.type,e.pointer=p}var d=n.get(["label","margin"]),g=oz(i,a,n,l,d);bT(e,a,n,o,g)},t}(ST);function oz(r,t,e,i,a){var n=t.axis,o=n.dataToCoord(r),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=i.getRadiusAxis().getExtent(),u,f,h;if(n.dim==="radius"){var c=Fe();Ai(c,c,s),Wr(c,c,[i.cx,i.cy]),u=ir([o,-a],c);var v=t.getModel("axisLabel").get("rotate")||0,p=Ci.innerTextLayout(s,v*Math.PI/180,-1);f=p.textAlign,h=p.textVerticalAlign}else{var d=l[1];u=i.coordToPoint([d+a,o]);var g=i.cx,y=i.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 sz={line:function(r,t,e,i){return r.dim==="angle"?{type:"Line",shape:CT(t.coordToPoint([i[0],e]),t.coordToPoint([i[1],e]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:e}}},shadow:function(r,t,e,i){var a=Math.max(1,r.getBandWidth()),n=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:P0(t.cx,t.cy,i[0],i[1],(-e-a/2)*n,(-e+a/2)*n)}:{type:"Sector",shape:P0(t.cx,t.cy,e-a/2,e+a/2,0,Math.PI*2)}}},lz=nz,uz=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.findAxisModel=function(e){var i,a=this.ecModel;return a.eachComponent(e,function(n){n.getCoordSysModel()===this&&(i=n)},this),i},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(ft),fz=uz,Xp=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",zt).models[0]},t.type="polarAxis",t}(ft);Xt(Xp,os);var hz=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="angleAxis",t}(Xp),vz=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="radiusAxis",t}(Xp),Zp=function(r){O(t,r);function t(e,i){return r.call(this,"radius",e,i)||this}return t.prototype.pointToData=function(e,i){return this.polar.pointToData(e,i)[this.dim==="radius"?0:1]},t}(ur);Zp.prototype.dataToRadius=ur.prototype.dataToCoord;Zp.prototype.radiusToData=ur.prototype.coordToData;var cz=Zp,pz=St(),qp=function(r){O(t,r);function t(e,i){return r.call(this,"angle",e,i||[0,360])||this}return t.prototype.pointToData=function(e,i){return this.polar.pointToData(e,i)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,i=e.getLabelModel(),a=e.scale,n=a.getExtent(),o=a.count();if(n[1]-n[0]<1)return 0;var s=n[0],l=e.dataToCoord(s+1)-e.dataToCoord(s),u=Math.abs(l),f=jo(s==null?"":s+"",i.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=pz(e.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},t}(ur);qp.prototype.dataToAngle=ur.prototype.dataToCoord;qp.prototype.angleToData=ur.prototype.coordToData;var dz=qp,DT=["radius","angle"],gz=function(){function r(t){this.dimensions=DT,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new cz,this._angleAxis=new dz,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},r.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},r.prototype.getAxis=function(t){var e="_"+t+"Axis";return this[e]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(t){var e=[],i=this._angleAxis,a=this._radiusAxis;return i.scale.type===t&&e.push(i),a.scale.type===t&&e.push(a),e},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},r.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},r.prototype.pointToData=function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},r.prototype.pointToCoord=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,a=this.getAngleAxis(),n=a.getExtent(),o=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]);a.inverse?o=s-360:s=o+360;var l=Math.sqrt(e*e+i*i);e/=l,i/=l;for(var u=Math.atan2(-i,e)/Math.PI*180,f=us;)u+=f*360;return[l,u]},r.prototype.coordToPoint=function(t){var e=t[0],i=t[1]/180*Math.PI,a=Math.cos(i)*e+this.cx,n=-Math.sin(i)*e+this.cy;return[a,n]},r.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),i=e.getExtent().slice();i[0]>i[1]&&i.reverse();var a=t.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-a[0]*n,endAngle:-a[1]*n,clockwise:t.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(t,e,i){var a=B0(e);return a===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(t,e,i){var a=B0(e);return a===this?this.pointToData(i):null},r}();function B0(r){var t=r.seriesModel,e=r.polarModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}var yz=gz;function mz(r,t,e){var i=t.get("center"),a=e.getWidth(),n=e.getHeight();r.cx=K(i[0],a),r.cy=K(i[1],n);var o=r.getRadiusAxis(),s=Math.min(a,n)/2,l=t.get("radius");l==null?l=[0,"100%"]:N(l)||(l=[0,l]);var u=[K(l[0],s),K(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function _z(r,t){var e=this,i=e.getAngleAxis(),a=e.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===e){var l=s.getData();w(Xl(l,"radius"),function(u){a.scale.unionExtentFromData(l,u)}),w(Xl(l,"angle"),function(u){i.scale.unionExtentFromData(l,u)})}}),cn(i.scale,i.model),cn(a.scale,a.model),i.type==="category"&&!i.onBand){var n=i.getExtent(),o=360/i.scale.count();i.inverse?n[1]+=o:n[1]-=o,i.setExtent(n[0],n[1])}}function Sz(r){return r.mainType==="angleAxis"}function N0(r,t){if(r.type=t.get("type"),r.scale=Hu(t),r.onBand=t.get("boundaryGap")&&r.type==="category",r.inverse=t.get("inverse"),Sz(t)){r.inverse=r.inverse!==t.get("clockwise");var e=t.get("startAngle");r.setExtent(e,e+(r.inverse?-360:360))}t.axis=r,r.model=t}var xz={dimensions:DT,create:function(r,t){var e=[];return r.eachComponent("polar",function(i,a){var n=new yz(a+"");n.update=_z;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=i.findAxisModel("radiusAxis"),u=i.findAxisModel("angleAxis");N0(o,l),N0(s,u),mz(n,i,t),e.push(n),i.coordinateSystem=n,n.model=i}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="polar"){var a=i.getReferringComponents("polar",zt).models[0];i.coordinateSystem=a.coordinateSystem}}),e}},bz=xz,wz=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function js(r,t,e){t[1]>t[0]&&(t=t.slice().reverse());var i=r.coordToPoint([t[0],e]),a=r.coordToPoint([t[1],e]);return{x1:i[0],y1:i[1],x2:a[0],y2:a[1]}}function Js(r){var t=r.getRadiusAxis();return t.inverse?0:1}function z0(r){var t=r[0],e=r[r.length-1];t&&e&&Math.abs(Math.abs(t.coord-e.coord)-360)<1e-4&&r.pop()}var Tz=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return t.prototype.render=function(e,i){if(this.group.removeAll(),!!e.get("show")){var a=e.axis,n=a.polar,o=n.getRadiusAxis().getExtent(),s=a.getTicksCoords(),l=a.getMinorTicksCoords(),u=z(a.getViewLabels(),function(f){f=X(f);var h=a.scale,c=h.type==="ordinal"?h.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=a.dataToCoord(c),f});z0(u),z0(s),w(wz,function(f){e.get([f,"show"])&&(!a.scale.isBlank()||f==="axisLine")&&Cz[f](this.group,e,n,s,l,o,u)},this)}},t.type="angleAxis",t}(ss),Cz={axisLine:function(r,t,e,i,a,n){var o=t.getModel(["axisLine","lineStyle"]),s=Js(e),l=s?0:1,u;n[l]===0?u=new nr({shape:{cx:e.cx,cy:e.cy,r:n[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new Qo({shape:{cx:e.cx,cy:e.cy,r:n[s],r0:n[l]},style:o.getLineStyle(),z2:1,silent:!0}),u.style.fill=null,r.add(u)},axisTick:function(r,t,e,i,a,n){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=n[Js(e)],u=z(i,function(f){return new le({shape:js(e,[l,l+s],f.coord)})});r.add(Be(u,{style:Z(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,t,e,i,a,n){if(!!a.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=n[Js(e)],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 b=s[p];U(b)&&b.textStyle&&(v=new At(b.textStyle,l,l.ecModel))}var x=new dt({silent:Ci.isLabelSilent(t),style:Bt(v,{x:g[0],y:g[1],fill:v.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:S})});if(r.add(x),f){var T=Ci.makeAxisEventDataBase(t);T.targetType="axisLabel",T.value=h.rawLabel,nt(x).eventData=T}},this)},splitLine:function(r,t,e,i,a,n){var o=t.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",L=T;b&&(i[f][M]||(i[f][M]={p:T,n:T}),L=i[f][M][P]);var I=void 0,R=void 0,E=void 0,W=void 0;if(p.dim==="radius"){var B=p.dataToCoord(D)-T,F=l.dataToCoord(M);Math.abs(B)=W})}}})}function kz(r){var t={};w(r,function(i,a){var n=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=LT(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/n.count(),h=t[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=h.stacks;t[l]=h;var v=PT(i);c[v]||h.autoWidthCount++,c[v]=c[v]||{width:0,maxWidth:0};var p=K(i.get("barWidth"),f),d=K(i.get("barMaxWidth"),f),g=i.get("barGap"),y=i.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 e={};return w(t,function(i,a){e[a]={};var n=i.stacks,o=i.bandWidth,s=K(i.categoryGap,o),l=K(i.gap,1),u=i.remainedWidth,f=i.autoWidthCount,h=(u-s)/(f+(f-1)*l);h=Math.max(h,0),w(n,function(d,g){var y=d.maxWidth;y&&y+i.start.y&&(p=p+"-"+i.end.y);var d=o.get("formatter"),g={start:i.start.y,end:i.end.y,nameMap:p},y=this._formatterLabel(d,g),m=new dt({z2:30,style:Bt(o,{text:y})});m.attr(this._yearTextPositionControl(m,v[l],a,l,s)),n.add(m)}},t.prototype._monthTextPositionControl=function(e,i,a,n,o){var s="left",l="top",u=e[0],f=e[1];return a==="horizontal"?(f=f+o,i&&(s="center"),n==="start"&&(l="bottom")):(u=u+o,i&&(l="middle"),n==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(e,i,a,n){var o=e.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||V(s))&&(s&&(i=dv(s)||i),s=i.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&&i.times.end.time&&e.reverse(),e},r.prototype._getRangeInfo=function(t){var e=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],i;e[0].time>e[1].time&&(i=!0,e.reverse());var a=Math.floor(e[1].time/wh)-Math.floor(e[0].time/wh)+1,n=new Date(e[0].time),o=n.getDate(),s=e[1].date.getDate();n.setDate(o+a-1);var l=n.getDate();if(l!==s)for(var u=n.getTime()-e[1].time>0?1:-1;(l=n.getDate())!==s&&(n.getTime()-e[1].time)*u>0;)a-=u,n.setDate(l-u);var f=Math.floor((a+e[0].day+6)/7),h=i?-f+1:f-1;return i&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:a,weeks:f,nthWeek:h,fweek:e[0].day,lweek:e[1].day}},r.prototype._getDateByWeeksAndDay=function(t,e,i){var a=this._getRangeInfo(i);if(t>a.weeks||t===0&&ea.lweek)return null;var n=(t-1)*7-a.fweek+e,o=new Date(a.start.time);return o.setDate(+a.start.d+n),this.getDateInfo(o)},r.create=function(t,e){var i=[];return t.eachComponent("calendar",function(a){var n=new r(a);i.push(n),a.coordinateSystem=n}),t.eachSeries(function(a){a.get("coordinateSystem")==="calendar"&&(a.coordinateSystem=i[a.get("calendarIndex")||0])}),i},r.dimensions=["time","value"],r}();function F0(r){var t=r.calendarModel,e=r.seriesModel,i=t?t.coordinateSystem:e?e.coordinateSystem:null;return i}var $z=Wz;function Uz(r){r.registerComponentModel(Fz),r.registerComponentView(Hz),r.registerCoordinateSystem("calendar",$z)}function Yz(r,t){var e=r.existing;if(t.id=r.keyInfo.id,!t.type&&e&&(t.type=e.type),t.parentId==null){var i=t.parentOption;i?t.parentId=i.id:e&&(t.parentId=e.parentId)}t.parentOption=null}function G0(r,t){var e;return w(t,function(i){r[i]!=null&&r[i]!=="auto"&&(e=!0)}),e}function Xz(r,t,e){var i=k({},e),a=r[t],n=e.$action||"merge";n==="merge"?a?(Q(a,i,!0),bi(a,i,{ignoreSize:!0}),lx(e,a),Qs(e,a),Qs(e,a,"shape"),Qs(e,a,"style"),Qs(e,a,"extra"),e.clipPath=a.clipPath):r[t]=i:n==="replace"?r[t]=i:n==="remove"&&a&&(r[t]=null)}var IT=["transition","enterFrom","leaveTo"],Zz=IT.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Qs(r,t,e){if(e&&(!r[e]&&t[e]&&(r[e]={}),r=r[e],t=t[e]),!(!r||!t))for(var i=e?IT:Zz,a=0;a=0;f--){var h=a[f],c=Qt(h.id,null),v=c!=null?o.get(c):null;if(!!v){var p=v.parent,y=ke(p),m=p===n?{width:s,height:l}:{width:y.width,height:y.height},_={},S=Qc(v,h,m,null,{hv:h.hv,boundingMode:h.bounding},_);if(!ke(v).isNew&&S){for(var b=h.transition,x={},T=0;T=0)?x[C]=A:v[C]=A}Dt(v,x,e,0)}else v.attr(_)}}},t.prototype._clear=function(){var e=this,i=this._elMap;i.each(function(a){ml(a,ke(a).option,i,e._lastGraphicModel)}),this._elMap=$()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(Pt);function Zv(r){var t=G(H0,r)?H0[r]:Vc(r),e=new t({});return ke(e).type=r,e}function W0(r,t,e,i){var a=Zv(e);return t.add(a),i.set(r,a),ke(a).id=r,ke(a).isNew=!0,a}function ml(r,t,e,i){var a=r&&r.parent;a&&(r.type==="group"&&r.traverse(function(n){ml(n,t,e,i)}),b5(r,t,i),e.removeKey(ke(r).id))}function $0(r,t,e,i){r.isGroup||w([["cursor",Ur.prototype.cursor],["zlevel",i||0],["z",e||0],["z2",0]],function(a){var n=a[0];G(t,n)?r[n]=rt(t[n],a[1]):r[n]==null&&(r[n]=a[1])}),w(at(t),function(a){if(a.indexOf("on")===0){var n=t[a];r[a]=q(n)?n:null}}),G(t,"draggable")&&(r.draggable=t.draggable),t.name!=null&&(r.name=t.name),t.id!=null&&(r.id=t.id)}function Jz(r){return r=k({},r),w(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(sx),function(t){delete r[t]}),r}function Qz(r,t,e){var i=nt(r).eventData;!r.silent&&!r.ignore&&!i&&(i=nt(r).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:r.name}),i&&(i.info=e.info)}function tV(r){r.registerComponentModel(Kz),r.registerComponentView(jz),r.registerPreprocessor(function(t){var e=t.graphic;N(e)?!e[0]||!e[0].elements?t.graphic=[{elements:e}]:t.graphic=[t.graphic[0]]:e&&!e.elements&&(t.graphic=[{elements:[e]}])})}var U0=["x","y","radius","angle","single"],eV=["cartesian2d","polar","singleAxis"];function rV(r){var t=r.get("coordinateSystem");return ot(eV,t)>=0}function pi(r){return r+"Axis"}function iV(r,t){var e=$(),i=[],a=$();r.eachComponent({mainType:"dataZoom",query:t},function(f){a.get(f.uid)||s(f)});var n;do n=!1,r.eachComponent("dataZoom",o);while(n);function o(f){!a.get(f.uid)&&l(f)&&(s(f),n=!0)}function s(f){a.set(f.uid,!0),i.push(f),u(f)}function l(f){var h=!1;return f.eachTargetAxis(function(c,v){var p=e.get(c);p&&p[v]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,c){(e.get(h)||e.set(h,[]))[c]=!0})}return i}function RT(r){var t=r.ecModel,e={infoList:[],infoMap:$()};return r.eachTargetAxis(function(i,a){var n=t.getComponent(pi(i),a);if(!!n){var o=n.getCoordSysModel();if(!!o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(n)}}}),e}var Th=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r}(),aV=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,i,a){var n=Y0(e);this.settledOption=n,this.mergeDefaultAndTheme(e,a),this._doInit(n)},t.prototype.mergeOption=function(e){var i=Y0(e);Q(this.option,e,!0),Q(this.settledOption,i,!0),this._doInit(i)},t.prototype._doInit=function(e){var i=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var a=this.settledOption;w([["start","startValue"],["end","endValue"]],function(n,o){this._rangePropMode[o]==="value"&&(i[n[0]]=a[n[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),i=this._targetAxisInfoMap=$(),a=this._fillSpecifiedTargetAxis(i);a?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(n){n.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var i=!1;return w(U0,function(a){var n=this.getReferringComponents(pi(a),YM);if(!!n.specified){i=!0;var o=new Th;w(n.models,function(s){o.add(s.componentIndex)}),e.set(a,o)}},this),i},t.prototype._fillAutoTargetAxisByOrient=function(e,i){var a=this.ecModel,n=!0;if(n){var o=i==="vertical"?"y":"x",s=a.findComponents({mainType:o+"Axis"});l(s,o)}if(n){var s=a.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===i}});l(s,"single")}function l(u,f){var h=u[0];if(!!h){var c=new Th;if(c.add(h.componentIndex),e.set(f,c),n=!1,f==="x"||f==="y"){var v=h.getReferringComponents("grid",zt).models[0];v&&w(u,function(p){h.componentIndex!==p.componentIndex&&v===p.getReferringComponents("grid",zt).models[0]&&c.add(p.componentIndex)})}}}n&&w(U0,function(u){if(!!n){var f=a.findComponents({mainType:pi(u),filter:function(c){return c.get("type",!0)==="category"}});if(f[0]){var h=new Th;h.add(f[0].componentIndex),e.set(u,h),n=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(i){!e&&(e=i)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var i=this._rangePropMode,a=this.get("rangeMode");w([["start","startValue"],["end","endValue"]],function(n,o){var s=e[n[0]]!=null,l=e[n[1]]!=null;s&&!l?i[o]="percent":!s&&l?i[o]="value":a?i[o]=a[o]:s&&(i[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(i,a){e==null&&(e=this.ecModel.getComponent(pi(i),a))},this),e},t.prototype.eachTargetAxis=function(e,i){this._targetAxisInfoMap.each(function(a,n){w(a.indexList,function(o){e.call(i,n,o)})})},t.prototype.getAxisProxy=function(e,i){var a=this.getAxisModel(e,i);if(a)return a.__dzAxisProxy},t.prototype.getAxisModel=function(e,i){var a=this._targetAxisInfoMap.get(e);if(a&&a.indexMap[i])return this.ecModel.getComponent(pi(e),i)},t.prototype.setRawRange=function(e){var i=this.option,a=this.settledOption;w([["start","startValue"],["end","endValue"]],function(n){(e[n[0]]!=null||e[n[1]]!=null)&&(i[n[0]]=a[n[0]]=e[n[0]],i[n[1]]=a[n[1]]=e[n[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var i=this.option;w(["start","startValue","end","endValue"],function(a){i[a]=e[a]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,i){if(e==null&&i==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(e,i).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var i,a=this._targetAxisInfoMap.keys(),n=0;no[1];if(_&&!S&&!b)return!0;_&&(g=!0),S&&(p=!0),b&&(d=!0)}return g&&p&&d})}else Ka(f,function(v){if(n==="empty")l.setData(u=u.map(v,function(d){return s(d)?d:NaN}));else{var p={};p[v]=o,u.selectRange(p)}});Ka(f,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,i=this._dataExtent;Ka(["min","max"],function(a){var n=e.get(a+"Span"),o=e.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?n=wt(i[0]+o,i,[0,100],!0):n!=null&&(o=wt(n,[0,100],i,!0)-i[0]),t[a+"Span"]=n,t[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,i=this._valueWindow;if(!!e){var a=xc(i,[0,500]);a=Math.min(a,20);var n=t.axis.scale.rawExtentInfo;e[0]!==0&&n.setDeterminedMinMax("min",+i[0].toFixed(a)),e[1]!==100&&n.setDeterminedMinMax("max",+i[1].toFixed(a)),n.freeze()}},r}();function hV(r,t,e){var i=[1/0,-1/0];Ka(e,function(o){dE(i,o.getData(),t)});var a=r.getAxisModel(),n=Yb(a.axis.scale,a,i).calculate();return[n.min,n.max]}var vV=fV,cV={getTargetSeries:function(r){function t(a){r.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(o,s){var l=r.getComponent(pi(o),s);a(o,s,l,n)})})}t(function(a,n,o,s){o.__dzAxisProxy=null});var e=[];t(function(a,n,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new vV(a,n,s,r),e.push(o.__dzAxisProxy))});var i=$();return w(e,function(a){w(a.getTargetSeriesModels(),function(n){i.set(n.uid,n)})}),i},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(i,a){e.getAxisProxy(i,a).reset(e)}),e.eachTargetAxis(function(i,a){e.getAxisProxy(i,a).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var i=e.findRepresentativeAxisProxy();if(i){var a=i.getDataPercentWindow(),n=i.getDataValueWindow();e.setCalculatedRange({start:a[0],end:a[1],startValue:n[0],endValue:n[1]})}})}},pV=cV;function dV(r){r.registerAction("dataZoom",function(t,e){var i=iV(e,t);w(i,function(a){a.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var Z0=!1;function jp(r){Z0||(Z0=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,pV),dV(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function gV(r){r.registerComponentModel(oV),r.registerComponentView(uV),jp(r)}var Qe=function(){function r(){}return r}(),ET={};function Xn(r,t){ET[r]=t}function kT(r){return ET[r]}var yV=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;w(this.option.feature,function(i,a){var n=kT(a);n&&(n.getDefaultOption&&(n.defaultOption=n.getDefaultOption(e)),Q(i,n.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(ft),mV=yV;function _V(r,t,e){var i=t.getBoxLayoutParams(),a=t.get("padding"),n={width:e.getWidth(),height:e.getHeight()},o=ve(i,n,a);da(t.get("orient"),r,t.get("itemGap"),o.width,o.height),Qc(r,i,n,a)}function OT(r,t){var e=Ma(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),r=new pt({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1}),r}var SV=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,i,a,n){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},f=this._features||(this._features={}),h=[];w(u,function(p,d){h.push(d)}),new xp(this._featureNames||[],h).add(c).update(c).remove(vt(c,null)).execute(),this._featureNames=h;function c(p,d){var g=h[p],y=h[d],m=u[g],_=new At(m,e,e.ecModel),S;if(n&&n.newTitle!=null&&n.featureName===g&&(m.title=n.newTitle),g&&!y){if(xV(g))S={onclick:_.option.onclick,featureName:g};else{var b=kT(g);if(!b)return;S=new b}f[g]=S}else if(S=f[y],!S)return;S.uid=xn("toolbox-feature"),S.model=_,S.ecModel=i,S.api=a;var x=S instanceof Qe;if(!g&&y){x&&S.dispose&&S.dispose(i,a);return}if(!_.get("show")||x&&S.unusable){x&&S.remove&&S.remove(i,a);return}v(_,S,g),_.setIconStatus=function(T,C){var A=this.option,D=this.iconPaths;A.iconStatus=A.iconStatus||{},A.iconStatus[T]=C,D[T]&&(C==="emphasis"?un:fn)(D[T])},S instanceof Qe&&S.render&&S.render(_,i,a,n)}function v(p,d,g){var y=p.getModel("iconStyle"),m=p.getModel(["emphasis","iconStyle"]),_=d instanceof Qe&&d.getIcons?d.getIcons():p.get("icon"),S=p.get("title")||{},b,x;V(_)?(b={},b[g]=_):b=_,V(S)?(x={},x[g]=S):x=S;var T=p.iconPaths={};w(b,function(C,A){var D=_n(C,{},{x:-s/2,y:-s/2,width:s,height:s});D.setStyle(y.getItemStyle());var M=D.ensureState("emphasis");M.style=m.getItemStyle();var P=new dt({style:{text:x[A],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null},ignore:!0});D.setTextContent(P),Sn({el:D,componentModel:e,itemName:A,formatterParamsExtra:{title:x[A]}}),D.__title=x[A],D.on("mouseover",function(){var L=m.getItemStyle(),I=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";P.setStyle({fill:m.get("textFill")||L.fill||L.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),D.setTextConfig({position:m.get("textPosition")||I}),P.ignore=!e.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",A])!=="emphasis"&&a.leaveEmphasis(this),P.hide()}),(p.get(["iconStatus",A])==="emphasis"?un:fn)(D),o.add(D),D.on("click",H(d.onclick,d,i,a,A)),T[A]=D})}_V(o,e,a),o.add(OT(o.getBoundingRect(),e)),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={}),b=jo(d,dt.makeFont(S)),x=p.x+o.x,T=p.y+o.y+s,C=!1;T+b.height>a.getHeight()&&(y.position="top",C=!0);var A=C?-5-b.height:s+10;x+b.width/2>a.getWidth()?(y.position=["100%",A],S.align="right"):x-b.width/2<0&&(y.position=[0,A],S.align="left")}})},t.prototype.updateView=function(e,i,a,n){w(this._features,function(o){o instanceof Qe&&o.updateView&&o.updateView(o.model,i,a,n)})},t.prototype.remove=function(e,i){w(this._features,function(a){a instanceof Qe&&a.remove&&a.remove(e,i)}),this.group.removeAll()},t.prototype.dispose=function(e,i){w(this._features,function(a){a instanceof Qe&&a.dispose&&a.dispose(e,i)})},t.type="toolbox",t}(Pt);function xV(r){return r.indexOf("my")===0}var bV=SV,wV=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,i){var a=this.model,n=a.get("name")||e.get("title.0.text")||"echarts",o=i.getZr().painter.getType()==="svg",s=o?"svg":a.get("type",!0)||"png",l=i.getConnectedDataURL({type:s,backgroundColor:a.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=ht.browser;if(q(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=n+"."+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=n+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,y=new Uint8Array(g);g--;)y[g]=p.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,d)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,b=S.document;b.open("image/svg+xml","replace"),b.write(p),b.close(),S.focus(),b.execCommand("SaveAs",!0,d),document.body.removeChild(_)}}else{var x=a.get("lang"),T='',C=window.open();C.document.write(T),C.document.title=n}},t.getDefaultOption=function(e){var i={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return i},t}(Qe),TV=wV,q0="__ec_magicType_stack__",CV=[["line","bar"],["stack"]],AV=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,i=e.get("icon"),a={};return w(e.get("type"),function(n){i[n]&&(a[n]=i[n])}),a},t.getDefaultOption=function(e){var i={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return i},t.prototype.onclick=function(e,i,a){var n=this.model,o=n.get(["seriesIndex",a]);if(!!K0[a]){var s={series:[]},l=function(h){var c=h.subType,v=h.id,p=K0[a](c,v,h,n);p&&(Z(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,zt).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var b=0;b<=S;b++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=a==="bar"}}};w(CV,function(h){ot(h,a)>=0&&w(h,function(c){n.setIconStatus(c,"normal")})}),n.setIconStatus(a,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=a;a==="stack"&&(u=Q({stack:n.option.title.tiled,tiled:n.option.title.stack},n.option.title),n.get(["iconStatus",a])!=="emphasis"&&(f="tiled")),i.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},t}(Qe),K0={line:function(r,t,e,i){if(r==="bar")return Q({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(r,t,e,i){if(r==="line")return Q({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(r,t,e,i){var a=e.get("stack")===q0;if(r==="line"||r==="bar")return i.setIconStatus("stack",a?"normal":"emphasis"),Q({id:t,stack:a?"":q0},i.get(["option","stack"])||{},!0)}};lr({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var MV=AV,Yu=new Array(60).join("-"),gn=" ";function DV(r){var t={},e=[],i=[];return r.eachRawSeries(function(a){var n=a.coordinateSystem;if(n&&(n.type==="cartesian2d"||n.type==="polar")){var o=n.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:n.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(a)}else e.push(a)}else e.push(a)}),{seriesGroupByCategoryAxis:t,other:e,meta:i}}function PV(r){var t=[];return w(r,function(e,i){var a=e.categoryAxis,n=e.valueAxis,o=n.dim,s=[" "].concat(z(e.series,function(v){return v.name})),l=[a.model.getCategories()];w(e.series,function(v){var p=v.getRawData();l.push(v.getRawData().mapArray(p.mapDimension(o),function(d){return d}))});for(var u=[s.join(gn)],f=0;f=0)return!0}var qv=new RegExp("["+gn+"]+","g");function EV(r){for(var t=r.split(/\n+/g),e=eu(t.shift()).split(qv),i=[],a=z(e,function(l){return{name:l,data:[]}}),n=0;n=0;n--){var o=e[n];if(o[a])break}if(n<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(s){var l=s.getPercentRange();e[0][a]={dataZoomId:a,start:l[0],end:l[1]}}}}),e.push(t)}function FV(r){var t=Jp(r),e=t[t.length-1];t.length>1&&t.pop();var i={};return BT(e,function(a,n){for(var o=t.length-1;o>=0;o--)if(a=t[o][n],a){i[n]=a;break}}),i}function GV(r){NT(r).snapshots=null}function HV(r){return Jp(r).length}function Jp(r){var t=NT(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var WV=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,i){GV(e),i.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var i={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])};return i},t}(Qe);lr({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var $V=WV,UV=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],YV=function(){function r(t,e,i){var a=this;this._targetInfoList=[];var n=j0(e,t);w(XV,function(o,s){(!i||!i.include||ot(i.include,s)>=0)&&o(n,a._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(i,a,n){if((i.coordRanges||(i.coordRanges=[])).push(a),!i.coordRange){i.coordRange=a;var o=Ch[i.brushType](0,n,a);i.__rangeOffset={offset:e_[i.brushType](o.values,i.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,i){w(t,function(a){var n=this.findTargetInfo(a,e);n&&n!==!0&&w(n.coordSyses,function(o){var s=Ch[a.brushType](1,o,a.range,!0);i(a,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){w(t,function(i){var a=this.findTargetInfo(i,e);if(i.range=i.range||[],a&&a!==!0){i.panelId=a.panelId;var n=Ch[i.brushType](0,a.coordSys,i.coordRange),o=i.__rangeOffset;i.range=o?e_[i.brushType](n.values,o.offset,ZV(n.xyMinMax,o.xyMinMax)):n.values}},this)},r.prototype.makePanelOpts=function(t,e){return z(this._targetInfoList,function(i){var a=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e?e(i):null,clipPath:sT(a),isTargetByCursor:uT(a,t,i.coordSysModel),getLinearBrushOtherExtent:lT(a)}})},r.prototype.controlSeries=function(t,e,i){var a=this.findTargetInfo(t,i);return a===!0||a&&ot(a.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var i=this._targetInfoList,a=j0(e,t),n=0;nr[1]&&r.reverse(),r}function j0(r,t){return ho(r,t,{includeMainTypes:UV})}var XV={grid:function(r,t){var e=r.xAxisModels,i=r.yAxisModels,a=r.gridModels,n=$(),o={},s={};!e&&!i&&!a||(w(e,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),w(i,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),w(a,function(l){n.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),n.each(function(l){var u=l.coordinateSystem,f=[];w(u.getCartesians(),function(h,c){(ot(e,h.getAxis("x").model)>=0||ot(i,h.getAxis("y").model)>=0)&&f.push(h)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:Q0.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){w(r.geoModels,function(e){var i=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:i,coordSyses:[i],getPanelRect:Q0.geo})})}},J0=[function(r,t){var e=r.xAxisModel,i=r.yAxisModel,a=r.gridModel;return!a&&e&&(a=e.axis.grid.model),!a&&i&&(a=i.axis.grid.model),a&&a===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],Q0={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(yi(r)),t}},Ch={lineX:vt(t_,0),lineY:vt(t_,1),rect:function(r,t,e,i){var a=r?t.pointToData([e[0][0],e[1][0]],i):t.dataToPoint([e[0][0],e[1][0]],i),n=r?t.pointToData([e[0][1],e[1][1]],i):t.dataToPoint([e[0][1],e[1][1]],i),o=[Kv([a[0],n[0]]),Kv([a[1],n[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,i){var a=[[1/0,-1/0],[1/0,-1/0]],n=z(e,function(o){var s=r?t.pointToData(o,i):t.dataToPoint(o,i);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:n,xyMinMax:a}}};function t_(r,t,e,i){var a=e.getAxis(["x","y"][r]),n=Kv(z([0,1],function(s){return t?a.coordToData(a.toLocalCoord(i[s]),!0):a.toGlobalCoord(a.dataToCoord(i[s]))})),o=[];return o[r]=n,o[1-r]=[NaN,NaN],{values:n,xyMinMax:o}}var e_={lineX:vt(r_,0),lineY:vt(r_,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return z(r,function(i,a){return[i[0]-e[0]*t[a][0],i[1]-e[1]*t[a][1]]})}};function r_(r,t,e,i){return[t[0]-i[r]*e[0],t[1]-i[r]*e[1]]}function ZV(r,t){var e=i_(r),i=i_(t),a=[e[0]/i[0],e[1]/i[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function i_(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var zT=YV,jv=w,qV=GM("toolbox-dataZoom_"),KV=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,i,a,n){this._brushController||(this._brushController=new oT(a.getZr()),this._brushController.on("brush",H(this._onBrush,this)).mount()),QV(e,i,this,n,a),JV(e,i)},t.prototype.onclick=function(e,i,a){jV[a].call(this)},t.prototype.remove=function(e,i){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,i){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var i=e.areas;if(!e.isEnd||!i.length)return;var a={},n=this.ecModel;this._brushController.updateCovers([]);var o=new zT(Qp(this.model),n,{include:["grid"]});o.matchOutputRanges(i,n,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)}}),VV(n,a),this._dispatchZoomAction(a);function s(u,f,h){var c=f.getAxis(u),v=c.model,p=l(u,v,n),d=p.findRepresentativeAxisProxy(v).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(h=Da(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}},t.prototype._dispatchZoomAction=function(e){var i=[];jv(e,function(a,n){i.push(X(a))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},t.getDefaultOption=function(e){var i={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return i},t}(Qe),jV={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(FV(this.ecModel))}};function Qp(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function JV(r,t){r.setIconStatus("back",HV(t)>1?"emphasis":"normal")}function QV(r,t,e,i,a){var n=e._isZoomActive;i&&i.type==="takeGlobalCursor"&&(n=i.key==="dataZoomSelect"?i.dataZoomSelectActive:!1),e._isZoomActive=n,r.setIconStatus("zoom",n?"emphasis":"normal");var o=new zT(Qp(r),t,{include:["grid"]}),s=o.makePanelOpts(a,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(n&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}MP("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var i=t.getModel(e),a=[],n=Qp(i),o=ho(r,n);jv(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),jv(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var h=l.componentIndex,c={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:qV+u+h};c[f]=h,a.push(c)}return a});var tF=KV;function eF(r){r.registerComponentModel(mV),r.registerComponentView(bV),Xn("saveAsImage",TV),Xn("magicType",MV),Xn("dataView",zV),Xn("dataZoom",tF),Xn("restore",$V),Wt(gV)}var rF=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(ft),iF=rF;function VT(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function FT(r){if(!!ht.domSupported){for(var t=document.documentElement.style,e=0,i=r.length;e-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=n==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=n==="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+=";"+n+":-"+v+"px";var p=t+" 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:"+i+";"];return'
'}function fF(r,t){var e="cubic-bezier(0.23,1,0.32,1)",i=" "+r/2+"s "+e,a="opacity"+i+",visibility"+i;return t||(i=" "+r+"s "+e,a+=ht.transformSupported?","+td+i:",left"+i+",top"+i),oF+":"+a}function a_(r,t,e){var i=r.toFixed(0)+"px",a=t.toFixed(0)+"px";if(!ht.transformSupported)return e?"top:"+a+";left:"+i+";":[["top",a],["left",i]];var n=ht.transform3dSupported,o="translate"+(n?"3d":"")+"("+i+","+a+(n?",0":"")+")";return e?"top:0;left:0;"+td+":"+o+";":[["top",0],["left",0],[GT,o]]}function hF(r){var t=[],e=r.get("fontSize"),i=r.getTextColor();i&&t.push("color:"+i),t.push("font:"+r.getFont()),e&&t.push("line-height:"+Math.round(e*3/2)+"px");var a=r.get("textShadowColor"),n=r.get("textShadowBlur")||0,o=r.get("textShadowOffsetX")||0,s=r.get("textShadowOffsetY")||0;return a&&n&&t.push("text-shadow:"+o+"px "+s+"px "+n+"px "+a),w(["decoration","align"],function(l){var u=r.get(l);u&&t.push("text-"+l+":"+u)}),t.join(";")}function vF(r,t,e){var i=[],a=r.get("transitionDuration"),n=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=Fx(r,"html"),c=l+"px "+u+"px "+o+"px "+s;return i.push("box-shadow:"+c),t&&a&&i.push(fF(a,e)),n&&i.push("background-color:"+n),w(["width","color","radius"],function(v){var p="border-"+v,d=Kc(p),g=r.get(d);g!=null&&i.push(p+":"+g+(v==="color"?"":"px"))}),i.push(hF(f)),h!=null&&i.push("padding:"+Ma(h).join("px ")+"px"),i.join(";")+";"}function n_(r,t,e,i,a){var n=t&&t.painter;if(e){var o=n&&n.getViewportRoot();o&&rA(r,o,document.body,i,a)}else{r[0]=i,r[1]=a;var s=n&&n.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var cF=function(){function r(t,e,i){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,ht.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var n=this._zr=e.getZr(),o=this._appendToBody=i&&i.appendToBody;n_(this._styleCoord,n,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(a):t.appendChild(a),this._container=t;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,f=n.painter.getViewportRoot();Ie(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(t){var e=this._container,i=nF(e,"position"),a=e.style;a.position!=="absolute"&&i!=="absolute"&&(a.position="relative");var n=t.get("alwaysShowContent");n&&this._moveIfResized(),this._alwaysShowContent=n,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,a=i.style,n=this._styleCoord;i.innerHTML?a.cssText=sF+vF(t,!this._firstShow,this._longHide)+a_(n[0],n[1],!0)+("border-color:"+xa(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,i,a,n){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(V(n)&&i.get("trigger")==="item"&&!VT(i)&&(s=uF(i,a,n)),V(t))o.innerHTML=t+s;else if(t){o.innerHTML="",N(t)||(t=[t]);for(var l=0;l=0?this._tryShow(n,o):a==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,i=this._ecModel,a=this._api,n=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&n!=="none"&&n!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&o.manuallyShowTip(e,i,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,i,a,n){if(!(n.from===this.uid||ht.node||!a.getDom())){var o=l_(n,a);this._ticket="";var s=n.dataByCoordSys,l=bF(n,i,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:n.position,positionDefault:"bottom"},o)}else if(n.tooltip&&n.x!=null&&n.y!=null){var f=yF;f.x=n.x,f.y=n.y,f.update(),nt(f).tooltipConfig={name:null,option:n.tooltip},this._tryShow({offsetX:n.x,offsetY:n.y,target:f},o)}else if(s)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:s,tooltipOption:n.tooltipOption},o);else if(n.seriesIndex!=null){if(this._manuallyAxisShowTip(e,i,a,n))return;var h=MT(n,i),c=h.point[0],v=h.point[1];c!=null&&v!=null&&this._tryShow({offsetX:c,offsetY:v,target:h.el,position:n.position,positionDefault:"bottom"},o)}else n.x!=null&&n.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:a.getZr().findHover(n.x,n.y).target},o))}},t.prototype.manuallyHideTip=function(e,i,a,n){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,n.from!==this.uid&&this._hide(l_(n,a))},t.prototype._manuallyAxisShowTip=function(e,i,a,n){var o=n.seriesIndex,s=n.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=i.getSeriesByIndex(o);if(!!u){var f=u.getData(),h=Zn([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:n.position}),!0}}},t.prototype._tryShow=function(e,i){var a=e.target,n=this._tooltipModel;if(!!n){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(a){this._lastDataByCoordSys=null;var s,l;ua(a,function(u){if(nt(u).dataIndex!=null)return s=u,!0;if(nt(u).tooltipConfig!=null)return l=u,!0},!0),s?this._showSeriesItemTooltip(e,s,i):l?this._showComponentItemTooltip(e,l,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},t.prototype._showOrMove=function(e,i){var a=e.get("showDelay");i=H(i,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(i,a):i()},t.prototype._showAxisTooltip=function(e,i){var a=this._ecModel,n=this._tooltipModel,o=[i.offsetX,i.offsetY],s=Zn([i.tooltipOption],n),l=this._renderMode,u=[],f=Ar("section",{blocks:[],noHeader:!0}),h=[],c=new Hf;w(e,function(m){w(m.dataByAxis,function(_){var S=a.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!S||b==null)){var x=wT(b,S.axis,a,_.seriesDataIndices,_.valueLabelOpt),T=Ar("section",{header:x,noHeader:!ze(x),sortBlocks:!0,blocks:[]});f.blocks.push(T),w(_.seriesDataIndices,function(C){var A=a.getSeriesByIndex(C.seriesIndex),D=C.dataIndexInside,M=A.getDataParams(D);if(!(M.dataIndex<0)){M.axisDim=_.axisDim,M.axisIndex=_.axisIndex,M.axisType=_.axisType,M.axisId=_.axisId,M.axisValue=Mp(S.axis,{value:b}),M.axisValueLabel=x,M.marker=c.makeTooltipMarker("item",xa(M.color),l);var P=Jg(A.formatTooltip(D,!0,null)),L=P.frag;if(L){var I=Zn([A],n).get("valueFormatter");T.blocks.push(I?k({valueFormatter:I},L):L)}P.text&&h.push(P.text),u.push(M)}})}})}),f.blocks.reverse(),h.reverse();var v=i.position,p=s.get("order"),d=iy(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(e,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)})},t.prototype._showSeriesItemTooltip=function(e,i,a){var n=this._ecModel,o=nt(i),s=o.seriesIndex,l=n.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,c=u.getData(h),v=this._renderMode,p=e.positionDefault,d=Zn([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 Hf;y.marker=m.makeTooltipMarker("item",xa(y.color),v);var _=Jg(u.formatTooltip(f,!1,h)),S=d.get("order"),b=d.get("valueFormatter"),x=_.frag,T=x?iy(b?k({valueFormatter:b},x):x,m,v,S,n.get("useUTC"),d.get("textStyle")):_.text,C="item_"+u.name+"_"+f;this._showOrMove(d,function(){this._showTooltipContent(d,T,y,C,e.offsetX,e.offsetY,e.position,e.target,m)}),a({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,i,a){var n=nt(i),o=n.tooltipConfig,s=o.option||{};if(V(s)){var l=s;s={content:l,formatter:l}}var u=[s],f=this._ecModel.getComponent(n.componentMainType,n.componentIndex);f&&u.push(f),u.push({formatter:s.content});var h=e.positionDefault,c=Zn(u,this._tooltipModel,h?{position:h}:null),v=c.get("content"),p=Math.random()+"",d=new Hf;this._showOrMove(c,function(){var g=X(c.get("formatterParams")||{});this._showTooltipContent(c,v,g,p,e.offsetX,e.offsetY,e.position,i,d)}),a({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,i,a,n,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var h=this._tooltipContent;h.setEnterable(e.get("enterable"));var c=e.get("formatter");l=l||e.get("position");var v=i,p=this._getNearestPoint([o,s],a,e.get("trigger"),e.get("borderColor")),d=p.color;if(c)if(V(c)){var g=e.ecModel.get("useUTC"),y=N(a)?a[0]:a,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=c,m&&(v=rs(y.axisValue,v,g)),v=jc(v,a,!0)}else if(q(c)){var _=H(function(S,b){S===this._ticket&&(h.setContent(b,f,e,d,l),this._updatePosition(e,l,o,s,h,a,u))},this);this._ticket=n,v=c(a,n,_)}else v=c;h.setContent(v,f,e,d,l),h.show(e,d),this._updatePosition(e,l,o,s,h,a,u)}},t.prototype._getNearestPoint=function(e,i,a,n){if(a==="axis"||N(i))return{color:n||(this._renderMode==="html"?"#fff":"none")};if(!N(i))return{color:n||i.color||i.borderColor}},t.prototype._updatePosition=function(e,i,a,n,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();i=i||e.get("position");var h=o.getSize(),c=e.get("align"),v=e.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),q(i)&&(i=i([a,n],s,o.el,p,{viewSize:[u,f],contentSize:h.slice()})),N(i))a=K(i[0],u),n=K(i[1],f);else if(U(i)){var d=i;d.width=h[0],d.height=h[1];var g=ve(d,{width:u,height:f});a=g.x,n=g.y,c=null,v=null}else if(V(i)&&l){var y=xF(i,p,h,e.get("borderWidth"));a=y[0],n=y[1]}else{var y=_F(a,n,o,u,f,c?null:20,v?null:20);a=y[0],n=y[1]}if(c&&(a-=u_(c)?h[0]/2:c==="right"?h[0]:0),v&&(n-=u_(v)?h[1]/2:v==="bottom"?h[1]:0),VT(e)){var y=SF(a,n,o,u,f);a=y[0],n=y[1]}o.moveTo(a,n)},t.prototype._updateContentNotChangedOnAxis=function(e,i){var a=this._lastDataByCoordSys,n=this._cbParamsList,o=!!a&&a.length===e.length;return o&&w(a,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&w(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&&w(d,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),n&&w(c.seriesDataIndices,function(y){var m=y.seriesIndex,_=i[m],S=n[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=i,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,i){ht.node||!i.getDom()||(No(this,"_updatePosition"),this._tooltipContent.dispose(),Xv("itemTooltip",i))},t.type="tooltip",t}(Pt);function Zn(r,t,e){var i=t.ecModel,a;e?(a=new At(e,i,i),a=new At(t.option,a,i)):a=t;for(var n=r.length-1;n>=0;n--){var o=r[n];o&&(o instanceof At&&(o=o.get("tooltip",!0)),V(o)&&(o={formatter:o}),o&&(a=new At(o,a,i)))}return a}function l_(r,t){return r.dispatchAction||H(t.dispatchAction,t)}function _F(r,t,e,i,a,n,o){var s=e.getSize(),l=s[0],u=s[1];return n!=null&&(r+l+n+2>i?r-=l+n:r+=n),o!=null&&(t+u+o>a?t-=u+o:t+=o),[r,t]}function SF(r,t,e,i,a){var n=e.getSize(),o=n[0],s=n[1];return r=Math.min(r+o,i)-o,t=Math.min(t+s,a)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function xF(r,t,e,i){var a=e[0],n=e[1],o=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-a/2,l=t.y+f/2-n/2;break;case"top":s=t.x+u/2-a/2,l=t.y-n-o;break;case"bottom":s=t.x+u/2-a/2,l=t.y+f+o;break;case"left":s=t.x-a-o,l=t.y+f/2-n/2;break;case"right":s=t.x+u+o,l=t.y+f/2-n/2}return[s,l]}function u_(r){return r==="center"||r==="middle"}function bF(r,t,e){var i=Ac(r).queryOptionMap,a=i.keys()[0];if(!(!a||a==="series")){var n=Jo(t,a,i.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=n.models[0];if(!!o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=nt(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}var wF=mF;function TF(r){Wt(Yp),r.registerComponentModel(iF),r.registerComponentView(wF),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Gt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Gt)}var f_=w;function h_(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function v_(r,t,e){var i={};return f_(t,function(n){var o=i[n]=a();f_(r[n],function(s,l){if(!!fe.isValidType(l)){var u={type:l,visual:s};e&&e(u,n),o[l]=new fe(u),l==="opacity"&&(u=X(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new fe(u))}})}),i;function a(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function CF(r,t,e){var i;w(e,function(a){t.hasOwnProperty(a)&&h_(t[a])&&(i=!0)}),i&&w(e,function(a){t.hasOwnProperty(a)&&h_(t[a])?r[a]=X(t[a]):delete r[a]})}function aH(r,t,e,i,a,n){var o={};w(r,function(h){var c=fe.prepareVisualTypes(t[h]);o[h]=c});var s;function l(h){return up(e,s,h)}function u(h,c){Kx(e,s,h,c)}n==null?e.each(f):e.each([n],f);function f(h,c){s=n==null?h:c;var v=e.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var p=i.call(a,h),d=t[p],g=o[p],y=0,m=g.length;y=i&&(e=i-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,i=e.data||[],a=e.axisType,n=this._names=[],o;a==="category"?(o=[],w(i,function(u,f){var h=Qt(mn(u),""),c;U(u)?(c=X(u),c.value=f):c=f,o.push(c),n.push(h)})):o=i;var s={category:"ordinal",time:"time",value:"number"}[a]||"number",l=this._data=new zu([{name:"value",type:s}],this);l.initData(o,n)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.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:[]},t}(ft),c_=LF,WT=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline.slider",t.defaultOption=Mi(c_.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:[]}),t}(c_);Xt(WT,Px.prototype);var IF=WT,RF=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline",t}(Pt),EF=RF,kF=function(r){O(t,r);function t(e,i,a,n){var o=r.call(this,e,i,a)||this;return o.type=n||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(ur),OF=kF,Ah=Math.PI,p_=St(),BF=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){this.api=i},t.prototype.render=function(e,i,a){if(this.model=e,this.api=a,this.ecModel=i,this.group.removeAll(),e.get("show",!0)){var n=this._layout(e,a),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(n,e);e.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return Ar("nameValue",{noName:!0,value:f})},w(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](n,o,l,e)},this),this._renderAxisLabel(n,s,l,e),this._position(n,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,i){var a=e.get(["label","position"]),n=e.get("orient"),o=zF(e,i),s;a==null||a==="auto"?s=n==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:Ah/2},h=n==="vertical"?o.height:o.width,c=e.getModel("controlStyle"),v=c.get("show",!0),p=v?c.get("itemSize"):0,d=v?c.get("itemGap"):0,g=p+d,y=e.get(["label","rotate"])||0;y=y*Ah/180;var m,_,S,b=c.get("position",!0),x=v&&c.get("showPlayBtn",!0),T=v&&c.get("showPrevBtn",!0),C=v&&c.get("showNextBtn",!0),A=0,D=h;b==="left"||b==="bottom"?(x&&(m=[0,0],A+=g),T&&(_=[A,0],A+=g),C&&(S=[D-p,0],D-=g)):(x&&(m=[D-p,0],D-=g),T&&(_=[0,0],A+=g),C&&(S=[D-p,0],D-=g));var M=[A,D];return e.get("inverse")&&M.reverse(),{viewRect:o,mainLength:h,orient:n,rotation:f[n],labelRotation:y,labelPosOpt:s,labelAlign:e.get(["label","align"])||l[n],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||u[n],playPosition:m,prevBtnPosition:_,nextBtnPosition:S,axisExtent:M,controlSize:p,controlGap:d}},t.prototype._position=function(e,i){var a=this._mainGroup,n=this._labelGroup,o=e.viewRect;if(e.orient==="vertical"){var s=Fe(),l=o.x,u=o.y+o.height;Wr(s,s,[-l,-u]),Ai(s,s,-Ah/2),Wr(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=m(o),h=m(a.getBoundingRect()),c=m(n.getBoundingRect()),v=[a.x,a.y],p=[n.x,n.y];p[0]=v[0]=f[0][0];var d=e.labelPosOpt;if(d==null||V(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),n.setPosition(p),a.rotation=n.rotation=e.rotation,y(a),y(n);function y(S){S.originX=f[0][0]-S.x,S.originY=f[1][0]-S.y}function m(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function _(S,b,x,T,C){S[T]+=x[T][C]-b[T][C]}},t.prototype._createAxis=function(e,i){var a=i.getData(),n=i.get("axisType"),o=NF(i,n);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 OF("value",o,e.axisExtent,n);return l.model=i,l},t.prototype._createGroup=function(e){var i=this[e]=new it;return this.group.add(i),i},t.prototype._renderAxisLine=function(e,i,a,n){var o=a.getExtent();if(!!n.get(["lineStyle","show"])){var s=new le({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:k({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});i.add(s);var l=this._progressLine=new le({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Z({lineCap:"round",lineWidth:s.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});i.add(l)}},t.prototype._renderAxisTick=function(e,i,a,n){var o=this,s=n.getData(),l=a.scale.getTicks();this._tickSymbols=[],w(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:H(o._changeTimeline,o,u.value)},g=d_(h,c,i,d);g.ensureState("emphasis").style=v.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),gi(g);var y=nt(g);h.get("tooltip")?(y.dataIndex=u.value,y.dataModel=n):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},t.prototype._renderAxisLabel=function(e,i,a,n){var o=this,s=a.getLabelModel();if(!!s.get("show")){var l=n.getData(),u=a.getViewLabels();this._tickLabels=[],w(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 dt({x:g,y:0,rotation:e.labelRotation-e.rotation,onclick:H(o._changeTimeline,o,h),silent:!1,style:Bt(v,{text:f.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});y.ensureState("emphasis").style=Bt(p),y.ensureState("progress").style=Bt(d),i.add(y),gi(y),p_(y).dataIndex=h,o._tickLabels.push(y)})}},t.prototype._renderControl=function(e,i,a,n){var o=e.controlSize,s=e.rotation,l=n.getModel("controlStyle").getItemStyle(),u=n.getModel(["emphasis","controlStyle"]).getItemStyle(),f=n.getPlayState(),h=n.get("inverse",!0);c(e.nextBtnPosition,"next",H(this._changeTimeline,this,h?"-":"+")),c(e.prevBtnPosition,"prev",H(this._changeTimeline,this,h?"+":"-")),c(e.playPosition,f?"stop":"play",H(this._handlePlayClick,this,!f),!0);function c(v,p,d,g){if(!!v){var y=ar(rt(n.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=VF(n,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,i.add(_),gi(_)}}},t.prototype._renderCurrentPointer=function(e,i,a,n){var o=n.getData(),s=n.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(h){h.draggable=!0,h.drift=H(u._handlePointerDrag,u),h.ondragend=H(u._handlePointerDragend,u),g_(h,u._progressLine,s,a,n,!0)},onUpdate:function(h){g_(h,u._progressLine,s,a,n)}};this._currentPointer=d_(l,l,this._mainGroup,{},this._currentPointer,f)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,i,a){this._clearTimer(),this._pointerChangeTimeline([a.offsetX,a.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,i){var a=this._toAxisCoord(e)[0],n=this._axis,o=Sr(n.getExtent().slice());a>o[1]&&(a=o[1]),a=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(ft),Jv=YF,Ya=vt,Qv=w,tl=it,XF=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new tl),this.group.add(this._selectorGroup=new tl),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,i,a){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,i,a,l,s,u);var f=e.getBoxLayoutParams(),h={width:a.getWidth(),height:a.getHeight()},c=e.get("padding"),v=ve(f,h,c),p=this.layoutInner(e,o,v,n,l,u),d=ve(Z({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=OT(p,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,i,a,n,o,s,l){var u=this.getContentGroup(),f=$(),h=i.get("selectedMode"),c=[];a.eachRawSeries(function(v){!v.get("legendHoverLink")&&c.push(v.id)}),Qv(i.getData(),function(v,p){var d=v.get("name");if(!this.newlineDisabled&&(d===""||d===` `)){var g=new tl;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"),b=m.getVisual("style"),x=this._createItem(y,d,p,v,i,e,_,b,S,h,n);x.on("click",Ya(m_,d,null,n,c)).on("mouseover",Ya(tc,y.name,null,n,c)).on("mouseout",Ya(ec,y.name,null,n,c)),f.set(d,!0)}else a.eachRawSeries(function(T){if(!f.get(d)&&T.legendVisualProvider){var C=T.legendVisualProvider;if(!C.containName(d))return;var A=C.indexOfName(d),D=C.getItemVisual(A,"style"),M=C.getItemVisual(A,"legendIcon"),P=ue(D.fill);P&&P[3]===0&&(P[3]=.2,D=k(k({},D),{fill:rr(P,"rgba")}));var L=this._createItem(T,d,p,v,i,e,{},D,M,h,n);L.on("click",Ya(m_,null,d,n,c)).on("mouseover",Ya(tc,null,d,n,c)).on("mouseout",Ya(ec,null,d,n,c)),f.set(d,!0)}},this)},this),o&&this._createSelector(o,i,n,s,l)},t.prototype._createSelector=function(e,i,a,n,o){var s=this.getSelectorGroup();Qv(e,function(u){var f=u.type,h=new dt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(h);var c=i.getModel("selectorLabel"),v=i.getModel(["emphasis","selectorLabel"]);qr(h,{normal:c,emphasis:v},{defaultText:u.title}),gi(h)})},t.prototype._createItem=function(e,i,a,n,o,s,l,u,f,h,c){var v=e.visualDrawType,p=o.get("itemWidth"),d=o.get("itemHeight"),g=o.isSelected(i),y=n.get("symbolRotate"),m=n.get("symbolKeepAspect"),_=n.get("icon");f=_||f||"roundRect";var S=ZF(f,n,l,u,v,g,c),b=new tl,x=n.getModel("textStyle");if(q(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:p,itemHeight:d,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var T=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;b.add(qF({itemWidth:p,itemHeight:d,icon:f,iconRotate:T,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}))}var C=s==="left"?p+5:-5,A=s,D=o.get("formatter"),M=i;V(D)&&D?M=D.replace("{name}",i!=null?i:""):q(D)&&(M=D(i));var P=g?x.getTextColor():n.get("inactiveColor");b.add(new dt({style:Bt(x,{text:M,x:C,y:d/2,fill:P,align:A,verticalAlign:"middle"},{inheritColor:P})}));var L=new pt({shape:b.getBoundingRect(),invisible:!0}),I=n.getModel("tooltip");return I.get("show")&&Sn({el:L,componentModel:o,itemName:i,itemTooltipOption:I.option}),b.add(L),b.eachChild(function(R){R.silent=!0}),L.silent=!h,this.getContentGroup().add(b),gi(b),b.__legendDataIndex=a,b},t.prototype.layoutInner=function(e,i,a,n,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();da(e.get("orient"),l,e.get("itemGap"),a.width,a.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){da("horizontal",u,e.get("selectorItemGap",!0));var c=u.getBoundingRect(),v=[-c.x,-c.y],p=e.get("selectorButtonGap",!0),d=e.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()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Pt);function ZF(r,t,e,i,a,n,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),Qv(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?i.decal:Hl(h,o),u.fill==="inherit"&&(u.fill=i[a]),u.stroke==="inherit"&&(u.stroke=i[f]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?i:e).opacity),s(u,i);var c=t.getModel("lineStyle"),v=c.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"&&(u.stroke=i.fill),v.stroke==="auto"&&(v.stroke=i.fill),!n){var p=t.get("inactiveBorderWidth"),d=u[f];u.lineWidth=p==="auto"?i.lineWidth>0&&d?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=c.get("inactiveColor"),v.lineWidth=c.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function qF(r){var t=r.icon||"roundRect",e=Yt(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill="#fff",e.style.lineWidth=2),e}function m_(r,t,e,i){ec(r,t,e,i),e.dispatchAction({type:"legendToggleSelect",name:r!=null?r:t}),tc(r,t,e,i)}function $T(r){for(var t=r.getZr().storage.getDisplayList(),e,i=0,a=t.length;ia[o],g=[-v.x,-v.y];i||(g[n]=f[u]);var y=[0,0],m=[-p.x,-p.y],_=rt(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(d){var S=e.get("pageButtonPosition",!0);S==="end"?m[n]+=a[o]-p[o]:y[n]+=p[o]+_}m[1-n]+=v[s]/2-p[s]/2,f.setPosition(g),h.setPosition(y),c.setPosition(m);var b={x:0,y:0};if(b[o]=d?a[o]:v[o],b[s]=Math.max(v[s],p[s]),b[l]=Math.min(0,p[l]+m[1-n]),h.__rectSize=a[o],d){var x={x:0,y:0};x[o]=Math.max(a[o]-p[o]-_,0),x[s]=b[s],h.setClipPath(new pt({shape:x})),h.__rectSize=x[o]}else c.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var T=this._getPageInfo(e);return T.pageIndex!=null&&Dt(f,{x:T.contentPosition[0],y:T.contentPosition[1]},d?e:null),this._updatePageInfoView(e,T),b},t.prototype._pageGo=function(e,i,a){var n=this._getPageInfo(i)[e];n!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:i.id})},t.prototype._updatePageInfoView=function(e,i){var a=this._controllerGroup;w(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",c=i[h]!=null,v=a.childOfName(f);v&&(v.setStyle("fill",c?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=c?"pointer":"default")});var n=a.childOfName("pageText"),o=e.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;n&&o&&n.setStyle("text",V(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var i=e.get("scrollDataIndex",!0),a=this.getContentGroup(),n=this._containerGroup.__rectSize,o=e.getOrient().index,s=Mh[o],l=Dh[o],u=this._findTargetItemIndex(i),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+n||_&&!b(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=_;for(var g=u-1,y=d,m=d,_=null;g>=-1;--g)_=S(f[g]),(!_||!b(m,_.s))&&y.i=T&&x.s<=T+n}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var i,a=this.getContentGroup(),n;return a.eachChild(function(o,s){var l=o.__legendDataIndex;n==null&&l!=null&&(n=s),l===e&&(i=s)}),i!=null?i:n},t.type="legend.scroll",t}(UT),e3=t3;function r3(r){r.registerAction("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;i!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(a){a.setScrollDataIndex(i)})})}function i3(r){Wt(YT),r.registerComponentModel(QF),r.registerComponentView(e3),r3(r)}function a3(r){Wt(YT),Wt(i3)}var n3=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=Mi(Uo.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Uo),o3=n3,ed=St();function s3(r,t,e){ed(r).coordSysRecordMap.each(function(i){var a=i.dataZoomInfoMap.get(t.uid);a&&(a.getRange=e)})}function l3(r,t){for(var e=ed(r).coordSysRecordMap,i=e.keys(),a=0;ai[e+t]&&(t=s),a=a&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function c3(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var i=ed(e),a=i.coordSysRecordMap||(i.coordSysRecordMap=$());a.each(function(n){n.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(n){var o=RT(n);w(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,u3(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=$());f.set(n.uid,{dzReferCoordSysInfo:s,model:n,getRange:null})})}),a.each(function(n){var o=n.controller,s,l=n.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){XT(a,n);return}var f=v3(l);o.enable(f.controlType,f.opt),o.setPointerChecker(n.containsPoint),is(n,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var p3=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,i,a){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),s3(a,e,{pan:H(Ph.pan,this),zoom:H(Ph.zoom,this),scrollMove:H(Ph.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){l3(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(Kp),Ph={zoom:function(r,t,e,i){var a=this.range,n=a.slice(),o=r.axisModels[0];if(!!o){var s=Lh[t](null,[i.originX,i.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(n[1]-n[0])+n[0],u=Math.max(1/i.scale,0);n[0]=(n[0]-l)*u+l,n[1]=(n[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Da(0,n,[0,100],0,f.minSpan,f.maxSpan),this.range=n,a[0]!==n[0]||a[1]!==n[1])return n}},pan:x_(function(r,t,e,i,a,n){var o=Lh[i]([n.oldX,n.oldY],[n.newX,n.newY],t,a,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:x_(function(r,t,e,i,a,n){var o=Lh[i]([0,0],[n.scrollDelta,n.scrollDelta],t,a,e);return o.signal*(r[1]-r[0])*n.scrollDelta})};function x_(r){return function(t,e,i,a){var n=this.range,o=n.slice(),s=t.axisModels[0];if(!!s){var l=r(o,s,t,e,i,a);if(Da(l,o,[0,100],"all"),this.range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var Lh={grid:function(r,t,e,i,a){var n=e.axis,o={},s=a.model.coordinateSystem.getRect();return r=r||[0,0],n.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(r,t,e,i,a){var n=e.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=n.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(r,t,e,i,a){var n=e.axis,o=a.model.coordinateSystem.getRect(),s={};return r=r||[0,0],n.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}},d3=p3;function g3(r){jp(r),r.registerComponentModel(o3),r.registerComponentView(d3),c3(r)}var y3=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Mi(Uo.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"}}}),t}(Uo),m3=y3,Kn=pt,b_=7,_3=1,Ih=30,S3=7,jn="horizontal",w_="vertical",x3=5,b3=["line","bar","candlestick","scatter"],w3={easing:"cubicOut",duration:100,delay:0},T3=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,i){this.api=i,this._onBrush=H(this._onBrush,this),this._onBrushEnd=H(this._onBrushEnd,this)},t.prototype.render=function(e,i,a,n){if(r.prototype.render.apply(this,arguments),is(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!n||n.type!=="dataZoom"||n.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){No(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var i=this._displayables.sliderGroup=new it;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(i),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,i=this.api,a=e.get("brushSelect"),n=a?S3:0,o=this._findCoordRect(),s={width:i.getWidth(),height:i.getHeight()},l=this._orient===jn?{right:s.width-o.x-o.width,top:s.height-Ih-b_-n,width:o.width,height:Ih}:{right:b_,top:o.y,width:Ih,height:o.height},u=bn(e.option);w(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var f=ve(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===w_&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,i=this._location,a=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===jn&&!o?{scaleY:l?1:-1,scaleX:1}:a===jn&&o?{scaleY:l?1:-1,scaleX:-1}:a===w_&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=i.x-u.x,e.y=i.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,i=this._size,a=this._displayables.sliderGroup,n=e.get("brushSelect");a.add(new Kn({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new Kn({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:H(this._onClickPanel,this)}),s=this.api.getZr();n?(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)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var i=this._size,a=this._shadowSize||[],n=e.series,o=n.getRawData(),s=n.getShadowDim&&n.getShadowDim(),l=s&&o.getDimensionInfo(s)?n.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||i[0]!==a[0]||i[1]!==a[1]){var h=o.getDataExtent(l),c=(h[1]-h[0])*.3;h=[h[0]-c,h[1]+c];var v=[0,i[1]],p=[0,i[0]],d=[[i[0],0],[0,0]],g=[],y=p[1]/(o.count()-1),m=0,_=Math.round(o.count()/i[0]),S;o.each([l],function(A,D){if(_>0&&D%_){m+=y;return}var M=A==null||isNaN(A)||A==="",P=M?0:wt(A,h,v,!0);M&&!S&&D?(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,P]),g.push([m,P]),m+=y,S=M}),u=this._shadowPolygonPts=d,f=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var b=this.dataZoomModel;function x(A){var D=b.getModel(A?"selectedDataBackground":"dataBackground"),M=new it,P=new Dr({shape:{points:u},segmentIgnoreThreshold:1,style:D.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),L=new He({shape:{points:f},segmentIgnoreThreshold:1,style:D.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(P),M.add(L),M}for(var T=0;T<3;T++){var C=x(T===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,i=e.get("showDataShadow");if(i!==!1){var a,n=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();w(l,function(u){if(!a&&!(i!==!0&&ot(b3,u.get("type"))<0)){var f=n.getComponent(pi(o),s).axis,h=C3(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}},t.prototype._renderHandle=function(){var e=this.group,i=this._displayables,a=i.handles=[null,null],n=i.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=i.filler=new Kn({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new Kn({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:_3,fill:"rgba(0,0,0,0)"}})),w([0,1],function(_){var S=l.get("handleIcon");!Vl[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var b=Yt(S,-1,0,2,2,null,!0);b.attr({cursor:T_(this._orient),draggable:!0,drift:H(this._onDragMove,this,_),ondragend:H(this._onDragEnd,this),onmouseover:H(this._showDataInfo,this,!0),onmouseout:H(this._showDataInfo,this,!1),z2:5});var x=b.getBoundingRect(),T=l.get("handleSize");this._handleHeight=K(T,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),gi(b);var C=l.get("handleColor");C!=null&&(b.style.fill=C),o.add(a[_]=b);var A=l.getModel("textStyle");e.add(n[_]=new dt({silent:!0,invisible:!0,style:Bt(A,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:A.getTextColor(),font:A.getFont()}),z2:10}))},this);var v=c;if(h){var p=K(l.get("moveHandleSize"),s[1]),d=i.moveHandle=new pt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,y=i.moveHandleIcon=Yt(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=i.moveZone=new pt({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:T_(this._orient),drift:H(this._onDragMove,this,"all"),ondragstart:H(this._showDataInfo,this,!0),ondragend:H(this._onDragEnd,this),onmouseover:H(this._showDataInfo,this,!0),onmouseout:H(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[wt(e[0],[0,100],i,!0),wt(e[1],[0,100],i,!0)]},t.prototype._updateInterval=function(e,i){var a=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Da(i,n,o,a.get("zoomLock")?"all":e,s.minSpan!=null?wt(s.minSpan,l,o,!0):null,s.maxSpan!=null?wt(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=Sr([wt(n[0],o,l,!0),wt(n[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var i=this._displayables,a=this._handleEnds,n=Sr(a.slice()),o=this._size;w([0,1],function(v){var p=i.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),i.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]});var s={x:n[0],width:n[1]-n[0]};i.moveHandle&&(i.moveHandle.setShape(s),i.moveZone.setShape(s),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=i.dataShadowSegs,u=[0,n[0],n[1],o[0]],f=0;fi[0]||a[1]<0||a[1]>i[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var i=e.offsetX,a=e.offsetY;this._brushStart=new et(i,a),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(!!this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var a=i.shape,n=+new Date;if(!(n-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=Sr([wt(a.x,o,s,!0),wt(a.x+a.width,o,s,!0)]),this._handleEnds=[a.x,a.x+a.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Hr(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,i){var a=this._displayables,n=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new Kn({silent:!0,style:n.getModel("brushStyle").getItemStyle()}),a.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,i),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]})},t.prototype._dispatchZoomAction=function(e){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?w3:null,start:i[0],end:i[1]})},t.prototype._findCoordRect=function(){var e,i=RT(this.dataZoomModel).infoList;if(!e&&i.length){var a=i[0].model.coordinateSystem;e=a.getRect&&a.getRect()}if(!e){var n=this.api.getWidth(),o=this.api.getHeight();e={x:n*.2,y:o*.2,width:n*.6,height:o*.6}}return e},t.type="dataZoom.slider",t}(Kp);function C3(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function T_(r){return r==="vertical"?"ns-resize":"ew-resize"}var A3=T3;function M3(r){r.registerComponentModel(m3),r.registerComponentView(A3),jp(r)}function D3(r){Wt(g3),Wt(M3)}var P3={get:function(r,t,e){var i=X((L3[r]||{})[t]);return e&&N(i)?i[i.length-1]:i}},L3={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]}},ZT=P3,C_=fe.mapVisual,I3=fe.eachVisual,R3=N,A_=w,E3=Sr,k3=wt,O3=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,i,a){this.mergeDefaultAndTheme(e,a)},t.prototype.optionUpdated=function(e,i){var a=this.option;!i&&CF(a,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var i=this.stateList;e=H(e,this),this.controllerVisuals=v_(this.option.controller,i,e),this.targetVisuals=v_(this.option.target,i,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,i=[];return e==null||e==="all"?this.ecModel.eachSeries(function(a,n){i.push(n)}):i=Mt(e),i},t.prototype.eachTargetSeries=function(e,i){w(this.getTargetSeriesIndices(),function(a){var n=this.ecModel.getSeriesByIndex(a);n&&e.call(i,n)},this)},t.prototype.isTargetSeries=function(e){var i=!1;return this.eachTargetSeries(function(a){a===e&&(i=!0)}),i},t.prototype.formatValueText=function(e,i,a){var n=this.option,o=n.precision,s=this.dataBound,l=n.formatter,u;a=a||["<",">"],N(e)&&(e=e.slice(),u=!0);var f=i?e:u?[h(e[0]),h(e[1])]:h(e);if(V(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(q(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?a[0]+" "+f[1]:e[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))}},t.prototype.resetExtent=function(){var e=this.option,i=E3([e.min,e.max]);this._dataExtent=i},t.prototype.getDataDimensionIndex=function(e){var i=this.option.dimension;if(i!=null)return e.getDimensionIndex(i);for(var a=e.dimensions,n=a.length-1;n>=0;n--){var o=a[n],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,i=this.option,a={inRange:i.inRange,outOfRange:i.outOfRange},n=i.target||(i.target={}),o=i.controller||(i.controller={});Q(n,a),Q(o,a);var s=this.isCategory();l.call(this,n),l.call(this,o),u.call(this,n,"inRange","outOfRange"),f.call(this,o);function l(h){R3(i.color)&&!h.inRange&&(h.inRange={color:i.color.slice().reverse()}),h.inRange=h.inRange||{color:e.get("gradientColor")}}function u(h,c,v){var p=h[c],d=h[v];p&&!d&&(d=h[v]={},A_(p,function(g,y){if(!!fe.isValidType(y)){var m=ZT.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";A_(this.stateList,function(y){var m=this.itemSize,_=h[y];_||(_=h[y]={color:s?p:[p]}),_.symbol==null&&(_.symbol=c&&X(c)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=v&&X(v)||(s?m[0]:[m[0],m[0]])),_.symbol=C_(_.symbol,function(x){return x==="none"?g:x});var S=_.symbolSize;if(S!=null){var b=-1/0;I3(S,function(x){x>b&&(b=x)}),_.symbolSize=C_(S,function(x){return k3(x,[0,b],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.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"}},t}(ft),ru=O3,M_=[20,140],B3=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=M_[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=M_[1])},t.prototype._resetRange=function(){var e=this.getExtent(),i=this.option.range;!i||i.auto?(e.auto=1,this.option.range=e):N(i)&&(i[0]>i[1]&&i.reverse(),i[0]=Math.max(i[0],e[0]),i[1]=Math.min(i[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),w(this.stateList,function(e){var i=this.option.controller[e].symbolSize;i&&i[0]!==i[1]&&(i[0]=i[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),i=Sr((this.get("range")||[]).slice());return i[0]>e[1]&&(i[0]=e[1]),i[1]>e[1]&&(i[1]=e[1]),i[0]=a[1]||e<=i[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var i=[];return this.eachTargetSeries(function(a){var n=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&n.push(l)},this),i.push({seriesId:a.id,dataIndex:n})},this),i},t.prototype.getVisualMeta=function(e){var i=D_(this,"outOfRange",this.getExtent()),a=D_(this,"inRange",this.option.range.slice()),n=[];function o(v,p){n.push({value:v,color:e(v,p)})}for(var s=0,l=0,u=a.length,f=i.length;le[1])break;n.push({color:this.getControllerVisual(l,"color",i),offset:s/a})}return n.push({color:this.getControllerVisual(e[1],"color",i),offset:1}),n},t.prototype._createBarPoints=function(e,i){var a=this.visualMapModel.itemSize;return[[a[0]-i[0],e[0]],[a[0],e[0]],[a[0],e[1]],[a[0]-i[1],e[1]]]},t.prototype._createBarGroup=function(e){var i=this._orient,a=this.visualMapModel.get("inverse");return new it(i==="horizontal"&&!a?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:i==="horizontal"&&a?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:i==="vertical"&&!a?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,i){if(!!this._useHandle){var a=this._shapes,n=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=n.itemSize,u=n.getExtent();V3([0,1],function(f){var h=o[f];h.setStyle("fill",i.handlesColor[f]),h.y=e[f];var c=dr(e[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=ir(a.handleLabelPoints[f],yi(h,this.group));s[f].setStyle({x:p[0],y:p[1],text:n.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,i,a,n){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(e,"color",c),p=this.getControllerVisual(e,"symbolSize"),d=dr(e,s,u,!0),g=l[0]-p/2,y={x:h.x,y:h.y};h.y=d,h.x=g;var m=ir(f.indicatorLabelPoint,yi(h,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),b=this._orient,x=b==="horizontal";_.setStyle({text:(a||"")+o.formatValueText(i),verticalAlign:x?S:"middle",align:x?"center":S});var T={x:g,y:d,style:{fill:v}},C={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var A={duration:100,easing:"cubicInOut",additive:!0};h.x=y.x,h.y=y.y,h.animateTo(T,A),_.animateTo(C,A)}else h.attr(T),_.attr(C);this._firstShowIndicator=!1;var D=this._shapes.handleLabels;if(D)for(var M=0;Mo[1]&&(h[1]=1/0),i&&(h[0]===-1/0?this._showIndicator(f,h[1],"< ",l):h[1]===1/0?this._showIndicator(f,h[0],"> ",l):this._showIndicator(f,f,"\u2248 ",l));var c=this._hoverLinkDataIndices,v=[];(i||R_(a))&&(v=this._hoverLinkDataIndices=a.findTargetDataIndices(h));var p=$M(c,v);this._dispatchHighDown("downplay",_l(p[0],a)),this._dispatchHighDown("highlight",_l(p[1],a))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var i;if(ua(e.target,function(l){var u=nt(l);if(u.dataIndex!=null)return i=u,!0},!0),!!i){var a=this.ecModel.getSeriesByIndex(i.seriesIndex),n=this.visualMapModel;if(!!n.isTargetSeries(a)){var o=a.getData(i.dataType),s=o.getStore().get(n.getDataDimensionIndex(o),i.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var i=this._shapes.handleLabels;if(i)for(var a=0;a=0&&(n.dimension=o,i.push(n))}}),r.getData().setVisual("visualMeta",i)}}];function Z3(r,t,e,i){for(var a=t.targetVisuals[i],n=fe.prepareVisualTypes(a),o={color:qx(r.getData(),"color")},s=0,l=n.length;s0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(U3,Y3),w(X3,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(q3))}function K3(r){r.registerComponentModel(N3),r.registerComponentView($3),jT(r)}var j3=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],J3[this._mode].call(this,this._pieceList),this._resetSelected(e,i);var n=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=X(n)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=z(this._pieceList,function(l){return l=X(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,i={},a=fe.listVisualTypes(),n=this.isCategory();w(e.pieces,function(s){w(a,function(l){s.hasOwnProperty(l)&&(i[l]=1)})}),w(i,function(s,l){var u=!1;w(this.stateList,function(f){u=u||o(e,f,l)||o(e.target,f,l)},this),!u&&w(this.stateList,function(f){(e[f]||(e[f]={}))[l]=ZT.get(l,f==="inRange"?"active":"inactive",n)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,i){var a=this.option,n=this._pieceList,o=(i?a:e).selected||{};if(a.selected=o,w(n,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),a.selectedMode==="single"){var s=!1;w(n,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=X(e)},t.prototype.getValueState=function(e){var i=fe.findPieceIndex(e,this._pieceList);return i!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[i])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var i=[],a=this._pieceList;return this.eachTargetSeries(function(n){var o=[],s=n.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=fe.findPieceIndex(l,a);f===e&&o.push(u)},this),i.push({seriesId:n.id,dataIndex:o})},this),i},t.prototype.getRepresentValue=function(e){var i;if(this.isCategory())i=e.value;else if(e.value!=null)i=e.value;else{var a=e.interval||[];i=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return i},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var i=[],a=["",""],n=this;function o(f,h){var c=n.getRepresentValue({interval:f});h||(h=n.getValueState(c));var v=e(c,h);f[0]===-1/0?a[0]=v:f[1]===1/0?a[1]=v:i.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 w(s,function(f){var h=f.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:i,outerColors:a}},t.type="visualMap.piecewise",t.defaultOption=Mi(ru.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}),t}(ru),J3={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),i=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;for(var n=(i[1]-i[0])/a;+n.toFixed(e)!==n&&e<5;)e++;t.precision=e,n=+n.toFixed(e),t.minOpen&&r.push({interval:[-1/0,i[0]],close:[0,0]});for(var o=0,s=i[0];o","\u2265"][i[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,a)},this)}};function B_(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}var Q3=j3,tG=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var i=this.visualMapModel,a=i.get("textGap"),n=i.textStyleModel,o=n.getFont(),s=n.getTextColor(),l=this._getItemAlign(),u=i.itemSize,f=this._getViewData(),h=f.endsText,c=Gr(i.get("showLabel",!0),!h);h&&this._renderEndsText(e,h[0],u,c,l),w(f.viewPieceList,function(v){var p=v.piece,d=new it;d.onclick=H(this._onItemClick,this,p),this._enableHoverLink(d,v.indexInModelPieceList);var g=i.getRepresentValue(p);if(this._createItemSymbol(d,g,[0,0,u[0],u[1]]),c){var y=this.visualMapModel.getValueState(g);d.add(new dt({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}}))}e.add(d)},this),h&&this._renderEndsText(e,h[1],u,c,l),da(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,i){var a=this;e.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:_l(s.findTargetDataIndices(i),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,i=e.option;if(i.orient==="vertical")return KT(e,this.api,e.itemSize);var a=i.align;return(!a||a==="auto")&&(a="left"),a},t.prototype._renderEndsText=function(e,i,a,n,o){if(!!i){var s=new it,l=this.visualMapModel.textStyleModel;s.add(new dt({style:Bt(l,{x:n?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:n?o:"center",text:i})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,i=z(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=e.get("text"),n=e.get("orient"),o=e.get("inverse");return(n==="horizontal"?o:!o)?i.reverse():a&&(a=a.slice().reverse()),{viewPieceList:i,endsText:a}},t.prototype._createItemSymbol=function(e,i,a){e.add(Yt(this.getControllerVisual(i,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(i,"color")))},t.prototype._onItemClick=function(e){var i=this.visualMapModel,a=i.option,n=a.selectedMode;if(!!n){var o=X(a.selected),s=i.getSelectedMapKey(e);n==="single"||n===!0?(o[s]=!0,w(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})}},t.type="visualMap.piecewise",t}(qT),eG=tG;function rG(r){r.registerComponentModel(Q3),r.registerComponentView(eG),jT(r)}function iG(r){Wt(K3),Wt(rG)}var aG={label:{enabled:!0},decal:{show:!1}},N_=St(),nG={};function oG(r,t){var e=r.getModel("aria");if(!e.get("enabled"))return;var i=X(aG);Q(i.label,r.getLocaleModel().get("aria"),!1),Q(e.option,i,!1),a(),n();function a(){var u=e.getModel("decal"),f=u.get("show");if(f){var h=$();r.eachSeries(function(c){if(!c.isColorBySeries()){var v=h.get(c.type);v||(v={},h.set(c.type,v)),N_(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=Og(c.ecModel,c.name,nG,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",S(_,m))}else{var p=c.getRawData(),d={},g=N_(c).scope;v.each(function(b){var x=v.getRawIndex(b);d[x]=b});var y=p.count();p.each(function(b){var x=d[b],T=p.getName(b)||b+"",C=Og(c.ecModel,T,g,y),A=v.getItemVisual(x,"decal");v.setItemVisual(x,"decal",S(A,C))})}function S(b,x){var T=b?k(k({},x),b):x;return T.dirty=!0,T}})}}function n(){var u=r.getLocaleModel().get("aria"),f=e.getModel("label");if(f.option=Z(f.option,u),!!f.get("enabled")){var h=t.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(C,A){if(A1?f.get(["series","multiple",P]):f.get(["series","single",P]),D=o(D,{seriesId:C.seriesIndex,seriesName:C.get("name"),seriesType:l(C.subType)});var L=C.getData();if(L.count()>v){var I=f.get(["data","partialData"]);D+=o(I,{displayCnt:v})}else D+=f.get(["data","allData"]);for(var R=f.get(["data","separator","middle"]),E=f.get(["data","separator","end"]),W=[],B=0;B=ji:-u>=ji),v=u>0?u%ji:u%ji+ji,p=!1;c?p=!0:hi(h)?p=!1:p=v>=JT==!!f;var d=t+i*kh(o),g=e+a*Eh(o);this._start&&this._add("M",d,g);var y=Math.round(n*uG);if(c){var m=1/this._p,_=(f?1:-1)*(ji-m);this._add("A",i,a,y,1,+f,t+i*kh(o+_),e+a*Eh(o+_)),m>.01&&this._add("A",i,a,y,0,+f,d,g)}else{var S=t+i*kh(s),b=e+a*Eh(s);this._add("A",i,a,y,+p,+f,S,b)}},r.prototype.rect=function(t,e,i,a){this._add("M",t,e),this._add("l",i,0),this._add("l",0,a),this._add("l",-i,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(t,e,i,a,n,o,s,l,u){for(var f=[],h=this._p,c=1;c"}function _G(r){return""}function rd(r,t){t=t||{};var e=t.newline?` `:"";function i(a){var n=a.children,o=a.tag,s=a.attrs,l=a.text;return mG(o,s)+(o!=="style"?oe(l):l||"")+(n?""+e+z(n,function(u){return i(u)}).join(e)+e:"")+_G(o)}return i(r)}function SG(r,t,e){e=e||{};var i=e.newline?` `:"",a=" {"+i,n=i+"}",o=z(at(r),function(l){return l+a+z(at(r[l]),function(u){return u+":"+r[l][u]+";"}).join(i)+n}).join(i),s=z(at(t),function(l){return"@keyframes "+l+a+z(at(t[l]),function(u){return u+a+z(at(t[l][u]),function(f){var h=t[l][u][f];return f==="d"&&(h='path("'+h+'")'),f+":"+h+";"}).join(i)+n}).join(i)+n}).join(i);return!o&&!s?"":[""].join(i)}function ic(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function z_(r,t,e,i){return Vt("svg","root",{width:r,height:t,xmlns:tC,"xmlns:xlink":eC,version:"1.1",baseProfile:"full",viewBox:i?"0 0 "+r+" "+t:!1},e)}var V_={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"},ea="transform-origin";function xG(r,t,e){var i=k({},r.shape);k(i,t),r.buildPath(e,i);var a=new QT;return a.reset(I1(r)),e.rebuildPath(a,1),a.generateStr(),a.getStr()}function bG(r,t){var e=t.originX,i=t.originY;(e||i)&&(r[ea]=e+"px "+i+"px")}var wG={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function iC(r,t){var e=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[e]=r,e}function TG(r,t,e){var i=r.shape.paths,a={},n,o;if(w(i,function(l){var u=ic(e.zrId);u.animation=!0,Xu(l,{},u,!0);var f=u.cssAnims,h=u.cssNodes,c=at(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&&(n=m)}}}),!!n){t.d=!1;var s=iC(a,e);return n.replace(o,s)}}function F_(r){return V(r)?V_[r]?"cubic-bezier("+V_[r]+")":gc(r)?r:"":""}function Xu(r,t,e,i){var a=r.animators,n=a.length,o=[];if(r instanceof _u){var s=TG(r,t,e);if(s)o.push(s);else if(!n)return}else if(!n)return;for(var l={},u=0;u0}).length){var Zt=iC(T,e);return Zt+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=e.zrId+"-cls-"+e.cssClassIdx++;e.cssNodes["."+y]={animation:o.join(",")},t.class=y}}var Yo=Math.round;function aC(r){return r&&V(r.src)}function nC(r){return r&&q(r.toDataURL)}function id(r,t,e,i){dG(function(a,n){var o=a==="fill"||a==="stroke";o&&L1(n)?sC(t,r,a,i):o&&mc(n)?lC(e,r,a,i):r[a]=n},t,e,!1),IG(e,r,i)}function G_(r){return hi(r[0]-1)&&hi(r[1])&&hi(r[2])&&hi(r[3]-1)}function CG(r){return hi(r[4])&&hi(r[5])}function ad(r,t,e){if(t&&!(CG(t)&&G_(t))){var i=e?10:1e4;r.transform=G_(t)?"translate("+Yo(t[4]*i)/i+" "+Yo(t[5]*i)/i+")":WA(t)}}function H_(r,t,e){for(var i=r.points,a=[],n=0;nn?(p=e[l+1]==null?null:e[l+1].elm,hC(r,p,e,a,l)):iu(r,t,i,n))}function ja(r,t){var e=t.elm=r.elm,i=r.children,a=t.children;r!==t&&(nd(r,t),ac(t.text)?gr(i)&&gr(a)?i!==a&&BG(e,i,a):gr(a)?(gr(r.text)&&Oh(e,""),hC(e,null,a,0,a.length-1)):gr(i)?iu(e,i,0,i.length-1):gr(r.text)&&Oh(e,""):r.text!==t.text&&(gr(i)&&iu(e,i,0,i.length-1),Oh(e,t.text)))}function NG(r,t){if(oo(r,t))ja(r,t);else{var e=r.elm,i=uC(e);Xo(t),i!==null&&(aa(i,t.elm,fC(e)),iu(i,[r],0,0))}return t}var zG=0,VG=function(){function r(t,e,i){if(this.type="svg",this.refreshHover=q_(),this.configLayer=q_(),this.storage=e,this._opts=i=k({},i),this.root=t,this._id="zr"+zG++,this._oldVNode=z_(i.width,i.height),t&&!i.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var n=this._svgDom=this._oldVNode.elm=rC("svg");nd(null,this._oldVNode),a.appendChild(n),t.appendChild(a)}this.resize(i.width,i.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",NG(this._oldVNode,t),this._oldVNode=t}},r.prototype.renderOneToVNode=function(t){return $_(t,ic(this._id))},r.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),i=this._width,a=this._height,n=ic(this._id);n.animation=t.animation,n.willUpdate=t.willUpdate,n.compress=t.compress;var o=[],s=this._bgVNode=FG(i,a,this._backgroundColor,n);s&&o.push(s);var l=t.compress?null:this._mainVNode=Vt("g","main",{},[]);this._paintList(e,n,l?l.children:o),l&&o.push(l);var u=z(at(n.defs),function(c){return n.defs[c]});if(u.length&&o.push(Vt("defs","defs",{},u)),t.animation){var f=SG(n.cssNodes,n.cssAnims,{newline:!0});if(f){var h=Vt("style","stl",{},[],f);o.push(h)}}return z_(i,a,o,t.useViewBox)},r.prototype.renderToString=function(t){return t=t||{},rd(this.renderToVNode({animation:rt(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:rt(t.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(t,e,i){for(var a=t.length,n=[],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=n[o-1];for(var y=d+1;yt==="default"?e.value:t);let a=null,n=h;const o=gC({});let s=()=>{};n=bC(h,200);const l=fd(()=>i.value!=="dark"?o.value:ud({backgroundColor:"transparent"},o.value));function u(v=t){const p=La(r);if(!p||!La(p))return;a=tm.init(p,v);const{removeEvent:d}=SC({el:window,name:"resize",listener:n});s=d;const{widthRef:g,screenEnum:y}=xC();(La(g)<=y.MD||p.offsetHeight===0)&&qu(()=>{n()},30)}function f(v,p=!0){var d;if(o.value=v,((d=La(r))==null?void 0:d.offsetHeight)===0){qu(()=>{f(La(l))},30);return}_C(()=>{qu(()=>{!a&&(u(i.value),!a)||(p&&(a==null||a.clear()),a==null||a.setOption(La(l)))},30)})}function h(){a==null||a.resize({animation:{duration:300,easing:"quadraticIn"}})}yC(()=>i.value,v=>{a&&(a.dispose(),u(v),f(o.value))}),mC(()=>{!a||(s(),a.dispose(),a=null)});function c(){return a||u(i.value),a}return{setOptions:f,resize:h,echarts:tm,getInstance:c}}export{V as $,gB as A,st as B,yB as C,Ut as D,n1 as E,sv as F,it as G,pu as H,Oc as I,Z as J,hn as K,Rc as L,Lo as M,vt as N,he as O,gt as P,k as Q,kw as R,Pp as S,na as T,z as U,Gw as V,N as W,Qt as X,bp as Y,zu as Z,O as _,rk as a,ww as a$,At as a0,Ar as a1,we as a2,nN as a3,Gt as a4,Og as a5,$ as a6,Mt as a7,Qc as a8,KG as a9,tn as aA,s1 as aB,u1 as aC,el as aD,Ta as aE,l1 as aF,vc as aG,WC as aH,o1 as aI,$C as aJ,wt as aK,le as aL,Ge as aM,Et as aN,un as aO,fn as aP,fp as aQ,Ou as aR,Yt as aS,wu as aT,Al as aU,jt as aV,ha as aW,lw as aX,Xt as aY,as as aZ,Lu as a_,Dr as aa,dt as ab,Bt as ac,dS as ad,xi as ae,ln as af,xp as ag,H as ah,Wr as ai,dc as aj,Eg as ak,Fe as al,fv as am,kc as an,l2 as ao,qr as ap,Kr as aq,hc as ar,Ur as as,pt as at,nl as au,A1 as av,fe as aw,Gr as ax,IM as ay,yt as az,ik as b,bu as b$,Pl as b0,kL as b1,xD as b2,XD as b3,ce as b4,j2 as b5,lm as b6,Mr as b7,Rp as b8,He as b9,Cd as bA,Oa as bB,TD as bC,t1 as bD,Si as bE,Lp as bF,dk as bG,zt as bH,Hl as bI,ao as bJ,Il as bK,Yh as bL,b5 as bM,Wu as bN,Tg as bO,iH as bP,G as bQ,tH as bR,K2 as bS,S5 as bT,x5 as bU,Su as bV,Vc as bW,E5 as bX,Sh as bY,Yv as bZ,Ci as b_,Io as ba,et as bb,El as bc,cx as bd,xw as be,$r as bf,bo as bg,Wt as bh,o5 as bi,ts as bj,UG as bk,_R as bl,CP as bm,Tu as bn,Sr as bo,EM as bp,be as bq,se as br,gk as bs,U as bt,sp as bu,$2 as bv,zr as bw,Ip as bx,cA as by,bl as bz,tk as c,Yr as c$,$O as c0,ss as c1,Ro as c2,Be as c3,WO as c4,ft as c5,os as c6,ur as c7,Hu as c8,cn as c9,e2 as cA,_S as cB,qx as cC,Lb as cD,jG as cE,JG as cF,ee as cG,zC as cH,fL as cI,sr as cJ,CL as cK,QG as cL,Fr as cM,bt as cN,GC as cO,yr as cP,or as cQ,kd as cR,nu as cS,gy as cT,NC as cU,xy as cV,Tv as cW,tb as cX,bd as cY,uc as cZ,yy as c_,xT as ca,B5 as cb,TT as cc,ST as cd,CT as ce,N5 as cf,Pt as cg,Yp as ch,Go as ci,Xy as cj,Y2 as ck,X as cl,v_ as cm,aH as cn,zT as co,is as cp,oT as cq,CF as cr,Q as cs,Qe as ct,Xn as cu,ht as cv,Px as cw,wi as cx,xr as cy,pl as cz,ek as d,Cl as d0,XG as d1,rl as d2,Nc as d3,BL as d4,ZG as d5,HG as d6,Lk as d7,Zk as d8,sO as d9,KO as da,vB as db,fN as dc,_5 as dd,az as de,zz as df,uN as dg,Uz as dh,tV as di,eF as dj,TF as dk,PF as dl,$F as dm,a3 as dn,D3 as dp,g3 as dq,M3 as dr,iG as ds,K3 as dt,rG as du,lG as dv,bb as dw,w as e,Ct as f,nt as g,ak as h,q as i,eH as j,at as k,go as l,St as m,vi as n,es as o,K as p,te as q,rt as r,rH as s,ot as t,nH as u,Dt as v,qG as w,ve as x,YG as y,Ow as z};