import{i as e,r as t,t as n}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as r,t as i}from"./jsx-runtime-CRBytmvs.js";import{t as a}from"./request--UCyt0wo.js";import{t as o}from"./table-BXi9q3AE.js";import{t as s}from"./empty-_1ZFK8yy.js";import{t as c}from"./card-DU2T2-YW.js";import{t as l}from"./spin-CfJYIffX.js";import{n as u,t as d}from"./row-DfzKzMF0.js";import{t as f}from"./divider-BWjoWWHX.js";import{t as p}from"./statistic-G8YfPOC4.js";import{t as m}from"./tag-DBV1bHre.js";import{t as h}from"./theme-D5FZSALB.js";import{t as g}from"./ArrowDownOutlined-hMgHFKfN.js";import{t as _}from"./ArrowUpOutlined-C-Hx3V4D.js";import{t as v}from"./ShopOutlined-CwwKSpcq.js";import{n as y,r as b,t as x}from"./WalletOutlined-Bjy-chtO.js";import{t as S}from"./UserOutlined-D5Ziy0eL.js";import{t as C}from"./useTranslation-DBl6NYjI.js";import{a as w,i as T,n as E,r as D,t as O}from"./tslib.es6-5i5FW2KX.js";import{n as k,t as A}from"./iStoreOrder-CyyYoLoV.js";var j=e(r()),ee=function(e,t){return ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ee(e,t)};function M(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);ee(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var te=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),N=new(function(){function e(){this.browser=new te,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(N.wxa=!0,N.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?N.worker=!0:!N.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(N.node=!0,N.svgSupported=!0):ne(navigator.userAgent,N);function ne(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var re=`12px sans-serif`,ie=20,ae=100,oe=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function se(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n=0)s=o*n.length;else for(var c=0;cmt,HashMap:()=>ct,RADIAN_TO_DEGREE:()=>pt,assert:()=>et,assignProps:()=>ke,bind:()=>z,clone:()=>P,concatArray:()=>lt,createCanvas:()=>Ae,createHashMap:()=>G,createObject:()=>ut,curry:()=>Be,defaults:()=>I,disableUserSelect:()=>dt,each:()=>L,eqNaN:()=>Ye,extend:()=>F,filter:()=>Ie,find:()=>Le,guid:()=>Te,hasOwn:()=>K,indexOf:()=>je,inherits:()=>Me,isArray:()=>B,isArrayLike:()=>Pe,isBuiltInObject:()=>Ue,isDom:()=>Ge,isFunction:()=>V,isGradientObject:()=>Ke,isImagePatternObject:()=>qe,isNumber:()=>He,isObject:()=>U,isPrimitive:()=>it,isRegExp:()=>Je,isString:()=>H,isStringSafe:()=>Ve,isTypedArray:()=>We,keys:()=>Re,logError:()=>Ee,map:()=>R,merge:()=>De,mergeAll:()=>Oe,mixin:()=>Ne,noop:()=>ft,normalizeCssArray:()=>$e,reduce:()=>Fe,retrieve:()=>Xe,retrieve2:()=>W,retrieve3:()=>Ze,setAsPrimitive:()=>rt,slice:()=>Qe,trim:()=>tt}),fe=Fe([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),pe=Fe([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),me=Object.prototype.toString,he=Array.prototype,ge=he.forEach,_e=he.filter,ve=he.slice,ye=he.map,be=function(){}.constructor,xe=be?be.prototype:null,Se=`__proto__`,Ce=2311,we=2**53-1;function Te(){return Ce>=we&&(Ce=0),Ce++}function Ee(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function P(e){if(typeof e!=`object`||!e)return e;var t=e,n=me.call(e);if(n===`[object Array]`){if(!it(e)){t=[];for(var r=0,i=e.length;rbt,applyTransform:()=>Rt,clone:()=>vt,copy:()=>_t,create:()=>gt,dist:()=>Nt,distSquare:()=>Ft,distance:()=>Mt,distanceSquare:()=>Pt,div:()=>Ot,dot:()=>kt,len:()=>Ct,lenSquare:()=>Tt,length:()=>wt,lengthSquare:()=>Et,lerp:()=>Lt,max:()=>Bt,min:()=>zt,mul:()=>Dt,negate:()=>It,normalize:()=>jt,scale:()=>At,scaleAndAdd:()=>xt,set:()=>yt,sub:()=>St});function gt(e,t){return e??=0,t??=0,[e,t]}function _t(e,t){return e[0]=t[0],e[1]=t[1],e}function vt(e){return[e[0],e[1]]}function yt(e,t,n){return e[0]=t,e[1]=n,e}function bt(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function xt(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function St(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Ct(e){return Math.sqrt(Tt(e))}var wt=Ct;function Tt(e){return e[0]*e[0]+e[1]*e[1]}var Et=Tt;function Dt(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function Ot(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function kt(e,t){return e[0]*t[0]+e[1]*t[1]}function At(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function jt(e,t){var n=Ct(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Mt(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Nt=Mt;function Pt(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Ft=Pt;function It(e,t){return e[0]=-t[0],e[1]=-t[1],e}function Lt(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function Rt(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function zt(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Bt(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Vt=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),Ht=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Vt(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new Vt(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new Vt(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new Vt(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Vt(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new Vt(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),Ut=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){L(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function $t(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Kt(s,o):Kt(o,s))}function en(e){return e.nodeName.toUpperCase()===`CANVAS`}var tn=/([&<>"'])/g,nn={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function rn(e){return e==null?``:(e+``).replace(tn,function(e,t){return nn[t]})}var an=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,on=[],sn=N.browser.firefox&&+N.browser.version.split(`.`)[0]<39;function cn(e,t,n,r){return n||={},r?ln(e,t,n):sn&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?ln(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function ln(e,t,n){if(N.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(en(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}else if(Zt(on,e,r,i)){n.zrX=on[0],n.zrY=on[1];return}}n.zrX=n.zrY=0}function un(e){return e||window.event}function dn(e,t,n){if(t=un(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&cn(e,i,t,n)}else{cn(e,t,t,n);var a=fn(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&an.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function fn(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function pn(e,t,n,r){e.addEventListener(t,n,r)}function mn(e,t,n,r){e.removeEventListener(t,n,r)}var hn=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function gn(e){return e.which===2||e.which===3}var _n=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=vn(r)/vn(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=yn(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},xn=t({clone:()=>An,copy:()=>wn,create:()=>Sn,identity:()=>Cn,invert:()=>kn,mul:()=>Tn,rotate:()=>Dn,scale:()=>On,translate:()=>En});function Sn(){return[1,0,0,1,0,0]}function Cn(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function wn(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Tn(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function En(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Dn(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function On(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function kn(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function An(e){var t=Sn();return wn(t,e),t}var q=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),jn=Math.min,Mn=Math.max,Nn=Math.abs,Pn=[`x`,`y`],Fn=[`width`,`height`],In=new q,Ln=new q,Rn=new q,zn=new q,Bn=er(),Vn=Bn.minTv,Hn=Bn.maxTv,Un=[0,0],J=function(){function e(e,t,n,r){Gn(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=jn(e.x,this.x),n=jn(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Mn(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Mn(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return qn(Sn(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&q.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=Gn(Xn,t.x,t.y,t.width,t.height)),n instanceof e||(n=Gn(Zn,n.x,n.y,n.width,n.height));var s=!!r;Bn.reset(i,s);var c=Bn.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){Kn(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n){e!==t&&Kn(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}In.x=Rn.x=t.x,In.y=zn.y=t.y,Ln.x=zn.x=t.x+t.width,Ln.y=Rn.y=t.y+t.height,In.transform(n),zn.transform(n),Ln.transform(n),Rn.transform(n),e.x=jn(In.x,Ln.x,Rn.x,zn.x),e.y=jn(In.y,Ln.y,Rn.y,zn.y);var s=Mn(In.x,Ln.x,Rn.x,zn.x),c=Mn(In.y,Ln.y,Rn.y,zn.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=Cn(e||[]),En(e,e,yt(Qn,-t.x,-t.y)),On(e,e,yt(Qn,r,i)),En(e,e,yt(Qn,n.x,n.y)),e},e}(),Wn=J.create,Gn=J.set,Kn=J.copy,qn=J.calculateTransform,Jn=J.applyTransform,Yn=J.contain,Xn=new J(0,0,0,0),Zn=new J(0,0,0,0),Qn=[];function $n(e,t,n,r,i,a,o,s){var c=Nn(t-n),l=Nn(r-e),u=jn(c,l),d=Pn[i],f=Pn[1-i],p=Fn[i];t=l||!Bn.bidirectional)&&(Vn[d]=-l,Vn[f]=0,Bn.useDir&&Bn.calcDirMTV())))}function er(){var e=0,t=new q,n=new q,r={minTv:new q,maxTv:new q,useDir:!1,dirMinTv:new q,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=Mn(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(sr.copy(u.getBoundingRect()),u.transform&&sr.applyTransform(u.transform),sr.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function lr(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||tr}return!1}function ur(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=lr(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==tr)){t.target=o;break}}}function dr(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var fr=32,pr=7;function mr(e){for(var t=0;e>=fr;)t|=e&1,e>>=1;return e+t}function hr(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function gr(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function vr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function yr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function br(e,t){var n=pr,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=pr||m>=pr);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-vr(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=pr||g>=pr);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),_r(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var Sr=!1;function Cr(){Sr||(Sr=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function wr(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Tr=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=wr}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Er=N.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Dr={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=1.70158*1.525;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Dr.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Dr.bounceIn(e*2)*.5:Dr.bounceOut(e*2-1)*.5+.5}},Or=Math.pow,kr=Math.sqrt,Ar=1e-8,jr=1e-4,Mr=kr(3),Nr=1/3,Pr=gt(),Fr=gt(),Ir=gt();function Lr(e){return e>-Ar&&eAr||e<-Ar}function zr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function Br(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function Vr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(Lr(u)&&Lr(d))if(Lr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}else{var h=d*d-4*u*f;if(Lr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=kr(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Or(-y,Nr):Or(y,Nr),b=b<0?-Or(-b,Nr):Or(b,Nr);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*kr(u*u*u)),S=Math.acos(x)/3,C=kr(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+Mr*Math.sin(S)))/(3*o),T=(-s+C*(w-Mr*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function Hr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(Lr(o)){if(Rr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(Lr(u))i[0]=-a/(2*o);else if(u>0){var d=kr(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Ur(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function Wr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;Pr[0]=c,Pr[1]=l;for(var v=0;v<1;v+=.05)Fr[0]=zr(e,n,i,o,v),Fr[1]=zr(t,r,a,s,v),g=Ft(Pr,Fr),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(Lr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=kr(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Yr(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Xr(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function Zr(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;Pr[0]=o,Pr[1]=s;for(var f=0;f<1;f+=.05){Fr[0]=Kr(e,n,i,f),Fr[1]=Kr(t,r,a,f);var p=Ft(Pr,Fr);p=0&&p=1?1:Vr(0,r,a,1,e,s)&&zr(0,i,o,1,s[0])}}}var ti=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||ft,this.ondestroy=e.ondestroy||ft,this.onrestart=e.onrestart||ft,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1)if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=V(e)?e:Dr[e]||ei(e)},e}(),ni=function(){function e(e){this.value=e}return e}(),ri=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new ni(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),ii=function(){function e(e){this._list=new ri,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new ni(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),ai=t({fastLerp:()=>wi,fastMapToColor:()=>Ti,lerp:()=>Ei,lift:()=>Si,liftColor:()=>Pi,lum:()=>ji,mapToColor:()=>Di,modifyAlpha:()=>ki,modifyHSL:()=>Oi,parse:()=>yi,parseCssFloat:()=>di,parseCssInt:()=>ui,random:()=>Mi,stringify:()=>Ai,toHex:()=>Ci}),oi={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 si(e){return e=Math.round(e),e<0?0:e>255?255:e}function ci(e){return e=Math.round(e),e<0?0:e>360?360:e}function li(e){return e<0?0:e>1?1:e}function ui(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?si(parseFloat(t)/100*255):si(parseInt(t,10))}function di(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?li(parseFloat(t)/100):li(parseFloat(t))}function fi(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function pi(e,t,n){return e+(t-e)*n}function mi(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function hi(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var gi=new ii(20),_i=null;function vi(e,t){_i&&hi(_i,t),_i=gi.put(e,_i||t.slice())}function yi(e,t){if(e){t||=[];var n=gi.get(e);if(n)return hi(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in oi)return hi(t,oi[r]),vi(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){mi(t,0,0,0,1);return}return mi(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),vi(e,t),t}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){mi(t,0,0,0,1);return}return mi(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),vi(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?mi(t,+l[0],+l[1],+l[2],1):mi(t,0,0,0,1);u=di(l.pop());case`rgb`:if(l.length>=3)return mi(t,ui(l[0]),ui(l[1]),ui(l[2]),l.length===3?u:di(l[3])),vi(e,t),t;mi(t,0,0,0,1);return;case`hsla`:if(l.length!==4){mi(t,0,0,0,1);return}return l[3]=di(l[3]),bi(l,t),vi(e,t),t;case`hsl`:if(l.length!==3){mi(t,0,0,0,1);return}return bi(l,t),vi(e,t),t;default:return}}mi(t,0,0,0,1)}}function bi(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=di(e[1]),i=di(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],mi(t,si(fi(o,a,n+1/3)*255),si(fi(o,a,n)*255),si(fi(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function xi(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Si(e,t){var n=yi(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Ai(n,n.length===4?`rgba`:`rgb`)}}function Ci(e){var t=yi(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function wi(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=si(pi(o[0],s[0],c)),n[1]=si(pi(o[1],s[1],c)),n[2]=si(pi(o[2],s[2],c)),n[3]=li(pi(o[3],s[3],c)),n}}var Ti=wi;function Ei(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=yi(t[i]),s=yi(t[a]),c=r-i,l=Ai([si(pi(o[0],s[0],c)),si(pi(o[1],s[1],c)),si(pi(o[2],s[2],c)),li(pi(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}var Di=Ei;function Oi(e,t,n,r){var i=yi(e);if(e)return i=xi(i),t!=null&&(i[0]=ci(V(t)?t(i[0]):t)),n!=null&&(i[1]=di(V(n)?n(i[1]):n)),r!=null&&(i[2]=di(V(r)?r(i[2]):r)),Ai(bi(i),`rgba`)}function ki(e,t){var n=yi(e);if(n&&t!=null)return n[3]=li(t),Ai(n,`rgba`)}function Ai(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function ji(e,t){var n=yi(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}function Mi(){return Ai([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],`rgb`)}var Ni=new ii(100);function Pi(e){if(H(e)){var t=Ni.get(e);return t||(t=Si(e,-.1),Ni.put(e,t)),t}else if(Ke(e)){var n=F({},e);return n.colorStops=R(e.colorStops,function(e){return{offset:e.offset,color:Si(e.color,-.1)}}),n}return e}var Fi=Math.round;function Ii(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=yi(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var Li=1e-4;function Ri(e){return e-Li}function zi(e){return Fi(e*1e3)/1e3}function Bi(e){return Fi(e*1e4)/1e4}function Vi(e){return`matrix(`+zi(e[0])+`,`+zi(e[1])+`,`+zi(e[2])+`,`+zi(e[3])+`,`+Bi(e[4])+`,`+Bi(e[5])+`)`}var Hi={left:`start`,right:`end`,center:`middle`,middle:`middle`};function Ui(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function Wi(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function Gi(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function Ki(e){return e&&!!e.image}function qi(e){return e&&!!e.svgElement}function Ji(e){return Ki(e)||qi(e)}function Yi(e){return e.type===`linear`}function Xi(e){return e.type===`radial`}function Zi(e){return e&&(e.type===`linear`||e.type===`radial`)}function Qi(e){return`url(#`+e+`)`}function $i(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function ea(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*pt,i=W(e.scaleX,1),a=W(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+Fi(o*pt)+`deg, `+Fi(s*pt)+`deg)`),c.join(` `)}var ta=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),na=Array.prototype.slice;function ra(e,t,n){return(t-e)*n+e}function ia(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=ya,s=t;if(Pe(t)){var c=fa(t);o=c,(c===1&&!He(t[0])||c===2&&!He(t[0][0]))&&(a=!0)}else if(He(t)&&!Ye(t))o=pa;else if(H(t))if(!isNaN(+t))o=pa;else{var l=yi(t);l&&(s=l,o=ga)}else if(Ke(t)){var u=F({},s);u.colorStops=R(t.colorStops,function(e){return{offset:e.offset,color:yi(e.color)}}),Yi(t)?o=_a:Xi(t)&&(o=va),s=u}i===0?this.valType=o:(o!==this.valType||o===ya)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=V(n)?n:Dr[n]||ei(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=xa(r),c=ba(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Sa:e[s];if((xa(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(xa(i))i===ma?ia(g,f[r],p[r],h):aa(g,f[r],p[r],h);else if(ba(i)){var _=f[r],v=p[r],y=i===_a;e[s]={type:y?`linear`:`radial`,x:ra(_.x,v.x,h),y:ra(_.y,v.y,h),colorStops:R(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:ra(e.offset,n.offset,h),color:da(ia([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=ra(_.x2,v.x2,h),e[s].y2=ra(_.y2,v.y2,h)):e[s].r=ra(_.r,v.r,h)}else if(c)ia(g,f[r],p[r],h),n||(e[s]=da(g));else{var b=ra(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===pa?e[n]=e[n]+r:t===ga?(yi(e[n],Sa),oa(Sa,Sa,r,1),e[n]=da(Sa)):t===ma?oa(e[n],e[n],r,1):t===ha&&sa(e[n],e[n],r,1)},e}(),wa=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){Ee(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Re(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,ua(c),r),this._trackKeys.push(o)}s.addKeyframe(e,ua(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function Ta(){return new Date().getTime()}var Ea=function(e){M(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=Ta()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Er(t),!e._paused&&e.update())}Er(t)},t.prototype.start=function(){this._running||(this._time=Ta(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=Ta(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=Ta()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new wa(e,t.loop);return this.addAnimator(n),n},t}(Ut),Da=300,Oa=N.domSupported,ka=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:R(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Aa={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},ja=!1;function Ma(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Na(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Pa(e){e&&(e.zrByTouch=!0)}function Fa(e,t){return dn(e.dom,new La(e,t),!0)}function Ia(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var La=function(){function e(e,t){this.stopPropagation=ft,this.stopImmediatePropagation=ft,this.preventDefault=ft,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Ra={mousedown:function(e){e=dn(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=dn(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=dn(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=dn(this.dom,e);var t=e.toElement||e.relatedTarget;Ia(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){ja=!0,e=dn(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){ja||(e=dn(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=dn(this.dom,e),Pa(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Ra.mousemove.call(this,e),Ra.mousedown.call(this,e)},touchmove:function(e){e=dn(this.dom,e),Pa(e),this.handler.processGesture(e,`change`),Ra.mousemove.call(this,e)},touchend:function(e){e=dn(this.dom,e),Pa(e),this.handler.processGesture(e,`end`),Ra.mouseup.call(this,e),new Date-+this.__lastTouchMoment$a||e<-$a}var to=[],no=[],ro=Sn(),io=Math.abs,ao=function(){function e(){}return e.prototype.getLocalTransform=function(e){return oo(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return eo(this.rotation)||eo(this.x)||eo(this.y)||eo(this.scaleX-1)||eo(this.scaleY-1)||eo(this.skewX)||eo(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(Qa(n),this.invTransform=null);return}n||=Sn(),t?this.getLocalTransform(n):Qa(n),e&&(t?Tn(n,e,n):wn(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||Sn(),kn(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(to);var n=to[0]<0?-1:1,r=to[1]<0?-1:1,i=((to[0]-n)*t+n)/to[0]||0,a=((to[1]-r)*t+r)/to[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Sn(),Tn(no,e.invTransform,t),t=no);var n=this.originX,r=this.originY;(n||r)&&(ro[4]=n,ro[5]=r,Tn(no,t,ro),no[4]-=n,no[5]-=r,t=no),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Rt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Rt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&io(e[0]-1)>1e-10&&io(e[3]-1)>1e-10?Math.sqrt(io(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){lo(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&Dn(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.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})(),e}(),oo=ao.getLocalTransform;function so(){return new ao}var co=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function lo(e,t){return ke(e,t,co)}function uo(e){fo||=new ii(100),e||=`12px sans-serif`;var t=fo.get(e);return t||(t={font:e,strWidthCache:new ii(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:le.measureText(`国`,e).width,asciiCharWidth:le.measureText(`a`,e).width},fo.put(e,t)),t}var fo;function po(e){if(!(mo>=ho)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=le.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?mo=ho:i>2&&mo++,t}}var mo=0,ho=5;function go(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=po(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function _o(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=le.measureText(t,e.font).width,n.put(t,r)),r}function vo(e,t,n,r){var i=_o(uo(t),e),a=So(t);return new J(bo(0,i,n),xo(0,a,r),i,a)}function yo(e,t,n,r){var i=((e||``)+``).split(` `);if(i.length===1)return vo(i[0],t,n,r);for(var a=new J(0,0,0,0),o=0;o=0?parseFloat(e)/100*t:parseFloat(e):e}function wo(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=Co(r[0],n.width),l+=Co(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`;break}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var To=`__zr_normal__`,Eo=co.concat([`ignore`]),Do=Fe(co,function(e,t){return e[t]=!0,e},{ignore:!1}),Oo={},ko=new J(0,0,0,0),Ao=[],jo=function(){function e(e){this.id=Te(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0;break}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=ko,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(Oo,n,d):wo(Oo,n,d),i.x=Oo.x,i.y=Oo.y,a=Oo.align,o=Oo.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=Co(f[0],d.width),m=Co(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||={};if(u){var _=g.overflowRect=g.overflowRect||new J(0,0,0,0);i.getLocalTransform(Ao),kn(Ao,Ao),J.copy(_,d),_.applyTransform(Ao)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Xa:Ya},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&yi(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,Ai(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},F(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(U(e))for(var n=Re(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(To,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===To;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(je(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){Ee(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=zo(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,Vo(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=je(r,e),a=je(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var Y=function(e){M(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}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 t=this._children,n=0;n=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=je(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=je(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nYo,disposeAll:()=>Xo,getElementSSRData:()=>es,getInstance:()=>Zo,init:()=>Jo,registerPainter:()=>Qo,registerSSRDataGetter:()=>ts,version:()=>ns}),Uo={},Wo={};function Go(e){delete Wo[e]}function Ko(e){if(!e)return!1;if(typeof e==`string`)return ji(e,1)0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var X=vs;function vs(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`;break}return ys(e,t,n)}function ys(e,t,n){return H(e)?xs(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function bs(e){return H(e)&&xs(e)}function xs(e){return!!as(e).match(/%$/)}function Ss(e,t,n){return isNaN(t)?n?``+e:+e:(t=os(ss(0,t),is),e=(+e).toFixed(t),n?e:+e)}function Cs(e,t,n){return t??=10,Ss(e,t,n)}function ws(e){return e.sort(function(e,t){return e-t}),e}function Ts(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(ls(e*t)/t===e)return n}return Es(e)}function Es(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return ss(0,(a<0?0:i-1-a)-r)}function Ds(e,t){var n=us(ps(e[1]-e[0])/ms),r=ls(ps(cs(t[1]-t[0]))/ms),i=os(ss(-n+r,0),is);return isFinite(i)?i:is}function Os(e,t,n){var r=cs(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=ps(2*cs(n||1)*cs(r))/ms,a=ps(cs(t))/ms,o=ss(0,ds(-i+a));return isFinite(o)||(o=NaN),o}function ks(e,t,n){return e[t]&&As(e,n)[t]||0}function As(e,t){var n=Fe(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=fs(10,t),i=R(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=R(i,function(e){return us(e)}),s=Fe(o,function(e,t){return e+t},0),c=R(i,function(e,t){return e-o[t]});sl&&(l=c[d],u=d);++o[u],c[u]=0,++s}return R(o,function(e){return e/r})}function js(e,t){var n=ss(Ts(e),Ts(t)),r=e+t;return n>is?r:Ss(r,n)}var Ms=fs(2,53)-1;function Ns(e){var t=hs*2;return(e%t+t)%t}function Ps(e){return e>-rs&&e=10&&t++,t}function zs(e,t){var n=Rs(e),r=fs(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,Ss(e,-n)}function Bs(e,t){var n=(e.length-1)*t+1,r=us(n),i=+e[r-1],a=n-r;return a?i+a*(e[r]-i):i}function Vs(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0):!1},e}();function zc(e){e.option=e.parentModel=e.ecModel=null}function Bc(){return[1/0,-1/0]}function Vc(e,t){Gc(t)&&(te[1]&&(e[1]=t))}function Hc(e,t){Gc(t)&&te[1]&&(e[1]=t)}function Wc(e,t){Kc(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function Gc(e){return e!=null&&isFinite(e)}function Kc(e,t){return Gc(e)&&Gc(t)&&e<=t}function qc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Jc(e){Kc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Yc(){var e=`__ec_once_`+Xc++;return function(t,n){K(t,e)||(t[e]=1,n())}}var Xc=Ws();function Zc(e,t,n){var r=G(),i=0;L(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Qc(e){return e.value+``}function $c(e){return e+``}function el(e,t){return W(t,!0)?e.seriesIndex+2:0}function tl(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function nl(e,t){return{seriesType:e,overallReset:t}}function rl(e){return{overallReset:e}}var il=`.`,al=`___EC__COMPONENT__CONTAINER___`,ol=`___EC__EXTENDED_CLASS___`;function sl(e){var t={main:``,sub:``};if(e){var n=e.split(il);t.main=n[0]||``,t.sub=n[1]||``}return t}function cl(e){et(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function ll(e){return!!(e&&e[ol])}function ul(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return dl(t)?n=function(e){M(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},Me(n,this)),F(n.prototype,e),n[ol]=!0,n.extend=this.extend,n.superCall=hl,n.superApply=gl,n.superClass=t,n}}function dl(e){return V(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function fl(e,t){e.extend=t.extend}var pl=Math.round(Math.random()*10);function ml(e){var t=[`__\0is_clz`,pl++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function hl(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function gl(e,t,n){return this.superClass.prototype[t].apply(e,n)}function _l(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){cl(r),e.prototype.type=r;var i=sl(r);if(!i.sub)t[i.main]=e;else if(i.sub!==al){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[al]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=sl(e),r=[],i=t[n.main];return i&&i[al]?L(i,function(e,t){t!==al&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[sl(e).main]},e.getAllClassMainTypes=function(){var e=[];return L(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[sl(e).main];return n&&n[al]};function n(e){var n=t[e.main];return(!n||!n[al])&&(n=t[e.main]={},n[al]=!0),n}}function vl(e,t){for(var n=0;n=0||i&&je(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var yl=vl([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),bl=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return yl(this,e,t)},e}(),xl=new ii(50);function Sl(e){if(typeof e==`string`){var t=xl.get(e);return t&&t.image}else return e}function Cl(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=xl.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!Tl(t)&&a.pending.push(o)):(t=le.loadImage(e,wl,wl),t.__zrImageSrc=e,xl.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e}function wl(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;l++)c-=s;var u=_o(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function Al(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=_o(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?jl(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=_o(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function jl(e,t,n){for(var r=0,i=0,a=e.length;ig&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=kl(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)Al(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=uo(l),S=0;S<_.length;S++)w=Math.max(_o(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var Nl=function(){function e(){}return e}(),Pl=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Fl=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function Il(e,t,n,r,i){var a=new Fl,o=Gl(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=El.lastIndex=0,h;(h=El.exec(o))!=null;){var g=h.index;g>m&&Ll(a,o.substring(m,g),t,p),Ll(a,h[2],t,p,h[1]),m=El.lastIndex}md){var N=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length0&&m+r.accumWidth>r.width&&(u=t.split(` `),l=!0),r.accumWidth=m}else{var h=Vl(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(` `);for(var g=uo(c),_=0;_=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var zl=Fe(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Bl(e){return!Rl(e)||!!zl[e]}function Vl(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=uo(t),f=0;fn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Hl(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;J.set(Ul,bo(n,o,i),xo(r,s,a),o,s),J.intersect(t,Ul,null,Wl);var c=Wl.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=bo(c.x,c.width,i,!0),e.baseY=xo(c.y,c.height,a,!0)}}var Ul=new J(0,0,0,0),Wl={outIntersectRect:{},clamp:!0};function Gl(e){return e==null?e=``:e+=``}function Kl(e){var t=Gl(e.text),n=e.font;return ql(e,_o(uo(n),t),So(n),null)}function ql(e,t,n,r){var i=new J(bo(e.x||0,t,e.textAlign),xo(e.y||0,n,e.textBaseline),t,n),a=r??(Jl(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Jl(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var Yl=`__zr_style_`+Math.round(Math.random()*10),Xl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},Zl={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Xl[Yl]=!0;var Ql=[`z`,`z2`,`invisible`],$l=[`invisible`],eu=function(e){M(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=Re(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(lu[0]=su(i)*n+e,lu[1]=ou(i)*r+t,uu[0]=su(a)*n+e,uu[1]=ou(a)*r+t,l(s,lu,uu),u(c,lu,uu),i%=cu,i<0&&(i+=cu),a%=cu,a<0&&(a+=cu),i>a&&!o?a+=cu:ii&&(du[0]=su(p)*n+e,du[1]=ou(p)*r+t,l(s,du,s),u(c,du,c))}var yu={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},bu=[],xu=[],Su=[],Cu=[],wu=[],Tu=[],Eu=Math.min,Du=Math.max,Ou=Math.cos,ku=Math.sin,Au=Math.abs,ju=Math.PI,Mu=ju*2,Nu=typeof Float32Array<`u`,Pu=[];function Fu(e){return Math.round(e/ju*1e8)/1e8%2*ju}function Iu(e,t){var n=Fu(e[0]);n<0&&(n+=Mu);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Mu?i=n+Mu:t&&n-i>=Mu?i=n-Mu:!t&&n>i?i=n+(Mu-Fu(n-i)):t&&n0&&(this._ux=Au(n/qa/e)||0,this._uy=Au(n/qa/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(yu.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Au(e-this._xi),r=Au(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(yu.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(yu.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(yu.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),Pu[0]=r,Pu[1]=i,Iu(Pu,a),r=Pu[0],i=Pu[1];var o=i-r;return this.addData(yu.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Ou(i)*n+e,this._yi=ku(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(yu.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(yu.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Nu&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Su[0]=Su[1]=wu[0]=wu[1]=Number.MAX_VALUE,Cu[0]=Cu[1]=Tu[0]=Tu[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,r=0,i=0,a;for(a=0;an||Au(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case yu.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=Gr(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case yu.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Qr(i,a,y,b,h,g,10),i=h,a=g;break;case yu.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Ou(D)*T+C,s=ku(D)*E+w),m=Du(T,E)*Eu(Mu,Math.abs(O)),i=Ou(k)*T+C,a=ku(k)*E+w;break;case yu.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case yu.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s;break}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case yu.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case yu.L:u=n[x++],d=n[x++];var w=Au(u-c),T=Au(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case yu.C:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++],M=n[x++],te=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Ur(c,k,j,M,D,bu),Ur(l,A,ee,te,D,xu),e.bezierCurveTo(bu[1],xu[1],bu[2],xu[2],bu[3],xu[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,ee,M,te),c=M,l=te;break;case yu.Q:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Xr(c,k,j,D,bu),Xr(l,A,ee,D,xu),e.quadraticCurveTo(bu[1],xu[1],bu[2],xu[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,ee),c=j,l=ee;break;case yu.A:var N=n[x++],ne=n[x++],re=n[x++],ie=n[x++],ae=n[x++],oe=n[x++],se=n[x++],ce=!n[x++],le=re>ie?re:ie,ue=Au(re-ie)>.001,de=ae+oe,fe=!1;if(f){var E=p[g++];h+E>_&&(de=ae+oe*(_-h)/E,fe=!0),h+=E}if(ue&&e.ellipse?e.ellipse(N,ne,re,ie,se,ae,de,ce):e.arc(N,ne,le,ae,de,ce),fe)break lo;C&&(o=Ou(ae)*re+N,s=ku(ae)*ie+ne),c=Ou(de)*re+N,l=ku(de)*ie+ne;break;case yu.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var pe=n[x++],me=n[x++];if(f){var E=p[g++];if(h+E>_){var he=_-h;e.moveTo(u,d),e.lineTo(u+Eu(he,pe),d),he-=pe,he>0&&e.lineTo(u+pe,d+Eu(he,me)),he-=me,he>0&&e.lineTo(u+Du(pe-he,0),d+me),he-=pe,he>0&&e.lineTo(u,d+Du(me-he,0));break lo}h+=E}e.rect(u,d,pe,me);break;case yu.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=yu,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function Ru(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=Uu);var f=Math.atan2(c,s);return f<0&&(f+=Uu),f>=r&&f<=i||f+Uu>=r&&f+Uu<=i}function Gu(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var Ku=Lu.CMD,qu=Math.PI*2,Ju=1e-4;function Yu(e,t){return Math.abs(e-t)t&&l>r&&l>a&&l>s||l1&&Qu(),p=zr(t,r,a,s,Zu[0]),f>1&&(m=zr(t,r,a,s,Zu[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=Kr(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);Xu[0]=-c,Xu[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=qu-1e-4){r=0,i=qu;var u=a?1:-1;return o>=Xu[0]+e&&o<=Xu[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=qu,i+=qu);for(var f=0,p=0;p<2;p++){var m=Xu[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=qu+h),(h>=r&&h<=i||h+qu>=r&&h+qu<=i)&&(h>Math.PI/2&&h1&&(n||(s+=Gu(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case Ku.M:u=a[m++],d=a[m++],c=u,l=d;break;case Ku.L:if(n){if(Ru(c,l,a[m],a[m+1],t,r,i))return!0}else s+=Gu(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Ku.C:if(n){if(zu(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=$u(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Ku.Q:if(n){if(Bu(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=ed(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Ku.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=Gu(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(Wu(_,v,b,x,x+S,C,t,w,i))return!0}else s+=td(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case Ku.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(Ru(u,d,f,d,t,r,i)||Ru(f,d,f,p,t,r,i)||Ru(f,p,u,p,t,r,i)||Ru(u,p,u,d,t,r,i))return!0}else s+=Gu(f,d,f,p,r,i),s+=Gu(u,p,u,d,r,i);break;case Ku.Z:if(n){if(Ru(c,l,u,d,t,r,i))return!0}else s+=Gu(c,l,u,d,r,i);c=u,l=d;break}}return!n&&!Yu(l,d)&&(s+=Gu(c,l,u,d,r,i)||0),s!==0}function rd(e,t,n){return nd(e,0,!1,t,n)}function id(e,t,n,r){return nd(e,t,!0,n,r)}var ad=I({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Xl),od={style:I({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Zl.style)},sd=co.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),cd=function(e){M(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Ya:t>.2?Za:Xa}else if(e)return Xa}return Ya},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(H(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==ji(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Lu(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),id(a,o/s,e,t)))return!0}if(this.hasFill())return rd(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,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(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:F(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return ut(ad,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=F({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=F({},r.shape),F(c,n.shape)):(c=F({},i?this.shape:r.shape),F(c,n.shape)):s&&(c=r.shape),c)if(a){this.shape=F({},this.shape);for(var l={},u=Re(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var gd=Math.round;function _d(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(gd(r*2)===gd(i*2)&&(e.x1=e.x2=yd(r,s,!0)),gd(a*2)===gd(o*2)&&(e.y1=e.y2=yd(a,s,!0)),e):e}}function vd(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=yd(r,s,!0),e.y=yd(i,s,!0),e.width=Math.max(yd(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(yd(i+o,s,!1)-e.y,o===0?0:1),e):e}}function yd(e,t,n){if(!t)return e;var r=gd(e*2);return(r+gd(t))%2==0?r/2:(r+(n?1:-1))/2}var bd=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),xd={},Sd=function(e){M(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new bd},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=vd(xd,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?hd(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(cd);Sd.prototype.type=`rect`;var Cd={fill:`#000`},wd=2,Td={},Ed={style:I({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},Zl.style)},Dd=function(e){M(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Cd,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&Bd(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=Rd(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(ud),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=Ld(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=Id(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=wd,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=Ze(s.opacity,t.opacity,1),Md(p,s),y&&(p.lineWidth=Ze(s.lineWidth,t.lineWidth,g),p.lineDash=W(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(ql(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Sd),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=W(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(md),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=W(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=Ze(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return Nd(e)&&(t=[e.fontStyle,e.fontWeight,jd(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&tt(t)||e.textFont||e.font},t}(eu),Od={left:!0,right:1,center:1},kd={top:1,bottom:1,middle:1},Ad=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function jd(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Md(e,t){for(var n=0;n=0,a=!1;if(e instanceof cd){var o=af(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(hf(s)||hf(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=F({},r),l=F({},l),l.fill=s):!hf(l.fill)&&hf(s)?(a=!0,r=F({},r),l=F({},l),l.fill=Pi(s)):!hf(l.stroke)&&hf(c)&&(a||(r=F({},r),l=F({},l)),l.stroke=Pi(c)),r.style=l}}if(r&&r.z2==null){a||(r=F({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Of(e,t,n){if(n&&n.z2==null){n=F({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function kf(e,t,n){var r=je(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Ef(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=F({},n),o=F({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Af(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Df(this,e,t,n);if(e===`blur`)return kf(this,e,n);if(e===`select`)return Of(this,e,n)}return n}function jf(e){e.stateProxy=Af;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Af),n&&(n.stateProxy=Af)}function Mf(e,t){!Bf(e,t)&&!e.__highByOuter&&wf(e,_f)}function Nf(e,t){!Bf(e,t)&&!e.__highByOuter&&wf(e,vf)}function Pf(e,t){e.__highByOuter|=1<<(t||0),wf(e,_f)}function Ff(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&wf(e,vf)}function If(e){wf(e,yf)}function Lf(e){wf(e,bf)}function Rf(e){wf(e,xf)}function zf(e){wf(e,Sf)}function Bf(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Vf(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=of(i),o=tf(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){bf(e)}),s&&n.push(i)),a.isBlured=!1}),L(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Hf(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function Zf(e,t,n){ip(e,!0),wf(e,jf),ep(e,t,n)}function Qf(e){ip(e,!1)}function $f(e,t,n,r){r?Qf(e):Zf(e,t,n)}function ep(e,t,n){var r=Vd(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var tp=[`emphasis`,`blur`,`select`],np={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function rp(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=gp(m),s*=gp(m));var h=(i===a?-1:1)*gp((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+vp(d)*g-_p(d)*_,y=(t+r)/2+_p(d)*g+vp(d)*_,b=Sp([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=Sp(x,S);if(xp(x,S)<=-1&&(C=yp),xp(x,S)>=1&&(C=0),C<0){var w=Math.round(C/yp*1e6)/1e6;C=yp*2+w%2*yp}u.addData(l,v,y,o,s,b,C,d,a)}var wp=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Tp=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Ep(e){var t=new Lu;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=Lu.CMD,c=e.match(wp);if(!c)return t;for(var l=0;lA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function Zp(e){var t;if(B(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function Qp(e,t){var n,r=Kp(t.r,0),i=Kp(t.r0||0,0),a=r>0;if(!(!a&&!(i>0))){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=Wp(c-s),p=f>zp&&f%zp;if(p>Jp&&(f=p),!(r>Jp))e.moveTo(l,u);else if(f>zp-Jp)e.moveTo(l+r*Vp(s),u+r*Bp(s)),e.arc(l,u,r,s,c,!d),i>Jp&&(e.moveTo(l+i*Vp(c),u+i*Bp(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Vp(s),j=r*Bp(s),ee=i*Vp(c),M=i*Bp(c),te=f>Jp;if(te){var N=t.cornerRadius;N&&(n=Zp(N),m=n[0],h=n[1],g=n[2],_=n[3]);var ne=Wp(r-i)/2;if(v=qp(ne,g),y=qp(ne,_),b=qp(ne,m),x=qp(ne,h),w=S=Kp(v,y),T=C=Kp(b,x),(S>Jp||C>Jp)&&(E=r*Vp(c),D=r*Bp(c),O=i*Vp(s),k=i*Bp(s),fJp){var ue=qp(g,w),de=qp(_,w),fe=Xp(O,k,A,j,r,ue,d),pe=Xp(E,D,ee,M,r,de,d);e.moveTo(l+fe.cx+fe.x0,u+fe.cy+fe.y0),w0&&e.arc(l+fe.cx,u+fe.cy,ue,Up(fe.y0,fe.x0),Up(fe.y1,fe.x1),!d),e.arc(l,u,r,Up(fe.cy+fe.y1,fe.cx+fe.x1),Up(pe.cy+pe.y1,pe.cx+pe.x1),!d),de>0&&e.arc(l+pe.cx,u+pe.cy,de,Up(pe.y1,pe.x1),Up(pe.y0,pe.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>Jp)||!te)e.lineTo(l+ee,u+M);else if(T>Jp){var ue=qp(m,T),de=qp(h,T),fe=Xp(ee,M,E,D,i,-de,d),pe=Xp(A,j,O,k,i,-ue,d);e.lineTo(l+fe.cx+fe.x0,u+fe.cy+fe.y0),T0&&e.arc(l+fe.cx,u+fe.cy,de,Up(fe.y0,fe.x0),Up(fe.y1,fe.x1),!d),e.arc(l,u,i,Up(fe.cy+fe.y1,fe.cx+fe.x1),Up(pe.cy+pe.y1,pe.cx+pe.x1),d),ue>0&&e.arc(l+pe.cx,u+pe.cy,ue,Up(pe.y1,pe.x1),Up(pe.y0,pe.x0),!d))}else e.lineTo(l+ee,u+M),e.arc(l,u,i,c,s,d)}e.closePath()}}}var $p=function(){function e(){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 e}(),em=function(e){M(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new $p},t.prototype.buildPath=function(e,t){Qp(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(cd);em.prototype.type=`sector`;var tm=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),nm=function(e){M(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new tm},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(cd);nm.prototype.type=`ring`;function rm(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=rm(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sEm[1]){if(i=!1,Dm.negativeSize||n)return i;var s=wm(Em[0]-Tm[1]),c=wm(Tm[0]-Em[1]);Sm(s,c)>km.len()&&(s=c||!Dm.bidirectional)&&(q.scale(Om,o,-c*r),Dm.useDir&&Dm.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function Im(e,t,n,r,i,a){Fm(`update`,e,t,n,r,i,a)}function Lm(e,t,n,r,i,a){Fm(`enter`,e,t,n,r,i,a)}function Rm(e){if(!e.__zr)return!0;for(var t=0;t_m,BezierCurve:()=>hm,BoundingRect:()=>J,Circle:()=>Fp,CompoundPath:()=>vm,Ellipse:()=>Lp,Group:()=>Y,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>md,IncrementalDisplayable:()=>Mm,Line:()=>dm,LinearGradient:()=>bm,OrientedBoundingRect:()=>Am,Path:()=>cd,Point:()=>q,Polygon:()=>om,Polyline:()=>cm,RadialGradient:()=>xm,Rect:()=>Sd,Ring:()=>nm,Sector:()=>em,Text:()=>Dd,WH:()=>qm,XY:()=>Km,applyTransform:()=>ch,calcZ2Range:()=>jh,clipPointsByRect:()=>ph,clipRectByRect:()=>mh,createIcon:()=>hh,decomposeTransform:()=>Fh,ensureCopyRect:()=>Oh,ensureCopyTransform:()=>kh,expandOrShrinkRect:()=>bh,extendPath:()=>Xm,extendShape:()=>Jm,getCurrentCanvasPainter:()=>Lh,getShapeClass:()=>Qm,getTransform:()=>sh,groupTransition:()=>fh,initProps:()=>Lm,isBoundingRectAxisAligned:()=>Eh,isElementRemoved:()=>Rm,lineLineIntersect:()=>_h,linePolygonIntersect:()=>gh,makeImage:()=>eh,makePath:()=>$m,mergePath:()=>nh,payloadDisableAnimation:()=>Ph,registerShape:()=>Zm,removeElement:()=>zm,removeElementWithFadeOut:()=>Vm,resizePath:()=>rh,retrieveZInfo:()=>Ah,setTooltipConfig:()=>Ch,subPixelOptimize:()=>oh,subPixelOptimizeLine:()=>ih,subPixelOptimizeRect:()=>ah,transformDirection:()=>lh,traverseElements:()=>Th,traverseUpdateZ:()=>Mh,updateProps:()=>Im}),Gm={},Km=[`x`,`y`],qm=[`width`,`height`];function Jm(e){return cd.extend(e)}var Ym=jp;function Xm(e,t){return Ym(e,t)}function Zm(e,t){Gm[e]=t}function Qm(e){if(Gm.hasOwnProperty(e))return Gm[e]}function $m(e,t,n,r){var i=Ap(e,t);return n&&(r===`center`&&(n=th(n,i.getBoundingRect())),rh(i,n)),i}function eh(e,t,n){var r=new md({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(th(t,i))}}});return r}function th(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var nh=Mp;function rh(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function ih(e,t){return _d(e,e,{lineWidth:t}),e}function ah(e,t){return vd(e,e,t),e}var oh=yd;function sh(e,t){for(var n=Cn([]);e&&e!==t;)Tn(n,e.getLocalTransform(),n),e=e.parent;return n}function ch(e,t,n){return t&&!Pe(t)&&(t=ao.getLocalTransform(t)),n&&(t=kn([],t)),Rt([],e,t)}function lh(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:cs(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:cs(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=ch(a,t,n),cs(a[0])>cs(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function uh(e){return!e.isGroup}function dh(e){return e.shape!=null}function fh(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){uh(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return dh(e)&&(t.shape=P(e.shape)),t}var a=r(e);t.traverse(function(e){if(uh(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Im(e,r,n,Vd(e).dataIndex)}}})}function ph(e,t){return R(e,function(e){var n=e[0];n=ss(n,t.x),n=os(n,t.x+t.width);var r=e[1];return r=ss(r,t.y),r=os(r,t.y+t.height),[n,r]})}function mh(e,t){var n=ss(e.x,t.x),r=os(e.x+e.width,t.x+t.width),i=ss(e.y,t.y),a=os(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function hh(e,t,n){var r=F({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),I(i,n),new md(r)):$m(e.replace(`path://`,``),r,n,`center`)}function gh(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=vh(p,m,u,d)/f;return!(g<0||g>1)}function vh(e,t,n,r){return e*r-n*t}function yh(e){return e<=1e-6&&e>=-1e-6}function bh(e,t,n,r,i){return t==null?e:(He(t)?xh[0]=xh[1]=xh[2]=xh[3]=t:(xh[0]=t[0],xh[1]=t[1],xh[2]=t[2],xh[3]=t[3]),r&&(xh[0]=ss(0,xh[0]),xh[1]=ss(0,xh[1]),xh[2]=ss(0,xh[2]),xh[3]=ss(0,xh[3])),n&&(xh[0]=-xh[0],xh[1]=-xh[1],xh[2]=-xh[2],xh[3]=-xh[3]),Sh(e,xh,`x`,`width`,3,1,i&&i[0]||0),Sh(e,xh,`y`,`height`,0,2,i&&i[1]||0),e)}var xh=[0,0,0,0];function Sh(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=ss(0,os(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:cs(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Ch(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=H(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&L(Re(c),function(e){K(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Vd(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:I({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function wh(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Th(e,t){if(e)if(B(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Mh(e,t,n){Nh(e,t,n,-1/0)}function Nh(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s=0&&n.push(e)}),n}}function _g(e,t){return De(De({},e,!0),t,!0)}var vg={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},yg={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},bg=`ZH`,xg=`EN`,Sg=xg,Cg={},wg={},Tg=N.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Sg).toUpperCase().indexOf(bg)>-1?bg:Sg}():Sg;function Eg(e,t){e=e.toUpperCase(),wg[e]=new fg(t),Cg[e]=t}function Dg(e){if(H(e)){var t=Cg[e.toUpperCase()]||{};return e===bg||e===xg?P(t):De(P(t),P(Cg[Sg]),!1)}else return De(P(e),P(Cg[Sg]),!1)}function Og(e){return wg[e]}function kg(){return wg[Sg]}Eg(xg,vg),Eg(bg,yg);var Ag=null;function jg(e){Ag||=e}function Mg(){return Ag}function Ng(e,t){var n=Mg(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function Pg(e){var t=e.brk;return t?t.breaks:[]}function Fg(e){var t=e.brk;return t?t.hasBreaks():!1}var Ig=1e3,Lg=Ig*60,Rg=Lg*60,zg=Rg*24,Bg=zg*365,Vg={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Hg={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},Ug=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,Wg=`{yyyy}-{MM}-{dd}`,Gg={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:Wg,hour:Wg+` `+Hg.hour,minute:Wg+` `+Hg.minute,second:Wg+` `+Hg.second,millisecond:Ug},Kg=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],qg=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function Jg(e){return!H(e)&&!V(e)?Yg(e):e}function Yg(e){e||={};var t={},n=!0;return L(Kg,function(t){n&&=e[t]==null}),L(Kg,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=Kg[s],l=U(a)&&!B(a)?a[c]:a,u=void 0;B(l)?(u=l.slice(),o=u[0]||``):H(l)?(o=l,u=[o]):(o==null?o=Hg[r]:Vg[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function Xg(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function Zg(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function Qg(e){return e===Zg(e)}function $g(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function e_(e,t,n,r){var i=Is(e),a=i[i_(n)](),o=i[a_(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[o_(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[s_(n)](),d=(u-1)%12+1,f=i[c_(n)](),p=i[l_(n)](),m=i[u_(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof fg?r:Og(r||Tg)||kg()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,Xg(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,Xg(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,Xg(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,Xg(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,Xg(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,Xg(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,Xg(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,Xg(m,3)).replace(/{S}/g,m+``)}function t_(e,t,n,r,i){var a=null;if(H(n))a=n;else if(V(n)){var o={time:e.time,level:e.time?e.time.level:0},s=Mg();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=n_(e.value,i);a=n[u][u][0]}}return e_(new Date(e.value),a,i,r)}function n_(e,t){var n=Is(e),r=n[a_(t)]()+1,i=n[o_(t)](),a=n[s_(t)](),o=n[c_(t)](),s=n[l_(t)](),c=n[u_(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function r_(e,t,n){switch(t){case`year`:e[f_(n)](0);case`month`:e[p_(n)](1);case`day`:e[m_(n)](0);case`hour`:e[h_(n)](0);case`minute`:e[g_(n)](0);case`second`:e[__(n)](0)}return e}function i_(e){return e?`getUTCFullYear`:`getFullYear`}function a_(e){return e?`getUTCMonth`:`getMonth`}function o_(e){return e?`getUTCDate`:`getDate`}function s_(e){return e?`getUTCHours`:`getHours`}function c_(e){return e?`getUTCMinutes`:`getMinutes`}function l_(e){return e?`getUTCSeconds`:`getSeconds`}function u_(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function d_(e){return e?`setUTCFullYear`:`setFullYear`}function f_(e){return e?`setUTCMonth`:`setMonth`}function p_(e){return e?`setUTCDate`:`setDate`}function m_(e){return e?`setUTCHours`:`setHours`}function h_(e){return e?`setUTCMinutes`:`setMinutes`}function g_(e){return e?`setUTCSeconds`:`setSeconds`}function __(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function v_(e,t,n,r,i,a,o,s){return new Dd({style:{text:e,font:t,align:n,verticalAlign:r,padding:i,rich:a,overflow:o?`truncate`:null,lineHeight:s}}).getBoundingRect()}function y_(e){if(!Us(e))return H(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function b_(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var x_=$e;function S_(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&tt(e)?e:`-`}function a(e){return qs(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Is(e):e;if(!isNaN(+c))return e_(c,r,n);if(s)return`-`}if(t===`ordinal`)return Ve(e)?i(e):He(e)&&a(e)?e+``:`-`;var l=Hs(e);return a(l)?y_(l):Ve(e)?i(e):typeof e==`boolean`?e+``:`-`}var C_=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],w_=function(e,t){return`{`+e+(t??``)+`}`};function T_(e,t,n){B(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function O_(e,t,n){(e===`week`||e===`month`||e===`quarter`||e===`half-year`||e===`year`)&&(e=`MM-dd yyyy`);var r=Is(t),i=n?`getUTC`:`get`,a=r[i+`FullYear`](),o=r[i+`Month`]()+1,s=r[i+`Date`](),c=r[i+`Hours`](),l=r[i+`Minutes`](),u=r[i+`Seconds`](),d=r[i+`Milliseconds`]();return e=e.replace(`MM`,Xg(o,2)).replace(`M`,o).replace(`yyyy`,a).replace(`yy`,Xg(a%100+``,2)).replace(`dd`,Xg(s,2)).replace(`d`,s).replace(`hh`,Xg(c,2)).replace(`h`,c).replace(`mm`,Xg(l,2)).replace(`m`,l).replace(`ss`,Xg(u,2)).replace(`s`,u).replace(`SSS`,Xg(d,3)),e}function k_(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function A_(e,t){return t||=`transparent`,H(e)?e:U(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function j_(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var M_={},N_={},P_=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(M_,!0),this._normalMasterList=n(N_,!1);function n(n,r){var i=[];return L(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){L(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){M_[e]=t;return}N_[e]=t},e.get=function(e){return N_[e]||M_[e]},e}();function F_(e){return!!M_[e]}function I_(e){L_.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var L_=G();function R_(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=L_.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function z_(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!F_(n)&&(i=0))}return{coordSysType:n,kind:i}}function B_(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=z_(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var V_=function(e,t){var n=t.getReferringComponents(e,kc).models[0];return n&&n.coordinateSystem},H_=L,U_=[`left`,`right`,`top`,`bottom`,`width`,`height`],W_=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function G_(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var K_=G_;Be(G_,`vertical`),Be(G_,`horizontal`);function q_(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function J_(e,t){var n=$_(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===Q_.point)a=n.refPoint,i=X_(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=B(o)?o:[o,o];i=X_(r,n.refContainer),a=n.boxCoordFrom===2?n.refPoint:[X(s[0],i.width)+i.x,X(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function Y_(e,t){var n=J_(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);B(a)||(a=[0,a]);var o=X(r.width,t.getWidth()),s=X(r.height,t.getHeight()),c=Math.min(o,s),l=X(a[0],c/2),u=X(a[1],c/2);return{cx:i[0],cy:i[1],r0:l,r:u,viewRect:r}}function X_(e,t,n){n=x_(n||0);var r=t.width,i=t.height,a=X(e.left,r),o=X(e.top,i),s=X(e.right,r),c=X(e.bottom,i),l=X(e.width,r),u=X(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f;break}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d;break}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new J((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}function Z_(e,t,n){var r=e.getShallow(`preserveAspect`,!0);if(!r)return t;var i=t.width/t.height;if(Math.abs(Math.atan(n)-Math.atan(i))<1e-9)return t;var a=e.getShallow(`preserveAspectAlign`,!0),o=e.getShallow(`preserveAspectVerticalAlign`,!0),s={width:t.width,height:t.height},c=r===`cover`;return i>n&&!c||i=u)return a;for(var d=0;d=0;o--)a=De(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return jc(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return q_(this,!1)},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}(fg);fl(sv,fg),_l(sv),hg(sv),gg(sv,cv);function cv(e){var t=[];return L(sv.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=R(t,function(e){return sl(e).main}),e!==`dataset`&&je(t,`dataset`)<=0&&t.unshift(`dataset`),t}var Z={color:{},darkColor:{},size:{}},lv=Z.color={theme:[`#5070dd`,`#b6d634`,`#505372`,`#ff994d`,`#0ca8df`,`#ffd10a`,`#fb628b`,`#785db0`,`#3fbe95`],neutral00:`#fff`,neutral05:`#f4f7fd`,neutral10:`#e8ebf0`,neutral15:`#dbdee4`,neutral20:`#cfd2d7`,neutral25:`#c3c5cb`,neutral30:`#b7b9be`,neutral35:`#aaacb2`,neutral40:`#9ea0a5`,neutral45:`#929399`,neutral50:`#86878c`,neutral55:`#797b7f`,neutral60:`#6d6e73`,neutral65:`#616266`,neutral70:`#54555a`,neutral75:`#48494d`,neutral80:`#3c3c41`,neutral85:`#303034`,neutral90:`#232328`,neutral95:`#17171b`,neutral99:`#000`,accent05:`#eff1f9`,accent10:`#e0e4f2`,accent15:`#d0d6ec`,accent20:`#c0c9e6`,accent25:`#b1bbdf`,accent30:`#a1aed9`,accent35:`#91a0d3`,accent40:`#8292cc`,accent45:`#7285c6`,accent50:`#6578ba`,accent55:`#5c6da9`,accent60:`#536298`,accent65:`#4a5787`,accent70:`#404c76`,accent75:`#374165`,accent80:`#2e3654`,accent85:`#252b43`,accent90:`#1b2032`,accent95:`#121521`,transparent:`rgba(0,0,0,0)`,highlight:`rgba(255,231,130,0.8)`};for(var uv in F(lv,{primary:lv.neutral80,secondary:lv.neutral70,tertiary:lv.neutral60,quaternary:lv.neutral50,disabled:lv.neutral20,border:lv.neutral30,borderTint:lv.neutral20,borderShade:lv.neutral40,background:lv.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:lv.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:lv.neutral70,axisLineTint:lv.neutral40,axisTick:lv.neutral70,axisTickMinor:lv.neutral60,axisLabel:lv.neutral70,axisSplitLine:lv.neutral15,axisMinorSplitLine:lv.neutral05}),lv)if(lv.hasOwnProperty(uv)){var dv=lv[uv];uv===`theme`?Z.darkColor.theme=lv.theme.slice():uv===`highlight`?Z.darkColor.highlight=`rgba(255,231,130,0.4)`:uv.indexOf(`accent`)===0?Z.darkColor[uv]=Oi(dv,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Z.darkColor[uv]=Oi(dv,null,function(e){return e*.9},function(e){return 1-e**1.5})}Z.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var fv=``;typeof navigator<`u`&&(fv=navigator.platform||``);var pv=`rgba(0, 0, 0, 0.2)`,mv=Z.color.theme[0],hv=Oi(mv,null,null,.9),gv={darkMode:`auto`,colorBy:`series`,color:Z.color.theme,gradientColor:[hv,mv],aria:{decal:{decals:[{color:pv,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:pv,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:pv,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:pv,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:pv,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:pv,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:fv.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},_v={Must:1,Might:2,Not:3},vv=Tc();function yv(e){vv(e).datasetMap=G()}function bv(e,t,n){var r={},i=Sv(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=vv(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),L(e,function(t,n){var i=U(t)?t:e[n]={name:t};i.type===`ordinal`&&u==null&&(u=n,d=m(i)),r[i.name]=[]});var f=c.get(l)||c.set(l,{categoryWayDim:d,valueWayDim:0});L(e,function(e,t){var n=e.name,i=m(e);if(u==null){var s=f.valueWayDim;p(r[n],s,i),p(o,s,i),f.valueWayDim+=i}else if(u===t)p(r[n],0,i),p(a,0,i);else{var s=f.categoryWayDim;p(r[n],s,i),p(o,s,i),f.categoryWayDim+=i}});function p(e,t,n){for(var r=0;rt)return e[r];return e[n-1]}function Pv(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:Nv(r,o);if(u||=n,!(!u||!u.length)){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function Fv(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Iv,Lv,Rv,zv=`\0_ec_inner`,Bv=1,Vv=function(e){M(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(e,t,n,r,i,a){r||={},this.option=null,this._theme=new fg(r),this._locale=new fg(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=Kv(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,Kv(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);!this.option||e===`recreate`?Rv(this,i):(this.restoreData(),this._mergeOption(i,t)),n=!0}if((e===`timeline`||e===`media`)&&this.restoreData(),!e||e===`recreate`||e===`timeline`){var a=r.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,t))}if(!e||e===`recreate`||e===`media`){var o=r.getMediaOption(this);o.length&&L(o,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=G(),s=t&&t.replaceMergeMainTypeMap;yv(this),L(e,function(e,t){e!=null&&(sv.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?P(e):De(n[t],e,!0))}),s&&s.each(function(e,t){sv.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),sv.topologicalTravel(a,sv.getAllClassMainTypes(),c,this);function c(t){var a=Ov(this,t,rc(e[t])),o=r.get(t),c=cc(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);xc(c,t,sv),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;L(c,function(e,n){var r=e.existing,i=e.newOption;if(!i)r&&(r.mergeOption({},this),r.optionUpdated({},!1));else{var a=t===`series`,o=sv.getClass(t,e.keyInfo.subType,!a);if(!o)return;if(t===`tooltip`){if(f)return;f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=F({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),F(r,s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}r?(l.push(r.option),u.push(r),d++):(l.push(void 0),u.push(void 0))},this),n[t]=l,r.set(t,u),i.set(t,d),t===`series`&&Iv(this)}this._seriesIndices||Iv(this)},t.prototype.getOption=function(){var e=P(this.option);return L(e,function(t,n){if(sv.hasClass(n)){for(var r=rc(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!yc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[zv],e},t.prototype.setTheme=function(e){this._theme=new fg(e),this._resetOption(`recreate`,null)},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,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function Qv(e,t){return e.join(`,`)===t.join(`,`)}var $v=L,ey=U,ty=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function ny(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=ty.length;n0?e[n-1].seriesModel:null)}),Ty(e))})}function Ty(e){L(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=js(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var Ey=function(){function e(e){this.data=e.data||(e.sourceFormat===`keyedColumns`?{}:[]),this.sourceFormat=e.sourceFormat||`unknown`,this.seriesLayoutBy=e.seriesLayoutBy||`column`,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;nl&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Vy=(e={},e[Kd+`_`+Zd]={pure:!0,appendData:i},e[Kd+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[qd]={pure:!0,appendData:i},e[Jd]={pure:!0,appendData:function(e){var t=this._data;L(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[Gd]={appendData:i},e[Yd]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;t=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return tb(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function ib(e){var t,n;return U(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function ab(e){return new ob(e)}var ob=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:at},gte:function(e,t){return e>=t}},fb=function(){function e(e,t){He(t)||$s(``),this._opFn=db[e],this._rvalFloat=Hs(t)}return e.prototype.evaluate=function(e){return He(e)?this._opFn(e,this._rvalFloat):this._opFn(Hs(e),this._rvalFloat)},e}(),pb=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=He(e)?e:Hs(e),r=He(t)?t:Hs(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=H(e),s=H(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}(),mb=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Hs(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Hs(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function hb(e,t){return e===`eq`||e===`ne`?new mb(e===`eq`,t):K(db,e)?new fb(e,t):null}function gb(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function _b(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,Ab=typeof Uint16Array>`u`?Array:Uint16Array,jb=typeof Int32Array>`u`?Array:Int32Array,Mb=typeof Float64Array>`u`?Array:Float64Array,Nb={float:Mb,int:jb,ordinal:Array,number:Array,time:Mb},Pb;function Fb(e){return e>65535?kb:Ab}function Ib(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Lb(e,t,n,r,i){var a=Nb[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=R(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f)if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(Fb(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=h),d[f++]=g}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return cb(e[r],this._dimensions[r])}Pb={arrayRows:e,objectRows:function(e,t,n,r){return cb(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return cb(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),zb=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(Vb(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=We(o)?Yd:Gd,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=W(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=W(u.sourceHeader,d.sourceHeader),m=W(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Oy(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Oy(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&Hb(``);var i,a=[],o=[];return L(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&Hb(``),a.push(t),o.push(e._getVersionSign())}),n?i=Eb(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Ay(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||n>0&&!e.noHeader;return L(e.blocks,function(e){var n=Zb(e);n>=t&&(t=n+ +(r&&(!n||Yb(e)&&!e.noHeader)))}),t}return 0}function Qb(e,t,n,r){var i=t.noHeader,a=tx(Zb(t)),o=[],s=t.blocks||[];et(!s||B(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(K(l,c)){var u=new pb(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}L(s,function(n,i){var s=t.valueFormatter,c=Xb(n)(s?F(F({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):nx(r,o.join(``),i?n:a.html);if(i)return d;var f=S_(t.header,`ordinal`,e.useUTC),p=Gb(r,e.renderMode).nameStyle,m=Wb(r);return e.renderMode===`richText`?ax(e,f,p)+a.richText+d:nx(r,`
`+rn(f)+`
`+d,n)}function $b(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=B(e)?e:[e],R(e,function(e,t){return S_(e,B(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Z.color.secondary,i),f=a?``:S_(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=Gb(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:ax(e,f,v))+(o?``:ox(e,m,h,g,y)):nx(r,(s?``:d)+(a?``:rx(f,!s,v))+(o?``:ix(m,h,g,y)),n)}}function ex(e,t,n,r,i,a){if(e)return Xb(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function tx(e){return{html:Kb[e],richText:qb[e]}}function nx(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=Wb(e);return`
`+t+r+`
`}function rx(e,t,n){var r=t?`margin-left:2px`:``;return``+rn(e)+``}function ix(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=B(e)?e:[e],``+R(e,function(e){return rn(e)}).join(`  `)+``}function ax(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function ox(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(B(t)?t.join(` `):t,a)}function sx(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return A_(n)}function cx(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var lx=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Ws()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=D_({color:t,type:e,renderMode:n,markerId:r});return H(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};B(t)?L(t,function(e){return F(n,e)}):F(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function ux(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=B(s),l=sx(t,n),u,d,f,p;if(o>1||c&&!o){var m=dx(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=tb(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=vc(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return Jb(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[Jb(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!tt(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function dx(e,t,n,r,i){var a=t.getData(),o=Fe(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?L(r,function(e){u(tb(a,n,e),e)}):L(e,u);function u(e,t){var n=a.getDimensionInfo(t);!n||n.otherDims.tooltip===!1||(o?l.push(Jb(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var fx=Tc();function px(e,t){return e.getName(t)||e.getId(t)}var mx=`__universalTransitionEnabled`,hx=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=ab({count:vx,reset:yx}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(fx(this).sourceManager=new zb(this)).prepareSource();var r=this.getInitialData(e,n);xx(r,this),this.dataTask.context.data=r,fx(this).dataBeforeProcessed=r,gx(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=nv(this),r=n?iv(e):{},i=this.subType;sv.hasClass(i)&&(i+=`Series`),De(e,t.getTheme().get(this.subType)),De(e,this.getDefaultOption()),ic(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&rv(e,r,n)},t.prototype.mergeOption=function(e,t){e=De(this.option,e,!0),this.fillDataTextStyle(e.data);var n=nv(this);n&&rv(this.option,e,n);var r=fx(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);xx(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,fx(this).dataBeforeProcessed=i,gx(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!We(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return ux({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(N.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=jv.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},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,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[px(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(!(!a||!o)){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){U(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return sv.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}(sv);Ne(hx,rb),Ne(hx,jv),fl(hx,sv);function gx(e){var t=e.name;vc(e)||(e.name=_x(e)||t)}function _x(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return L(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function vx(e){return e.model.getRawData().count()}function yx(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),bx}function bx(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function xx(e,t){L(lt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,Be(Sx,t))})}function Sx(e,t){var n=Cx(e);return n&&n.setOutputEnd((t||this).count()),t}function Cx(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var Tx=function(){function e(){this.group=new Y,this.uid=mg(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();ul(Tx),_l(Tx);function Ex(){var e=Tc();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==o||a!==s)&&`reset`}}var Dx=Tc(),Ox=Ex(),kx=function(){function e(){this.group=new Y,this.uid=mg(`viewChart`),this.renderTask=ab({plan:Mx,reset:Nx}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&jx(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&jx(i,r,`normal`)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){Th(this.group,e)},e.markUpdateMethod=function(e,t){Dx(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function Ax(e,t,n){e&&ap(e)&&(t===`emphasis`?Pf:Ff)(e,n)}function jx(e,t,n){var r=wc(e,t),i=t&&t.highlightKey!=null?sp(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){Ax(e,n,i)}):L(rc(r),function(t){Ax(e.getItemGraphicEl(t),n,i)})}ul(kx,[`dispose`]),_l(kx);function Mx(e){return Ox(e.model)}function Nx(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&Dx(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),Px[c]}var Px={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Fx=`\0__throttleOriginMethod`,Ix=`\0__throttleRate`,Lx=`\0__throttleType`;function Rx(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function zx(e,t,n,r){var i=e[t];if(i){var a=i[Fx]||i,o=i[Lx];if(i[Ix]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Rx(a,n,r===`debounce`),i[Fx]=a,i[Lx]=r,i[Ix]=n}return i}}function Bx(e,t){var n=e[t];n&&n[Fx]&&(n.clear&&n.clear(),e[t]=n[Fx])}var Vx=Tc(),Hx={itemStyle:vl(lg,!0),lineStyle:vl(og,!0)},Ux={lineStyle:`stroke`,itemStyle:`fill`};function Wx(e,t){return e.visualStyleMapper||Hx[t]||(console.warn(`Unknown style type '`+t+`'.`),Hx.itemStyle)}function Gx(e,t){return e.visualDrawType||Ux[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var Kx={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=Wx(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=Gx(e,r),c=a[s],l=V(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||V(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||V(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=F({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},qx=new fg,Jx={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=Wx(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){qx.option=n[r];var o=i(qx);F(e.ensureUniqueItemVisual(t,`style`),o),qx.option.decal&&(e.setItemVisual(t,`decal`,qx.option.decal),qx.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},Yx={performRawSeries:!0,overallReset:function(e){var t=G();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();Vx(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=Vx(e).scope,a=Gx(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},Xx=Math.PI;function Zx(e,t){t||={},I(t,{text:`loading`,textColor:Z.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Z.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Y,r=new Sd({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Dd({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Sd({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new _m({shape:{startAngle:-Xx/2,endAngle:-Xx/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:Xx*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:Xx*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var Qx=function(){function e(e,t,n,r){this._stageTaskMap=G(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):tl(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=G();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;L(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});et(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;L(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=G(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||ab({plan:rS,reset:iS,count:sS}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||ab({reset:$x});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=G(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;et(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):L(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,ab({reset:eS,onDirty:nS})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return V(e)&&(e={overallReset:e,seriesType:cS(e)}),e.uid=mg(`stageHandler`),t&&(e.visualType=t),e},e}();function $x(e){e.overallReset(e.ecModel,e.api,e.payload)}function eS(e){return e.dirtyOnOverallProgress&&tS}function tS(){this.agent.dirty(),this.getDownstream().dirty()}function nS(){this.agent&&this.agent.dirty()}function rS(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function iS(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=rc(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?R(t,function(e,t){return oS(t)}):aS}var aS=oS(0);function oS(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),vS=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],yS=vS.concat([`symbolKeepAspect`]),bS={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&$S(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function nC(e,t,n){for(var r=t.type===`radial`?tC(e,t,n):eC(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:He(e)?[e]:B(e)?e:null}function sC(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&oC(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=R(n,function(e){return e/i}),r/=i)}return[n,r]}var cC=new Lu(!0);function lC(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function uC(e){return typeof e==`string`&&e!==`none`}function dC(e){var t=e.fill;return t!=null&&t!==`none`}function fC(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function pC(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function mC(e,t,n){var r=Cl(t.image,t.__image,n);if(Tl(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*pt),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function hC(e,t,n,r,i){var a,o=lC(n),s=dC(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||cC,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?nC(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?nC(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?mC(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?mC(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=sC(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&pC(e,n),s&&fC(e,n)):(s&&fC(e,n),o&&pC(e,n)),T&&e.setLineDash([])}function gC(e,t,n){var r=t.__image=Cl(n.image,t.__image,t,t.onload);if(!(!r||!Tl(r))){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function _C(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=sC(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(lC(n)&&e.strokeText(i,n.x,n.y),dC(n)&&e.fillText(i,n.x,n.y)):(dC(n)&&e.fillText(i,n.x,n.y),lC(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var vC=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],yC=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function bC(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){jC(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Xl.opacity:o}(r||t.blend!==n.blend)&&(a||=(jC(e,i),!0),e.globalCompositeOperation=t.blend||Xl.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,t,n){if(!this[pw]){if(this._disposed){this.id;return}var r,i,a;if(U(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[pw]=!0,Gw(this),!this._model||t){var o=new Jv(this._api),s=this._theme,c=this._model=new Vv;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},$w);var l={seriesTransition:a,optionChanged:!0};if(n)this[hw]={silent:r,updateParams:l},this[pw]=!1,this.getZr().wakeUp();else{try{Dw(this),Aw.update.call(this,null,l)}catch(e){throw this[hw]=null,this[pw]=!1,e}this._ssr||this._zr.flush(),this[hw]=null,this[pw]=!1,Pw.call(this,r),Fw.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[pw]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[hw]&&(r??=this[hw].silent,i=this[hw].updateParams,this[hw]=null),this[pw]=!0,Gw(this);try{this._updateTheme(e),n.setTheme(this._theme),Dw(this),Aw.update.call(this,{type:`setTheme`},i)}catch(e){throw this[pw]=!1,e}this[pw]=!1,Pw.call(this,r),Fw.call(this,r)}}},t.prototype._updateTheme=function(e){H(e)&&(e=tT[e]),e&&(e=P(e),e&&Sy(e,!0),this._theme=e)},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||N.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return L(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;L(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return L(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(iT[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();L(rT,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(P(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=le.createCanvas(),h=Jo(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return L(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}else return e.connectedBackgroundColor&&h.add(new Sd({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),L(u,function(e){var t=new md({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return jw(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return jw(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return jw(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return L(Dc(n,e),function(e,n){n.indexOf(`Models`)>=0&&L(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Dc(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?CS(i,t):SS(i,a,t)},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;L(Jw,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&OS(i,function(e){var t=Vd(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}else if(t.eventData)return a=F({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;L(Zw,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),DS(t,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,this.getDom()&&Nc(this.getDom(),sT,``);var e=this,t=e._api,n=e._model;L(e._componentsViews,function(e){e.dispose(n,t)}),L(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete rT[e.id]},t.prototype.resize=function(e){if(!this[pw]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[hw]&&(r??=this[hw].silent,n=!0,this[hw]=null),this[pw]=!0,Gw(this);try{n&&Dw(this),Aw.update.call(this,{type:`resize`,animation:F({duration:0},e&&e.animation)})}catch(e){throw this[pw]=!1,e}this[pw]=!1,Pw.call(this,r),Fw.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(U(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),nT[e]){var n=nT[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},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 t=F({},e);return t.type=Xw[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(U(t)||(t={silent:!!t}),Yw[e.type]&&this._model){if(this[pw]){this._pendingActions.push(e);return}var n=t.silent;Nw.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&N.browser.weChat&&this._throttledZrFlush(),Pw.call(this,n),Fw.call(this,n)}},t.prototype.updateLabelLayout=function(){kS.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){Dw=function(e){LS(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),Ow(e,!0),Ow(e,!1),t.plan()},Ow=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cW(t.get(`hoverLayerThreshold`),gv.hoverLayerThreshold)&&!N.node&&!N.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=Ah(e);t.eachRendered(function(e){return Mh(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!Rm(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(Rm(e))return;if(e instanceof cd&&up(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}Vw=function(e){return new(function(t){M(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Pf(t,n),Uw(e)},n.prototype.leaveEmphasis=function(t,n){Ff(t,n),Uw(e)},n.prototype.enterBlur=function(t){If(t),Uw(e)},n.prototype.leaveBlur=function(t){Lf(t),Uw(e)},n.prototype.enterSelect=function(t){Rf(t),Uw(e)},n.prototype.leaveSelect=function(t){zf(t),Uw(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[mw]},n.prototype.usingTHL=function(){return e._usingTHL},n}(ef))(e)},Hw=function(e){function t(e,t){for(var n=0;n=0)){DT.push(n);var o=Qx.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function kT(e,t){nT[e]=t}function AT(e){ue({createCanvas:e})}function jT(e,t,n){var r=MS(`registerMap`);r&&r(e,t,n)}function MT(e){var t=MS(`getMap`);return t&&t(e)}var NT=Tb;ET(iw,Kx),ET(sw,Jx),ET(sw,Yx),ET(iw,bS),ET(sw,xS),ET(dw,GC),gT(Sy),_T(ZC,Cy),kT(`default`,Zx),xT({type:lf,event:lf,update:lf},ft),xT({type:uf,event:uf,update:uf},ft),xT({type:df,event:mf,update:df,action:ft,refineEvent:PT,publishNonRefinedEvent:!0}),xT({type:ff,event:mf,update:ff,action:ft,refineEvent:PT,publishNonRefinedEvent:!0}),xT({type:pf,event:mf,update:pf,action:ft,refineEvent:PT,publishNonRefinedEvent:!0});function PT(e,t,n,r){return{eventContent:{selected:Xf(n),isFromClick:t.isFromClick||!1}}}hT(`default`,{}),hT(`dark`,gS);var FT={},IT=[],LT={registerPreprocessor:gT,registerProcessor:_T,registerPostInit:vT,registerPostUpdate:yT,registerUpdateLifecycle:bT,registerAction:xT,registerCoordinateSystem:ST,registerLayout:TT,registerVisual:ET,registerTransform:NT,registerLoading:kT,registerMap:jT,registerImpl:jS,PRIORITY:fw,ComponentModel:sv,ComponentView:Tx,SeriesModel:hx,ChartView:kx,registerComponentModel:function(e){sv.registerClass(e)},registerComponentView:function(e){Tx.registerClass(e)},registerSeriesModel:function(e){hx.registerClass(e)},registerChartView:function(e){kx.registerClass(e)},registerCustomSeries:function(e,t){PS(e,t)},registerSubTypeDefaulter:function(e,t){sv.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Qo(e,t)}};function RT(e){if(B(e)){L(e,function(e){RT(e)});return}je(IT,e)>=0||(IT.push(e),V(e)&&(e={install:e}),e.install(LT))}function zT(e){return e==null?0:e.length||1}function BT(e){return e}var VT=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||BT,this._newKeyGetter=r||BT,this.context=i,this._diffModeMultiple=a===`multiple`}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?`_executeMultiple`:`_executeOneToOne`]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=Array(e.length),i=Array(t.length);this._initIndexMap(e,null,r,`_oldKeyGetter`),this._initIndexMap(t,n,i,`_newKeyGetter`);for(var a=0;a1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;o30}var tE=U,nE=R,rE=typeof Int32Array>`u`?Array:Int32Array,iE=`e\0\0`,aE=-1,oE=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],sE=[`_approximateExtent`],cE,lE,uE,dE,fE,pE,mE,hE=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;ZT(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),B(i)?i=i.slice():tE(i)&&(i=F({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,tE(t)?F(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){tE(e)?F(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?F(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){Hd(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){L(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:nE(this.dimensions,this._getDimInfo,this),this.hostModel),fE(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];V(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Qe(arguments)))})},e.internalField=function(){cE=function(e){var t=e._invertedIndicesMap;L(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new rE(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function gE(e,t){return _E(e,t).dimensions}function _E(e,t){Dy(e)||(e=ky(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=G(),a=[],o=vE(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&eE(o),c=r===e.dimensionsDefine,l=c?$T(e):QT(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=G(u),f=new jb(o),p=0;p0&&(e.name+=t-1)}),new XT({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function vE(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return L(t,function(e){var t;U(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function yE(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var bE=function(){function e(e){this.coordSysDims=[],this.axisMap=G(),this.categoryAxisMap=G(),this.coordSysName=e}return e}();function xE(e){var t=e.get(`coordinateSystem`),n=new bE(t),r=SE[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var SE={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,kc).models[0],a=e.getReferringComponents(`yAxis`,kc).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),CE(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),CE(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,kc).models[0];t.coordSysDims=[`single`],n.set(`single`,i),CE(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,kc).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),CE(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),CE(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();L(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),CE(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,kc).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function CE(e){return e.get(`type`)===`category`}function wE(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;TE(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(L(a,function(e,t){H(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),L(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;L(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function TE(e){return!ZT(e.schema)}function EE(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function DE(e,t){return EE(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function OE(e,t){var n=e.get(`coordinateSystem`),r=P_.get(n),i;return t&&t.coordSysDims&&(i=R(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=GT(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function kE(e,t,n){var r,i;return n&&L(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function AE(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=ky(e)):(i=r.getSource(),a=i.sourceFormat===Gd);var o=xE(t),s=OE(t,o),c=n.useEncodeDefaulter,l=V(c)?c:c?Be(bv,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=_E(i,u),f=kE(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=wE(t,{schema:d,store:p}),h=new hE(d,t);h.setCalculationInfo(m);var g=f!=null&&jE(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function jE(e){if(e.sourceFormat===`original`)return!B(oc(ME(e.data||[])))}function ME(e){for(var t=0;t=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){qE(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),qE(r,e,t,n)},freeze:function(){}};function qE(e,t,n,r){Kc(n,r)&&(e[t][0]=n,e[t][1]=r)}function JE(e){return YE(e)||ZE(e)}function YE(e){return e.type===`interval`}function XE(e){return e.type===`time`}function ZE(e){return e.type===`log`}function QE(e){return e.type===`ordinal`}function $E(e){var t=Rs(e),n=fs(10,t),r=ls(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ss(r*n,-t)}function eD(e){return Ts(e)+2}function tD(e,t){return ps(e)/ps(t)}function nD(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var sD=function(e){M(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,zE(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new FE({}),B(i)&&(i=new FE({categories:R(i,function(e){return U(e)?e.value:e})})),r._ordinalMeta=i;var a=RE(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,BE(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:H(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=ls(e),e},t.prototype.getTicks=function(){var e=[];return oD(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=os(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=os(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=Ss(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=Ss(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?Ss(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return cD(this,e,Pg(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=Ts(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),y_(Ss(e.value,n,!0))},t.type=`interval`,t}(NE);NE.registerClass(lD);var uD=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function hD(e){var t=30*zg;return e/=t,e>6?6:e>3?3:e>2?2:1}function gD(e){return e/=Rg,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function _D(e,t){return e/=t?Lg:Ig,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function vD(e){return ss(zs(e,!0),1)}function yD(e,t,n){var r=Math.max(0,je(Kg,t)-1);return r_(new Date(e),Kg[r],n).getTime()}function bD(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function xD(e,t,n,r,i,a){var o=qg,s=0;function c(e,t,n,i,o,c,l){for(var u=bD(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!pD(Zg(e),r[0],r[1],n)){s&&(i=[{value:yD(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=Ie(R(u,function(e){return Ie(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=fD.length,l=Math.min(uD(fD,a,0,c),c-1),u=fD[l][1],d=fD[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};NE.registerClass(dD);var CD=0,wD=1,TD=2,ED=function(e){M(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=lD.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[CD]=i[wD]=a[CD]=a[wD]=NaN,zE(r,t.mapperMethods);var s=Mg(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},TD,l),r.powStub=new lD({breakParsed:l.original}),r.intervalStub=new lD({breakParsed:l.transformed}),BE(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Mg(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return R(i.getTicks(e||{}),function(e){var i=e.value,o=nD(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,Pg(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return cD(this,e,Pg(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(tD(e,this.base))},scale:function(e){return nD(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=tD(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return DD.depth=n,OD.lookup=this._lookup,nD(n===2?e:this.intervalStub.transformOut(e,DD),this.base,OD)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Kc(t,n)||t<=0||n<=0)){var r=kD,i=kD;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[CD]=t,r[wD]=n);var o=this.base;this.intervalStub.setExtent2(e,i[CD]=tD(t,o),i[wD]=tD(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Kc(t[0],t[1])&&qs(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(NE);NE.registerClass(ED);var DD={},OD={},kD=[],AD={value:1,category:1,time:1,log:1},jD=Tc();function MD(e){var t=e.get(`type`);return(t==null||!K(AD,t)&&!NE.getClass(t))&&(t=`value`),t}function ND(e,t,n){var r=Mg(),i;switch(r&&(i=WD(e,t,n)),t){case`category`:return new sD({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Bc()});case`time`:return new dD({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new ED({logBase:e.get(`logBase`),breakOption:i});case`value`:return new lD({breakOption:i});default:return new((NE.getClass(t))||lD)({})}}function PD(e,t,n){var r=n?HE(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Kc(i,a)?i===t||a===t?2:it?1:3:3}function FD(e){jD(e).noOnMyZero=!0}function ID(e){return jD(e).noOnMyZero}function LD(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=Jg(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}else if(H(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};else if(V(t)){if(e.type===`category`)return function(n,r){return t(RD(e,n),n.value-e.scale.getExtent()[0],null)};var r=Mg();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(RD(e,n),i,a)}}else return function(t){return e.scale.getLabel(t)}}function RD(e,t){var n=e.scale;return QE(n)?n.getLabel(t):t.value}function zD(e){return e.get(`interval`)??`auto`}function BD(e){return e.type===`category`&&zD(e.getLabelModel())===0}function VD(e,t){var n={};return L(e.mapDimensionsAll(t),function(t){n[DE(e,t)]=!0}),Re(n)}function HD(e){return e===`middle`||e===`center`}function UD(e){return e.getShallow(`show`)}function WD(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Mg()||!n||!GD(t)?void 0:r}function GD(e){return e!==`category`}function KD(e,t,n,r,i,a){var o=ZE(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=iD(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function qD(e,t){return QE(e)?e.getRawOrdinalNumber(t.value):t.value}function JD(e,t){return QE(e)&&!!t.get(`boundaryGap`)}var YD=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),XD=Yc(),ZD=Tc(),QD=Tc();function $D(e,t){var n=e.model,r=ZD(BS(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function eO(e,t){return rO($D(e,t))}function tO(e,t){var n=[];return nO(e.model.ecModel,function(e){for(var r=0;r0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=xO(e,t.get(`startValue`,!0)),x=b!=null;!qs(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),qs(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),bO(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),bO(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function bO(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Jc(t))}function xO(e,t){return t==null?null:Ye(t)?NaN:e.parse(t)}function SO(e,t){var n;if(QE(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=B(r)?r:[r,r]}return[CO(n[0]),CO(n[1])]}function CO(e){return Co(typeof e==`boolean`?0:e,1)||0}function wO(e){var t=_O(e.scale);return t.extent||=Bc(),t}function TO(e,t){wO(e).dimIdxInCoord=t.get(e.dim)}function EO(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||DO(n,e,i,r,t)}function DO(e,t,n,r,i){var a=wO(t),o=a.extent,s=!1;iO(t,function(r){if(r.boxCoordinateSystem){var i=R_(r).coord,c=a.dimIdxInCoord;if(c>=0&&B(i)){var l=i[c];l!=null&&!B(l)&&Vc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;L(VD(u,n),function(e){Wc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=NO(e,t,r);kO(e,new yO(e,r,o,s,c),i),a.extent=null}function OO(e,t){var n=e.scale;kO(n,new yO(n,e.model,t,!1,!1),vO)}function kO(e,t,n){e.rawExtentInfo=t,t.from=n}function AO(e,t){jO.set(e,t)}var jO=G();function MO(e,t,n,r,i){e.rawExtentInfo||OO({scale:e,model:t},i||Bc());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function NO(e,t,n){var r=JD(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return lO(t,function(e){a=!!jO.get(e)||a}),a}function PO(e,t,n,r){if(n.ctnShp){var i;if(lO(e,function(t){var n=jO.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Hc(i,a[0]),Uc(i,a[1]),FD(e))}}),i){var a=t.getExtent();if(QE(t))e.onBand||t.setExtent2(1,os(a[0],a[0]+i[0]),ss(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=os(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=ss(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}function FO(e,t){var n=ZE(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=rD(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?LO(r,t):IO(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=eD(d)),i[0]||(s[0]=Ss(us(s[0]/u)*u,l)),i[1]||(s[1]=Ss(ds(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),KD(e,i,o,s,a,c)}function IO(e,t){var n=aD(t.splitNumber,5),r=WE(e),i=t.minInterval,a=t.maxInterval,o=zs(r/n,!0);i!=null&&oa&&(o=a);var s=eD(o),c=e.getExtent(),l=[Ss(ds(c[0]/o)*o,s),Ss(us(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function LO(e,t){var n=aD(t.splitNumber,10),r=e.getExtent(),i=WE(e),a=ss(Ls(i),1);n/i*a<=.5&&(a*=10);var o=eD(a),s=[Ss(ds(r[0]/a)*a,o),Ss(us(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function RO(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;zO(t,n,r,i,null)}function zO(e,t,n,r,i){var a=MO(e,t,r,n,i),o=YE(e)||XE(e);BO(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&PO(n,e,a,r)}function BO(e,t){VO[e.type](e,t)}var VO={interval:FO,log:FO,time:SD,ordinal:ft},HO=t({createDimensions:()=>gE,createList:()=>UO,createScale:()=>GO,createSymbol:()=>XS,createTextStyle:()=>qO,dataStack:()=>WO,enableHoverEmphasis:()=>Zf,getECData:()=>Vd,getLayoutRect:()=>X_,mixinAxisModelCommonMethods:()=>KO});function UO(e){return AE(null,e)}var WO={isDimensionStacked:EE,enableDataStack:wE,getStackedDimension:DE};function GO(e,t){var n=t;t instanceof fg||(n=new fg(t));var r=MD(n),i=ND(n,r,!1);return e[1]n&&(t=i,n=o)}if(t)return ek(t.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},t.prototype.getBoundingRect=function(e){var t=this._rect;if(t&&!e)return t;var n=[1/0,1/0],r=[-1/0,-1/0],i=this.geometries;return L(i,function(t){t.type===`polygon`?$O(t.exterior,n,r,e):L(t.points,function(t){$O(t,n,r,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(r[0])&&isFinite(r[1])||(n[0]=n[1]=r[0]=r[1]=0),t=new J(n[0],n[1],r[0]-n[0],r[1]-n[1]),e||(this._rect=t),t},t.prototype.contain=function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;loopGeo:for(var r=0,i=n.length;r>1^-(s&1),c=c>>1^-(c&1),s+=i,c+=a,i=s,a=c,r.push([s/n,c/n])}return r}function lk(e,t){return e=ok(e),R(Ie(e.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,r=e.geometry,i=[];switch(r.type){case`Polygon`:var a=r.coordinates;i.push(new nk(a[0],a.slice(1)));break;case`MultiPolygon`:L(r.coordinates,function(e){e[0]&&i.push(new nk(e[0],e.slice(1)))});break;case`LineString`:i.push(new rk([r.coordinates]));break;case`MultiLineString`:i.push(new rk(r.coordinates))}var o=new ik(n[t||`name`],i,n.cp);return o.properties=n,o})}var uk=t({MAX_SAFE_INTEGER:()=>Ms,asc:()=>ws,getPercentWithPrecision:()=>ks,getPixelPrecision:()=>Ds,getPrecision:()=>Ts,getPrecisionSafe:()=>Es,isNumeric:()=>Us,isRadianAroundZero:()=>Ps,linearMap:()=>_s,nice:()=>zs,numericToNumber:()=>Hs,parseDate:()=>Is,parsePercent:()=>X,quantile:()=>Bs,quantity:()=>Ls,quantityExponent:()=>Rs,reformIntervals:()=>Vs,remRadian:()=>Ns,round:()=>Cs}),dk=t({format:()=>e_,parse:()=>Is,roundTime:()=>r_}),fk=t({Arc:()=>_m,BezierCurve:()=>hm,BoundingRect:()=>J,Circle:()=>Fp,CompoundPath:()=>vm,Ellipse:()=>Lp,Group:()=>Y,Image:()=>md,IncrementalDisplayable:()=>Mm,Line:()=>dm,LinearGradient:()=>bm,Polygon:()=>om,Polyline:()=>cm,RadialGradient:()=>xm,Rect:()=>Sd,Ring:()=>nm,Sector:()=>em,Text:()=>Dd,clipPointsByRect:()=>ph,clipRectByRect:()=>mh,createIcon:()=>hh,extendPath:()=>Xm,extendShape:()=>Jm,getShapeClass:()=>Qm,getTransform:()=>sh,initProps:()=>Lm,makeImage:()=>eh,makePath:()=>$m,mergePath:()=>nh,registerShape:()=>Zm,resizePath:()=>rh,updateProps:()=>Im}),pk=t({addCommas:()=>y_,capitalFirst:()=>k_,encodeHTML:()=>rn,formatTime:()=>O_,formatTpl:()=>T_,getTextRect:()=>v_,getTooltipMarker:()=>D_,normalizeCssArray:()=>x_,toCamelCase:()=>b_,truncateText:()=>Dl}),mk=t({bind:()=>z,clone:()=>P,curry:()=>Be,defaults:()=>I,each:()=>L,extend:()=>F,filter:()=>Ie,indexOf:()=>je,inherits:()=>Me,isArray:()=>B,isFunction:()=>V,isObject:()=>U,isString:()=>H,map:()=>R,merge:()=>De,reduce:()=>Fe}),hk=Tc(),gk=Tc(),_k={estimate:1,determine:2};function vk(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function yk(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:R(xk(n,r),function(t,n){return{formattedLabel:LD(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?Sk(e,t):Tk(e)}function bk(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:xk(i,r)}:e.type===`category`?wk(e,t):{ticks:r.getTicks(n)}}function xk(e,t){var n=t.getExtent(),r=[];return L(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Zc(r,$c,null),ws(r),R(r,function(e){return{value:e}})}function Sk(e,t){var n=e.getLabelModel(),r=Ck(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function Ck(e,t,n){var r=Dk(e),i=zD(t),a=n.kind===_k.estimate;if(!a){var o=kk(r,i);if(o)return o}var s,c;V(i)?s=Ik(e,i,!1):(c=i===`auto`?jk(e,n):i,s=Ik(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return Ak(r,i,l),!0}):Ak(r,i,l),l}function wk(e,t){var n=Ek(e),r=zD(t),i=kk(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),V(r))a=Ik(e,r,!0);else if(r===`auto`){var s=Ck(e,e.getLabelModel(),vk(_k.determine));o=s.labelCategoryInterval,a=R(s.labels,function(e){return e.tick})}else o=r,a=Ik(e,o,!0);return Ak(n,r,{ticks:a,tickCategoryInterval:o})}function Tk(e){var t=e.scale.getTicks(),n=LD(e);return{labels:R(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var Ek=Ok(`axisTick`),Dk=Ok(`axisLabel`);function Ok(e){return function(t){return gk(t)[e]||(gk(t)[e]={list:[]})}}function kk(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=yo(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===_k.estimate?(t.out.noPxChangeTryDetermine.push(z(Nk,null,e,S,c)),S):Pk(e,S,c)??S}function Nk(e,t,n){return Pk(e,t,n)==null}function Pk(e,t,n){var r=hk(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function Fk(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function Ik(e,t,n){var r=LD(e),i=e.scale,a=[],o=V(t);return oD(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var Lk=.8;function Rk(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=UE(r);qs(o)||(o=NaN);var s=e.getExtent(),c=cs(s[1]-s[0]);return QE(r)?zk(n,e,o,c):i&&Bk(n,e,o,c,i),a!=null&&(n.w=qs(n.w)?ss(a,n.w):a),n}function zk(e,t,n,r){var i=t.onBand,a=n+ +!!i;a===0&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}function Bk(e,t,n,r,i){var a=!1,o=-1/0;L(i.key?[eO(t,i.key)]:tO(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),qs(n)&&n>0&&qs(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*Lk,e.w2=e.w*n/r)}var Vk=[0,1],Hk=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),_s(e,Vk,Uk(this),t)},e.prototype.coordToData=function(e,t){var n=_s(e,Uk(this),Vk,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=R(bk(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(qD(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=Wk(this,n,r);return R(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(QE(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),R(this.scale.getMinorTicks(e),function(e){return R(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=vk(_k.determine),yk(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return Rk(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=vk(_k.determine),Mk(this,e)},e}();function Uk(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function Wk(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=Rk(e).w;if(!i)return!1;L(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}function Gk(e){var t=sv.extend(e);return sv.registerClass(t),t}function Kk(e){var t=Tx.extend(e);return Tx.registerClass(t),t}function qk(e){var t=hx.extend(e);return hx.registerClass(t),t}function Jk(e){var t=kx.extend(e);return kx.registerClass(t),t}var Yk=Math.PI*2,Xk=Lu.CMD,Zk=[`top`,`right`,`bottom`,`left`];function Qk(e,t,n,r,i){var a=n.width,o=n.height;switch(e){case`top`:r.set(n.x+a/2,n.y-t),i.set(0,-1);break;case`bottom`:r.set(n.x+a/2,n.y+o+t),i.set(0,1);break;case`left`:r.set(n.x-t,n.y+o/2),i.set(-1,0);break;case`right`:r.set(n.x+a+t,n.y+o/2),i.set(1,0);break}}function $k(e,t,n,r,i,a,o,s,c){o-=e,s-=t;var l=Math.sqrt(o*o+s*s);o/=l,s/=l;var u=o*n+e,d=s*n+t;if(Math.abs(r-i)%Yk<1e-4)return c[0]=u,c[1]=d,l-n;if(a){var f=r;r=Hu(i),i=Hu(f)}else r=Hu(r),i=Hu(i);r>i&&(i+=Yk);var p=Math.atan2(s,o);if(p<0&&(p+=Yk),p>=r&&p<=i||p+Yk>=r&&p+Yk<=i)return c[0]=u,c[1]=d,l-n;var m=n*Math.cos(r)+e,h=n*Math.sin(r)+t,g=n*Math.cos(i)+e,_=n*Math.sin(i)+t,v=(m-o)*(m-o)+(h-s)*(h-s),y=(g-o)*(g-o)+(_-s)*(_-s);return v0){t=t/180*Math.PI,aA.fromArray(e[0]),oA.fromArray(e[1]),sA.fromArray(e[2]),q.sub(cA,aA,oA),q.sub(lA,sA,oA);var n=cA.len(),r=lA.len();if(!(n<.001||r<.001)){cA.scale(1/n),lA.scale(1/r);var i=cA.dot(lA);if(Math.cos(t)1&&q.copy(fA,sA),fA.toArray(e[1])}}}}function mA(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,aA.fromArray(e[0]),oA.fromArray(e[1]),sA.fromArray(e[2]),q.sub(cA,oA,aA),q.sub(lA,sA,oA);var r=cA.len(),i=lA.len();if(!(r<.001||i<.001)&&(cA.scale(1/r),lA.scale(1/i),cA.dot(t)=o)q.copy(fA,sA);else{fA.scaleAndAdd(lA,a/Math.tan(Math.PI/2-s));var c=sA.x===oA.x?(fA.y-oA.y)/(sA.y-oA.y):(fA.x-oA.x)/(sA.x-oA.x);if(isNaN(c))return;c<0?q.copy(fA,oA):c>1&&q.copy(fA,sA)}fA.toArray(e[1])}}}function hA(e,t,n,r){var i=n===`normal`,a=i?e:e.ensureState(n);a.ignore=t;var o=r.get(`smooth`);o=o===!0?.3:Math.max(+o,0)||0,a.shape=a.shape||{},a.shape.smooth=o;var s=r.getModel(`lineStyle`).getLineStyle();i?e.useStyle(s):a.style=s}function gA(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=Nt(r[0],r[1]),a=Nt(r[1],r[2]);if(!i||!a){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(i,a)*n,s=Lt([],r[1],r[0],o/i),c=Lt([],r[1],r[2],o/a),l=Lt([],s,c,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(c[0],c[1],c[0],c[1],r[2][0],r[2][1])}else for(var u=1;u0&&i&&S(-d/a,0,a);var g=e[0],_=e[a-1],v,y;b(),v<0&&C(-v,.8),y<0&&C(y,.8),b(),x(v,y,1),x(y,v,-1),b(),v<0&&w(-v),y<0&&w(y);function b(){v=g.rect[o]-n,y=r-_.rect[o]-_.rect[s]}function x(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var i=r+e;i<0&&C(-i*n,1)}else C(-e*n,1)}}function S(t,n,r){t!==0&&(u=!0);for(var i=n;i0)for(var c=0;c0;c--){var f=r[c-1]*d;S(-f,c,a)}}}function w(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r0?S(n,0,r+1):S(-n,a-r-1,a),e-=n,e<=0)return}return u}function NA(e){for(var t=0;t=0&&n.attr(i.oldLayoutSelect),je(u,`emphasis`)>=0&&n.attr(i.oldLayoutEmphasis)),Im(n,c,t,s)}else if(n.attr(c),!Qh(n).valueAnimation){var d=W(n.style.opacity,1);n.style.opacity=0,Lm(n,{style:{opacity:d}},t,s)}if(i.oldLayout=c,n.states.select){var f=i.oldLayoutSelect={};HA(f,c,UA),HA(f,n.states.select,UA)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};HA(p,c,UA),HA(p,n.states.emphasis,UA)}eg(n,s,l,t,t)}if(r&&!r.ignore&&!r.invisible){var i=VA(r),a=i.oldLayout,m={points:r.shape.points};a?(r.attr({shape:a}),Im(r,{shape:m},t)):(r.setShape(m),r.style.strokePercent=0,Lm(r,{style:{strokePercent:1}},t)),i.oldLayout=m}},e}(),GA=Tc();function KA(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){var r=GA(t).labelManager;r||=GA(t).labelManager=new WA,r.clearLabels()}),e.registerUpdateLifecycle(`series:layoutlabels`,function(e,t,n){var r=GA(t).labelManager;L(n.updatedSeries,function(e){r.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()})}var qA=Math.sin,JA=Math.cos,YA=Math.PI,XA=Math.PI*2,ZA=180/YA,QA=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str=``,this._p=10**(e||4)},e.prototype.moveTo=function(e,t){this._add(`M`,e,t)},e.prototype.lineTo=function(e,t){this._add(`L`,e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){this._add(`C`,e,t,n,r,i,a)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add(`Q`,e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,a){this.ellipse(e,t,n,n,0,r,i,a)},e.prototype.ellipse=function(e,t,n,r,i,a,o,s){var c=o-a,l=!s,u=Math.abs(c),d=Ri(u-XA)||(l?c>=XA:-c>=XA),f=c>0?c%XA:c%XA+XA,p=!1;p=d?!0:!Ri(u)&&f>=YA==!!l;var m=e+n*JA(a),h=t+r*qA(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*ZA);if(d){var _=1/this._p,v=(l?1:-1)*(XA-_);this._add(`A`,n,r,g,1,+l,e+n*JA(a+v),t+r*qA(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*JA(o),b=t+r*qA(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function mj(e){return``}function hj(e,t){t||={};var n=t.newline?` `:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return pj(i,a)+(i===`style`?o||``:rn(o))+(t?``+n+R(t,function(e){return r(e)}).join(n)+n:``)+mj(i)}return r(e)}function gj(e,t,n){n||={};var r=n.newline?` `:``,i=` {`+r,a=r+`}`,o=R(Re(e),function(t){return t+i+R(Re(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=R(Re(t),function(e){return`@keyframes `+e+i+R(Re(t[e]),function(n){return n+i+R(Re(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function _j(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function vj(e,t,n,r){return fj(`svg`,`root`,{width:e,height:t,xmlns:oj,"xmlns:xlink":sj,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var yj=0;function bj(){return yj++}var xj={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`},Sj=`transform-origin`;function Cj(e,t,n){var r=F({},e.shape);F(r,t),e.buildPath(n,r);var i=new QA;return i.reset($i(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function wj(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[Sj]=n+`px `+r+`px`)}var Tj={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function Ej(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function Dj(e,t,n){var r=e.shape.paths,i={},a,o;if(L(r,function(e){var t=_j(n.zrId);t.animation=!0,kj(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=Re(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=Ej(i,n);return a.replace(o,s)}}function Oj(e){return H(e)?xj[e]?`cubic-bezier(`+xj[e]+`)`:ei(e)?e:``:``}function kj(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof vm){var s=Dj(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return Ej(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+bj();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function Aj(e,t,n){if(!e.ignore)if(e.isSilent()){var r={"pointer-events":`none`};jj(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=Pi(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),jj(r,t,n,!0)}}function jj(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+bj(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var Mj=Math.round;function Nj(e){return e&&H(e.src)}function Pj(e){return e&&V(e.toDataURL)}function Fj(e,t,n,r){aj(function(i,a){var o=i===`fill`||i===`stroke`;o&&Zi(a)?Xj(t,e,i,r):o&&Ji(a)?Zj(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),Yj(n,e,r)}function Ij(e,t){var n=es(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[uj+`silent`]=`true`))}function Lj(e){return Ri(e[0]-1)&&Ri(e[1])&&Ri(e[2])&&Ri(e[3]-1)}function Rj(e){return Ri(e[4])&&Ri(e[5])}function zj(e,t,n){if(t&&!(Rj(t)&&Lj(t))){var r=n?10:1e4;e.transform=Lj(t)?`translate(`+Mj(t[4]*r)/r+` `+Mj(t[5]*r)/r+`)`:Vi(t)}}function Bj(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;et(f,g),et(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=Cl(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=fj(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=P(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=ea(i);x&&(o.patternTransform=x);var S=fj(`pattern`,``,o,[d]),C=hj(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=fj(`pattern`,T,o,[d])),t[n]=Qi(T)}}function Qj(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=fj(`clipPath`,a,o,[Gj(e,n)])}t[`clip-path`]=Qi(a)}function $j(e){return document.createTextNode(e)}function eM(e,t,n){e.insertBefore(t,n)}function tM(e,t){e.removeChild(t)}function nM(e,t){e.appendChild(t)}function rM(e){return e.parentNode}function iM(e){return e.nextSibling}function aM(e,t){e.textContent=t}var oM=58,sM=120,cM=fj(``,``);function lM(e){return e===void 0}function uM(e){return e!==void 0}function dM(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function fM(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function pM(e){var t,n=e.children,r=e.tag;if(uM(r)){var i=e.elm=dj(r);if(gM(cM,e),B(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,mM(e,m,n,i,c)):hM(e,t,r,a))}function vM(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(gM(e,t),lM(t.text)?uM(r)&&uM(i)?r!==i&&_M(n,r,i):uM(i)?(uM(e.text)&&aM(n,``),mM(n,null,i,0,i.length-1)):uM(r)?hM(n,r,0,r.length-1):uM(e.text)&&aM(n,``):e.text!==t.text&&(uM(r)&&hM(n,r,0,r.length-1),aM(n,t.text)))}function yM(e,t){if(fM(e,t))vM(e,t);else{var n=e.elm,r=rM(n);pM(t),r!==null&&(eM(r,t.elm,iM(n)),hM(r,[e],0,0))}return t}var bM=0,xM=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=SM(`configLayer`),this.storage=t,this._opts=n=F({},n),this.root=e,this._id=`zr`+bM++,this._oldVNode=vj(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=dj(`svg`);gM(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,yM(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return Jj(e,_j(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=_j(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=CM(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=fj(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=R(Re(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(fj(`defs`,`defs`,{},c)),e.animation){var l=gj(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=fj(`style`,`stl`,{},[],l);a.push(u)}}return vj(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},hj(this.renderToVNode({animation:W(e.cssAnimation,!0),emphasis:W(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:W(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g=a}}for(var l=DM(this),u=l.startIdx;u=0)&&(a=!0)}),!(!a&&!i.__dirty)){var o=n._opts.useDirtyRect&&!EM(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}BM(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},KM),N.wxa&&HM(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r)if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s=t.endIdx},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=EM(e),c=s&&le.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d15){d++;break}}}PC(o,a),t.drawIdx=Math.max(d,l)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t||=0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=AM,t=0);var i=VM(this._i,e)[t];return i||(i=IM(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&De(i,this._layerConfig[e],!0),(n||r&&e!==AM)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(!(a[t]&&a[t][n])&&PM(e)){for(var l=o.length,u=0;u0&&(c=VM(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),VM(i,t)[n]=e,!r&&!e.virtual)if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom);e.painter||=this}},e.prototype.eachLayer=function(e,t){return HM(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return HM(this._i,function(n,r){e.call(t,n,r)},UM)},e.prototype.eachOtherLayer=function(e,t){return HM(this._i,function(n,r){e.call(t,n,r)},WM)},e.prototype.getLayers=function(){var e={};return HM(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(EM(t)?s=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=aC(i,0,r),t=aC(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,HM(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(AM).resize(e,t)}return this},e.prototype.clearLayer=function(e){L(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._i.layers[AM][0].dom;var t=new OM(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;HM(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;s-1&&(s.style.stroke=s.style.fill,s.style.fill=Z.color.neutral00,s.style.lineWidth=2),t},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:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(hx);function XM(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=tb(e,t,n[0]);return i==null?null:i+``}else if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var QM=function(e){M(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=XS(e,-1,-1,2,2,null,a);o.attr({z2:W(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=$M,this._symbolType=e,this.add(o)},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(){Pf(this.childAt(0))},t.prototype.downplay=function(){Ff(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):Im(f,p,o,n),Hm(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Lm(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Hh(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=QS(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof md){var S=a.style;a.useStyle(F({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(F({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Vh(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):XM(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),$f(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=Vd(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&zm(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();zm(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return ZS(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Y);function $M(e,t){this.parent.drift(e,t)}function eN(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function tN(e){return e!=null&&!U(e)&&(e={isIgnore:e}),e||{}}function nN(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Hh(t),cursorStyle:t.get(`cursor`)}}function rN(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var iN=function(){function e(e){this.group=new Y,this._SymbolCtor=e||QM}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=tN(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=nN(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);eN(e,i,r,t)&&rN(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!eN(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):Im(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i0?n=r[0]:r[1]<0&&(n=r[1]),n}function sN(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function cN(e,t){return!isFinite(e)||!isFinite(t)}var lN=typeof Float32Array<`u`?Float32Array:void 0,uN=typeof Float64Array<`u`?Float64Array:void 0;function dN(e){return fN({ctor:lN},e).arr}function fN(e,t){var n=e.arr,r=e.ctor;if(t>Ms&&(t=Ms),!n||e.typed&&n.length=i||h<0)break;if(cN(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g=r||cN(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,ee=v-u,M=C-v,te=void 0,N=void 0;if(s===`x`){te=Math.abs(A),N=Math.abs(j);var ne=E>0?1:-1;p=_-ne*te*o,m=v,O=_+ne*N*o,k=v}else if(s===`y`){te=Math.abs(ee),N=Math.abs(M);var re=D>0?1:-1;p=_,m=v-re*te*o,O=_,k=v+re*N*o}else te=Math.sqrt(A*A+ee*ee),N=Math.sqrt(j*j+M*M),T=N/(N+te),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=hN(O,gN(S,_)),k=hN(k,gN(C,v)),O=gN(O,hN(S,_)),k=gN(k,hN(C,v)),E=O-_,D=k-v,p=_-E*te/N,m=v-D*te/N,p=hN(p,gN(l,_)),m=hN(m,gN(u,v)),p=gN(p,hN(l,_)),m=gN(m,hN(u,v)),E=_-p,D=v-m,O=_+E*N/te,k=v+D*N/te}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var vN=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),yN=function(e){M(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new vN},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&cN(n[i*2-2],n[i*2-1]);i--);for(;r=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?Vr(i,u,f,m,e,s):Vr(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?zr(a,d,p,h,b):zr(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h;break}}},t}(cd),bN=function(e){M(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(vN),xN=function(e){M(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new bN},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&cN(n[a*2-2],n[a*2-1]);a--);for(;i=0,a=e.fill||Z.color.neutral99;NN(r,t);var o=r.textFill==null;return i?o&&(r.textFill=n.insideFill||Z.color.neutral00,!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=a),r.textStrokeWidth??=2):(o&&(r.textFill=e.fill||n.outsideFill||Z.color.neutral00),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,L(t.rich,function(e){NN(e,e)}),r}function NN(e,t){t&&(K(t,`fill`)&&(e.textFill=t.fill),K(t,`stroke`)&&(e.textStroke=t.fill),K(t,`lineWidth`)&&(e.textStrokeWidth=t.lineWidth),K(t,`font`)&&(e.font=t.font),K(t,`fontStyle`)&&(e.fontStyle=t.fontStyle),K(t,`fontWeight`)&&(e.fontWeight=t.fontWeight),K(t,`fontSize`)&&(e.fontSize=t.fontSize),K(t,`fontFamily`)&&(e.fontFamily=t.fontFamily),K(t,`align`)&&(e.textAlign=t.align),K(t,`verticalAlign`)&&(e.textVerticalAlign=t.verticalAlign),K(t,`lineHeight`)&&(e.textLineHeight=t.lineHeight),K(t,`width`)&&(e.textWidth=t.width),K(t,`height`)&&(e.textHeight=t.height),K(t,`backgroundColor`)&&(e.textBackgroundColor=t.backgroundColor),K(t,`padding`)&&(e.textPadding=t.padding),K(t,`borderColor`)&&(e.textBorderColor=t.borderColor),K(t,`borderWidth`)&&(e.textBorderWidth=t.borderWidth),K(t,`borderRadius`)&&(e.textBorderRadius=t.borderRadius),K(t,`shadowColor`)&&(e.textBoxShadowColor=t.shadowColor),K(t,`shadowBlur`)&&(e.textBoxShadowBlur=t.shadowBlur),K(t,`shadowOffsetX`)&&(e.textBoxShadowOffsetX=t.shadowOffsetX),K(t,`shadowOffsetY`)&&(e.textBoxShadowOffsetY=t.shadowOffsetY),K(t,`textShadowColor`)&&(e.textShadowColor=t.textShadowColor),K(t,`textShadowBlur`)&&(e.textShadowBlur=t.textShadowBlur),K(t,`textShadowOffsetX`)&&(e.textShadowOffsetX=t.textShadowOffsetX),K(t,`textShadowOffsetY`)&&(e.textShadowOffsetY=t.textShadowOffsetY))}function PN(e,t){if(e.length===t.length){for(var n=0;nt){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function VN(e,t,n){var r=e.getVisual(`visualMeta`);if(!(!r||!r.length||!e.count())&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=R(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=BN(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;L(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new bm(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function HN(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&UN(a,t))){var o=t.mapDimension(a.dim),s={};return L(a.getViewLabels(),function(e){e.tick.offInterval||(s[qD(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function UN(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function WN(e){for(var t=e.length/2;t>0&&cN(e[t*2-2],e[t*2-1]);t--);return t-1}function GN(e,t){return[e[t*2],e[t*2+1]]}function KN(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function qN(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var ee=f.getState(`emphasis`).style;ee.lineWidth=+f.style.lineWidth+1}Vd(f).seriesIndex=e.seriesIndex,$f(f,k,A,j);var M=LN(e.get(`smooth`)),te=e.get(`smoothMonotone`);if(f.setShape({smooth:M,smoothMonotone:te,connectNulls:x}),p){var N=a.getCalculationInfo(`stackedOnSeries`),ne=0;p.useStyle(I(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),N&&(ne=LN(N.get(`smooth`))),p.setShape({smooth:M,stackedOnSmooth:ne,smoothMonotone:te,connectNulls:x}),rp(p,e,`areaStyle`),Vd(p).seriesIndex=e.seriesIndex,$f(p,k,A,j)}var re=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=re)}),this._polyline.onHoverStateChange=re,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var ie=e.get(`triggerEvent`),ae=e.get(`triggerLineEvent`),oe=ae===!0||ie===!0||ie===`line`,se=ae===!0||ie===!0||ie===`area`;this.packEventData(e,f,oe),p&&this.packEventData(e,p,se)},t.prototype.packEventData=function(e,t,n){Vd(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=wc(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(cN(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new QM(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else kx.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=wc(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else kx.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Tf(this._polyline,e),t&&Tf(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new yN({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new xN({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);V(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=V(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n)if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=V(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(qN(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Dd({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=WN(o);c>=0&&(Vh(a,Hh(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?XM(i,e):ZM(i,n)},enableTextSetter:!0},YN(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=KN(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=GN(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Lc(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=GN(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=Qh(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=mN(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=zN(u.stackedOnCurrent,u.current,n,i,o),d=zN(u.current,null,n,i,o),m=zN(u.stackedOnNext,u.next,n,i,o),p=zN(u.next,null,n,i,o)),IN(d,p)>3e3||c&&IN(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),Im(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Im(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;H(i)?p=QN[i]:V(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,$N))}}}}}function tP(e){e.registerChartView(XN),e.registerSeriesModel(YM),e.registerLayout(ZN(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,eP(`line`))}var nP=function(e){M(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Hk),rP=null;function iP(e){rP||=e}function aP(){return rP}var oP=`expandAxisBreak`,sP=`collapseAxisBreak`,cP=`toggleAxisBreak`,lP=`axisbreakchanged`,uP={type:oP,event:lP,update:`update`,refineEvent:pP},dP={type:sP,event:lP,update:`update`,refineEvent:pP},fP={type:cP,event:lP,update:`update`,refineEvent:pP};function pP(e,t,n,r){var i=[];return L(e,function(e){i=i.concat(e.eventBreaks)}),{eventContent:{breaks:i}}}function mP(e){e.registerAction(uP,t),e.registerAction(dP,t),e.registerAction(fP,t);function t(e,t){var n=[],r=Dc(t,e);function i(t,i){L(r[t],function(t){L(t.updateAxisBreaks(e).breaks,function(e){var r;n.push(I((r={},r[i]=t.componentIndex,r),e))})})}return i(`xAxisModels`,`xAxisIndex`),i(`yAxisModels`,`yAxisIndex`),i(`singleAxisModels`,`singleAxisIndex`),{eventBreaks:n}}}var hP=Math.PI,gP=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],_P=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],vP=Tc(),yP=Tc(),bP=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}();function xP(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=GP(e.axisName)&&HD(e.nameLocation);L(r,function(e){var t=TA(e);if(!(!t||t.label.ignore)){o.push(t);var n=a.transGroup;c&&(n.transform?kn(SP,n.transform):Cn(SP),t.transform&&Tn(SP,SP,t.transform),J.copy(CP,t.localRect),CP.applyTransform(SP),s?s.union(CP):J.copy(s=new J(0,0,0,0),CP))}});var l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new J(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var SP=Sn(),CP=new J(0,0,0,0),wP=function(e,t,n,r,i,a){if(HD(e.nameLocation)){var o=a.stOccupiedRect;o&&TP(OA({},o,a.transGroup.transform),r,i)}else EP(a.labelInfoList,a.dirVec,r,i)};function TP(e,t,n){var r=new q;FA(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&kA(t,r)}function EP(e,t,n,r){for(var i=q.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):Ps(r-hP)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),OP=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],kP={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Rt(u,u,l),Rt(d,d,l));var p=F({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&Fg(r.axis.scale))aP().buildAxisBreakLine(r,i,a,m);else{var h=new dm(F({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));ih(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);H(g)&&(g=[g,g]),(H(_)||He(_))&&(_=[_,_]);var v=QS(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];L([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=XS(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){RP(t,i,s)&&AP(e,t,n,r,i,a,o,_k.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){RP(t,i,s)&&AP(e,t,n,r,i,a,o,_k.determine);var c=IP(e,i,a,r);NP(e,t.labelLayoutList,c),LP(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(GP(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new q(0,0),_=new q(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=Sn();_.transform(Dn(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*hP/180);var b,x;HD(u)?b=DP.innerTextLayout(e.rotation,y??e.rotation,d):(b=jP(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=Xe(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Dd({x:g.x,y:g.y,rotation:b.rotation,silent:DP.isLabelSilent(r),style:Uh(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Ch({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=DP.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Vd(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=TA({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:HD(u)?gP[E]:_P[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function AP(e,t,n,r,i,a,o,s){BP(t)||zP(e,t,i,s,r,o);var c=t.labelLayoutList;HP(e,r,c,a),qP(r,e.rotation,c);var l=e.optionHideOverlap;MP(r,c,l),l&&PA(Ie(c,function(e){return e&&!e.label.ignore})),xP(e,n,r,c)}function jP(e,t,n,r){var i=Ns(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Ps(i-hP/2)?(o=c?`bottom`:`top`,a=`center`):Ps(i-hP*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=ihP/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function MP(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(BD(r))return;function a(e,a,o){var s=TA(t[a]),c=TA(t[o]),l=r.scale;if(!(!s||!c)){if(e==null){if(!n&&i)return;var u=vP(s.label).labelInfo.tick;if(XE(l)&&u.notNice||QE(l)&&u.offInterval){PP(s.label);return}}if(e===!1||s.suggestIgnore){PP(s.label);return}if(c.suggestIgnore){PP(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=AA({marginForce:f},s),c=AA({marginForce:f},c)}FA(s,c,null,{touchThreshold:d})&&PP(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function NP(e,t,n){e.showMinorTicks||L(t,function(e){if(e&&e.label.ignore)for(var t=0;t=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}fN(nF,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r0&&v0?-2:-1,n.serUids=r}var nF=fN({ctor:uN},50);function rF(e){return function(t,n){var r=Rk(t,{fromStat:{key:e}});if(qs(r.w2))return[-r.w2/2,r.w2/2]}}function iF(e){return e+`|&`}function aF(e,t){return e+`|&`+t}function oF(e){return eF(),{liPosMinGap:!QE(e.scale)}}var sF=`pictorialBar`;function cF(e,t,n,r){hO(e,{key:t,seriesType:n,coordSysType:r,getMetrics:oF})}function lF(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var uF={left:0,right:0,top:0,bottom:0},dF=[`25%`,`25%`],fF=`cartesian2d`,pF=function(e){M(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=iv(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&rv(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&rv(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:uF,outerBoundsContain:`all`,outerBoundsClampWidth:dF[0],outerBoundsClampHeight:dF[1],backgroundColor:Z.color.transparent,borderWidth:1,borderColor:Z.color.neutral30},t}(sv),mF=Yc(),hF=`__ec_stack_`;function gF(e){return e.get(`stack`)||hF+e.seriesIndex}function _F(e){if(QE(e.axis.scale)){for(var t=Rk(e.axis),n=[],r=0;ro&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=ss(u,0);var d=0,f;L(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return L(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function xF(e){return{seriesType:e,overallReset:function(t){var n=aF(e,fF);cO(t,n,function(t){var r=vF(t,e);aO(t,n,function(e){var t=r.columnMap[gF(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function SF(e){return{seriesType:e,plan:Ex(),reset:function(e){if(YP(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=EE(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(lF(i))),p=CF(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&dN(r*3),c=p&&s&&dN(r*3),l=p&&dN(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,cs(k)s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},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`,defaultBarGap:`10%`},t}(hx);hx.registerClass(EF);var DF=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return AE(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=tl(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=_g(EF.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:Z.color.primary,borderWidth:2}},realtimeSort:!1}),t}(EF),OF=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),kF=function(e){M(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new OF},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-cMath.PI/2&&ua)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Vm(t,e,Vd(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(kx),RF={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=FF(t.x,e.x),s=IF(t.x+t.width,i),c=FF(t.y,e.y),l=IF(t.y+t.height,a),u=si?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=IF(t.r,e.r),a=FF(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},zF={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new Sd({shape:F({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?kF:em,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=AF(JF(i),{isRoundCap:l===kF}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Im:Lm)(u,{shape:p},a)}return u}};function BF(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function VF(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?Im:Lm)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Im:Lm)(n,{shape:l},u,i)}function HF(e,t){for(var n=0;n0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function qF(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function JF(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function YF(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;F(u,PF(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?iI(i,a.coordinateSystem):aI(i,a.coordinateSystem),p=Hh(r);Vh(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:XM(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,jF(e,h===`outside`?f:h,JF(o),r.get([`label`,`rotate`]))}$h(m,p,a.getRawValue(n),function(e){return ZM(t,e)});var g=r.getModel([`emphasis`]);$f(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),rp(e,r),qF(i)&&(e.style.fill=`none`,e.style.stroke=`none`,L(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function XF(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var ZF=function(){function e(){}return e}(),QF=function(e){M(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new ZF},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c=0?n:null},30,!1);function tI(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function nI(e,t,n){if(DN(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}else{var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function rI(e,t,n){return new(e.type===`polar`?em:Sd)({shape:nI(t,n,e),silent:!0,z2:0})}function iI(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function aI(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function oI(e){e.registerChartView(LF),e.registerSeriesModel(DF),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,xF(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,SF(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,eP(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),TF(e)}function sI(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:`legend`});if(!(!n||!n.length)){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),uI=Tc(),dI=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new lI(z(this.getData,this),z(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return cI(this,{coordDimensions:[`value`],encodeDefaulter:Be(xv,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=uI(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=As(a,n.hostModel.get(`percentPrecision`))}var o=e.prototype.getDataParams.call(this,t);return o.percent=i[t]||0,o.$vars.push(`percent`),o},t.prototype._defaultLabelLine=function(e){ic(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type=`series.pie`,t.defaultOption={z:2,legendHoverLink:!0,colorBy:`data`,center:[`50%`,`50%`],radius:[0,`50%`],clockwise:!0,startAngle:90,endAngle:`auto`,padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:`box`,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%`,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,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}(hx);I_({fullType:dI.type,getCoord2:function(e){return e.getShallow(`center`)}});var fI=Math.PI/180;function pI(e,t,n,r,i,a,o,s,c,l){if(e.length<2)return;function u(e){for(var a=e.rB,o=a*a,s=0;sn?o:a,d=Math.abs(c.label.y-n);if(d>=l.maxY){var f=c.label.x-t-c.len2*i,p=r+c.len;l.rB=Math.abs(f)e.unconstrainedWidth?null:f:null;r.setStyle(`width`,p)}gI(a,r)}}}function gI(e,t){vI.rect=e,EA(vI,t,_I)}var _I={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},vI={};function yI(e){return e.position===`center`}function bI(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*fI,s=t.getLayout(`viewRect`),c=t.getLayout(`r`),l=s.width,u=s.x,d=s.y,f=s.height;function p(e){e.ignore=!0}function m(e){if(!e.ignore)return!0;for(var t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){var s=t.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),g=s.getTextGuideLine(),_=t.getItemModel(e),v=_.getModel(`label`),y=v.get(`position`)||_.get([`emphasis`,`label`,`position`]),b=v.get(`distanceToLabelLine`),x=v.get(`alignTo`),S=X(v.get(`edgeDistance`),l),C=v.get(`bleedMargin`);C??=Math.min(l,f)>200?10:2;var w=_.getModel(`labelLine`),T=w.get(`length`);T=X(T,l);var E=w.get(`length2`);if(E=X(E,l),Math.abs(d.endAngle-d.startAngle)0?`right`:`left`:O>0?`left`:`right`}var se=Math.PI,ce=0,le=v.get(`rotate`);if(He(le))ce=se/180*le;else if(y===`center`)ce=0;else if(le===`radial`||le===!0)ce=O<0?-D+se:-D;else if(le===`tangential`||le===`tangential-noflip`&&y!==`outside`&&y!==`outer`){var ue=Math.atan2(O,k);ue<0&&(ue=se*2+ue),k>0&&le!==`tangential-noflip`&&(ue=se+ue),ce=ue-se}if(a=!!ce,h.x=A,h.y=j,h.rotation=ce,h.setStyle({verticalAlign:`middle`}),te){h.setStyle({align:M});var de=h.states.select;de&&(de.x+=h.x,de.y+=h.y)}else{var fe=new J(0,0,0,0);gI(fe,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new q(O,k),linePoints:ee,textAlign:M,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:fe,unconstrainedWidth:fe.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:te})}}),!a&&e.get(`avoidLabelOverlap`)&&mI(n,r,i,c,l,f,u,d);for(var h=0;hr?(l=O+x*r/2,u=l):(l=O+C,u=i-C),n.setItemLayout(t,{angle:r,startAngle:l,endAngle:u,clockwise:_,cx:a,cy:o,r0:c,r:v?_s(e,b,[c,s]):s}),O=i}),E0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l=n.r0}},t.type=`pie`,t}(kx);function OI(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension(`value`),r=n.get(t,e);return!(He(r)&&!isNaN(r)&&r<0)})}}}function kI(e){e.registerChartView(DI),e.registerSeriesModel(dI),TS(`pie`,e.registerAction),e.registerLayout(CI),e.registerProcessor(sI(`pie`)),e.registerProcessor(OI(`pie`))}var AI=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e,t){return AE(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?5e3:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?1e4:this.get(`progressiveThreshold`))},t.prototype.brushSelector=function(e,t,n){return n.point(t.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`,`matrix`],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:Z.color.primary}},universalTransition:{divideShape:`clone`}},t}(hx),jI=4,MI=function(){function e(){}return e}(),NI=function(e){M(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new MI},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.buildPath=function(e,t){var n=t.points,r=t.size,i=this.symbolProxy,a=i.shape,o=e.getContext?e.getContext():e,s=o&&r[0]=0;s--){var c=s*2,l=r[c]-a/2,u=r[c+1]-o/2;if(e>=l&&t>=u&&e<=l+a&&t<=u+o)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],a=r[1],o=1/0,s=1/0,c=-1/0,l=-1/0,u=0;u=0&&(c.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),FI=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,II(e)),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),el(t),II(t)),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),this._finished){var i=ZN(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(II(e))}else return{update:!0}},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return(!n||r!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=r?new PI:new iN,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type=`scatter`,t}(kx);function II(e){return{clipShape:EN(e)}}var LI=function(e){M(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,kc).models[0]},t.type=`cartesian2dAxis`,t}(sv);Ne(LI,YD);var RI={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:`auto`,onZeroAxisIndex:null,lineStyle:{color:Z.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},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,color:Z.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Z.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Z.color.backgroundTint,Z.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Z.color.neutral00,borderColor:Z.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},zI=De({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},RI),BI=De({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Z.color.axisMinorSplitLine,width:1}}},RI),VI={category:zI,value:BI,time:De({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},BI),log:I({logBase:10},BI)};function HI(e,t,n,r){L(AD,function(i,a){var o=De(De({},VI[a],!0),r,!0),s=function(e){M(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=nv(this),r=n?iv(e):{};De(e,t.getTheme().get(a+`Axis`)),De(e,this.getDefaultOption()),e.type=UI(e),n&&rv(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=FE.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=aP();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,UI)}function UI(e){return e.type||(e.data?`category`:`value`)}var WI=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return R(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Ie(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),GI=[`x`,`y`];function KI(e){return(e.type===`interval`||e.type===`time`)&&!Fg(e)}var qI=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=fF,t.dimensions=GI,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!KI(e)||!KI(t))){var n=HE(e,null),r=HE(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(!(!o||!s)){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=kn([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.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,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new J(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Rt(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Rt(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new J(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(WI);function JI(e,t){var n=e.scale,r=e.model,i=MO(n,r,r.ecModel,e,null),a=ZE(n),o=ZE(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=cs(l[0].value-l[1].value),g=cs(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(te(),k=Ss(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=Ss(ds(C[0]/E)*E,D),O=Ss(us(C[1]/E)*E,D);var e=ls((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=us(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}KD(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}var YI=[[3,1],[0,2]],XI=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=GI,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;L(this._axesList,function(e){EO(e,1);var t=e.scale;QE(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=Re(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):RO(i)}L(n,function(e){tL(e,e.__alignTo)?RO(e):JI(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};L(n.x,function(e){QI(n,`y`,e,i)}),L(n.y,function(e){QI(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=$_(e,t),i=this._rect=X_(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(rL(a,i),!n){var c=cL(i,o,a,s,t),l=void 0;if(s)aL?(aL(this._axesList,i),rL(a,i)):l=sL(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=uL(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=sL(d,f,p,i,a,c,r))}lL(i,a,_k.determine,null,l,r),L(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}U(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];JE(a.scale)&&WD(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&L(r,function(e){e.__alignTo=n})}function tL(e,t){return Fg(e.scale)||Fg(t.scale)||t.scale.getTicks().length<2}function nL(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function rL(e,t){L(e.x,function(e){return iL(e,t.x,t.width)}),L(e.y,function(e){return iL(e,t.y,t.height)})}function iL(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),nL(e,t)}var aL;function oL(e){aL=e}function sL(e,t,n,r,i,a,o){lL(r,i,_k.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=Le(s,function(e){return e>0})==null;return bh(r,s,!0,!0,n),rL(i,r),c;function l(e){L(i[Km[e]],function(t){if(UD(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!Ye(t)&&t>1e-4&&(e/=t),e}}function cL(e,t,n,r,i){var a=new bP(dL);return L(n,function(n){return L(n,function(n){if(UD(n.model)){var o=!r;n.axisBuilder=ZP(e,t,n.model,i,a,o)}})}),a}function lL(e,t,n,r,i,a){var o=n===_k.determine;L(t,function(t){return L(t,function(t){UD(t.model)&&(QP(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[Km[1-t]]=e[qm[t]]<=a.refContainer[qm[t]]*.5?0:1-t==1?2:1}L(t,function(e,t){return L(e,function(e){UD(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function uL(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=X_(e.get(`outerBounds`,!0)||uF,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||je([`all`,`axisLabel`],a)<0?`all`:a,s=[ys(W(e.get(`outerBoundsClampWidth`,!0),dF[0]),t.width),ys(W(e.get(`outerBoundsClampHeight`,!0),dF[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var dL=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;wP(e,t,n,r,i,a),HD(e.nameLocation)||L(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&EP(e.labelInfoList,e.dirVec,r,i)})};function fL(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return pL(n,e,t),n.seriesInvolved&&hL(n,e),n}function pL(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];L(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=SL(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(L(n.getAxes(),Be(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&L(f.baseAxes,Be(p,!d||`cross`,u)),d&&L(f.otherAxes,Be(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!xL(d))){s??=d.get(`triggerTooltip`),d=r?mL(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=SL(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:xL(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=gL(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function mL(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};L(s,function(e){c[e]=P(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&I(l,u.textStyle)}return e.model.getModel(`axisPointer`,new fg(c,n,r))}function hL(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);!n||!n.model||r===`none`||r===!1||r===`item`||i===!1||t.get([`axisPointer`,`show`],!0)===!1||L(e.coordSysAxesInfo[SL(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function gL(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function vL(e){var t=yL(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=xL(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o0;return o&&s}var BL=Tc();function VL(e,t,n,r){if(e instanceof nP&&e.scale.type!==`ordinal`)return n;var i=e.model,a=i.get(`jitter`);if(!(a>0))return n;var o=i.get(`jitterOverlap`),s=i.get(`jitterMargin`)||0,c=QE(e.scale)?Rk(e).w:null;return o?HL(n,a,c,r):UL(e,t,n,r,a,s)}function HL(e,t,n,r){if(n===null)return e+(Math.random()-.5)*t;var i=n-r*2,a=Math.min(Math.max(0,t),i);return e+(Math.random()-.5)*a}function UL(e,t,n,r,i,a){var o=BL(e);o.items||=[];var s=o.items,c=WL(s,t,n,r,i,a,1),l=WL(s,t,n,r,i,a,-1),u=Math.abs(c-n)i/2||d&&f>d/2-r?HL(n,i,d,r):(s.push({fixedCoord:t,floatCoord:u,r}),u)}function WL(e,t,n,r,i,a,o){for(var s=n,c=0;ci/2)return Number.MAX_VALUE;if(o===1&&m>s||o===-1&&m0&&!f.min?f.min=0:f.min!=null&&f.min<0&&!f.max&&(f.max=0);var p=s;f.color!=null&&(p=I({color:f.color},s));var m=De(P(f),{boundaryGap:e,splitNumber:t,clockwise:n,scale:r,axisLine:i,axisTick:a,axisLabel:o,name:f.text,showName:c,nameLocation:`end`,nameGap:u,nameTextStyle:p,triggerEvent:d},!1);if(H(l)){var h=m.name;m.name=l.replace(`{value}`,h??``)}else V(l)&&(m.name=l(m.name,m));var g=new fg(m,null,this.ecModel);return Ne(g,YD.prototype),g.mainType=`radar`,g.componentIndex=this.componentIndex,g.uid=mg(`ec_radar`),g},this);this._indicatorModels=f},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type=eR,t.defaultOption={z:0,center:[`50%`,`50%`],radius:`50%`,startAngle:90,clockwise:!1,axisName:{show:!0,color:Z.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:`polygon`,axisLine:De({lineStyle:{color:Z.color.neutral20}},QL.axisLine),axisLabel:nR(QL.axisLabel,!1),axisTick:nR(QL.axisTick,!1),splitLine:nR(QL.splitLine,!0),splitArea:nR(QL.splitArea,!0),indicator:[]},t}(sv),iR=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeAll(),this._buildAxes(e,n),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e,t){var n=e.coordinateSystem;L(R(n.getIndicatorAxes(),function(e){var r=e.model.get(`showName`)?e.name:``;return new DP(e.model,t,{axisName:r,position:[n.cx,n.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(e){e.build(),this.group.add(e.group)},this)},t.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(!n.length)return;var r=e.get(`shape`),i=e.getModel(`splitLine`),a=e.getModel(`splitArea`),o=i.getModel(`lineStyle`),s=a.getModel(`areaStyle`),c=i.get(`show`),l=a.get(`show`),u=o.get(`color`),d=s.get(`color`),f=B(u)?u:[u],p=B(d)?d:[d],m=[],h=[];function g(e,t,n){var r=n%t.length;return e[r]=e[r]||[],r}if(r===`circle`)for(var _=n[0].getTicksCoords(),v=t.cx,y=t.cy,b=0;b<_.length;b++){if(c){var x=g(m,f,b);m[x].push(new Fp({shape:{cx:v,cy:y,r:_[b].coord}}))}if(l&&b<_.length-1){var x=g(h,p,b);h[x].push(new nm({shape:{cx:v,cy:y,r0:_[b].coord,r:_[b+1].coord}}))}}else for(var S,C=R(n,function(e,n){var r=e.getTicksCoords();return S=S==null?r.length-1:Math.min(r.length-1,S),R(r,function(e){return t.coordToPoint(e.coord,n)})}),w=[],b=0;b<=S;b++){for(var T=[],E=0;E3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(gR(this._zr,`globalPan`)||bR(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(hn(r.event),r.__ecRoamConsumed=!0,DR(e,t,n,r,i))},t}(Ut);function bR(e){return e.__ecRoamConsumed}var xR=Tc();function SR(e){var t=xR(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function CR(e,t,n,r){for(var i=SR(e).roam,a=i[t]=i[t]||[],o=0;o=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&o!=null&&s!=null&&(u=ez(l,{x:0,y:0,width:o,height:s}),!t.ignoreViewBox)){var f=r;r=new Y,r.add(f),f.scaleX=f.scaleY=u.scale,f.x=u.x,f.y=u.y}return!t.ignoreRootClip&&o!=null&&s!=null&&r.setClipPath(new Sd({shape:{x:0,y:0,width:o,height:s}})),{root:r,width:o,height:s,viewBoxRect:l,viewBoxTransform:u,named:i}},e.prototype._parseNode=function(e,t,n,r,i,a){var o=e.nodeName.toLowerCase(),s,c=r;if(o===`defs`&&(i=!0),o===`text`&&(a=!0),o===`defs`||o===`switch`)s=t;else{if(!i){var l=AR[o];if(l&&K(AR,o)){s=l.call(this,e,t);var u=e.getAttribute(`name`);if(u){var d={name:u,namedFrom:null,svgNodeTagLower:o,el:s};n.push(d),o===`g`&&(c=d)}else r&&n.push({name:r.name,namedFrom:r,svgNodeTagLower:o,el:s});t.add(s)}}var f=IR[o];if(f&&K(IR,o)){var p=f.call(this,e),m=e.getAttribute(`id`);m&&(this._defs[m]=p)}}if(s&&s.isGroup)for(var h=e.firstChild;h;)h.nodeType===1?this._parseNode(h,s,n,c,i,a):h.nodeType===3&&a&&this._parseText(h,s),h=h.nextSibling},e.prototype._parseText=function(e,t){var n=new ud({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});zR(t,n),VR(e,n,this._defsUsePending,!1,!1),HR(n,t);var r=n.style,i=r.fontSize;i&&i<9&&(r.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9),r.font=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+`px`,r.fontFamily||`sans-serif`].join(` `);var a=n.getBoundingRect();return this._textX+=a.width,t.add(n),n},e.internalField=(function(){AR={g:function(e,t){var n=new Y;return zR(t,n),VR(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new Sd;return zR(t,n),VR(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute(`x`)||`0`),y:parseFloat(e.getAttribute(`y`)||`0`),width:parseFloat(e.getAttribute(`width`)||`0`),height:parseFloat(e.getAttribute(`height`)||`0`)}),n.silent=!0,n},circle:function(e,t){var n=new Fp;return zR(t,n),VR(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute(`cx`)||`0`),cy:parseFloat(e.getAttribute(`cy`)||`0`),r:parseFloat(e.getAttribute(`r`)||`0`)}),n.silent=!0,n},line:function(e,t){var n=new dm;return zR(t,n),VR(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute(`x1`)||`0`),y1:parseFloat(e.getAttribute(`y1`)||`0`),x2:parseFloat(e.getAttribute(`x2`)||`0`),y2:parseFloat(e.getAttribute(`y2`)||`0`)}),n.silent=!0,n},ellipse:function(e,t){var n=new Lp;return zR(t,n),VR(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute(`cx`)||`0`),cy:parseFloat(e.getAttribute(`cy`)||`0`),rx:parseFloat(e.getAttribute(`rx`)||`0`),ry:parseFloat(e.getAttribute(`ry`)||`0`)}),n.silent=!0,n},polygon:function(e,t){var n=e.getAttribute(`points`),r;n&&(r=BR(n));var i=new om({shape:{points:r||[]},silent:!0});return zR(t,i),VR(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n=e.getAttribute(`points`),r;n&&(r=BR(n));var i=new cm({shape:{points:r||[]},silent:!0});return zR(t,i),VR(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new md;return zR(t,n),VR(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute(`xlink:href`)||e.getAttribute(`href`),x:+e.getAttribute(`x`),y:+e.getAttribute(`y`),width:+e.getAttribute(`width`),height:+e.getAttribute(`height`)}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute(`x`)||`0`,r=e.getAttribute(`y`)||`0`,i=e.getAttribute(`dx`)||`0`,a=e.getAttribute(`dy`)||`0`;this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(r)+parseFloat(a);var o=new Y;return zR(t,o),VR(e,o,this._defsUsePending,!1,!0),o},tspan:function(e,t){var n=e.getAttribute(`x`),r=e.getAttribute(`y`);n!=null&&(this._textX=parseFloat(n)),r!=null&&(this._textY=parseFloat(r));var i=e.getAttribute(`dx`)||`0`,a=e.getAttribute(`dy`)||`0`,o=new Y;return zR(t,o),VR(e,o,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(a),o},path:function(e,t){var n=Ap(e.getAttribute(`d`)||``);return zR(t,n),VR(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}})(),e}(),IR={lineargradient:function(e){var t=new bm(parseInt(e.getAttribute(`x1`)||`0`,10),parseInt(e.getAttribute(`y1`)||`0`,10),parseInt(e.getAttribute(`x2`)||`10`,10),parseInt(e.getAttribute(`y2`)||`0`,10));return LR(e,t),RR(e,t),t},radialgradient:function(e){var t=new xm(parseInt(e.getAttribute(`cx`)||`0`,10),parseInt(e.getAttribute(`cy`)||`0`,10),parseInt(e.getAttribute(`r`)||`0`,10));return LR(e,t),RR(e,t),t}};function LR(e,t){e.getAttribute(`gradientUnits`)===`userSpaceOnUse`&&(t.global=!0)}function RR(e,t){for(var n=e.firstChild;n;){if(n.nodeType===1&&n.nodeName.toLocaleLowerCase()===`stop`){var r=n.getAttribute(`offset`),i=void 0;i=r&&r.indexOf(`%`)>0?parseInt(r,10)/100:r?parseFloat(r):0;var a={};QR(n,a,a);var o=a.stopColor||n.getAttribute(`stop-color`)||`#000000`,s=a.stopOpacity||n.getAttribute(`stop-opacity`);if(s){var c=yi(o);c&&c[3]&&(c[3]*=di(s),o=Ai(c,`rgba`))}t.colorStops.push({offset:i,color:o})}n=n.nextSibling}}function zR(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||={},I(t.__inheritedStyle,e.__inheritedStyle))}function BR(e){for(var t=qR(e),n=[],r=0;r0;a-=2){var o=r[a],s=r[a-1],c=qR(o);switch(i||=Sn(),s){case`translate`:En(i,i,[parseFloat(c[0]),parseFloat(c[1]||`0`)]);break;case`scale`:On(i,i,[parseFloat(c[0]),parseFloat(c[1]||c[0])]);break;case`rotate`:Dn(i,i,-parseFloat(c[0])*YR,[parseFloat(c[1]||`0`),parseFloat(c[2]||`0`)]);break;case`skewX`:var l=Math.tan(parseFloat(c[0])*YR);Tn(i,[1,0,l,1,0,0],i);break;case`skewY`:var u=Math.tan(parseFloat(c[0])*YR);Tn(i,[1,u,0,1,0,0],i);break;case`matrix`:i[0]=parseFloat(c[0]),i[1]=parseFloat(c[1]),i[2]=parseFloat(c[2]),i[3]=parseFloat(c[3]),i[4]=parseFloat(c[4]),i[5]=parseFloat(c[5]);break}}t.setLocalTransform(i)}}var ZR=/([^\s:;]+)\s*:\s*([^:;]+)/g;function QR(e,t,n){var r=e.getAttribute(`style`);if(r){ZR.lastIndex=0;for(var i;(i=ZR.exec(r))!=null;){var a=i[1],o=K(jR,a)?jR[a]:null;o&&(t[o]=i[2]);var s=K(NR,a)?NR[a]:null;s&&(n[s]=i[2])}}}function $R(e,t,n){for(var r=0;r1e-6;pB[0]=o?(i[0]-r.x)/a:i[0],pB[1]=o?(i[1]-r.y)/a:i[1],Rt(pB,pB,e.mtRawInv);var s=lB(e,pB);mB(t,s,a),L(n,function(e){e!==t&&mB(e,s.slice(),a)})}var pB=[];function mB(e,t,n){var r=e.option;r.center=t,r.zoom=n}function hB(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function gB(e,t){var n=t.getShallow(`nodeScaleRatio`,!0)||1,r=Sz(e);return((r.zoom-1)*n+1)/(r.trans[2].scaleX||1)}function _B(e,t,n,r,i,a,o,s){if(!iB(e)){n.disable();return}n.enable(W(e.get(`roam`),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:r,isInClip:function(e,t,n){return!i||i.contain(t,n)}}});function c(n){var r=e.mainType,i=Ph(I({type:xB(r,e.subType,Qd)},n));s&&(i.componentType=r),i[r+`Id`]=e.id,t.dispatchAction(i)}n.off(`pan`).off(`zoom`).on(`pan`,function(e){a&&a(`pan`),c({dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){a&&a(`zoom`),c({zoom:e.scale,originX:e.originX,originY:e.originY})})}function vB(e){return function(t,n,r){return yB.copy(e.getBoundingRect()),yB.applyTransform(e.getComputedTransform()),yB.contain(n,r)}}var yB=new J(0,0,0,0);function bB(e,t,n){var r=xB(t,n,Qd);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Mc(e,t,n),function(t){rB(e,t),aB(e,t,r,i)})})}function xB(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function SB(e){return e.zoom!=null}function CB(e,t,n,r,i,a,o){var s=new wz(null,dB(e.ecModel,t));return Iz(s,n,r,i,a),o?Lz(s,o.x,o.y,o.width,o.height):Lz(s,n,r,i,a),Fz(s,e),s}var wB=[`rect`,`circle`,`line`,`ellipse`,`polygon`,`polyline`,`path`],TB=G(wB),EB=G(wB.concat([`g`])),DB=G(wB.concat([`g`])),OB=Tc();function kB(e){var t=e.getItemStyle(),n=e.get(`areaColor`);return n!=null&&(t.fill=n),t}function AB(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var jB=function(){function e(e){var t=this.group=new Y,n=this._transformGroup=new Y;t.add(n),this.uid=mg(`ec_map_draw`),this._controller=new yR(e.getZr()),n.add(this._regionsGroup=new Y),n.add(this._svgGroup=new Y)}return e.prototype.draw=function(e,t,n,r,i){var a=this,o=e.getData&&e.getData();RB(e)&&t.eachComponent({mainType:`series`,subType:`map`},function(t){!o&&t.getHostGeoModel()===e&&(o=t.getData())});var s=e.coordinateSystem,c=s.view,l=this._regionsGroup,u=this._transformGroup,d=!l.childAt(0)||i,f;s.shouldClip()?(f=kz(null,c),this.group.setClipPath(new Sd({shape:f.clone()}))):this.group.removeClipPath(),$z(u,1,c,d?null:e);var p=o&&o.getVisual(`visualMeta`)&&o.getVisual(`visualMeta`).length>0;s.resourceType===`geoJSON`?this._buildGeoJSON(c,n,s,e,o,p):s.resourceType===`geoSVG`&&this._buildSVG(c,n,s,e,o,p),_B(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},f,function(){a._mouseDownFlag=!1},!1,!0),this._updateMapSelectHandler(e,l,n,r)},e.prototype.__updateOnOwnRoam=function(e){$z(this._transformGroup,1,e.coordinateSystem.view,null)},e.prototype._buildGeoJSON=function(e,t,n,r,i,a){var o=this._regionsGroupByName=G(),s=G(),c=this._regionsGroup,l=n.projection,u=l&&l.stream,d=oo(Az(null,e,0));function f(e,t){return t&&(e=t(e)),e&&Rt([],e,d)}function p(e){for(var t=[],n=!u&&l&&l.project,r=0;r=0)&&(u=e);var d=o?{normal:{align:`center`,verticalAlign:`middle`}}:null;Vh(n,Hh(i),{labelFetcher:u,labelDataIndex:l,defaultText:r},d);var f=n.getTextContent();if(f&&(OB(f).ignore=f.ignore,n.textConfig&&o)){var p=n.getBoundingRect().clone();n.textConfig.layoutRect=p,n.textConfig.position=[(o[0]-p.x)/p.width*100+`%`,(o[1]-p.y)/p.height*100+`%`]}n.disableLabelAnimation=!0}else n.removeTextContent(),n.removeTextConfig(),n.disableLabelAnimation=null}function PB(e,t,n,r,i,a){t?t.setItemGraphicEl(a,n):Vd(n).eventData={componentType:`geo`,componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:r,region:i&&i.option||{}}}function FB(e,t,n,r,i){t||Ch({el:n,componentModel:e,itemName:r,itemTooltipOption:i.get(`tooltip`)})}function IB(e,t,n,r){t.highDownSilentOnTouch=!!e.get(`selectedMode`);var i=r.getModel(`emphasis`),a=i.get(`focus`);return $f(t,a,i.get(`blurScope`),i.get(`disabled`)),RB(e)&&op(t,e,n),a}function LB(e,t,n){var r=[],i;function a(){i=[]}function o(){i.length&&(r.push(i),i=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(e,t){isFinite(e)&&isFinite(t)&&i.push([e,t])},sphere:function(){}});return!n&&s.polygonStart(),L(e,function(e){s.lineStart();for(var t=0;t-1&&(n.style.stroke=n.style.fill,n.style.fill=Z.color.neutral00,n.style.lineWidth=2),n},t.prototype.__ownRoamView=function(){return VB(this)?this.coordinateSystem.view:null},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:Z.color.tertiary},itemStyle:{borderWidth:.5,borderColor:Z.color.border,areaColor:Z.color.background},emphasis:{label:{show:!0,color:Z.color.primary},itemStyle:{areaColor:Z.color.highlight}},select:{label:{show:!0,color:Z.color.primary},itemStyle:{color:Z.color.highlight}},nameProperty:`name`},t}(hx);function BB(e){return e.indexOf(`i`)===0}function VB(e){return HB(e.seriesGroup)===e&&!e.getHostGeoModel()}function HB(e){return e.f[0]}function UB(e,t){var n={};return e.eachRawSeriesByType(`map`,function(r){var i=r.getHostGeoModel(),a=i?`o`+i.id:`i`+r.getMapType(),o=n[a]=n[a]||{f:[],r:[]};!e.isSeriesFiltered(r)&&!t&&o.f.push(r),o.r.push(r)}),n}var WB=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`map`,t}return t.prototype.render=function(e,t,n,r){if(!(r&&r.type===`mapToggleSelect`&&r.from===this.uid)){var i=this.group;if(i.removeAll(),!e.getHostGeoModel()){var a=this._mapDraw;a&&r&&r.type===`geoRoam`&&a.resetForLabelLayout(),r&&r.type===`geoRoam`&&r.componentType===`series`&&r.seriesId===e.id?a&&i.add(a.group):VB(e)?(a||=this._mapDraw=new jB(n),i.add(a.group),a.draw(e,t,n,this,r)):this._clearMapDraw(),e.get(`showLegendSymbol`)&&t.getComponent(`legend`)&&this._renderSymbols(e)}}},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=this._mapDraw;VB(t)&&r&&r.__updateOnOwnRoam(t)},t.prototype.remove=function(){this._clearMapDraw(),this.group.removeAll()},t.prototype.dispose=function(){this._clearMapDraw()},t.prototype._clearMapDraw=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e){var t=e.originalData,n=this.group;t.each(t.mapDimension(`value`),function(r,i){if(!isNaN(r)){var a=t.getItemLayout(i);if(!(!a||!a.point)){var o=a.point,s=a.offset,c=new Fp({style:{fill:e.getData().getVisual(`style`).fill},shape:{cx:o[0]+s*9,cy:o[1],r:3},silent:!0,z2:8+(s?0:11)});if(!s){var l=HB(e.seriesGroup).getData(),u=t.getName(i),d=l.indexOfName(u),f=t.getItemModel(i),p=f.getModel(`label`),m=l.getItemGraphicEl(d);Vh(c,Hh(f),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(d,n)}},defaultText:u}),c.disableLabelAnimation=!0,p.get(`position`)||c.setTextConfig({position:`bottom`}),m.onHoverStateChange=function(e){Tf(c,e)}}n.add(c)}}})},t.type=`map`,t}(kx),GB={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},KB=[`lng`,`lat`],qB=function(e){M(t,e);function t(t,n,r){var i=e.call(this)||this;i.dimensions=KB,i.type=`geo`,i._nameCoordMap=G(),i.name=t;var a=r.projection,o=xz.load(n,r.nameMap,r.nameProperty),s=xz.getGeoResource(n);i.resourceType=s?s.type:null;var c=i.regions=o.regions,l=GB[s.type];i._clip=r.clip,i.view=new wz(!a&&l.invertLongitute,dB(r.ecModel,r.api),i),i.map=n,i._regionsMap=o.regionsMap,i.regions=o.regions,i.projection=a;var u;if(a)for(var d=0;d1?(b.width=y,b.height=y/g):(b.height=y,b.width=y*g),b.y=v[1]-b.height/2,b.x=v[0]-b.width/2;else{var x=e.getBoxLayoutParams();x.aspect=g,b=X_(x,h),b=Z_(e,b,g)}Lz(n,b.x,b.y,b.width,b.height),Fz(n,e)}function XB(e,t){L(t.get(`geoCoord`),function(t,n){e.addGeoCoord(n,t)})}var ZB=new(function(){function e(){this.dimensions=KB}return e.prototype.create=function(e,t){var n=[];function r(e){return{nameProperty:e.get(`nameProperty`),aspectScale:e.get(`aspectScale`),projection:e.get(`projection`),clip:e.getShallow(`clip`,!0)}}return e.eachComponent(`geo`,function(i,a){var o=i.get(`map`),s=new qB(o+a,o,F({nameMap:i.get(`nameMap`),api:t,ecModel:e},r(i)));n.push(s),i.coordinateSystem=s,s.model=i,s.resize=YB,s.resize(i,t)}),e.eachSeries(function(e){B_({targetModel:e,coordSysType:`geo`,coordSysProvider:function(){var t=e.subType===`map`?e.getHostGeoModel():e.getReferringComponents(`geo`,kc).models[0];return t&&t.coordinateSystem},allowNotFound:!0})}),L(UB(e,!0),function(i,a){if(BB(a)){var o=i.r[0],s=[];L(i.r,function(e){s.push(e.get(`nameMap`)),e.seriesGroup=null});var c=a.slice(1),l=new qB(c,c,F({nameMap:Oe(s),api:t,ecModel:e},r(o))),u;L(i.r,function(e){u=W(u,e.get(`scaleLimit`))}),n.push(l),l.resize=YB,l.resize(o,t),L(i.r,function(e){e.coordinateSystem=l,XB(l,e)})}}),n},e.prototype.getFilledRegions=function(e,t,n,r){for(var i=(e||[]).slice(),a=G(),o=0;o=0;a--){var o=i[a];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},n.push(o)}}function lV(e,t){var n=e.isExpand?e.children:[],r=e.parentNode.children,i=e.hierNode.i?r[e.hierNode.i-1]:null;if(n.length){pV(e);var a=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-a):e.hierNode.prelim=a}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=mV(e,i,e.parentNode.hierNode.defaultAncestor||r[0],t)}function uV(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function dV(e){return arguments.length?e:yV}function fV(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function pV(e){for(var t=e.children,n=t.length,r=0,i=0;--n>=0;){var a=t[n];a.hierNode.prelim+=r,a.hierNode.modifier+=r,i+=a.hierNode.change,r+=a.hierNode.shift+i}}function mV(e,t,n,r){if(t){for(var i=e,a=e,o=a.parentNode.children[0],s=t,c=i.hierNode.modifier,l=a.hierNode.modifier,u=o.hierNode.modifier,d=s.hierNode.modifier;s=hV(s),a=gV(a),s&&a;){i=hV(i),o=gV(o),i.hierNode.ancestor=e;var f=s.hierNode.prelim+d-a.hierNode.prelim-l+r(s,a);f>0&&(vV(_V(s,e,n),e,f),l+=f,c+=f),d+=s.hierNode.modifier,l+=a.hierNode.modifier,c+=i.hierNode.modifier,u+=o.hierNode.modifier}s&&!hV(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=d-c),a&&!gV(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=l-u,n=e)}return n}function hV(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function gV(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function _V(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function vV(e,t,n){var r=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=r,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=r}function yV(e,t){return e.parentNode===t.parentNode?1:2}var bV=Tc();function xV(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,OV(t,n,e),L(n,function(n){L(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,Be(SV,e))})}),t.wrapMethod(`cloneShallow`,Be(wV,e)),L(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,Be(CV,e))}),et(n[t.dataType]===t)}function SV(e,t){if(DV(this)){var n=F({},bV(this).datas);n[this.dataType]=t,OV(t,n,e)}else kV(t,this.dataType,bV(this).mainData,e);return t}function CV(e,t){return e.struct&&e.struct.update(),t}function wV(e,t){return L(bV(t).datas,function(n,r){n!==t&&kV(n.cloneShallow(),r,t,e)}),t}function TV(e){var t=bV(this).mainData;return e==null||t==null?t:bV(t).datas[e]}function EV(){var e=bV(this).mainData;return e==null?[{data:e}]:R(Re(bV(e).datas),function(t){return{type:t,data:bV(e).datas[t]}})}function DV(e){return bV(e).mainData===e}function OV(e,t,n){bV(e).datas={},L(t,function(t,r){kV(t,r,e,n)})}function kV(e,t,n,r){bV(n).datas[t]=e,bV(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=TV,e.getLinkedDataAll=EV}var AV=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||``,this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){V(e)&&(n=t,t=e,e=null),e||={},H(e)&&(e={order:e});var r=e.order||`preorder`,i=this[e.attr||`children`],a;r===`preorder`&&(a=t.call(n,this));for(var o=0;!a&&ot&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var r=n.getData().tree.root,i=e.targetNode;if(H(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=r.getNodeById(a)))return{node:i}}}function PV(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function FV(e,t){return je(PV(e),t)>=0}function IV(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var LV=`tree`,RV=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.ignoreStyleOnData=!0,n}return t.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},n=new fg(e.leaves||{},this,this.ecModel),r=jV.createTree(t,this,i);function i(e){e.wrapMethod(`getItemModel`,function(e,t){var i=r.getNodeByDataIndex(t);return i&&i.children.length&&i.isExpand||(e.parentModel=n),e})}var a=0;r.eachNode(`preorder`,function(e){e.depth>a&&(a=e.depth)});var o=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:a;return r.root.eachNode(`preorder`,function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&t.collapsed!=null?!t.collapsed:e.depth<=o}),r.data},t.prototype.getOrient=function(){var e=this.get(`orient`);return e===`horizontal`?e=`LR`:e===`vertical`&&(e=`TB`),e},t.prototype.formatTooltip=function(e,t,n){for(var r=this.getData().tree,i=r.root.children[0],a=r.getNodeByDataIndex(e),o=a.getValue(),s=a.name;a&&a!==i;)s=a.parentNode.name+`.`+s,a=a.parentNode;return Jb(`nameValue`,{name:s,value:o,noValue:isNaN(o)||o==null})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=IV(r,this),n.collapsed=!r.isExpand,n},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type=`series.`+LV,t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystemUsage:`box`,left:`12%`,top:`12%`,right:`12%`,bottom:`12%`,layout:`orthogonal`,edgeShape:`curve`,edgeForkPosition:`50%`,roam:!1,roamTrigger:`global`,nodeScaleRatio:.4,center:null,zoom:1,orient:`LR`,symbol:`emptyCircle`,symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:Z.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:`lightsteelblue`,borderWidth:1.5},label:{show:!0},animationEasing:`linear`,animationDuration:700,animationDurationUpdate:500},t}(hx),zV=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),BV=function(e){M(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new zV},t.prototype.buildPath=function(e,t){var n=t.childPoints,r=n.length,i=t.parentPoint,a=n[0],o=n[r-1];if(r===1){e.moveTo(i[0],i[1]),e.lineTo(a[0],a[1]);return}var s=t.orient,c=s===`TB`||s===`BT`?0:1,l=1-c,u=X(t.forkPosition,1),d=[];d[c]=i[c],d[l]=i[l]+(o[l]-i[l])*u,e.moveTo(i[0],i[1]),e.lineTo(d[0],d[1]),e.moveTo(a[0],a[1]),d[c]=a[c],e.lineTo(d[0],d[1]),d[c]=o[c],e.lineTo(d[0],d[1]),e.lineTo(o[0],o[1]);for(var f=1;fv.x,x||(b-=Math.PI));var C=x?`left`:`right`,w=s.getModel(`label`),T=w.get(`rotate`),E=Math.PI/180*T,D=g.getTextContent();D&&(g.setTextConfig({position:w.get(`position`)||C,rotation:T==null?-b:E,origin:`center`}),D.setStyle(`verticalAlign`,`middle`))}var O=s.get([`emphasis`,`focus`]),k=O===`relative`?lt(o.getAncestorsIndices(),o.getDescendantIndices()):O===`ancestor`?o.getAncestorsIndices():O===`descendant`?o.getDescendantIndices():null;k&&(Vd(n).focus=k),WV(i,o,u,n,m,p,h,r),n.__edge&&(n.onHoverStateChange=function(t){if(t!==`blur`){var r=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);r&&r.hoverState===1||Tf(n.__edge,t)}})}function WV(e,t,n,r,i,a,o,s){var c=t.getModel(),l=e.get(`edgeShape`),u=e.get(`layout`),d=e.getOrient(),f=e.get([`lineStyle`,`curveness`]),p=e.get(`edgeForkPosition`),m=c.getModel(`lineStyle`).getLineStyle(),h=r.__edge;if(l===`curve`)t.parentNode&&t.parentNode!==n&&(h||=r.__edge=new hm({shape:JV(u,d,f,i,i)}),Im(h,{shape:JV(u,d,f,a,o)},e));else if(l===`polyline`&&u===`orthogonal`&&t!==n&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,_=[],v=0;v=0;a--)n.push(i[a])}}function ZV(e,t){e.eachSeriesByType(`tree`,function(e){QV(e,t)})}function QV(e,t){var n=$_(e,t).refContainer,r=X_(e.getBoxLayoutParams(),n);e.layoutInfo=r;var i=e.get(`layout`),a=0,o=0,s=null;i===`radial`?(a=2*Math.PI,o=Math.min(r.height,r.width)/2,s=dV(function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth})):(a=r.width,o=r.height,s=dV());var c=e.getData().tree.root,l=c.children[0];if(l){cV(c),YV(l,lV,s),c.hierNode.modifier=-l.hierNode.prelim,XV(l,uV);var u=l,d=l,f=l;XV(l,function(e){var t=e.getLayout().x;td.getLayout().x&&(d=e),e.depth>f.depth&&(f=e)});var p=u===d?1:s(u,d)/2,m=p-u.getLayout().x,h=0,g=0,_=0,v=0;if(i===`radial`)h=a/(d.getLayout().x+p+m),g=o/(f.depth-1||1),XV(l,function(e){_=(e.getLayout().x+m)*h,v=(e.depth-1)*g;var t=fV(_,v);e.setLayout({x:t.x,y:t.y,rawX:_,rawY:v},!0)});else{var y=e.getOrient();y===`RL`||y===`LR`?(g=o/(d.getLayout().x+p+m),h=a/(f.depth-1||1),XV(l,function(e){v=(e.getLayout().x+m)*g,_=y===`LR`?(e.depth-1)*h:a-(e.depth-1)*h,e.setLayout({x:_,y:v},!0)})):(y===`TB`||y===`BT`)&&(h=a/(d.getLayout().x+p+m),g=o/(f.depth-1||1),XV(l,function(e){_=(e.getLayout().x+m)*h,v=y===`TB`?(e.depth-1)*g:o-(e.depth-1)*g,e.setLayout({x:_,y:v},!0)}))}}}function $V(e){e.registerAction({type:`treeExpandAndCollapse`,event:`treeExpandAndCollapse`,update:`update`},function(e,t){t.eachComponent({mainType:Ud,subType:LV,query:e},function(t){var n=e.dataIndex,r=t.getData().tree.getNodeByDataIndex(n);r.isExpand=!r.isExpand})}),bB(e,Ud,LV)}var eH=nl(LV,tH);function tH(e){e.eachSeriesByType(LV,function(e){var t=e.getData();t.tree.eachNode(function(e){var n=e.getModel().getModel(`itemStyle`).getItemStyle();F(t.ensureUniqueItemVisual(e.dataIndex,`style`),n)})})}function nH(e){e.registerChartView(VV),e.registerSeriesModel(RV),e.registerLayout(ZV),e.registerVisual(eH),$V(e)}var rH=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function iH(e){for(var t=0;t1;)r=r.parentNode;var i=Mv(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var oH=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};sH(n);var r=e.levels||[],i=new fg({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=cH(r,t);var a=R(r||[],function(e){return new fg(e,i,t)},this),o=jV.createTree(n,this,s);function s(e){e.wrapMethod(`getItemModel`,function(e,t){var n=o.getNodeByDataIndex(t);return e.parentModel=(n?a[n.depth]:null)||i,e})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e);return Jb(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=IV(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},F(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=G(),this._idIndexMapCount=0);var n=t.get(e);return n??t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){aH(this)},t.type=`series.treemap`,t.layoutMode=`box`,t.defaultOption={progressive:0,coordinateSystemUsage:`box`,left:Z.size.l,top:Z.size.xxxl,right:Z.size.l,bottom:Z.size.xxxl,sort:!0,clipWindow:`origin`,squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:`▶`,zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:`global`,nodeClick:`zoomToNode`,animation:!0,animationDurationUpdate:900,animationEasing:`quinticInOut`,breadcrumb:{show:!0,height:22,left:`center`,bottom:Z.size.m,emptyItemWidth:25,itemStyle:{color:Z.color.backgroundShade,textStyle:{color:Z.color.secondary}},emphasis:{itemStyle:{color:Z.color.background}}},label:{show:!0,distance:0,padding:5,position:`inside`,color:Z.color.neutral00,overflow:`truncate`},upperLabel:{show:!1,position:[0,`50%`],height:20,overflow:`truncate`,verticalAlign:`middle`},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:Z.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,`50%`],overflow:`truncate`,verticalAlign:`middle`}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:`index`,visibleMin:10,childrenVisibleMin:null,levels:[]},t}(hx);function sH(e){var t=0;L(e.children,function(e){sH(e);var n=e.value;B(n)&&(n=n[0]),t+=n});var n=e.value;B(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),B(e.value)?e.value[0]=n:e.value=n}function cH(e,t){var n=rc(t.get(`color`)),r=rc(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;L(e,function(e){var t=new fg(e),n=t.get(`color`),r=t.get(`decal`);(t.get([`itemStyle`,`color`])||n&&n!==`none`)&&(i=!0),(t.get([`itemStyle`,`decal`])||r&&r!==`none`)&&(a=!0)});var o=e[0]||={};return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}}var lH=8,uH=8,dH=5,fH=function(){function e(e){this.group=new Y,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel(`breadcrumb`),a=this.group;if(a.removeAll(),!(!i.get(`show`)||!n)){var o=i.getModel(`itemStyle`),s=i.getModel(`emphasis`),c=o.getModel(`textStyle`),l=s.getModel([`itemStyle`,`textStyle`]),u=$_(e,t).refContainer,d={left:i.get(`left`),right:i.get(`right`),top:i.get(`top`),bottom:i.get(`bottom`)},f={emptyItemWidth:i.get(`emptyItemWidth`),totalWidth:0,renderList:[]},p=X_(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),ev(a,d,u)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=_c(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+lH*2,t.emptyItemWidth);t.totalWidth+=o+uH,t.renderList.push({node:r,text:i,width:o})}},e.prototype._renderContent=function(e,t,n,r,i,a,o,s){for(var c=0,l=t.emptyItemWidth,u=e.get([`breadcrumb`,`height`]),d=t.totalWidth,f=t.renderList,p=i.getModel(`itemStyle`).getItemStyle(),m=f.length-1;m>=0;m--){var h=f[m],g=h.node,_=h.width,v=h.text;d>n.width&&(d-=_-l,_=l,v=null);var y=new om({shape:{points:pH(c,0,_,u,m===f.length-1,m===0)},style:I(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new Dd({style:Uh(a,{text:v})}),textConfig:{position:`inside`},z2:10*1e4,onclick:Be(s,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=Uh(o,{text:v}),y.ensureState(`emphasis`).style=p,$f(y,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(y),mH(y,e,g),c+=_+uH}},e.prototype.remove=function(){this.group.removeAll()},e}();function pH(e,t,n,r,i,a){var o=[[i?e:e-dH,t],[e+n,t],[e+n,t+r],[i?e:e-dH,t+r]];return!a&&o.splice(2,0,[e+n+dH,t+r/2]),!i&&o.push([e,t+r/2]),o}function mH(e,t,n){Vd(e).eventData={componentType:`series`,componentSubType:`treemap`,componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:`treemap`,selfType:`breadcrumb`,nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&IV(n,t)}}var hH=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;r=0;c--){var l=i[r===`asc`?o-c-1:c].getValue();l/n*ts[1]&&(s[1]=t)})),{sum:r,dataExtent:s}}function AH(e,t,n){for(var r=0,i=1/0,a=0,o=void 0,s=e.length;ar&&(r=o));var c=e.area*e.area,l=t*t*n;return c?_H(l*r/c,c/(l*i)):1/0}function jH(e,t,n,r,i){var a=t===n.width?0:1,o=1-a,s=[`x`,`y`],c=[`width`,`height`],l=n[s[a]],u=t?e.area/t:0;(i||u>n[c[o]])&&(u=n[c[o]]);for(var d=0,f=e.length;dMs&&(u=Ms),i=c}uBH||Math.abs(e.dy)>BH)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:`treemapMove`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale,i=this.seriesModel;if(this._state!==`animating`){var a=i.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new J(o.x,o.y,o.width,o.height),c=i.layoutInfo,l=IH(c,o),u=l*r;u=LH(u,i);var d=u/l;t-=c.x,n-=c.y;var f=Sn();En(f,f,[-t,-n]),On(f,f,[d,d]),En(f,f,[t,n]),s.applyTransform(f),this.api.dispatchAction({type:`treemapRender`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var t=this;e.on(`click`,function(e){if(t._state===`ready`){var n=t.seriesModel.get(`nodeClick`,!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if(n===`zoomToNode`)t._zoomToNode(r);else if(n===`link`){var a=i.hostTree.data.getItemModel(i.dataIndex),o=a.get(`link`,!0),s=a.get(`target`,!0)||`blank`;o&&j_(o,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=e.get(`leafDepth`,!0)==null?this.findTarget(t.getWidth()/2,t.getHeight()/2):{node:e.getViewRoot()},n||={node:e.getData().tree.root}),(this._breadcrumb||=new fH(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&(FV(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=XH(),this._state=`ready`,this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:`treemapZoomToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:`treemapRootToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:`viewChildren`,order:`preorder`},function(r){var i=this._storage.background[r.getRawIndex()];if(i){var a=i.transformCoordToLocal(e,t),o=i.shape;if(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height)n={node:r,offsetX:a[0],offsetY:a[1]};else return!1}},this),n},t.type=`treemap`,t}(kx);function XH(){return{nodeGroup:[],background:[],content:[]}}function ZH(e,t,n,r,i,a,o,s,c,l){if(!o)return;var u=o.getLayout(),d=e.getData(),f=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!u||!u.isInView)return;var p=u.width,m=u.height,h=u.borderWidth,g=u.invisible,_=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,b=u.upperHeight,x=y&&y.length,S=f.getModel(`itemStyle`),C=f.getModel([`emphasis`,`itemStyle`]),w=f.getModel([`blur`,`itemStyle`]),T=f.getModel([`select`,`itemStyle`]),E=S.get(`borderRadius`)||0,D=se(`nodeGroup`,RH);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),JH(D).nodeWidth=p,JH(D).nodeHeight=m,u.isAboveViewRoot)return D;var O=se(`background`,zH,l,WH);O&&ne(D,O,x&&u.upperLabelHeight);var k=f.getModel(`emphasis`),A=k.get(`focus`),j=k.get(`blurScope`),ee=k.get(`disabled`),M=A===`ancestor`?o.getAncestorsIndices():A===`descendant`?o.getDescendantIndices():A;if(x)ap(D)&&ip(D,!1),O&&(ip(O,!ee),d.setItemGraphicEl(o.dataIndex,O),ep(O,M,j));else{var te=se(`content`,zH,l,GH);te&&re(D,te),O.disableMorphing=!0,O&&ap(O)&&ip(O,!1),ip(D,!ee),d.setItemGraphicEl(o.dataIndex,D);var N=f.getShallow(`cursor`);N&&te.attr(`cursor`,N),ep(D,M,j)}return D;function ne(t,n,r){var i=Vd(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)ie(n);else{n.invisible=!1;var a=o.getVisual(`style`),s=a.stroke,c=qH(S);c.fill=s;var l=KH(C);l.fill=C.get(`borderColor`);var u=KH(w);u.fill=w.get(`borderColor`);var d=KH(T);if(d.fill=T.get(`borderColor`),r){var f=p-2*h;ae(n,s,a.opacity,{x:h,y:0,width:f,height:b})}else n.removeTextContent();n.setStyle(c),n.ensureState(`emphasis`).style=l,n.ensureState(`blur`).style=u,n.ensureState(`select`).style=d,jf(n)}t.add(n)}function re(t,n){var r=Vd(n);r.dataIndex=o.dataIndex,r.seriesIndex=e.seriesIndex;var i=Math.max(p-2*h,0),a=Math.max(m-2*h,0);if(n.culling=!0,n.setShape({x:h,y:h,width:i,height:a,r:E}),g)ie(n);else{n.invisible=!1;var s=o.getVisual(`style`),c=s.fill,l=qH(S);l.fill=c,l.decal=s.decal;var u=KH(C),d=KH(w),f=KH(T);ae(n,c,s.opacity,null),n.setStyle(l),n.ensureState(`emphasis`).style=u,n.ensureState(`blur`).style=d,n.ensureState(`select`).style=f,jf(n)}t.add(n)}function ie(e){!e.invisible&&a.push(e)}function ae(t,n,r,i){var a=f.getModel(i?HH:VH),s=_c(f.get(`name`),null),c=a.getShallow(`show`);Vh(t,Hh(f,i?HH:VH),{defaultText:c?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:o.dataIndex});var l=t.getTextContent();if(l){var d=l.style,p=$e(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),l.disableLabelLayout=!0),l.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);(d.width!==e||d.height!==n)&&l.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow=`truncate`,oe(d,i,u);var m=l.getState(`emphasis`);oe(m?m.style:null,i,u)}}function oe(t,n,r){var i=t?t.text:null;if(!n&&r.isLeafRoot&&i!=null){var a=e.get(`drillDownIcon`,!0);t.text=a?a+` `+i:i}}function se(e,r,a,o){var s=v!=null&&n[e][v],c=i[e];return s?(n[e][v]=null,ce(c,s)):g||(s=new r,s instanceof eu&&(s.z2=QH(a,o)),le(c,s)),t[e][_]=s}function ce(e,t){var n=e[_]={};t instanceof RH?(n.oldX=t.x,n.oldY=t.y):n.oldShape=F({},t.shape)}function le(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof Y;if(a&&(!r||r.direction===`drillDown`)){var c=0,l=0,u=i.background[a.getRawIndex()];!r&&u&&u.oldShape&&(c=u.oldShape.width,l=u.oldShape.height),s?(n.oldX=0,n.oldY=l):n.oldShape={x:c,y:l,width:0,height:0}}n.fadein=!s}}function QH(e,t){return e*UH+t}var $H=L,eU=U,tU=-1,nU=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=P(t);this.type=r,this.mappingMethod=n,this._normalizeData=mU[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(aU(i),rU(i)):n===`category`?i.categories?iU(i):aU(i,!0):(et(n!==`linear`||i.dataExtent),aU(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return z(this._normalizeData,this)},e.listVisualTypes=function(){return Re(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){U(e)?L(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=B(t)?[]:U(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&$H(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(B(e))e=e.slice();else if(eU(e)){var t=[];$H(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a=0;a--)r[a]??(delete n[t[a]],t.pop())}function aU(e,t){var n=e.visual,r=[];U(n)?$H(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),pU(e,r)}function oU(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:dU([0,1])}}function sU(e){var t=this.option.visual;return t[Math.round(_s(e,[0,1],[0,t.length-1],!0))]||{}}function cU(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function lU(e){var t=this.option.visual;return t[this.option.loop&&e!==tU?e%t.length:e]}function uU(){return this.option.visual[0]}function dU(e){return{linear:function(t){return _s(t,e,this.option.visual,!0)},category:lU,piecewise:function(t,n){var r=fU.call(this,n);return r??=_s(t,e,this.option.visual,!0),r},fixed:uU}}function fU(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[nU.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function pU(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=R(t,function(e){return yi(e)||[0,0,0,1]})),t}var mU={linear:function(e){return _s(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=nU.findPieceIndex(e,t,!0);if(n!=null)return _s(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??tU},fixed:ft};function hU(e,t,n){return e?t<=n:t=n.length||e===n[e.depth])&&yU(e,EU(i,c,e,t,m,r),n,r)})}}}function bU(e,t,n){var r=F({},t),i=n.designatedVisualItemStyle;return L([`color`,`colorAlpha`,`colorSaturation`],function(n){i[n]=t[n];var a=e.get(n);i[n]=null,a!=null&&(r[n]=a)}),r}function xU(e){var t=CU(e,`color`);if(t){var n=CU(e,`colorAlpha`),r=CU(e,`colorSaturation`);return r&&(t=Oi(t,null,null,r)),n&&(t=ki(t,n)),t}}function SU(e,t){return t==null?null:Oi(t,null,null,e)}function CU(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function wU(e,t,n,r,i,a){if(!(!a||!a.length)){var o=TU(t,`color`)||i.color!=null&&i.color!==`none`&&(TU(t,`colorAlpha`)||TU(t,`colorSaturation`));if(o){var s=t.get(`visualMin`),c=t.get(`visualMax`),l=n.dataExtent.slice();s!=null&&sl[1]&&(l[1]=c);var u=t.get(`colorMappingBy`),d={type:o.name,dataExtent:l,visual:o.range};d.type===`color`&&(u===`index`||u===`id`)?(d.mappingMethod=`category`,d.loop=!0):d.mappingMethod=`linear`;var f=new nU(d);return _U(f).drColorMappingBy=u,f}}}function TU(e,t){var n=e.get(t);return B(n)&&n.length?{name:t,range:n}:null}function EU(e,t,n,r,i,a){var o=F({},t);if(i){var s=i.type,c=s===`color`&&_U(i).drColorMappingBy,l=c===`index`?r:c===`id`?a.mapIdToIndex(n.getId()):n.getValue(e.get(`visualDimension`));o[s]=i.mapValueToVisual(l)}return o}function DU(e){e.registerSeriesModel(oH),e.registerChartView(YH),e.registerVisual(vU),e.registerLayout(wH),iH(e)}function OU(e){return`_EC_`+e}var kU=function(){function e(e){this.type=`graph`,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=e==null?``+t:``+e;var n=this._nodesMap;if(!n[OU(e)]){var r=new AU(e,t);return r.hostGraph=this,this.nodes.push(r),n[OU(e)]=r,r}},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[OU(e)]},e.prototype.addEdge=function(e,t,n){var r=this._nodesMap,i=this._edgesMap;if(He(e)&&(e=this.nodes[e]),He(t)&&(t=this.nodes[t]),e instanceof AU||(e=r[OU(e)]),t instanceof AU||(t=r[OU(t)]),!(!e||!t)){var a=e.id+`-`+t.id,o=new jU(e,t,n);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),i[a]=o,o}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof AU&&(e=e.id),t instanceof AU&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+`-`+t]:n[e+`-`+t]||n[t+`-`+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,r=n.length,i=0;i=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof AU||(t=this._nodesMap[OU(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),jU=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=G(),t=G();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function MU(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}Ne(AU,MU(`hostGraph`,`data`)),Ne(jU,MU(`hostGraph`,`edgeData`));function NU(e,t,n,r,i){for(var a=new kU(r),o=0;o `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=AE(e,n);else{var h=P_.get(p),g=h&&h.dimensions||[];je(g,`value`)<0&&g.concat([`value`]);var _=_E(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new hE(_,n),m.initData(e)}var v=new hE([`value`],n);return v.initData(c,s),i&&i(m,v),xV({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var PU=`-->`,FU=function(e){return e.get(`autoCurveness`)||null},IU=function(e,t){var n=FU(e),r=20,i=[];if(He(n))r=n;else if(B(n)){e.__curvenessList=n;return}t>r&&(r=t);var a=r%2?r+2:r+3;i=[];for(var o=0;o `),value:i.value,noValue:i.value==null})}return ux({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=R(this.option.categories||[],function(e){return e.value==null?F({value:0},e):e}),t=new hE([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))},t.prototype.__ownRoamView=function(){var e=this.coordinateSystem;return Qz(e)&&e},t.type=`series.`+GU,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.defaultOption={z:2,coordinateSystem:`view`,legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:`center`,top:`center`,symbol:`circle`,symbolSize:10,edgeSymbol:[`none`,`none`],edgeSymbolSize:10,edgeLabel:{position:`middle`,distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:`{b}`},itemStyle:{},lineStyle:{color:Z.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:Z.color.primary}}},t}(hx);function qU(e){return e instanceof Array||(e=[e,e]),e}var JU=nl(GU,YU);function YU(e){e.eachSeriesByType(GU,function(e){var t=e.getGraph(),n=e.getEdgeData(),r=qU(e.get(`edgeSymbol`)),i=qU(e.get(`edgeSymbolSize`));n.setVisual(`fromSymbol`,r&&r[0]),n.setVisual(`toSymbol`,r&&r[1]),n.setVisual(`fromSymbolSize`,i&&i[0]),n.setVisual(`toSymbolSize`,i&&i[1]),n.setVisual(`style`,e.getModel(`lineStyle`).getLineStyle()),n.each(function(e){var r=n.getItemModel(e),i=t.getEdgeByIndex(e),a=qU(r.getShallow(`symbol`,!0)),o=qU(r.getShallow(`symbolSize`,!0)),s=r.getModel(`lineStyle`).getLineStyle(),c=n.ensureUniqueItemVisual(e,`style`);switch(F(c,s),c.stroke){case`source`:var l=i.node1.getVisual(`style`);c.stroke=l&&l.fill;break;case`target`:var l=i.node2.getVisual(`style`);c.stroke=l&&l.fill;break}a[0]&&i.setVisual(`fromSymbol`,a[0]),a[1]&&i.setVisual(`toSymbol`,a[1]),o[0]&&i.setVisual(`fromSymbolSize`,o[0]),o[1]&&i.setVisual(`toSymbolSize`,o[1])})})}function XU(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`)){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get(`x`),+t.get(`y`)])}),ZU(n,e)}}function ZU(e,t){e.eachEdge(function(e,n){var r=Ze(e.getModel().get([`lineStyle`,`curveness`]),-WU(e,t,n,!0),0),i=vt(e.node1.getLayout()),a=vt(e.node2.getLayout()),o=[i,a];+r&&o.push([(i[0]+a[0])/2-(i[1]-a[1])*r,(i[1]+a[1])/2-(a[0]-i[0])*r]),e.setLayout(o)})}var QU=nl(GU,$U);function $U(e,t){e.eachSeriesByType(GU,function(e){var t=e.get(`layout`),n=e.coordinateSystem;if(n&&n.type!==`view`){var r=e.getData(),i=[];L(n.dimensions,function(e){i=i.concat(r.mapDimensionsAll(e))});for(var a=0;a0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0].8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C;break}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(Y),DW=function(){function e(e){this.group=new Y,this._LineCtor=e||EW}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=kW(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=kW(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!OW(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i0}function kW(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Hh(t)}}function AW(e){return isNaN(e[0])||isNaN(e[1])}function jW(e){return e&&!AW(e[0])&&!AW(e[1])}var MW=[],NW=[],PW=[],FW=Kr,IW=Ft,LW=Math.abs;function RW(e,t,n){for(var r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1,u=.1;u<=.9;u+=.1){MW[0]=FW(r[0],i[0],a[0],u),MW[1]=FW(r[1],i[1],a[1],u);var d=LW(IW(MW,t)-c);d=0?s+=l:s-=l:m>=0?s-=l:s+=l}return s}function zW(e,t){var n=[],r=Xr,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){var c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[vt(c[0]),vt(c[1])],c[2]&&c.__original.push(vt(c[2])));var d=c.__original;if(c[2]!=null){if(_t(i[0],d[0]),_t(i[1],d[2]),_t(i[2],d[1]),l&&l!==`none`){var f=tW(e.node1),p=RW(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){var f=tW(e.node2),p=RW(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}_t(c[0],i[0]),_t(c[1],i[2]),_t(c[2],i[1])}else{if(_t(a[0],d[0]),_t(a[1],d[1]),St(o,a[1],a[0]),jt(o,o),l&&l!==`none`){var f=tW(e.node1);xt(a[0],a[0],o,f*t)}if(u&&u!==`none`){var f=tW(e.node2);xt(a[1],a[1],o,-f*t)}_t(c[0],a[0]),_t(c[1],a[1])}})}var BW=Tc();function VW(e){if(e)return BW(e).bridge}function HW(e,t){e&&(BW(e).bridge=t)}var UW=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=GU,t}return t.prototype.init=function(e,t){var n=new iN,r=new DW,i=this.group,a=new Y;this._controller=new yR(t.getZr()),a.add(n.group),a.add(r.group),i.add(a),this._symbolDraw=n,this._lineDraw=r,this._mainGroup=a,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=iB(e),a=!1;this._model=e,this._api=n,this._active=!0;var o=this._mainGroup,s=this._getThumbnailInfo();s&&s.bridge.reset(n);var c=this._symbolDraw,l=this._lineDraw;i&&$z(o,2,i,this._firstRender?null:e),zW(e.getGraph(),eW(e));var u=e.getData();c.updateData(u);var d=e.getEdgeData();l.updateData(d),this._updateNodeAndLinkScale(),i&&_B(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},null),clearTimeout(this._layoutTimeout);var f=e.forceLayout,p=e.get([`force`,`layoutAnimation`]);f&&(a=!0,this._startForceLayoutIteration(f,n,p));var m=e.get(`layout`);u.graph.eachNode(function(t){var i=t.dataIndex,a=t.getGraphicEl(),o=t.getModel();if(a){a.off(`drag`).off(`dragend`);var s=o.get(`draggable`);s&&a.on(`drag`,function(o){switch(m){case`force`:f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,n,p),f.setFixed(i),u.setItemLayout(i,[a.x,a.y]);break;case`circular`:u.setItemLayout(i,[a.x,a.y]),t.setLayout({fixed:!0},!0),iW(e,`symbolSize`,t,[o.offsetX,o.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(i,[a.x,a.y]),ZU(e.getGraph(),e),r.updateLayout(e);break}}).on(`dragend`,function(){f&&f.setUnfixed(i)}),a.setDraggable(s,!!o.get(`cursor`)),o.get([`emphasis`,`focus`])===`adjacency`&&(Vd(a).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&(Vd(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var h=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),g=u.getLayout(`cx`),_=u.getLayout(`cy`);u.graph.eachNode(function(e){oW(e,h,g,_)}),this._firstRender=!1,a||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(e,t,n){var r=this,i=!1;(function a(){e.step(function(e){r.updateLayout(r._model),(e||!i)&&(i=!0,r._renderThumbnail(r._model,t,r._symbolDraw,r._lineDraw)),(r._layouting=!e)&&(n?r._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=iB(t);!this._active||!r||($z(this._mainGroup,2,r,null),SB(e)&&(this._updateNodeAndLinkScale(),zW(t.getGraph(),eW(t)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=eW(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(zW(e.getGraph(),eW(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,t=e.coordinateSystem;if(t.type===`view`){var n=VW(e);if(n)return{bridge:n,coordSys:t}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(Ez(null,e.coordSys),this._api)},t.prototype._renderThumbnail=function(e,t,n,r){var i=this._getThumbnailInfo();if(i){var a=new Y,o=n.group.children(),s=r.group.children(),c=new Y,l=new Y;a.add(l),a.add(c);for(var u=0;u `),value:r.value,noValue:r.value==null})}return Jb(`nameValue`,{name:r.name,value:r.value,noValue:r.value==null})},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);if(n===`node`){var i=this.getData(),a=this.getGraph().getNodeByIndex(t);r.name??=i.getName(t),r.value??=a.getLayout().value}return r},t.type=`series.`+YW,t.defaultOption={z:2,coordinateSystem:`none`,legendHoverLink:!0,colorBy:`data`,left:0,top:0,right:0,bottom:0,width:null,height:null,center:[`50%`,`50%`],radius:[`70%`,`80%`],clockwise:!0,startAngle:90,endAngle:`auto`,minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:`source`,opacity:.2},label:{show:!0,position:`outside`,distance:5},emphasis:{focus:`adjacency`,lineStyle:{opacity:.5}}},t}(hx),ZW=function(e){M(t,e);function t(t,n,r){var i=e.call(this)||this;Vd(i).dataType=`node`,i.z2=2;var a=new Dd;return i.setTextContent(a),i.updateData(t,n,r,!0),i}return t.prototype.updateData=function(e,t,n,r){var i=this,a=e.graph.getNodeByIndex(t),o=e.hostModel,s=a.getModel(),c=s.getModel(`emphasis`),l=e.getItemLayout(t),u=F(PF(s.getModel(`itemStyle`),l,!0),l),d=this;if(isNaN(u.startAngle)){d.setShape(u);return}r?d.setShape(u):Im(d,{shape:u},o,t);var f=F(PF(s.getModel(`itemStyle`),l,!0),l);i.setShape(f),i.useStyle(e.getItemVisual(t,`style`)),rp(i,s),this._updateLabel(o,s,a),e.setItemGraphicEl(t,d),rp(d,s,`itemStyle`);var p=c.get(`focus`);$f(this,p===`adjacency`?a.getAdjacentDataIndices():p,c.get(`blurScope`),c.get(`disabled`))},t.prototype._updateLabel=function(e,t,n){var r=this.getTextContent(),i=n.getLayout(),a=(i.startAngle+i.endAngle)/2,o=Math.cos(a),s=Math.sin(a),c=t.getModel(`label`);r.ignore=!c.get(`show`);var l=Hh(t),u=n.getVisual(`style`);Vh(r,l,{labelFetcher:{getFormattedLabel:function(n,r,i,a,o,s){return e.getFormattedLabel(n,r,`node`,a,Ze(o,l.normal&&l.normal.get(`formatter`),t.get(`name`)),s)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+``,inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:`startArc`});var d=c.get(`position`)||`outside`,f=c.get(`distance`)||0,p=d===`outside`?i.r+f:(i.r+i.r0)/2;this.textConfig={inside:d!==`outside`};var m=d===`outside`?o>0?`left`:`right`:c.get(`align`)||`center`,h=d===`outside`?s>0?`top`:`bottom`:c.get(`verticalAlign`)||`middle`;r.attr({x:o*p+i.cx,y:s*p+i.cy,rotation:0,style:{align:m,verticalAlign:h}})},t}(em),QW=function(e){M(t,e);function t(t,n,r,i){var a=e.call(this)||this;return Vd(a).dataType=`edge`,a.updateData(t,n,r,i,!0),a}return t.prototype.buildPath=function(e,t){e.moveTo(t.s1[0],t.s1[1]);var n=.7,r=t.clockwise;e.arc(t.cx,t.cy,t.r,t.sStartAngle,t.sEndAngle,!r),e.bezierCurveTo((t.cx-t.s2[0])*n+t.s2[0],(t.cy-t.s2[1])*n+t.s2[1],(t.cx-t.t1[0])*n+t.t1[0],(t.cy-t.t1[1])*n+t.t1[1],t.t1[0],t.t1[1]),e.arc(t.cx,t.cy,t.r,t.tStartAngle,t.tEndAngle,!r),e.bezierCurveTo((t.cx-t.t2[0])*n+t.t2[0],(t.cy-t.t2[1])*n+t.t2[1],(t.cx-t.s1[0])*n+t.s1[0],(t.cy-t.s1[1])*n+t.s1[1],t.s1[0],t.s1[1]),e.closePath()},t.prototype.updateData=function(e,t,n,r,i){var a=e.hostModel,o=t.graph.getEdgeByIndex(n),s=o.getLayout(),c=o.node1.getModel(),l=t.getItemModel(o.dataIndex),u=l.getModel(`lineStyle`),d=l.getModel(`emphasis`),f=d.get(`focus`),p=F(PF(c.getModel(`itemStyle`),s,!0),s),m=this;if(isNaN(p.sStartAngle)||isNaN(p.tStartAngle)){m.setShape(p);return}i?(m.setShape(p),$W(m,o,e,u)):(Hm(m),$W(m,o,e,u),Im(m,{shape:p},a,n)),$f(this,f===`adjacency`?o.getAdjacentDataIndices():f,d.get(`blurScope`),d.get(`disabled`)),rp(m,l,`lineStyle`),t.setItemGraphicEl(o.dataIndex,m)},t}(cd);function $W(e,t,n,r){var i=t.node1,a=t.node2,o=e.style;switch(e.setStyle(r.getLineStyle()),r.get(`color`)){case`source`:o.fill=n.getItemVisual(i.dataIndex,`style`).fill,o.decal=i.getVisual(`style`).decal;break;case`target`:o.fill=n.getItemVisual(a.dataIndex,`style`).fill,o.decal=a.getVisual(`style`).decal;break;case`gradient`:var s=n.getItemVisual(i.dataIndex,`style`).fill,c=n.getItemVisual(a.dataIndex,`style`).fill;if(H(s)&&H(c)){var l=e.shape;o.fill=new bm((l.s1[0]+l.s2[0])/2,(l.s1[1]+l.s2[1])/2,(l.t1[0]+l.t2[0])/2,(l.t1[1]+l.t2[1])/2,[{offset:0,color:s},{offset:1,color:c}],!0)}break}}var eG=Math.PI/180,tG=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=YW,t}return t.prototype.init=function(e,t){},t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,a=this.group,o=-e.get(`startAngle`)*eG;if(r.diff(i).add(function(e){if(r.getItemLayout(e)){var t=new ZW(r,e,o);Vd(t).dataIndex=e,a.add(t)}}).update(function(t,n){var s=i.getItemGraphicEl(n);if(!r.getItemLayout(t)){s&&Vm(s,e,n);return}s?s.updateData(r,t,o):s=new ZW(r,t,o),a.add(s)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&Vm(n,e,t)}).execute(),!i){var s=e.get(`center`);this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=X(s[0],n.getWidth()),this.group.originY=X(s[1],n.getHeight()),Lm(this.group,{scaleX:1,scaleY:1},e)}this._data=r,this.renderEdges(e,o)},t.prototype.renderEdges=function(e,t){var n=e.getData(),r=e.getEdgeData(),i=this._edgeData,a=this.group;r.diff(i).add(function(e){var i=new QW(n,r,e,t);Vd(i).dataIndex=e,a.add(i)}).update(function(e,o){var s=i.getItemGraphicEl(o);s.updateData(n,r,e,t),a.add(s)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&Vm(n,e,t)}).execute(),this._edgeData=r},t.prototype.dispose=function(){},t.type=YW,t}(kx),nG=Math.PI/180,rG=nl(YW,iG);function iG(e,t){e.eachSeriesByType(YW,function(e){aG(e,t)})}function aG(e,t){var n=e.getData(),r=n.graph,i=e.getEdgeData();if(i.count()){var a=Y_(e,t),o=a.cx,s=a.cy,c=a.r,l=a.r0,u=Math.max((e.get(`padAngle`)||0)*nG,0),d=Math.max((e.get(`minAngle`)||0)*nG,0),f=-e.get(`startAngle`)*nG,p=f+Math.PI*2,m=e.get(`clockwise`),h=m?1:-1,g=[f,p];Iu(g,!m);var _=g[0],v=g[1]-_,y=n.getSum(`value`)===0&&i.getSum(`value`)===0,b=[],x=0;r.eachEdge(function(e){var t=y?1:e.getValue(`value`);y&&(t>0||d)&&(x+=2);var n=e.node1.dataIndex,r=e.node2.dataIndex;b[n]=(b[n]||0)+t,b[r]=(b[r]||0)+t});var S=0;if(r.eachNode(function(e){var t=e.getValue(`value`);isNaN(t)||(b[e.dataIndex]=Math.max(t,b[e.dataIndex]||0)),!y&&(b[e.dataIndex]>0||d)&&x++,S+=b[e.dataIndex]||0}),!(x===0||S===0)){u*x>=Math.abs(v)&&(u=Math.max(0,(Math.abs(v)-d*x)/x)),(u+d)*x>=Math.abs(v)&&(d=(Math.abs(v)-u*x)/x);var C=(v-u*x*h)/S,w=0,T=0,E=0,D=1/0;r.eachNode(function(e){var t=b[e.dataIndex]||0,n=C*(S?t:1)*h;Math.abs(n)T){var k=w/T;r.eachNode(function(e){var t=e.getLayout().angle;Math.abs(t)>=d?e.setLayout({angle:t*k,ratio:k},!0):e.setLayout({angle:d,ratio:d===0?1:t/d},!0)})}else r.eachNode(function(e){if(!O){var t=e.getLayout().angle;t-Math.min(t/E,1)*wd&&d>0){var n=O?1:Math.min(t/E,1),r=t-d,i=Math.min(r,Math.min(A,w*n));A-=i,e.setLayout({angle:t-i,ratio:(t-i)/t},!0)}else d>0&&e.setLayout({angle:d,ratio:t===0?1:d/t},!0)}});var j=_,ee=[];r.eachNode(function(e){var t=Math.max(e.getLayout().angle,d);e.setLayout({cx:o,cy:s,r0:l,r:c,startAngle:j,endAngle:j+t*h,clockwise:m},!0),ee[e.dataIndex]=j,j+=(t+u)*h}),r.eachEdge(function(e){var t=y?1:e.getValue(`value`),n=C*(S?t:1)*h,r=e.node1.dataIndex,i=ee[r]||0,a=i+Math.abs((e.node1.getLayout().ratio||1)*n)*h,c=[o+l*Math.cos(i),s+l*Math.sin(i)],u=[o+l*Math.cos(a),s+l*Math.sin(a)],d=e.node2.dataIndex,f=ee[d]||0,p=f+Math.abs((e.node2.getLayout().ratio||1)*n)*h,g=[o+l*Math.cos(f),s+l*Math.sin(f)],_=[o+l*Math.cos(p),s+l*Math.sin(p)];e.setLayout({s1:c,s2:u,sStartAngle:i,sEndAngle:a,t1:g,t2:_,tStartAngle:f,tEndAngle:p,cx:o,cy:s,r:l,value:t,clockwise:m}),ee[r]=a,ee[d]=p})}}}function oG(e){e.registerChartView(tG),e.registerSeriesModel(XW),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,rG),e.registerProcessor(sI(`chord`))}var sG=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),cG=function(e){M(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`pointer`,n}return t.prototype.getDefaultShape=function(){return new sG},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,i=t.r,a=t.width,o=t.angle,s=t.x-n(o)*a*(a>=i/3?1:2),c=t.y-r(o)*a*(a>=i/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,c),e.lineTo(t.x+n(o)*a,t.y+r(o)*a),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(o)*a,t.y-r(o)*a),e.lineTo(s,c)},t}(cd);function lG(e,t){var n=e.get(`center`),r=t.getWidth(),i=t.getHeight(),a=Math.min(r,i);return{cx:X(n[0],t.getWidth()),cy:X(n[1],t.getHeight()),r:X(e.get(`radius`),a/2)}}function uG(e,t){var n=e==null?``:e+``;return t&&(H(t)?n=t.replace(`{value}`,n):V(t)&&(n=t(e))),n}var dG=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeAll();var r=e.get([`axisLine`,`lineStyle`,`color`]),i=lG(e,n);this._renderMain(e,t,n,r,i),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,i){var a=this.group,o=e.get(`clockwise`),s=-e.get(`startAngle`)/180*Math.PI,c=-e.get(`endAngle`)/180*Math.PI,l=e.getModel(`axisLine`),u=l.get(`roundCap`)?kF:em,d=l.get(`show`),f=l.getModel(`lineStyle`),p=f.get(`width`),m=[s,c];Iu(m,!o),s=m[0],c=m[1];for(var h=c-s,g=s,_=[],v=0;d&&v=e&&(t===0?0:r[t-1][0])Math.PI/2&&(ie+=Math.PI)):re===`tangential`?ie=-S-Math.PI/2:He(re)&&(ie=re*Math.PI/180),ie===0?l.add(new Dd({style:Uh(_,{text:M,x:N,y:ne,verticalAlign:k<-.8?`top`:k>.8?`bottom`:`middle`,align:O<-.4?`left`:O>.4?`right`:`center`},{inheritColor:te}),silent:!0})):l.add(new Dd({style:Uh(_,{text:M,x:N,y:ne,verticalAlign:`middle`,align:`center`},{inheritColor:te}),silent:!0,originX:N,originY:ne,rotation:ie}))}if(g.get(`show`)&&A!==v){var j=g.get(`distance`);j=j?j+c:c;for(var ae=0;ae<=y;ae++){O=Math.cos(S),k=Math.sin(S);var oe=new dm({shape:{x1:O*(f-j)+u,y1:k*(f-j)+d,x2:O*(f-x-j)+u,y2:k*(f-x-j)+d},silent:!0,style:E});E.stroke===`auto`&&oe.setStyle({stroke:r((A+ae/y)/v)}),l.add(oe),S+=w}S-=w}else S+=C}},t.prototype._renderPointer=function(e,t,n,r,i,a,o,s,c){var l=this.group,u=this._data,d=this._progressEls,f=[],p=e.get([`pointer`,`show`]),m=e.getModel(`progress`),h=m.get(`show`),g=e.getData(),_=g.mapDimension(`value`),v=+e.get(`min`),y=+e.get(`max`),b=[v,y],x=[a,o];function S(t,n){var r=g.getItemModel(t).getModel(`pointer`),a=X(r.get(`width`),i.r),o=X(r.get(`length`),i.r),s=e.get([`pointer`,`icon`]),c=r.get(`offsetCenter`),l=X(c[0],i.r),u=X(c[1],i.r),d=r.get(`keepAspect`),f=s?XS(s,l-a/2,u-o,a,o,null,d):new cG({shape:{angle:-Math.PI/2,width:a,r:o,x:l,y:u}});return f.rotation=-(n+Math.PI/2),f.x=i.cx,f.y=i.cy,f}function C(e,t){var n=m.get(`roundCap`)?kF:em,r=m.get(`overlap`),o=r?m.get(`width`):c/g.count(),l=r?i.r-o:i.r-(e+1)*o,u=r?i.r:i.r-e*o,d=new n({shape:{startAngle:a,endAngle:t,cx:i.cx,cy:i.cy,clockwise:s,r0:l,r:u}});return r&&(d.z2=_s(g.get(_,e),[v,y],[100,0],!0)),d}(h||p)&&(g.diff(u).add(function(t){var n=g.get(_,t);if(p){var r=S(t,a);Lm(r,{rotation:-((isNaN(+n)?x[0]:_s(n,b,x,!0))+Math.PI/2)},e),l.add(r),g.setItemGraphicEl(t,r)}if(h){var i=C(t,a);Lm(i,{shape:{endAngle:_s(n,b,x,m.get(`clip`))}},e),l.add(i),Hd(e.seriesIndex,g.dataType,t,i),f[t]=i}}).update(function(t,n){var r=g.get(_,t);if(p){var i=u.getItemGraphicEl(n),o=i?i.rotation:a,s=S(t,o);s.rotation=o,Im(s,{rotation:-((isNaN(+r)?x[0]:_s(r,b,x,!0))+Math.PI/2)},e),l.add(s),g.setItemGraphicEl(t,s)}if(h){var c=d[n],v=C(t,c?c.shape.endAngle:a);Im(v,{shape:{endAngle:_s(r,b,x,m.get(`clip`))}},e),l.add(v),Hd(e.seriesIndex,g.dataType,t,v),f[t]=v}}).execute(),g.each(function(e){var t=g.getItemModel(e),n=t.getModel(`emphasis`),i=n.get(`focus`),a=n.get(`blurScope`),o=n.get(`disabled`),s=r(_s(g.get(_,e),b,[0,1],!0));if(p){var c=g.getItemGraphicEl(e),l=g.getItemVisual(e,`style`),u=l.fill;if(c instanceof md){var d=c.style;c.useStyle(F({image:d.image,x:d.x,y:d.y,width:d.width,height:d.height},l))}else c.useStyle(l),c.type!==`pointer`&&c.setColor(u);c.setStyle(t.getModel([`pointer`,`itemStyle`]).getItemStyle()),c.style.fill===`auto`&&c.setStyle(`fill`,s),c.z2EmphasisLift=0,rp(c,t),$f(c,i,a,o)}if(h){var m=f[e];m.useStyle(g.getItemVisual(e,`style`)),m.setStyle(t.getModel([`progress`,`itemStyle`]).getItemStyle()),m.style.fill===`auto`&&m.setStyle(`fill`,s),m.z2EmphasisLift=0,rp(m,t),$f(m,i,a,o)}}),this._progressEls=f)},t.prototype._renderAnchor=function(e,t){var n=e.getModel(`anchor`);if(n.get(`show`)){var r=n.get(`size`),i=n.get(`icon`),a=n.get(`offsetCenter`),o=n.get(`keepAspect`),s=XS(i,t.cx-r/2+X(a[0],t.r),t.cy-r/2+X(a[1],t.r),r,r,null,o);s.z2=+!!n.get(`showAbove`),s.setStyle(n.getModel(`itemStyle`).getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,i){var a=this,o=e.getData(),s=o.mapDimension(`value`),c=+e.get(`min`),l=+e.get(`max`),u=new Y,d=[],f=[],p=e.isAnimationEnabled(),m=e.get([`pointer`,`showAbove`]);o.diff(this._data).add(function(e){d[e]=new Dd({silent:!0}),f[e]=new Dd({silent:!0})}).update(function(e,t){d[e]=a._titleEls[t],f[e]=a._detailEls[t]}).execute(),o.each(function(t){var n=o.getItemModel(t),a=o.get(s,t),h=new Y,g=r(_s(a,[c,l],[0,1],!0)),_=n.getModel(`title`);if(_.get(`show`)){var v=_.get(`offsetCenter`),y=i.cx+X(v[0],i.r),b=i.cy+X(v[1],i.r),x=d[t];x.attr({z2:m?0:2,style:Uh(_,{x:y,y:b,text:o.getName(t),align:`center`,verticalAlign:`middle`},{inheritColor:g})}),h.add(x)}var S=n.getModel(`detail`);if(S.get(`show`)){var C=S.get(`offsetCenter`),w=i.cx+X(C[0],i.r),T=i.cy+X(C[1],i.r),E=X(S.get(`width`),i.r),D=X(S.get(`height`),i.r),O=e.get([`progress`,`show`])?o.getItemVisual(t,`style`).fill:g,x=f[t],k=S.get(`formatter`);x.attr({z2:m?0:2,style:Uh(S,{x:w,y:T,text:uG(a,k),width:isNaN(E)?null:E,height:isNaN(D)?null:D,align:`center`,verticalAlign:`middle`},{inheritColor:O})}),$h(x,{normal:S},a,function(e){return uG(e,k)}),p&&eg(x,t,o,e,{getFormattedLabel:function(e,t,n,r,i,o){return uG(o?o.interpolatedValue:a,k)}}),h.add(x)}u.add(h)}),this.group.add(u),this._titleEls=d,this._detailEls=f},t.type=`gauge`,t}(kx),fG=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath=`itemStyle`,n}return t.prototype.getInitialData=function(e,t){return cI(this,[`value`])},t.type=`series.gauge`,t.defaultOption={z:2,colorBy:`data`,center:[`50%`,`50%`],legendHoverLink:!0,radius:`75%`,startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,Z.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:Z.color.axisTick,width:3,type:`solid`}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:Z.color.axisTickMinor,width:1,type:`solid`}},axisLabel:{show:!0,distance:15,color:Z.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:`60%`,width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:`circle`,offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:Z.color.neutral00,borderWidth:0,borderColor:Z.color.theme[0]}},title:{show:!0,offsetCenter:[0,`20%`],color:Z.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:Z.color.transparent,borderWidth:0,borderColor:Z.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,`40%`],color:Z.color.primary,fontSize:30,fontWeight:`bold`,lineHeight:30,valueAnimation:!1}},t}(hx);function pG(e){e.registerChartView(dG),e.registerSeriesModel(fG)}var mG=`funnel`,hG=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new lI(z(this.getData,this),z(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return cI(this,{coordDimensions:[`value`],encodeDefaulter:Be(xv,this)})},t.prototype._defaultLabelLine=function(e){ic(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),i=n.mapDimension(`value`),a=n.getSum(i);return r.percent=a?+(n.get(i,t)/a*100).toFixed(2):0,r.$vars.push(`percent`),r},t.type=`series.`+mG,t.defaultOption={coordinateSystemUsage:`box`,z:2,legendHoverLink:!0,colorBy:`data`,left:80,top:60,right:80,bottom:65,minSize:`0%`,maxSize:`100%`,sort:`descending`,orient:`vertical`,gap:0,funnelAlign:`center`,label:{show:!0,position:`outer`},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:Z.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:Z.color.primary}}},t}(hx),gG=[`itemStyle`,`opacity`],_G=function(e){M(t,e);function t(t,n){var r=e.call(this)||this,i=r,a=new cm,o=new Dd;return i.setTextContent(o),r.setTextGuideLine(a),r.updateData(t,n,!0),r}return t.prototype.updateData=function(e,t,n){var r=this,i=e.hostModel,a=e.getItemModel(t),o=e.getItemLayout(t),s=a.getModel(`emphasis`),c=a.get(gG);c??=1,n||Hm(r),r.useStyle(e.getItemVisual(t,`style`)),r.style.lineJoin=`round`,n?(r.setShape({points:o.points}),r.style.opacity=0,Lm(r,{style:{opacity:c}},i,t)):Im(r,{style:{opacity:c},shape:{points:o.points}},i,t),rp(r,a),this._updateLabel(e,t),$f(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e,t){var n=this,r=this.getTextGuideLine(),i=n.getTextContent(),a=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,c=e.getItemVisual(t,`style`),l=c.fill;Vh(i,Hh(o),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:c.opacity,defaultText:e.getName(t)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}});var u=o.getModel(`label`).get(`color`)===`inherit`?l:null;n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var d=s.linePoints;r.setShape({points:d}),n.textGuideLineConfig={anchor:d?new q(d[0][0],d[0][1]):null},Im(i,{style:{x:s.x,y:s.y}},a,t),i.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),_A(n,vA(o),{stroke:l})},t}(om),vG=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=mG,t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,a=this.group;r.diff(i).add(function(e){var t=new _G(r,e);r.setItemGraphicEl(e,t),a.add(t)}).update(function(e,t){var n=i.getItemGraphicEl(t);n.updateData(r,e),a.add(n),r.setItemGraphicEl(e,n)}).remove(function(t){Vm(i.getItemGraphicEl(t),e,t)}).execute(),this._data=r},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type=mG,t}(kx);function yG(e,t){for(var n=e.mapDimension(`value`),r=e.mapArray(n,function(e){return e}),i=[],a=t===`ascending`,o=0,s=e.count();o-1&&(i=`left`),n&&je([`left`,`right`],i)>-1&&(i=`bottom`)),i===`left`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,h=p-_,u=h-5,l=`right`):i===`right`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,h=p+_,u=h+5,l=`left`):i===`top`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,g=m-_,d=g-5,l=`center`):i===`bottom`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,g=m+_,d=g+5,l=`center`):i===`rightTop`?(p=n?s[3][0]:s[1][0],m=n?s[3][1]:s[1][1],n?(g=m-_,d=g-5,l=`center`):(h=p+_,u=h+5,l=`top`)):i===`rightBottom`?(p=s[2][0],m=s[2][1],n?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`bottom`)):i===`leftTop`?(p=s[0][0],m=n?s[0][1]:s[1][1],n?(g=m-_,d=g-5,l=`center`):(h=p-_,u=h-5,l=`right`)):i===`leftBottom`?(p=n?s[1][0]:s[3][0],m=n?s[1][1]:s[2][1],n?(g=m+_,d=g+5,l=`center`):(h=p-_,u=h-5,l=`right`)):(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,n?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`left`)),n?(h=p,u=h):(g=m,d=g),f=[[p,m],[h,g]]}o.label={linePoints:f,x:u,y:d,verticalAlign:`middle`,textAlign:l,inside:c}})}var xG=nl(mG,SG);function SG(e,t){e.eachSeriesByType(mG,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=e.get(`sort`),a=$_(e,t),o=X_(e.getBoxLayoutParams(),a.refContainer),s=CG(e),c=o.width,l=o.height,u=yG(n,i),d=o.x,f=o.y,p=s?[X(e.get(`minSize`),l),X(e.get(`maxSize`),l)]:[X(e.get(`minSize`),c),X(e.get(`maxSize`),c)],m=n.getDataExtent(r),h=e.get(`min`),g=e.get(`max`);h??=Math.min(m[0],0),g??=m[1];var _=e.get(`funnelAlign`),v=e.get(`gap`),y=((s?c:l)-v*(n.count()-1))/n.count(),b=function(e,t){if(s){var i=_s(n.get(r,e)||0,[h,g],p,!0),a=void 0;switch(_){case`top`:a=f;break;case`center`:a=f+(l-i)/2;break;case`bottom`:a=f+(l-i);break}return[[t,a],[t,a+i]]}var o=_s(n.get(r,e)||0,[h,g],p,!0),u;switch(_){case`left`:u=d;break;case`center`:u=d+(c-o)/2;break;case`right`:u=d+c-o;break}return[[u,t],[u+o,t]]};i===`ascending`&&(y=-y,v=-v,s?d+=c:f+=l,u=u.reverse());for(var x=0;xVG)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);r.behavior!==`none`&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!(this._mouseDownPoint||!WG(this,`mousemove`))){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),r=n.behavior;r===`jump`&&this._throttledDispatchExpand.debounceNextCall(t.get(`axisExpandDebounce`)),this._throttledDispatchExpand(r===`none`?null:{axisExpandWindow:n.axisExpandWindow,animation:r===`jump`?null:{duration:0}})}}};function WG(e,t){var n=e._model;return n.get(`axisExpandable`)&&n.get(`axisExpandTriggerOn`)===t}var GG=`parallel`,KG=GG,qG=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&De(t,e,!0),this._initDimensions()},t.prototype.contains=function(e,t){var n=e.get(`parallelIndex`);return n!=null&&t.getComponent(`parallel`,n)===this},t.prototype.setAxisExpand=function(e){L([`axisExpandable`,`axisExpandCenter`,`axisExpandCount`,`axisExpandWidth`,`axisExpandWindow`],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[];L(Ie(this.ecModel.queryComponents({mainType:`parallelAxis`}),function(e){return(e.get(`parallelIndex`)||0)===this.componentIndex},this),function(n){e.push(`dim`+n.get(`dim`)),t.push(n.componentIndex)})},t.type=KG,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}(sv),JG=function(e){M(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.type=i||`value`,o.axisIndex=a,o}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get(`layout`)!==`horizontal`},t}(Hk);function YG(e,t,n,r,i,a){e||=0;var o=js(n[1],-n[0]);if(i!=null&&(i=ZG(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),r===`all`){var s=Math.abs(js(t[1],-t[0]));s=ZG(s,[0,o]),i=a=ZG(s,[i,a]),r=0}t[0]=ZG(t[0],n),t[1]=ZG(t[1],n);var c=XG(t,r);t[r]+=e;var l=i||0,u=n.slice();c.sign<0?u[0]=js(u[0],l):u[1]=js(u[1],-l),t[r]=ZG(t[r],u);var d=XG(t,r);return i!=null&&(d.sign!==c.sign||d.spana&&(t[1-r]=js(t[r],d.sign*a)),t}function XG(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function ZG(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var QG=function(){function e(e,t,n){this.type=GG,this._axesMap=G(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var r=e.dimensions,i=e.parallelAxisIndex;L(r,function(e,n){var r=i[n],a=t.getComponent(`parallelAxis`,r),o=MD(a),s=this._axesMap.set(e,new JG(e,ND(a,o,!1),[0,0],o,r));s.onBand=JD(s.scale,a),s.inverse=a.get(`inverse`),a.axis=s,s.model=a,s.coordinateSystem=a.coordinateSystem=this},this)},e.prototype.update=function(e,t){L(this.dimensions,function(e){var t=this._axesMap.get(e);EO(t,1),RO(t)},this)},e.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,r=t.layoutBase,i=t.pixelDimIndex,a=e[1-i],o=e[i];return a>=n&&a<=n+t.axisLength&&o>=r&&o<=r+t.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype.resize=function(e,t){var n=$_(e,t).refContainer;this._rect=X_(e.getBoxLayoutParams(),n),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=[`x`,`y`],r=[`width`,`height`],i=e.get(`layout`),a=i===`horizontal`?0:1,o=t[r[a]],s=[0,o],c=this.dimensions.length,l=$G(e.get(`axisExpandWidth`),s),u=$G(e.get(`axisExpandCount`)||0,[0,c]),d=e.get(`axisExpandable`)&&c>3&&c>u&&u>1&&l>0&&o>0,f=e.get(`axisExpandWindow`),p;f?(p=$G(f[1]-f[0],s),f[1]=f[0]+p):(p=$G(l*(u-1),s),f=[l*(e.get(`axisExpandCenter`)||us(c/2))-p/2],f[1]=f[0]+p);var m=(o-p)/(c-u);m<3&&(m=0);var h=[us(Ss(f[0]/l,1))+1,ds(Ss(f[1]/l,1))-1],g=m/l*f[0];return{layout:i,pixelDimIndex:a,layoutBase:t[n[a]],layoutLength:o,axisBase:t[n[1-a]],axisLength:t[r[1-a]],axisExpandable:d,axisExpandWidth:l,axisCollapseWidth:m,axisExpandWindow:f,axisCount:c,winInnerIndices:h,axisExpandWindow0Pos:g}},e.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,r=this._makeLayoutInfo(),i=r.layout;t.each(function(e){var t=[0,r.axisLength],n=+!!e.inverse;e.setExtent(t[n],t[1-n])}),L(n,function(t,n){var a=(r.axisExpandable?tK:eK)(n,r),o={horizontal:{x:a.position,y:r.axisLength},vertical:{x:0,y:a.position}},s={horizontal:hs/2,vertical:0},c=[o[i].x+e.x,o[i].y+e.y],l=s[i],u=Sn();Dn(u,u,l),En(u,u,c),this._axesLayout[t]={position:c,rotation:l,transform:u,axisNameAvailableWidth:a.axisNameAvailableWidth,axisLabelShow:a.axisLabelShow,nameTruncateMaxWidth:a.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(e){return this._axesMap.get(e)},e.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},e.prototype.eachActiveState=function(e,t,n,r){n??=0,r??=e.count();var i=this._axesMap,a=this.dimensions,o=[],s=[];L(a,function(t){o.push(e.mapDimension(t)),s.push(i.get(t).model)});for(var c=this.hasAxisBrushed(),l=n;li*(1-u[0])?(c=`jump`,s=o-i*(1-u[2])):(s=o-i*u[1])>=0&&(s=o-i*(1-u[1]))<=0&&(s=0),s*=t.axisExpandWidth/l,s?YG(s,r,a,`all`):c=`none`;else{var f=r[1]-r[0];r=[ss(0,a[1]*o/f-f/2)],r[1]=os(a[1],r[0]+f),r[0]=r[1]-f}return{axisExpandWindow:r,behavior:c}},e}();function $G(e,t){return os(ss(e,t[0]),t[1])}function eK(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function tK(e,t){var n=t.layoutLength,r=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,c=a,l=!1,u;return e=0;n--)ws(t[n])},t.prototype.getActiveState=function(e){var t=this.activeIntervals;if(!t.length)return`normal`;if(e==null||isNaN(+e))return`inactive`;if(t.length===1){var n=t[0];if(n[0]<=e&&e<=n[1])return`active`}else for(var r=0,i=t.length;ruK}function kK(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function AK(e,t,n,r){var i=new Y;return i.add(new Sd({name:`main`,style:PK(n),silent:!0,draggable:!0,cursor:`move`,drift:Be(zK,e,t,i,[`n`,`s`,`w`,`e`]),ondragend:Be(DK,t,{isEnd:!0})})),L(r,function(n){i.add(new Sd({name:n.join(``),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Be(zK,e,t,i,n),ondragend:Be(DK,t,{isEnd:!0})}))}),i}function jK(e,t,n,r){var i=r.brushStyle.lineWidth||0,a=sK(i,dK),o=n[0][0],s=n[1][0],c=o-i/2,l=s-i/2,u=n[0][1],d=n[1][1],f=u-a+i/2,p=d-a+i/2,m=u-o,h=d-s,g=m+i,_=h+i;NK(e,t,`main`,o,s,m,h),r.transformable&&(NK(e,t,`w`,c,l,a,_),NK(e,t,`e`,f,l,a,_),NK(e,t,`n`,c,l,g,a),NK(e,t,`s`,c,p,g,a),NK(e,t,`nw`,c,l,a,a),NK(e,t,`ne`,f,l,a,a),NK(e,t,`sw`,c,p,a,a),NK(e,t,`se`,f,p,a,a))}function MK(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(PK(n)),i.attr({silent:!r,cursor:r?`move`:`default`}),L([[`w`],[`e`],[`n`],[`s`],[`s`,`e`],[`s`,`w`],[`n`,`e`],[`n`,`w`]],function(n){var i=t.childOfName(n.join(``)),a=n.length===1?LK(e,n[0]):RK(e,n);i&&i.attr({silent:!r,invisible:!r,cursor:r?mK[a]+`-resize`:null})})}function NK(e,t,n,r,i,a,o){var s=t.childOfName(n);s&&s.setShape(UK(HK(e,t,[[r,i],[r+a,i+o]])))}function PK(e){return I({strokeNoScale:!0},e.brushStyle)}function FK(e,t,n,r){var i=[oK(e,n),oK(t,r)],a=[sK(e,n),sK(t,r)];return[[i[0],a[0]],[i[1],a[1]]]}function IK(e){return sh(e.group)}function LK(e,t){return{left:`w`,right:`e`,top:`n`,bottom:`s`}[lh({w:`left`,e:`right`,n:`top`,s:`bottom`}[t],IK(e))]}function RK(e,t){var n=[LK(e,t[0]),LK(e,t[1])];return(n[0]===`e`||n[0]===`w`)&&n.reverse(),n.join(``)}function zK(e,t,n,r,i,a){var o=n.__brushOption,s=e.toRectRange(o.range),c=VK(t,i,a);L(r,function(e){var t=pK[e];s[t[0]][t[1]]+=c[t[0]]}),o.range=e.fromRectRange(FK(s[0][0],s[1][0],s[0][1],s[1][1])),SK(t,n),DK(t,{isEnd:!1})}function BK(e,t,n,r){var i=t.__brushOption.range,a=VK(e,n,r);L(i,function(e){e[0]+=a[0],e[1]+=a[1]}),SK(e,t),DK(e,{isEnd:!1})}function VK(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),a=r.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function HK(e,t,n){var r=TK(e,t);return r&&r!==aK?r.clipPath(n,e._transform):P(n)}function UK(e){var t=oK(e[0][0],e[1][0]),n=oK(e[0][1],e[1][1]),r=sK(e[0][0],e[1][0]),i=sK(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}function WK(e,t,n){if(!(!e._brushType||ZK(e,t.offsetX,t.offsetY))){var r=e._zr,i=e._covers,a=wK(e,t,n);if(!e._dragging)for(var o=0;or.getWidth()||n<0||n>r.getHeight()}var QK={lineX:$K(0),lineY:$K(1),rect:{createCover:function(e,t){function n(e){return e}return AK({toRectRange:n,fromRectRange:n},e,t,[[`w`],[`e`],[`n`],[`s`],[`s`,`e`],[`s`,`w`],[`n`,`e`],[`n`,`w`]])},getCreatingRange:function(e){var t=kK(e);return FK(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){jK(e,t,n,r)},updateCommon:MK,contain:KK},polygon:{createCover:function(e,t){var n=new Y;return n.add(new cm({name:`main`,style:PK(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new om({name:`main`,draggable:!0,drift:Be(BK,e,t),ondragend:Be(DK,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:HK(e,t,n)})},updateCommon:MK,contain:KK}};function $K(e){return{createCover:function(t,n){return AK({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[[`w`],[`e`]],[[`n`],[`s`]]][e])},getCreatingRange:function(t){var n=kK(t);return[oK(n[0][e],n[1][e]),sK(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var a,o=TK(t,n);if(o!==aK&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var c=[r,a];e&&c.reverse(),jK(t,n,c,i)},updateCommon:MK,contain:KK}}function eq(e){return e=rq(e),function(t){return ph(t,e)}}function tq(e,t){return e=rq(e),function(n){var r=t??n,i=r?e.width:e.height,a=r?e.x:e.y;return[a,a+(i||0)]}}function nq(e,t,n){var r=rq(e);return function(e,i){return r.contain(i[0],i[1])&&!vR(e,t,n)}}function rq(e){return J.create(e)}var iq=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t,n){e.prototype.init.apply(this,arguments),(this._brushController=new _K(n.getZr())).on(`brush`,z(this._onBrush,this))},t.prototype.render=function(e,t,n,r){if(!aq(e,t,r)){this.axisModel=e,this.api=n,this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new Y,this.group.add(this._axisGroup),e.get(`show`)){var a=sq(e,t),o=a.coordinateSystem,s=e.getAreaSelectStyle(),c=s.width,l=e.axis.dim,u=o.getAxisLayout(l),d=F({strokeContainThreshold:c},u),f=new DP(e,n,d);f.build(),this._axisGroup.add(f.group),this._refreshBrushController(d,s,e,a,c,n),fh(i,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,t,n,r,i,a){var o=n.axis.getExtent(),s=o[1]-o[0],c=Math.min(30,Math.abs(s)*.1),l=J.create({x:o[0],y:-i/2,width:s,height:i});l.x-=c,l.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:`pl`,clipPath:eq(l),isTargetByCursor:nq(l,a,r),getLinearBrushOtherExtent:tq(l,0)}]).enableBrush({brushType:`lineX`,brushStyle:t,removeOnClick:!0}).updateCovers(oq(n))},t.prototype._onBrush=function(e){var t=e.areas,n=this.axisModel,r=n.axis,i=R(t,function(e){return[r.coordToData(e.range[0],!0),r.coordToData(e.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:`axisAreaSelect`,parallelAxisId:n.id,intervals:i})},t.prototype.dispose=function(){this._brushController.dispose()},t.type=`parallelAxis`,t}(Tx);function aq(e,t,n){return n&&n.type===`axisAreaSelect`&&t.findComponents({mainType:`parallelAxis`,query:n})[0]===e}function oq(e){var t=e.axis;return R(e.activeIntervals,function(e){return{brushType:`lineX`,panelId:`pl`,range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function sq(e,t){return t.getComponent(`parallel`,e.get(`parallelIndex`))}var cq={type:`axisAreaSelect`,event:`axisAreaSelected`};function lq(e){e.registerAction(cq,function(e,t){t.eachComponent({mainType:`parallelAxis`,query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),e.registerAction(`parallelAxisExpand`,function(e,t){t.eachComponent({mainType:`parallel`,query:e},function(t){t.setAxisExpand(e)})})}var uq={type:`value`,areaSelectStyle:{width:20,borderWidth:1,borderColor:`rgba(160,197,232)`,color:`rgba(160,197,232)`,opacity:.3},realtime:!0,z:10};function dq(e){e.registerComponentView(HG),e.registerComponentModel(qG),e.registerCoordinateSystem(`parallel`,rK),e.registerPreprocessor(RG),e.registerComponentModel(iK),e.registerComponentView(iq),HI(e,`parallel`,iK,uq),lq(e)}function fq(e){RT(dq),e.registerChartView(EG),e.registerSeriesModel(NG),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,LG)}var pq=`sankey`,mq=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[],i=e.levels||[];this.levelModels=[];for(var a=this.levelModels,o=0;o=0&&(a[i[o].depth]=new fg(i[o],this,t));return NU(r,n,this,!0,s).data;function s(e,t){e.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getData().getItemLayout(t);if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e}),t.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e})}},t.prototype.setNodePosition=function(e,t){var n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function r(e){return isNaN(e)||e==null}if(n===`edge`){var i=this.getDataParams(e,n),a=i.data,o=i.value;return Jb(`nameValue`,{name:a.source+` -- `+a.target,value:o,noValue:r(o)})}else{var s=this.getGraph().getNodeByIndex(e).getLayout().value,c=this.getDataParams(e,n).data.name;return Jb(`nameValue`,{name:c==null?null:c+``,value:s,noValue:r(s)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);return r.value==null&&n===`node`&&(r.value=this.getGraph().getNodeByIndex(t).getLayout().value),r},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type=`series.`+pq,t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystemUsage:`box`,left:`5%`,top:`5%`,right:`20%`,bottom:`5%`,orient:`horizontal`,nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:`global`,center:null,zoom:1,label:{show:!0,position:`right`,fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:`justify`,lineStyle:{color:Z.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:Z.color.primary}},animationEasing:`linear`,animationDuration:1e3},t}(hx),hq=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),gq=function(e){M(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new hq},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),t.orient===`vertical`?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){Pf(this)},t.prototype.downplay=function(){Ff(this)},t}(cd),_q=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=pq,t._mainGroup=new Y,t}return t.prototype.init=function(e,t){this._controller=new yR(t.getZr()),this.group.add(this._mainGroup),this._firstRender=!0},t.prototype.render=function(e,t,n){var r=e.getGraph(),i=this._mainGroup,a=e.layoutInfo,o=a.width,s=a.height,c=e.getData(),l=e.getData(`edge`),u=e.get(`orient`);i.removeAll(),i.x=a.x,i.y=a.y,this._updateViewCoordSys(e,n),_B(e,n,this._controller,vB(i),null),r.eachEdge(function(t){var n=new gq,r=Vd(n);r.dataIndex=t.dataIndex,r.seriesIndex=e.seriesIndex,r.dataType=`edge`;var a=t.getModel(),c=a.getModel(`lineStyle`),d=c.get(`curveness`),f=t.node1.getLayout(),p=t.node1.getModel(),m=p.get(`localX`),h=p.get(`localY`),g=t.node2.getLayout(),_=t.node2.getModel(),v=_.get(`localX`),y=_.get(`localY`),b=t.getLayout(),x,S,C,w,T,E,D,O;n.shape.extent=Math.max(1,b.dy),n.shape.orient=u,u===`vertical`?(x=(m==null?f.x:m*o)+b.sy,S=(h==null?f.y:h*s)+f.dy,C=(v==null?g.x:v*o)+b.ty,w=y==null?g.y:y*s,T=x,E=S*(1-d)+w*d,D=C,O=S*d+w*(1-d)):(x=(m==null?f.x:m*o)+f.dx,S=(h==null?f.y:h*s)+b.sy,C=v==null?g.x:v*o,w=(y==null?g.y:y*s)+b.ty,T=x*(1-d)+C*d,E=S,D=x*d+C*(1-d),O=w),n.setShape({x1:x,y1:S,x2:C,y2:w,cpx1:T,cpy1:E,cpx2:D,cpy2:O}),n.useStyle(c.getItemStyle()),vq(n.style,u,t);var k=``+a.get(`value`),A=Hh(a,`edgeLabel`);Vh(n,A,{labelFetcher:{getFormattedLabel:function(t,n,r,i,a,o){return e.getFormattedLabel(t,n,`edge`,i,Ze(a,A.normal&&A.normal.get(`formatter`),k),o)}},labelDataIndex:t.dataIndex,defaultText:k}),n.setTextConfig({position:`inside`});var j=a.getModel(`emphasis`);rp(n,a,`lineStyle`,function(e){var n=e.getItemStyle();return vq(n,u,t),n}),i.add(n),l.setItemGraphicEl(t.dataIndex,n);var ee=j.get(`focus`);$f(n,ee===`adjacency`?t.getAdjacentDataIndices():ee===`trajectory`?t.getTrajectoryDataIndices():ee,j.get(`blurScope`),j.get(`disabled`))}),r.eachNode(function(t){var n=t.getLayout(),r=t.getModel(),a=r.get(`localX`),l=r.get(`localY`),u=r.getModel(`emphasis`),d=r.get([`itemStyle`,`borderRadius`])||0,f=new Sd({shape:{x:a==null?n.x:a*o,y:l==null?n.y:l*s,width:n.dx,height:n.dy,r:d},style:r.getModel(`itemStyle`).getItemStyle(),z2:10});Vh(f,Hh(r),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(t,n,`node`)}},labelDataIndex:t.dataIndex,defaultText:t.id}),f.disableLabelAnimation=!0,f.setStyle(`fill`,t.getVisual(`color`)),f.setStyle(`decal`,t.getVisual(`style`).decal),rp(f,r),i.add(f),c.setItemGraphicEl(t.dataIndex,f),Vd(f).dataType=`node`;var p=u.get(`focus`);$f(f,p===`adjacency`?t.getAdjacentDataIndices():p===`trajectory`?t.getTrajectoryDataIndices():p,u.get(`blurScope`),u.get(`disabled`))}),c.eachItemGraphicEl(function(t,r){c.getItemModel(r).get(`draggable`)&&(t.drift=function(t,i){this.shape.x+=t,this.shape.y+=i,this.dirty(),n.dispatchAction({type:`dragNode`,seriesId:e.id,dataIndex:c.getRawIndex(r),localX:this.shape.x/o,localY:this.shape.y/s})},t.draggable=!0,t.cursor=`move`)}),!this._data&&e.isAnimationEnabled()&&i.setClipPath(yq(i.getBoundingRect(),e,function(){i.removeClipPath()})),this._data=e.getData(),this._firstRender=!1},t.prototype.__updateOnOwnRoam=function(e,t,n){$z(this.group,2,t.coordinateSystem,null)},t.prototype.dispose=function(){this._controller&&this._controller.dispose()},t.prototype._updateViewCoordSys=function(e,t){var n=e.layoutInfo,r=e.coordinateSystem=CB(e,t,n.x,n.y,n.width,n.height);$z(this.group,2,r,this._firstRender?null:e)},t.type=pq,t}(kx);function vq(e,t,n){switch(e.fill){case`source`:e.fill=n.node1.getVisual(`color`),e.decal=n.node1.getVisual(`style`).decal;break;case`target`:e.fill=n.node2.getVisual(`color`),e.decal=n.node2.getVisual(`style`).decal;break;case`gradient`:var r=n.node1.getVisual(`color`),i=n.node2.getVisual(`color`);H(r)&&H(i)&&(e.fill=new bm(0,0,+(t===`horizontal`),+(t===`vertical`),[{color:r,offset:0},{color:i,offset:1}]))}}function yq(e,t,n){var r=new Sd({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Lm(r,{shape:{width:e.width+20}},t,n),r}var bq=nl(pq,xq);function xq(e,t){e.eachSeriesByType(pq,function(e){var n=e.get(`nodeWidth`),r=e.get(`nodeGap`),i=$_(e,t).refContainer,a=X_(e.getBoxLayoutParams(),i);e.layoutInfo=a;var o=a.width,s=a.height,c=e.getGraph(),l=c.nodes,u=c.edges;Cq(l),Sq(l,u,n,r,o,s,Ie(l,function(e){return e.getLayout().value===0}).length===0?e.get(`layoutIterations`):0,e.get(`orient`),e.get(`nodeAlign`))})}function Sq(e,t,n,r,i,a,o,s,c){wq(e,t,n,i,a,s,c),kq(e,t,a,i,r,o,s),Hq(e,s)}function Cq(e){L(e,function(e){var t=Bq(e.outEdges,zq),n=Bq(e.inEdges,zq),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)})}function wq(e,t,n,r,i,a,o){for(var s=[],c=[],l=[],u=[],d=0,f=0;f=0;_&&g.depth>p&&(p=g.depth),h.setLayout({depth:_?g.depth:d},!0),a===`vertical`?h.setLayout({dy:n},!0):h.setLayout({dx:n},!0);for(var v=0;vd-1?p:d-1;o&&o!==`left`&&Eq(e,o,a,C),Oq(e,a===`vertical`?(i-n)/C:(r-n)/C,a)}function Tq(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function Eq(e,t,n,r){if(t===`right`){for(var i=[],a=e,o=0;a.length;){for(var s=0;s0;a--)c*=.99,Nq(s,c,o),Mq(s,i,n,r,o),Vq(s,c,o),Mq(s,i,n,r,o)}function Aq(e,t){var n=[],r=t===`vertical`?`y`:`x`,i=Ic(e,function(e){return e.getLayout()[r]});return ws(i.keys),L(i.keys,function(e){n.push(i.buckets.get(e))}),n}function jq(e,t,n,r,i,a){var o=1/0;L(e,function(e){var t=e.length,s=0;L(e,function(e){s+=e.getLayout().value});var c=a===`vertical`?(r-(t-1)*i)/s:(n-(t-1)*i)/s;c0&&(o=s.getLayout()[a]+c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]+s.getLayout()[d]+t;var p=i===`vertical`?r:n;if(c=l-t-p,c>0){o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0),l=o;for(var f=u-2;f>=0;--f)s=e[f],c=s.getLayout()[a]+s.getLayout()[d]+t-l,c>0&&(o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]}})}function Nq(e,t,n){L(e.slice().reverse(),function(e){L(e,function(e){if(e.outEdges.length){var r=Bq(e.outEdges,Pq,n)/Bq(e.outEdges,zq);if(isNaN(r)){var i=e.outEdges.length;r=i?Bq(e.outEdges,Fq,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-Rq(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-Rq(e,n))*t;e.setLayout({y:o},!0)}}})})}function Pq(e,t){return Rq(e.node2,t)*e.getValue()}function Fq(e,t){return Rq(e.node2,t)}function Iq(e,t){return Rq(e.node1,t)*e.getValue()}function Lq(e,t){return Rq(e.node1,t)}function Rq(e,t){return t===`vertical`?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function zq(e){return e.getValue()}function Bq(e,t,n){for(var r=0,i=e.length,a=-1;++aa&&(a=t)}),L(n,function(t){var n=new nU({type:`color`,mappingMethod:`linear`,dataExtent:[i,a],visual:e.get(`color`)}).mapValueToVisual(t.getLayout().value),r=t.getModel().get([`itemStyle`,`color`]);r==null?(t.setVisual(`color`,n),t.setVisual(`style`,{fill:n})):(t.setVisual(`color`,r),t.setVisual(`style`,{fill:r}))})}r.length&&L(r,function(e){var t=e.getModel().get(`lineStyle`);e.setVisual(`style`,t)})})}function Gq(e){e.registerChartView(_q),e.registerSeriesModel(mq),e.registerLayout(bq),e.registerVisual(Uq),e.registerAction({type:`dragNode`,event:`dragnode`,update:`update`},function(e,t){t.eachComponent({mainType:Ud,subType:pq,query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),bB(e,Ud,pq)}var Kq=function(){function e(){}return e.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},e.prototype.getInitialData=function(e,t){var n,r=t.getComponent(`xAxis`,this.get(`xAxisIndex`)),i=t.getComponent(`yAxis`,this.get(`yAxisIndex`)),a=r.get(`type`),o=i.get(`type`),s,c=e.layout;a===`category`?(c=`horizontal`,n=r.getOrdinalMeta(),s=!this._hasEncodeRule(`x`)):o===`category`&&(c=`vertical`,n=i.getOrdinalMeta(),s=!this._hasEncodeRule(`y`)),c||=o===`time`?`vertical`:`horizontal`,this._layout=c;var l=[`x`,`y`],u=c===`horizontal`?0:1,d=this._baseAxisDim=l[u],f=l[1-u],p=[r,i],m=p[u].get(`type`),h=p[1-u].get(`type`),g=e.data;if(g&&s){var _=[];L(g,function(e,t){var n;B(e)?(n=e.slice(),e.unshift(t)):B(e.value)?(n=F({},e),n.value=n.value.slice(),e.value.unshift(t)):n=e,_.push(n)}),e.data=_}var v=this.defaultValueDimensions,y=[{name:d,type:GT(m),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:[`base`]},{name:f,type:GT(h),dimsDef:v.slice()}];return cI(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:Be(bv,y,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+`Axis`,this.get(e+`AxisIndex`)).axis},e.prototype.getWhiskerBoxesLayout=function(){return this._layout},e}();function qq(e,t){for(var n=t.ends.length,r=0,i=0;ih){var b=[_,y];r.push(b)}}}return{boxData:n,outliers:r}}var lJ={type:`echarts:boxplot`,transform:function(e){var t=e.upstream;t.sourceFormat!==`arrayRows`&&$s(``);var n=cJ(t.getRawData(),e.config);return[{dimensions:[`ItemName`,`Low`,`Q1`,`Q2`,`Q3`,`High`],data:n.boxData},{data:n.outliers}]}};function uJ(e){e.registerSeriesModel(Yq),e.registerChartView(Xq),e.registerLayout(rJ),e.registerTransform(lJ),sJ(e)}var dJ=`candlestick`,fJ=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:`open`,defaultTooltip:!0},{name:`close`,defaultTooltip:!0},{name:`lowest`,defaultTooltip:!0},{name:`highest`,defaultTooltip:!0}],n}return t.prototype.getShadowDim=function(){return`open`},t.prototype.brushSelector=function(e,t,n){var r=t.getItemLayout(e);return r&&n.rect(r.brushRect)},t.type=`series.`+dJ,t.dependencies=[`xAxis`,`yAxis`,`grid`],t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:`#eb5454`,color0:`#47b262`,borderColor:`#eb5454`,borderColor0:`#47b262`,borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:`mod`,animationEasing:`linear`,animationDuration:300},t}(hx);Ne(fJ,Kq,!0);var pJ=[`itemStyle`,`borderColor`],mJ=[`itemStyle`,`borderColor0`],hJ=[`itemStyle`,`borderColorDoji`],gJ=[`itemStyle`,`color`],_J=[`itemStyle`,`color0`];function vJ(e,t){return t.get(e>0?gJ:_J)}function yJ(e,t){return t.get(e===0?hJ:e>0?pJ:mJ)}var bJ={seriesType:dJ,plan:Ex(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){for(var n;(n=e.next())!=null;){var r=t.getItemModel(n),i=t.getItemLayout(n).sign,a=r.getItemStyle();a.fill=vJ(i,r),a.stroke=yJ(i,r)||a.fill,F(t.ensureUniqueItemVisual(n,`style`),a)}}}}},xJ=[`color`,`borderColor`],SJ=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,t,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,t,n,r){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},t.prototype.eachRendered=function(e){Th(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e){var t=e.getData(),n=this._data,r=this.group,i=t.getLayout(`isSimpleBox`),a=e.get(`clip`,!0),o=e.coordinateSystem,s=o.getArea&&o.getArea(),c=a&&wN(o,!1,e);this._data||r.removeAll();var l=OJ(e);t.diff(n).add(function(n){if(t.hasValue(n)){var o=t.getItemLayout(n),u=a?qq(s,o):0;if(u===2)return;var d=TJ(o,n,l,!0);Lm(d,{shape:{points:o.ends}},e,n),TN(u===1,d,c),EJ(d,t,n,i),r.add(d),t.setItemGraphicEl(n,d)}}).update(function(o,u){var d=n.getItemGraphicEl(u);if(!t.hasValue(o)){r.remove(d);return}var f=t.getItemLayout(o),p=a?qq(s,f):0;if(p===2){r.remove(d);return}d?(Im(d,{shape:{points:f.ends}},e,o),Hm(d)):d=TJ(f,o,l),EJ(d,t,o,i),TN(p===1,d,c),r.add(d),t.setItemGraphicEl(o,d)}).remove(function(e){var t=n.getItemGraphicEl(e);t&&r.remove(t)}).execute(),this._data=t},t.prototype._renderLarge=function(e){this._clear(),jJ(e,this.group);var t=e.get(`clip`,!0)?wN(e.coordinateSystem,!1,e):null;TN(!!t,this.group,t)},t.prototype._incrementalRenderNormal=function(e,t){for(var n=t.getData(),r=n.getLayout(`isSimpleBox`),i=OJ(t),a;(a=e.next())!=null;){var o=TJ(n.getItemLayout(a),a,i);EJ(o,n,a,r),o.incremental=el(t),this.group.add(o),this._progressiveEls.push(o)}},t.prototype._incrementalRenderLarge=function(e,t){jJ(t,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),TN(!1,this.group,null),this._data=null},t.type=dJ,t}(kx),CJ=function(){function e(){}return e}(),wJ=function(e){M(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`normalCandlestickBox`,n}return t.prototype.getDefaultShape=function(){return new CJ},t.prototype.buildPath=function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t}(cd);function TJ(e,t,n,r){var i=e.ends;return new wJ({shape:{points:r?DJ(i,n,e):i},z2:100})}function EJ(e,t,n,r){var i=t.getItemModel(n);e.useStyle(t.getItemVisual(n,`style`)),e.style.strokeNoScale=!0;var a=i.getShallow(`cursor`);a&&e.attr(`cursor`,a),e.__simpleBox=r,rp(e,i);var o=t.getItemLayout(n).sign;L(e.states,function(e,t){var n=i.getModel(t),r=vJ(o,n),a=yJ(o,n)||r,s=e.style||={};r&&(s.fill=r),a&&(s.stroke=a)});var s=i.getModel(`emphasis`);$f(e,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))}function DJ(e,t,n){return R(e,function(e){return e=e.slice(),e[t]=n.initBaseline,e})}function OJ(e){return+(e.getWhiskerBoxesLayout()===`horizontal`)}var kJ=function(){function e(){}return e}(),AJ=function(e){M(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeCandlestickBox`,n}return t.prototype.getDefaultShape=function(){return new kJ},t.prototype.buildPath=function(e,t){for(var n=t.points,r=0;rh?x[a]:b[a],ends:w,brushRect:O(g,_,p)})}function E(e,n){var r=[];return r[i]=n,r[a]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(r)}function D(e,t,n){var a=t.slice(),o=t.slice();a[i]=oh(a[i]+r/2,1,!1),o[i]=oh(o[i]-r/2,1,!0),n?e.push(a,o):e.push(o,a)}function O(e,t,n){var o=E(e,n),s=E(t,n);return o[i]-=r/2,s[i]-=r/2,{x:o[0],y:o[1],width:a?r:s[0]-o[0],height:a?s[1]-o[1]:r}}function k(e){return e[i]=oh(e[i],1),e}}function m(n,r){for(var o=dN(n.count*4),c=0,p,m=[],h=[],g,_=r.getStore(),v=!!e.get([`itemStyle`,`borderColorDoji`]);(g=n.next())!=null;){var y=_.get(s,g),b=_.get(l,g),x=_.get(u,g),S=_.get(d,g),C=_.get(f,g);if(isNaN(y)||isNaN(S)||isNaN(C)){o[c++]=NaN,c+=3;continue}o[c++]=IJ(_,g,b,x,u,v),m[i]=y,m[a]=S,p=t.dataToPoint(m,null,h),o[c++]=p?p[0]:NaN,o[c++]=p?p[1]:NaN,m[a]=C,p=t.dataToPoint(m,null,h),o[c++]=p?p[1]:NaN}r.setLayout(`largePoints`,o)}}};function IJ(e,t,n,r,i,a){return n>r?-1:n0?e.get(i,t-1)<=r?1:-1:1}function LJ(e,t){var n=Rk(e.getBaseAxis(),{fromStat:{key:iF(dJ)},min:1}).w,r=X(W(e.get(`barMaxWidth`),n),n),i=X(W(e.get(`barMinWidth`),1),n),a=e.get(`barWidth`);return a==null?ss(os(n/2,r),i):X(a,n)}function RJ(e){PJ(e,function(){var t=iF(dJ);hO(e,{key:t,seriesType:dJ,getMetrics:oF}),AO(t,rF(t))})}function zJ(e){e.registerChartView(SJ),e.registerSeriesModel(fJ),e.registerPreprocessor(NJ),e.registerVisual(bJ),e.registerLayout(FJ),RJ(e)}function BJ(e,t){var n=t.rippleEffectColor||t.color;e.eachChild(function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType===`stroke`?n:null,fill:t.brushType===`fill`?n:null}})})}var VJ=function(e){M(t,e);function t(t,n){var r=e.call(this)||this,i=new QM(t,n),a=new Y;return r.add(i),r.add(a),r.updateData(t,n),r}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,r=e.rippleNumber,i=this.childAt(1),a=0;a0&&(a=this._getLineLength(r)/c*1e3),a!==this._period||o!==this._loop||s!==this._roundTrip){r.stopAnimation();var u=void 0;u=V(l)?l(n):l,r.__t>0&&(u=-a*r.__t),this._animateSymbol(r,a,u,o,s)}this._period=a,this._loop=o,this._roundTrip=s}},t.prototype._animateSymbol=function(e,t,n,r,i){if(t>0){e.__t=0;var a=this,o=e.animate(``,r).when(i?t*2:t,{__t:i?2:1}).delay(n).during(function(){a._updateSymbolPosition(e)});r||o.done(function(){a.remove(e)}),o.start()}},t.prototype._getLineLength=function(e){return Nt(e.__p1,e.__cp1)+Nt(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},t.prototype.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},t.prototype._updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,r=e.__cp1,i=e.__t<=1?e.__t:2-e.__t,a=[e.x,e.y],o=a.slice(),s=Kr,c=qr;a[0]=s(t[0],r[0],n[0],i),a[1]=s(t[1],r[1],n[1],i);var l=e.__t<=1?c(t[0],r[0],n[0],i):c(n[0],r[0],t[0],1-i),u=e.__t<=1?c(t[1],r[1],n[1],i):c(n[1],r[1],t[1],1-i);e.rotation=-Math.atan2(u,l)-Math.PI/2,(this._symbolType===`line`||this._symbolType===`rect`||this._symbolType===`roundRect`)&&(e.__lastT!==void 0&&e.__lastT=0&&!(r[o]<=t);o--);o=Math.min(o,i-2)}else{for(o=a;ot);o++);o=Math.min(o-1,i-2)}var s=(t-r[o])/(r[o+1]-r[o]),c=n[o],l=n[o+1];e.x=c[0]*(1-s)+s*l[0],e.y=c[1]*(1-s)+s*l[1];var u=e.__t<=1?l[0]-c[0]:c[0]-l[0],d=e.__t<=1?l[1]-c[1]:c[1]-l[1];e.rotation=-Math.atan2(d,u)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},t}(KJ),YJ=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),XJ=function(e){M(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new YJ},t.prototype.buildPath=function(e,t){var n=t.segs,r=t.curveness,i;if(t.polyline)for(i=this._off;i0){e.moveTo(n[i++],n[i++]);for(var o=1;o0){var d=(s+l)/2-(c-u)*r,f=(c+u)/2-(l-s)*r;e.quadraticCurveTo(d,f,l,u)}else e.lineTo(l,u)}this.incremental&&(this._off=i,this.notClear=!0)},t.prototype.findDataIndex=function(e,t){var n=this.shape,r=n.segs,i=n.curveness,a=this.style.lineWidth;if(n.polyline)for(var o=0,s=0;s0)for(var l=r[s++],u=r[s++],d=1;d0){if(Bu(l,u,(l+f)/2-(u-p)*i,(u+p)/2-(f-l)*i,f,p,a,e,t))return o}else if(Ru(l,u,f,p,a,e,t))return o;o++}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape.segs,n=1/0,r=1/0,i=-1/0,a=-1/0,o=0;o0&&(a.dataIndex=n+e.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),QJ={seriesType:`lines`,plan:Ex(),reset:function(e){var t=e.coordinateSystem;if(t){var n=e.get(`polyline`),r=e.pipelineContext.large;return{progress:function(i,a){var o=[];if(r){var s=void 0,c=i.end-i.start;if(n){for(var l=0,u=i.start;u0&&c&&s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)}),i.updateData(r);var l=e.get(`clip`,!0)&&wN(e.coordinateSystem,!1,e);l?this.group.setClipPath(l):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateLineDraw(r,e).incrementalPrepareUpdate(r),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData(),el(t)),this._finished=e.end===t.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,t,n){var r=e.getData(),i=this._lineDraw;if(!this._finished||!i||!i.updateLayout)return{update:!0};var a=QJ.reset(e,t,n);a.progress&&a.progress({start:0,end:r.count(),count:r.count()},r),i.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,t){var n=this._lineDraw,r=this._showEffect(t),i=!!t.get(`polyline`),a=t.pipelineContext.large;return(!n||r!==this._hasEffet||i!==this._isPolyline||a!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=a?new ZJ:new DW(i?r?JJ:qJ:r?KJ:EW),this._hasEffet=r,this._isPolyline=i,this._isLargeDraw=a),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get([`effect`,`show`])},t.prototype._clearLayer=function(e){var t=Lh(e);t&&this._lastZlevel!=null&&t.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.type=`lines`,t}(kx),eY=typeof Uint32Array>`u`?Array:Uint32Array,tY=typeof Float64Array>`u`?Array:Float64Array;function nY(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=R(t,function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),Oe([t,e[0],e[1]])}))}var rY=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath=`lineStyle`,n.visualDrawType=`stroke`,n}return t.prototype.init=function(t){t.data=t.data||[],nY(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(t){if(nY(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=lt(this._flatCoords,t.flatCoords),this._flatCoordsOffset=lt(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var t=this.getData().getItemModel(e);return t.option instanceof Array?t.option:t.getShallow(`coords`)},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[e*2],r=this._flatCoordsOffset[e*2+1],i=0;i `)}return Jb(`nameValue`,{name:o,value:i,noValue:i==null||isNaN(i)})},t.prototype.preventIncremental=function(){return!!this.get([`effect`,`show`])},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?1e4:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?2e4:this.get(`progressiveThreshold`))},t.prototype.getZLevelKey=function(){var e=this.getModel(`effect`),t=e.get(`trailLength`);return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get(`show`)&&t>0?t+``:``},t.type=`series.lines`,t.dependencies=[`grid`,`polar`,`geo`,`calendar`],t.defaultOption={coordinateSystem:`geo`,z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:[`none`,`none`],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:`circle`,symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:`end`},lineStyle:{opacity:.5}},t}(hx);function iY(e){return e instanceof Array||(e=[e,e]),e}var aY={seriesType:`lines`,reset:function(e){var t=iY(e.get(`symbol`)),n=iY(e.get(`symbolSize`)),r=e.getData();r.setVisual(`fromSymbol`,t&&t[0]),r.setVisual(`toSymbol`,t&&t[1]),r.setVisual(`fromSymbolSize`,n&&n[0]),r.setVisual(`toSymbolSize`,n&&n[1]);function i(e,t){var n=e.getItemModel(t),r=iY(n.getShallow(`symbol`,!0)),i=iY(n.getShallow(`symbolSize`,!0));r[0]&&e.setItemVisual(t,`fromSymbol`,r[0]),r[1]&&e.setItemVisual(t,`toSymbol`,r[1]),i[0]&&e.setItemVisual(t,`fromSymbolSize`,i[0]),i[1]&&e.setItemVisual(t,`toSymbolSize`,i[1])}return{dataEach:r.hasItemOption?i:null}}};function oY(e){e.registerChartView($J),e.registerSeriesModel(rY),e.registerLayout(QJ),e.registerVisual(aY)}var sY=256,cY=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=le.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,a){var o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(var p=0;p0){var E=a(v)?s:c;v>0&&(v=v*w+C),b[x++]=E[T],b[x++]=E[T+1],b[x++]=E[T+2],b[x++]=E[T+3]*v*256}else x+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||=le.createCanvas(),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=Z.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],a=0,o=0;o<256;o++)e[t](o/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r},e}();function lY(e,t,n){var r=e[1]-e[0];t=R(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(e){var r;for(r=a;r=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r=t[0]&&e<=t[1]}}var dY=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r;t.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):ON(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(ON(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Th(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=DN(a,`cartesian2d`),s=DN(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=Rk(f).w+.5,l=Rk(p).w+.5,u=f.scale.getExtent(),d=p.scale.getExtent()}for(var m=this.group,h=e.getData(),g=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),_=e.getModel([`blur`,`itemStyle`]).getItemStyle(),v=e.getModel([`select`,`itemStyle`]).getItemStyle(),y=e.get([`itemStyle`,`borderRadius`]),b=Hh(e),x=e.getModel(`emphasis`),S=x.get(`focus`),C=x.get(`blurScope`),w=x.get(`disabled`),T=o||s?[h.mapDimension(`x`),h.mapDimension(`y`),h.mapDimension(`value`)]:[h.mapDimension(`time`),h.mapDimension(`value`)],E=n;Eu[1]||Ad[1])continue;var j=a.dataToPoint([k,A]);D=new Sd({shape:{x:j[0]-c/2,y:j[1]-l/2,width:c,height:l},style:O})}else if(s){var ee=a.dataToLayout([h.get(T[0],E),h.get(T[1],E)]).rect;if(Ye(ee.x))continue;D=new Sd({z2:1,shape:ee,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var M=a.dataToLayout([h.get(T[0],E)]),ee=M.contentRect||M.rect;if(Ye(ee.x)||Ye(ee.y))continue;D=new Sd({z2:1,shape:ee,style:O})}if(h.hasItemOption){var te=h.getItemModel(E),N=te.getModel(`emphasis`);g=N.getModel(`itemStyle`).getItemStyle(),_=te.getModel([`blur`,`itemStyle`]).getItemStyle(),v=te.getModel([`select`,`itemStyle`]).getItemStyle(),y=te.get([`itemStyle`,`borderRadius`]),S=N.get(`focus`),C=N.get(`blurScope`),w=N.get(`disabled`),b=Hh(te)}D.shape.r=y;var ne=e.getRawValue(E),re=`-`;ne&&ne[2]!=null&&(re=ne[2]+``),Vh(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:re}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,$f(D,S,C,w),D.incremental=el(e,i),i&&(D.states.emphasis.hoverLayer=2),m.add(D),h.setItemGraphicEl(E,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new cY;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);var c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);var u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?uY(v,n.option.range):lY(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var b=new md({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(kx),fY=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return AE(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=P_.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`},t.type=`series.heatmap`,t.dependencies=[`grid`,`geo`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:Z.color.primary}}},t}(hx);function pY(e){e.registerChartView(dY),e.registerSeriesModel(fY)}var mY=[`itemStyle`,`borderWidth`],hY=[{xy:`x`,wh:`width`,index:0,posDesc:[`left`,`right`]},{xy:`y`,wh:`height`,index:1,posDesc:[`top`,`bottom`]}],gY=new Fp,_Y=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=sF,t}return t.prototype.render=function(e,t,n){var r=this.group,i=e.getData(),a=this._data,o=e.coordinateSystem,s=o.getBaseAxis().isHorizontal(),c=o.master.getRect(),l={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:o,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:s,valueDim:hY[+s],categoryDim:hY[1-s]};i.diff(a).add(function(e){if(i.hasValue(e)){var t=vY(i,e,kY(i,e),l),n=MY(i,l,t);i.setItemGraphicEl(e,n),r.add(n),RY(n,l,t)}}).update(function(e,t){var n=a.getItemGraphicEl(t);if(!i.hasValue(e)){r.remove(n);return}var o=vY(i,e,kY(i,e),l),s=FY(i,o);n&&s!==n.__pictorialShapeStr&&(r.remove(n),i.setItemGraphicEl(e,null),n=null),n?NY(n,l,o):n=MY(i,l,o,!0),i.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=o,r.add(n),RY(n,l,o)}).remove(function(e){var t=a.getItemGraphicEl(e);t&&PY(a,e,t.__pictorialSymbolMeta.animationModel,t)}).execute();var u=e.get(`clip`,!0)?wN(e.coordinateSystem,!1,e):null;return u?r.setClipPath(u):r.removeClipPath(),this._data=i,this.group},t.prototype.remove=function(e,t){var n=this.group,r=this._data;e.get(`animation`)?r&&r.eachItemGraphicEl(function(t){PY(r,Vd(t).dataIndex,e,t)}):n.removeAll()},t.type=sF,t}(kx);function vY(e,t,n,r){var i=e.getItemLayout(t),a=n.get(`symbolRepeat`),o=n.get(`symbolClip`),s=n.get(`symbolPosition`)||`start`,c=(n.get(`symbolRotate`)||0)*Math.PI/180||0,l=n.get(`symbolPatternSize`)||2,u=n.isAnimationEnabled(),d={dataIndex:t,layout:i,itemModel:n,symbolType:e.getItemVisual(t,`symbol`)||`circle`,style:e.getItemVisual(t,`style`),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:n.get(`symbolRepeatDirection`),symbolPatternSize:l,rotation:c,animationModel:u?n:null,hoverScale:u&&n.get([`emphasis`,`scale`]),z2:n.getShallow(`z`,!0)||0};yY(n,a,i,r,d),xY(e,t,i,a,o,d.boundingLength,d.pxSign,l,r,d),SY(n,d.symbolScale,c,r,d);var f=d.symbolSize;return CY(n,f,i,a,o,QS(n.get(`symbolOffset`),f),s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,r,d),d}function yY(e,t,n,r,i){var a=r.valueDim,o=e.get(`symbolBoundingData`),s=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),c=s.toGlobalCoord(s.dataToCoord(0)),l=1-(n[a.wh]<=0),u;if(B(o)){var d=[bY(s,o[0])-c,bY(s,o[1])-c];d[1]=0?1:-1:u>0?1:-1}function bY(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function xY(e,t,n,r,i,a,o,s,c,l){var u=c.valueDim,d=c.categoryDim,f=Math.abs(n[d.wh]),p=e.getItemVisual(t,`symbolSize`),m=B(p)?p.slice():p==null?[`100%`,`100%`]:[p,p];m[d.index]=X(m[d.index],f),m[u.index]=X(m[u.index],r?f:Math.abs(a)),l.symbolSize=m;var h=l.symbolScale=[m[0]/s,m[1]/s];h[u.index]*=(c.isHorizontal?-1:1)*o}function SY(e,t,n,r,i){var a=e.get(mY)||0;a&&(gY.attr({scaleX:t[0],scaleY:t[1],rotation:n}),gY.updateTransform(),a/=gY.getLineScale(),a*=t[r.valueDim.index]),i.valueLineWidth=a||0}function CY(e,t,n,r,i,a,o,s,c,l,u,d){var f=u.categoryDim,p=u.valueDim,m=d.pxSign,h=Math.max(t[p.index]+s,0),g=h;if(r){var _=Math.abs(c),v=Xe(e.get(`symbolMargin`),`15%`)+``,y=!1;v.lastIndexOf(`!`)===v.length-1&&(y=!0,v=v.slice(0,v.length-1));var b=X(v,t[p.index]),x=Math.max(h+b*2,0),S=y?0:b*2,C=Us(r),w=C?r:zY((_+S)/x);b=(_-w*h)/2/(y?w:Math.max(w-1,1)),x=h+b*2,S=y?0:b*2,!C&&r!==`fixed`&&(w=l?zY((Math.abs(l)+S)/x):0),g=w*x-S,d.repeatTimes=w,d.symbolMargin=b}var T=g/2*m,E=d.pathPosition=[];E[f.index]=n[f.wh]/2,E[p.index]=o===`start`?T:o===`end`?c-T:c/2,a&&(E[0]+=a[0],E[1]+=a[1]);var D=d.bundlePosition=[];D[f.index]=n[f.xy],D[p.index]=n[p.xy];var O=d.barRectShape=F({},n);O[p.wh]=m*Math.max(Math.abs(n[p.wh]),Math.abs(E[p.index]+T)),O[f.wh]=n[f.wh];var k=d.clipShape={};k[f.xy]=-n[f.xy],k[f.wh]=u.ecSize[f.wh],k[p.xy]=0,k[p.wh]=n[p.wh]}function wY(e){var t=e.symbolPatternSize,n=XS(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),n.type!==`image`&&n.setStyle({strokeNoScale:!0}),n}function TY(e,t,n,r){var i=e.__pictorialBundle,a=n.symbolSize,o=n.valueLineWidth,s=n.pathPosition,c=t.valueDim,l=n.repeatTimes||0,u=0,d=a[t.valueDim.index]+o+n.symbolMargin*2;for(IY(e,function(e){e.__pictorialAnimationIndex=u,e.__pictorialRepeatTimes=l,u0:r<0)&&(i=l-1-e),t[c.index]=d*(i-l/2+.5)+s[c.index],{x:t[0],y:t[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function EY(e,t,n,r){var i=e.__pictorialBundle,a=e.__pictorialMainPath;a?LY(a,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,r):(a=e.__pictorialMainPath=wY(n),i.add(a),LY(a,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,r))}function DY(e,t,n){var r=F({},t.barRectShape),i=e.__pictorialBarRect;i?LY(i,null,{shape:r},t,n):(i=e.__pictorialBarRect=new Sd({z2:2,shape:r,silent:!0,style:{stroke:`transparent`,fill:`transparent`,lineWidth:0}}),i.disableMorphing=!0,e.add(i))}function OY(e,t,n,r){if(n.symbolClip){var i=e.__pictorialClipPath,a=F({},n.clipShape),o=t.valueDim,s=n.animationModel,c=n.dataIndex;if(i)Im(i,{shape:a},s,c);else{a[o.wh]=0,i=new Sd({shape:a}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var l={};l[o.wh]=n.clipShape[o.wh],Wm[r?`updateProps`:`initProps`](i,{shape:l},s,c)}}}function kY(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=AY,n.isAnimationEnabled=jY,n}function AY(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function jY(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow(`animation`)}function MY(e,t,n,r){var i=new Y,a=new Y;return i.add(a),i.__pictorialBundle=a,a.x=n.bundlePosition[0],a.y=n.bundlePosition[1],n.symbolRepeat?TY(i,t,n):EY(i,t,n),DY(i,n,r),OY(i,t,n,r),i.__pictorialShapeStr=FY(e,n),i.__pictorialSymbolMeta=n,i}function NY(e,t,n){var r=n.animationModel,i=n.dataIndex,a=e.__pictorialBundle;Im(a,{x:n.bundlePosition[0],y:n.bundlePosition[1]},r,i),n.symbolRepeat?TY(e,t,n,!0):EY(e,t,n,!0),DY(e,n,!0),OY(e,t,n,!0)}function PY(e,t,n,r){var i=r.__pictorialBarRect;i&&i.removeTextContent();var a=[];IY(r,function(e){a.push(e)}),r.__pictorialMainPath&&a.push(r.__pictorialMainPath),r.__pictorialClipPath&&(n=null),L(a,function(e){zm(e,{scaleX:0,scaleY:0},n,t,function(){r.parent&&r.parent.remove(r)})}),e.setItemGraphicEl(t,null)}function FY(e,t){return[e.getItemVisual(t.dataIndex,`symbol`)||`none`,!!t.symbolRepeat,!!t.symbolClip].join(`:`)}function IY(e,t,n){L(e.__pictorialBundle.children(),function(r){r!==e.__pictorialBarRect&&t.call(n,r)})}function LY(e,t,n,r,i,a){t&&e.attr(t),r.symbolClip&&!i?n&&e.attr(n):n&&Wm[i?`updateProps`:`initProps`](e,n,r.animationModel,r.dataIndex,a)}function RY(e,t,n){var r=n.dataIndex,i=n.itemModel,a=i.getModel(`emphasis`),o=a.getModel(`itemStyle`).getItemStyle(),s=i.getModel([`blur`,`itemStyle`]).getItemStyle(),c=i.getModel([`select`,`itemStyle`]).getItemStyle(),l=i.getShallow(`cursor`),u=a.get(`focus`),d=a.get(`blurScope`),f=a.get(`scale`);IY(e,function(e){if(e instanceof md){var t=e.style;e.useStyle(F({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else e.useStyle(n.style);var r=e.ensureState(`emphasis`);r.style=o,f&&(r.scaleX=e.scaleX*1.1,r.scaleY=e.scaleY*1.1),e.ensureState(`blur`).style=s,e.ensureState(`select`).style=c,l&&(e.cursor=l),e.z2=n.z2});var p=t.valueDim.posDesc[+(n.boundingLength>0)],m=e.__pictorialBarRect;m.ignoreClip=!0,Vh(m,Hh(i),{labelFetcher:t.seriesModel,labelDataIndex:r,defaultText:XM(t.seriesModel.getData(),r),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),$f(e,u,d,a.get(`disabled`))}function zY(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var BY=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.defaultSymbol=`roundRect`,n}return t.prototype.getInitialData=function(t){return t.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type=`series.`+sF,t.dependencies=[`grid`],t.defaultOption=_g(EF.defaultOption,{symbol:`circle`,symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:`end`,symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:`-100%`,clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:Z.color.primary}}}),t}(EF);function VY(e){e.registerChartView(_Y),e.registerSeriesModel(BY),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,xF(sF)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,SF(sF)),TF(e)}var HY=2,UY=`themeRiver`,WY=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new lI(z(this.getData,this),z(this.getRawData,this))},t.prototype.fixData=function(e){var t=e.length,n={},r=Ic(e,function(e){return n.hasOwnProperty(e[0]+``)||(n[e[0]+``]=-1),e[2]}),i=[];r.buckets.each(function(e,t){i.push({name:t,dataList:e})});for(var a=i.length,o=0;oa&&(a=s),r.push(s)}for(var l=0;la&&(a=d)}return{y0:i,max:a}}function ZY(e){e.registerChartView(GY),e.registerSeriesModel(WY),e.registerLayout(qY),e.registerProcessor(sI(UY))}var QY=2,$Y=4,eX=function(e){M(t,e);function t(t,n,r,i){var a=e.call(this)||this;a.z2=QY,a.textConfig={inside:!0},Vd(a).seriesIndex=n.seriesIndex;var o=new Dd({z2:$Y,silent:t.getModel().get([`label`,`silent`])});return a.setTextContent(o),a.updateData(!0,t,n,r,i),a}return t.prototype.updateData=function(e,t,n,r,i){this.node=t,t.piece=this,n||=this._seriesModel,r||=this._ecModel;var a=this;Vd(a).dataIndex=t.dataIndex;var o=t.getModel(),s=o.getModel(`emphasis`),c=t.getLayout(),l=F({},c);l.label=null;var u=t.getVisual(`style`);u.lineJoin=`bevel`;var d=t.getVisual(`decal`);d&&(u.decal=zC(d,i)),F(l,PF(o.getModel(`itemStyle`),l,!0)),L(sf,function(e){var t=a.ensureState(e),n=o.getModel([e,`itemStyle`]);t.style=n.getItemStyle();var r=PF(n,l);r&&(t.shape=r)}),e?(a.setShape(l),a.shape.r=c.r0,Lm(a,{shape:{r:c.r}},n,t.dataIndex)):(Im(a,{shape:l},n),Hm(a)),a.useStyle(u),this._updateLabel(n);var f=o.getShallow(`cursor`);f&&a.attr(`cursor`,f),this._seriesModel=n||this._seriesModel,this._ecModel=r||this._ecModel;var p=s.get(`focus`),m=p===`relative`?lt(t.getAncestorsIndices(),t.getDescendantIndices()):p===`ancestor`?t.getAncestorsIndices():p===`descendant`?t.getDescendantIndices():p;$f(this,m,s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e){var t=this,n=this.node.getModel(),r=n.getModel(`label`),i=this.node.getLayout(),a=i.endAngle-i.startAngle,o=(i.startAngle+i.endAngle)/2,s=Math.cos(o),c=Math.sin(o),l=this,u=l.getTextContent(),d=this.node.dataIndex,f=r.get(`minAngle`)/180*Math.PI;u.ignore=!(r.get(`show`)&&!(f!=null&&Math.abs(a)T&&!Ps(D-T)&&D0?(i.virtualPiece?i.virtualPiece.updateData(!1,r,e,t,n):(i.virtualPiece=new eX(r,e,t,n),c.add(i.virtualPiece)),a.piece.off(`click`),i.virtualPiece.on(`click`,function(e){i._rootToNode(a.parentNode)})):i.virtualPiece&&=(c.remove(i.virtualPiece),null)}},t.prototype._initEvents=function(){var e=this;this.group.off(`click`),this.group.on(`click`,function(t){var n=!1;e.seriesModel.getViewRoot().eachNode(function(r){if(!n&&r.piece&&r.piece===t.target){var i=r.getModel().get(`nodeClick`);if(i===`rootToNode`)e._rootToNode(r);else if(i===`link`){var a=r.getModel(),o=a.get(`link`);o&&j_(o,a.get(`target`,!0)||`_blank`)}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:iX,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}},t.type=tX,t}(kx),lX=nl(tX,uX);function uX(e){var t={};function n(e,n,r){if(e.depth===0)return Z.color.neutral50;for(var i=e;i&&i.depth>1;)i=i.parentNode;var a=n.getColorFromPalette(i.name||i.dataIndex+``,t);return e.depth>1&&H(a)&&(a=Si(a,(e.depth-1)/(r-1)*.5)),a}e.eachSeriesByType(tX,function(e){var t=e.getData(),r=t.tree;r.eachNode(function(i){var a=i.getModel().getModel(`itemStyle`).getItemStyle();a.fill||=n(i,e,r.root.height),F(t.ensureUniqueItemVisual(i.dataIndex,`style`),a)})})}var dX=Math.PI/180,fX=nl(tX,pX);function pX(e,t){e.eachSeriesByType(tX,function(e){var n=e.get(`center`),r=e.get(`radius`);B(r)||(r=[0,r]),B(n)||(n=[n,n]);var i=t.getWidth(),a=t.getHeight(),o=Math.min(i,a),s=X(n[0],i),c=X(n[1],a),l=X(r[0],o/2),u=X(r[1],o/2),d=-e.get(`startAngle`)*dX,f=e.get(`minAngle`)*dX,p=e.getData().tree.root,m=e.getViewRoot(),h=m.depth,g=e.get(`sort`);g!=null&&mX(m,g);var _=0;L(m.children,function(e){!isNaN(e.getValue())&&_++});var v=m.getValue(),y=Math.PI/(v||_)*2,b=m.depth>0,x=m.height-(b?-1:1),S=(u-l)/(x||1),C=e.get(`clockwise`),w=e.get(`stillShowZeroSum`),T=C?1:-1,E=function(t,n){if(t){var r=n;if(t!==p){var i=t.getValue(),a=v===0&&w?y:i*y;ar[1]&&r.reverse(),{coordSys:{type:`polar`,cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=t.dataToRadius(r[0]),a=n.dataToAngle(r[1]),o=e.coordToPoint([i,a]);return o.push(i,a*Math.PI/180),o},size:z(DX,e)}}}function kX(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:`calendar`,x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}function AX(e){var t=e.getRect();return{coordSys:{type:`matrix`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}var jX={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},MX=Re(jX);Fe(co,function(e,t){return e[t]=1,e},{}),co.join(`, `);var NX=[``,`style`,`shape`,`extra`],PX=Tc();function FX(e,t,n,r,i){var a=e+`Animation`,o=Pm(e,r,i)||{},s=PX(t).userDuring;return o.duration>0&&(o.during=s?z(GX,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),F(o,n[a]),o}function IX(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=PX(e),l=t.style;c.userDuring=t.during;var u={},d={};if(YX(e,t,d),e.type===`compound`)for(var f=e.shape.paths,p=t.shape.paths,m=0;m0&&e.animateFrom(g,_)}else VX(e,t,i||0,n,u);LX(e,t),l?e.dirty():e.markRedraw()}function LX(e,t){for(var n=PX(e).leaveToProps,r=0;r0&&e.animateFrom(i,a)}}function HX(e,t){K(t,`silent`)&&(e.silent=t.silent),K(t,`ignore`)&&(e.ignore=t.ignore),e instanceof eu&&K(t,`invisible`)&&(e.invisible=t.invisible),e instanceof cd&&K(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}var UX={},WX={setTransform:function(e,t){return UX.el[e]=t,this},getTransform:function(e){return UX.el[e]},setShape:function(e,t){var n=UX.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=UX.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=UX.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=UX.el.style;if(t)return t[e]},setExtra:function(e,t){var n=UX.el.extra||(UX.el.extra={});return n[e]=t,this},getExtra:function(e){var t=UX.el.extra;if(t)return t[e]}};function GX(){var e=this,t=e.el;if(t){var n=PX(t).userDuring,r=e.userDuring;if(n!==r){e.el=e.userDuring=null;return}UX.el=t,r(WX)}}function KX(e,t,n,r){var i=n[e];if(i){var a=t[e],o;if(a){var s=n.transition,c=i.transition;if(c)if(!o&&(o=r[e]={}),zX(c))F(o,a);else for(var l=rc(c),u=0;u=0){!o&&(o=r[e]={});for(var p=Re(a),u=0;u=0)){var f=e.getAnimationStyleProps(),p=f?f.style:null;if(p){!a&&(a=r.style={});for(var m=Re(n),l=0;l=0?t.getStore().get(i,n):void 0}var a=t.get(r.name,n),o=r&&r.ordinalMeta;return o?o.categories[a]:a}function C(n,r){r??=u;var i=t.getItemVisual(r,`style`),a=i&&i.fill,o=i&&i.opacity,s=y(r,rZ).getItemStyle();a!=null&&(s.fill=a),o!=null&&(s.opacity=o);var c={inheritColor:H(a)?a:Z.color.neutral99},l=b(r,rZ),d=Uh(l,null,c,!1,!0);d.text=l.getShallow(`show`)?W(e.getFormattedLabel(r,rZ),XM(t,r)):null;var f=Wh(l,c,!1);return E(n,s),s=MN(s,d,f),n&&T(s,n),s.legacy=!0,s}function w(n,r){r??=u;var i=y(r,nZ).getItemStyle(),a=b(r,nZ),o=Uh(a,null,null,!0,!0);o.text=a.getShallow(`show`)?Ze(e.getFormattedLabel(r,nZ),e.getFormattedLabel(r,rZ),XM(t,r)):null;var s=Wh(a,null,!0);return E(n,i),i=MN(i,o,s),n&&T(i,n),i.legacy=!0,i}function T(e,t){for(var n in t)K(t,n)&&(e[n]=t[n])}function E(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}function D(e,n){if(n??=u,K(_X,e)){var r=t.getItemVisual(n,`style`);return r?r[_X[e]]:null}if(K(vX,e))return t.getItemVisual(n,e)}function O(e){if(o.type===`cartesian2d`)return _F(I({axis:o.getBaseAxis()},e))}function k(){return n.getCurrentSeriesIndices()}function A(e){return Zh(e,n)}}function CZ(e){var t={};return L(e.dimensions,function(n){var r=e.getDimensionInfo(n);if(!r.isExtraCoord){var i=r.coordDim,a=t[i]=t[i]||[];a[r.coordDimIndex]=e.getDimensionIndex(n)}}),t}function wZ(e,t,n,r,i,a,o){if(!r){a.remove(t);return}var s=TZ(e,t,n,r,i,a);return s&&o.setItemGraphicEl(n,s),s&&$f(s,r.focus,r.blurScope,r.emphasisDisabled),s}function TZ(e,t,n,r,i,a){var o=-1,s=t;t&&EZ(t,r,i)&&(o=je(a.childrenRef(),t),t=null);var c=!t,l=t;l?l.clearStates():(l=_Z(r),s&&hZ(s,l)),r.morph===!1?l.disableMorphing=!0:l.disableMorphing&&=!1,r.tooltipDisabled&&(l.tooltipDisabled=!0),dZ.normal.cfg=dZ.normal.conOpt=dZ.emphasis.cfg=dZ.emphasis.conOpt=dZ.blur.cfg=dZ.blur.conOpt=dZ.select.cfg=dZ.select.conOpt=null,dZ.isLegacy=!1,OZ(l,n,r,i,c,dZ),DZ(l,n,r,i,c),vZ(e,l,n,r,dZ,i,c),K(r,`info`)&&(yX(l).info=r.info);for(var u=0;u=0?a.replaceAt(l,o):a.add(l),l}function EZ(e,t,n){var r=yX(e),i=t.type,a=t.shape,o=t.style;return n.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i===`path`&&zZ(a)&&RZ(a)!==r.customPathData||i===`image`&&K(o,`image`)&&o.image!==r.customImagePath}function DZ(e,t,n,r,i){var a=n.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&EZ(o,a,r)&&(o=null),o||(o=_Z(a),e.setClipPath(o)),vZ(null,o,t,a,null,r,i)}}function OZ(e,t,n,r,i,a){if(!(e.isGroup||e.type===`compoundPath`)){kZ(n,null,a),kZ(n,nZ,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,c=a.blur.conOpt,l=a.select.conOpt;if(o!=null||s!=null||l!=null||c!=null){var u=e.getTextContent();if(o===!1)u&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:`text`},u?u.clearStates():(u=_Z(o),e.setTextContent(u)),vZ(null,u,t,o,null,r,i);for(var d=o&&o.style,f=0;f=u;p--)NZ(t,t.childAt(p),i)}}function NZ(e,t,n){t&&RX(t,yX(e).option,n)}function PZ(e){new VT(e.oldChildren,e.newChildren,FZ,FZ,e).add(IZ).update(IZ).remove(LZ).execute()}function FZ(e,t){return(e&&e.name)??uZ+t}function IZ(e,t){var n=this.context,r=e==null?null:n.newChildren[e],i=t==null?null:n.oldChildren[t];TZ(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function LZ(e){var t=this.context,n=t.oldChildren[e];n&&RX(n,yX(n).option,t.seriesModel)}function RZ(e){return e&&(e.pathData||e.d)}function zZ(e){return e&&(K(e,`pathData`)||K(e,`d`))}function BZ(e){e.registerChartView(gZ),e.registerSeriesModel(bX)}var VZ=Tc(),HZ=P,UZ=z,WZ=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!r&&this._lastValue===i&&this._lastStatus===a)){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Y,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=Be(GZ,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}YZ(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&Rk(r).w>o)return!0;if(a){var s=yL(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=VZ(e).pointerEl=new Wm[i.type](HZ(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=VZ(e).labelEl=new Dd(HZ(t.label));e.add(i),qZ(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=VZ(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=VZ(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),qZ(i,r))},e.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=hh(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){hn(e.event)},onmousedown:UZ(this._onHandleDragMove,this,0,0),drift:UZ(this._onHandleDragMove,this),ondragend:UZ(this._onHandleDragEnd,this)}),n.add(r)),YZ(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);B(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,zx(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){GZ(this._axisPointerModel,!t&&this._moveAnimation,this._handle,JZ(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(JZ(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(JZ(r)),VZ(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Bx(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function GZ(e,t,n,r){KZ(VZ(n).lastProp,r)||(VZ(n).lastProp=r,t?Im(n,r,e):(n.stopAnimation(),n.attr(r)))}function KZ(e,t){if(U(e)&&U(t)){var n=!0;return L(t,function(t,r){n&&=KZ(e[r],t)}),!!n}else return e===t}function qZ(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function JZ(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function YZ(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function XZ(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function ZZ(e,t,n,r,i){var a=$Z(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=x_(o.get(`padding`)||0),c=o.getFont(),l=yo(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),QZ(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Uh(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function QZ(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function $Z(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:RD(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};L(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),H(o)?a=o.replace(`{value}`,a):V(o)&&(a=o(s))}return a}function eQ(e,t,n){var r=Sn();return Dn(r,r,n.rotation),En(r,r,n.position),ch([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function tQ(e,t,n,r,i,a){var o=DP.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),ZZ(t,r,i,a,{position:eQ(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function nQ(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function rQ(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function iQ(e,t,n,r,i,a){return{cx:e,cy:t,r0:n,r,startAngle:i,endAngle:a,clockwise:!0}}function aQ(e,t,n){return Rk(e,{fromStat:{sers:R(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function oQ(e,t,n){return[ss(os(t[0],t[1]),e-n/2),os(e+n/2,ss(t[0],t[1]))]}var sQ=function(e){M(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=cQ(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=XZ(r),f=lQ[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}tQ(t,e,JP(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=JP(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=eQ(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=cQ(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=os(o[1],l[c]),l[c]=ss(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(WZ);function cQ(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var lQ={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:nQ([t,r[0]],[t,r[1]],uQ(e))}},shadow:function(e,t,n,r,i,a){var o=aQ(e,i,a),s=r[1]-r[0],c=oQ(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:rQ([l,r[0]],[u-l,s],uQ(e))}}};function uQ(e){return e.dim===`x`?0:1}var dQ=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}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:Z.color.border,width:1,type:`dashed`},shadowStyle:{color:Z.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Z.color.neutral00,padding:[5,7,5,7],backgroundColor:Z.color.accent60,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:Z.color.accent40,throttle:40}},t}(sv),fQ=Tc(),pQ=L;function mQ(e,t,n){if(!N.node){var r=t.getZr();fQ(r).records||(fQ(r).records={}),hQ(r,t);var i=fQ(r).records[e]||(fQ(r).records[e]={});i.handler=n}}function hQ(e,t){if(fQ(e).initialized)return;fQ(e).initialized=!0,n(`click`,Be(vQ,`click`)),n(`mousemove`,Be(vQ,`mousemove`)),n(`mousewheel`,Be(vQ,`mousewheel`)),n(`globalout`,_Q);function n(n,r){e.on(n,function(n){var i=yQ(t);pQ(fQ(e).records,function(e){e&&r(e,n,i.dispatchAction)}),gQ(i.pendings,t)})}}function gQ(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function _Q(e,t,n){e.handler(`leave`,null,n)}function vQ(e,t,n,r){t.handler(e,n,r)}function yQ(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function bQ(e,t){if(!N.node){var n=t.getZr();(fQ(n).records||{})[e]&&(fQ(n).records[e]=null)}}var xQ=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;mQ(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){bQ(`axisPointer`,t)},t.prototype.dispose=function(e,t){bQ(`axisPointer`,t)},t.type=`axisPointer`,t}(Tx);function SQ(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=wc(a,e);if(o==null||o<0||B(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint)if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(R(c.dimensions,function(e){return a.mapDimension(e)}),o))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var CQ=Tc();function wQ(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||z(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){PQ(i)&&(i=SQ({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=PQ(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||PQ(i),f={},p={},m={list:[],map:{}},h={showPointer:Be(DQ,p),showTooltip:Be(OQ,m)};L(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);L(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=MQ(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&TQ(e,o,h,!1,f)}})});var g={};return L(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&L(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,NQ(t),NQ(e)))),g[e.key]=a}})}),L(g,function(e,t){TQ(u[t],e,h,!0,f)}),kQ(p,u,f),AQ(m,i,e,o),jQ(u,o,n),f}}function TQ(e,t,n,r,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){n.showPointer(e,t);return}var o=EQ(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&F(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function EQ(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return L(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(qs(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),L(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function DQ(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function OQ(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var c=t.coordSys.model,l=SL(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function kQ(e,t,n){var r=n.axesInfo=[];L(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function AQ(e,t,n,r){if(PQ(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function jQ(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=CQ(r)[i]||{},o=CQ(r)[i]={};L(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&L(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}L(a,function(e,t){!o[t]&&c.push(l(e))}),L(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function MQ(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function NQ(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function PQ(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function FQ(e){wL.registerAxisPointerClass(`CartesianAxisPointer`,sQ),e.registerComponentModel(dQ),e.registerComponentView(xQ),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!B(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=fL(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},wQ)}function IQ(e){RT(FL),RT(FQ)}var LQ=function(e){M(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis;a.dim===`angle`&&(this.animationThreshold=Math.PI/18);var o=a.polar,s=a.getExtent(),c=o.getOtherAxis(a).getExtent(),l=a.dataToCoord(t),u=r.get(`type`);if(u&&u!==`none`){var d=XZ(r),f=zQ[u](a,o,l,s,c,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}ZZ(e,n,r,i,RQ(t,n,r,o,r.get([`label`,`margin`])))},t}(WZ);function RQ(e,t,n,r,i){var a=t.axis,o=a.dataToCoord(e),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var c=r.getRadiusAxis().getExtent(),l,u,d;if(a.dim===`radius`){var f=Sn();Dn(f,f,s),En(f,f,[r.cx,r.cy]),l=ch([o,-i],f);var p=t.getModel(`axisLabel`).get(`rotate`)||0,m=DP.innerTextLayout(s,p*Math.PI/180,-1);u=m.textAlign,d=m.textVerticalAlign}else{var h=c[1];l=r.coordToPoint([h+i,o]);var g=r.cx,_=r.cy;u=Math.abs(l[0]-g)/h<.3?`center`:l[0]>g?`left`:`right`,d=Math.abs(l[1]-_)/h<.3?`middle`:l[1]>_?`top`:`bottom`}return{position:l,align:u,verticalAlign:d}}var zQ={line:function(e,t,n,r,i){return e.dim===`angle`?{type:`Line`,shape:nQ(t.coordToPoint([i[0],n]),t.coordToPoint([i[1],n]))}:{type:`Circle`,shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,r,i,a,o){var s=Math.PI/180,c=aQ(e,a,o),l;if(e.dim===`angle`)l=iQ(t.cx,t.cy,i[0],i[1],(-n-c/2)*s,(-n+c/2)*s);else{var u=oQ(n,r,c),d=u[0],f=u[1];l=iQ(t.cx,t.cy,d,f,0,Math.PI*2)}return{type:`Sector`,shape:l}}},BQ=`polar`,VQ=BQ,HQ=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.findAxisModel=function(e){var t;return this.ecModel.eachComponent(e,function(e){e.getCoordSysModel()===this&&(t=e)},this),t},t.type=BQ,t.dependencies=[`radiusAxis`,`angleAxis`],t.defaultOption={z:0,center:[`50%`,`50%`],radius:`80%`},t}(sv),UQ=function(e){M(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`polar`,kc).models[0]},t.type=`polarAxis`,t}(sv);Ne(UQ,YD);var WQ=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`angleAxis`,t}(UQ),GQ=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`radiusAxis`,t}(UQ),KQ=function(e){M(t,e);function t(t,n){return e.call(this,`radius`,t,n)||this}return t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)[this.dim===`radius`?0:1]},t}(Hk);KQ.prototype.dataToRadius=Hk.prototype.dataToCoord,KQ.prototype.radiusToData=Hk.prototype.coordToData;var qQ=Tc(),JQ=function(e){M(t,e);function t(t,n){return e.call(this,`angle`,t,n||[0,360])||this}return t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)[this.dim===`radius`?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,t=e.getLabelModel(),n=e.scale,r=n.getExtent(),i=n.count();if(r[1]-r[0]<1)return 0;var a=r[0],o=e.dataToCoord(a+1)-e.dataToCoord(a),s=Math.abs(o),c=yo(a==null?``:a+``,t.getFont(),`center`,`top`),l=Math.max(c.height,7)/s;isNaN(l)&&(l=1/0);var u=Math.max(0,Math.floor(l)),d=qQ(e.model),f=d.lastAutoInterval,p=d.lastTickCount;return f!=null&&p!=null&&Math.abs(f-u)<=1&&Math.abs(p-i)<=1&&f>u?u=f:(d.lastTickCount=i,d.lastAutoInterval=u),u},t}(Hk);JQ.prototype.dataToAngle=Hk.prototype.dataToCoord,JQ.prototype.angleToData=Hk.prototype.coordToData;var YQ=[`radius`,`angle`],XQ=function(){function e(e){this.dimensions=YQ,this.type=BQ,this.cx=0,this.cy=0,this._radiusAxis=new KQ,this._angleAxis=new JQ,this.axisPointerEnabled=!0,this.name=e||``,this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){var t=`_`+e+`Axis`;return this[t]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,r=this._radiusAxis;return n.scale.type===e&&t.push(n),r.scale.type===e&&t.push(r),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=e!=null&&e!==`auto`?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],n)},e.prototype.pointToData=function(e,t,n){n||=[];var r=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(r[0],t),n[1]=this._angleAxis.angleToData(r[1],t),n},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,r=this.getAngleAxis(),i=r.getExtent(),a=Math.min(i[0],i[1]),o=Math.max(i[0],i[1]);r.inverse?a=o-360:o=a+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var c=Math.atan2(-n,t)/Math.PI*180,l=co;)c+=l*360;return[s,c]},e.prototype.coordToPoint=function(e,t){t||=[];var n=e[0],r=e[1]/180*Math.PI;return t[0]=Math.cos(r)*n+this.cx,t[1]=-Math.sin(r)*n+this.cy,t},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),r=Math.PI/180,i=1e-4;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*r,endAngle:-n[1]*r,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,r=t-this.cy,a=n*n+r*r,o=this.r,s=this.r0;return o!==s&&a-i<=o*o&&a+i>=s*s},x:this.cx-t[1],y:this.cy-t[1],width:t[1]*2,height:t[1]*2}},e.prototype.convertToPixel=function(e,t,n){return ZQ(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return ZQ(t)===this?this.pointToData(n):null},e}();function ZQ(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function QQ(e,t,n){var r=t.get(`center`),i=$_(t,n).refContainer;e.cx=X(r[0],i.width)+i.x,e.cy=X(r[1],i.height)+i.y;var a=e.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=t.get(`radius`);s==null?s=[0,`100%`]:B(s)||(s=[0,s]);var c=[X(s[0],o),X(s[1],o)];a.inverse?a.setExtent(c[1],c[0]):a.setExtent(c[0],c[1])}function $Q(e,t){var n=this,r=n.getAngleAxis(),i=n.getRadiusAxis();if(EO(r,1),EO(i,1),RO(r),RO(i),r.type===`category`&&!r.onBand){var a=r.getExtent(),o=360/r.scale.count();r.inverse?a[1]+=o:a[1]-=o,r.setExtent(a[0],a[1])}}function e$(e){return e.mainType===`angleAxis`}function t$(e,t){if(e.type=MD(t),e.scale=ND(t,e.type,!1),e.onBand=JD(e.scale,t),e.inverse=t.get(`inverse`),e$(t)){e.inverse=e.inverse!==t.get(`clockwise`);var n=t.get(`startAngle`),r=t.get(`endAngle`)??n+(e.inverse?-360:360);e.setExtent(n,r)}t.axis=e,e.model=t}var n$={dimensions:YQ,create:function(e,t){var n=[];return e.eachComponent(VQ,function(e,r){var i=new XQ(r+``);i.update=$Q;var a=i.getRadiusAxis(),o=i.getAngleAxis(),s=e.findAxisModel(`radiusAxis`),c=e.findAxisModel(`angleAxis`);t$(a,s),t$(o,c),QQ(i,e,t),n.push(i),e.coordinateSystem=i,i.model=e}),e.eachSeries(function(e){if(e.get(`coordinateSystem`)===`polar`){var t=e.coordinateSystem=e.getReferringComponents(VQ,kc).models[0].coordinateSystem;t&&(pO(t.getRadiusAxis(),e,BQ),pO(t.getAngleAxis(),e,BQ))}}),n}},r$=[`axisLine`,`axisLabel`,`axisTick`,`minorTick`,`splitLine`,`minorSplitLine`,`splitArea`];function i$(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var r=e.coordToPoint([t[0],n]),i=e.coordToPoint([t[1],n]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function a$(e){return+!e.getRadiusAxis().inverse}function o$(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var s$=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`PolarAxisPointer`,n}return t.prototype.render=function(e,t){if(this.group.removeAll(),e.get(`show`)){var n=e.axis,r=n.polar,i=r.getRadiusAxis().getExtent(),a=n.getTicksCoords({breakTicks:`none`}),o=n.getMinorTicksCoords(),s=[];L(n.getViewLabels(),function(e){if(!e.tick.offInterval){e=P(e);var t=n.scale;e.coord=n.dataToCoord(qD(t,e.tick)),s.push(e)}}),o$(s),o$(a),L(r$,function(t){e.get([t,`show`])&&(!n.scale.isBlank()||t===`axisLine`)&&c$[t](this.group,e,r,a,o,i,s)},this)}},t.type=`angleAxis`,t}(wL),c$={axisLine:function(e,t,n,r,i,a){var o=t.getModel([`axisLine`,`lineStyle`]),s=n.getAngleAxis(),c=Math.PI/180,l=s.getExtent(),u=a$(n),d=+!u,f,p=Math.abs(l[1]-l[0])===360?`Circle`:`Arc`;f=a[d]===0?new Wm[p]({shape:{cx:n.cx,cy:n.cy,r:a[u],startAngle:-l[0]*c,endAngle:-l[1]*c,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):new nm({shape:{cx:n.cx,cy:n.cy,r:a[u],r0:a[d]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,e.add(f)},axisTick:function(e,t,n,r,i,a){var o=t.getModel(`axisTick`),s=(o.get(`inside`)?-1:1)*o.get(`length`),c=a[a$(n)],l=R(r,function(e){return new dm({shape:i$(n,[c,c+s],e.coord)})});e.add(nh(l,{style:I(o.getModel(`lineStyle`).getLineStyle(),{stroke:t.get([`axisLine`,`lineStyle`,`color`])})}))},minorTick:function(e,t,n,r,i,a){if(i.length){for(var o=t.getModel(`axisTick`),s=t.getModel(`minorTick`),c=(o.get(`inside`)?-1:1)*s.get(`length`),l=a[a$(n)],u=[],d=0;dm?`left`:`right`,_=Math.abs(p[1]-h)/f<.3?`middle`:p[1]>h?`top`:`bottom`;if(s&&s[d]){var v=s[d];U(v)&&v.textStyle&&(o=new fg(v.textStyle,c,c.ecModel))}var y=new Dd({silent:DP.isLabelSilent(t),style:Uh(o,{x:p[0],y:p[1],fill:o.getTextColor()||t.get([`axisLine`,`lineStyle`,`color`]),text:r.formattedLabel,align:g,verticalAlign:_})});if(e.add(y),Ch({el:y,componentModel:t,itemName:r.formattedLabel,formatterParamsExtra:{isTruncated:function(){return y.isTruncated},value:r.rawLabel,tickIndex:i}}),u){var b=DP.makeAxisEventDataBase(t);b.targetType=`axisLabel`,b.value=r.rawLabel,Vd(y).eventData=b}},this)},splitLine:function(e,t,n,r,i,a){var o=t.getModel(`splitLine`).getModel(`lineStyle`),s=o.get(`color`),c=0;s=s instanceof Array?s:[s];for(var l=[],u=0;u=0?`p`:`n`,T=y;_&&(r[a][C]||(r[a][C]={p:y,n:y}),T=r[a][C][w]);var E=void 0,D=void 0,O=void 0,k=void 0;if(u.dim===`radius`){var A=u.dataToCoord(S)-y,j=e.dataToCoord(C);cs(A)=k})}}function v$(e,t){var n=aF(t,BQ),r=Rk(e,{fromStat:{key:n},min:1}).w,i=r,a=0,o=`20%`,s=`30%`,c={};aO(e,n,function(e){var t=m$(e);c[t]||a++,c[t]=c[t]||{width:0,maxWidth:0};var n=X(e.get(`barWidth`),r),l=X(e.get(`barMaxWidth`),r),u=e.get(`barGap`),d=e.get(`barCategoryGap`);n&&!c[t].width&&(n=os(i,n),c[t].width=n,i-=n),l&&(c[t].maxWidth=l),u!=null&&(s=u),d!=null&&(o=d)});var l={},u=X(o,r),d=X(s,1),f=(i-u)/(a+(a-1)*d);f=ss(f,0),L(c,function(e,t){var n=e.maxWidth;n&&n=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},e.prototype.pointToData=function(e,t,n){n||=[];var r=this.getAxis();return n[0]=r.coordToData(r.toLocalCoord(e[r.orient===`horizontal`?0:1])),n},e.prototype.dataToPoint=function(e,t,n){var r=this.getAxis(),i=this.getRect();n||=[];var a=r.orient===`horizontal`?0:1;return e instanceof Array&&(e=e[0]),n[a]=r.toGlobalCoord(r.dataToCoord(+e)),n[1-a]=a===0?i.y+i.height/2:i.x+i.width/2,n},e.prototype.convertToPixel=function(e,t,n){return j$(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return j$(t)===this?this.pointToData(n):null},e}();function j$(e){var t=e.seriesModel,n=e.singleAxisModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function M$(e,t){var n=[];return e.eachComponent(LL,function(r,i){var a=new A$(r,e,t);a.name=`single_`+i,a.resize(r,t),r.coordinateSystem=a,n.push(a)}),e.eachSeries(function(e){if(e.get(`coordinateSystem`)===`singleAxis`){var t=e.getReferringComponents(LL,kc).models[0],n=e.coordinateSystem=t&&t.coordinateSystem;n&&pO(n.getAxis(),e,IL)}}),n}var N$={create:M$,dimensions:k$},P$=[`x`,`y`],F$=[`width`,`height`],I$=function(e){M(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.coordinateSystem,s=R$(a),c=z$(o,s),l=z$(o,1-s),u=o.dataToPoint(t)[0],d=r.get(`type`);if(d&&d!==`none`){var f=XZ(r),p=L$[d](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);p.style=f,e.graphicKey=p.type,e.pointer=p}tQ(t,e,w$(n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=w$(t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=eQ(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.coordinateSystem,o=R$(i),s=z$(a,o),c=[e.x,e.y];c[o]+=t[o],c[o]=Math.min(s[1],c[o]),c[o]=Math.max(s[0],c[o]);var l=z$(a,1-o),u=(l[1]+l[0])/2,d=[u,u];return d[o]=c[o],{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:d,tooltipOption:{verticalAlign:`middle`}}},t}(WZ),L$={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:nQ([t,r[0]],[t,r[1]],R$(e))}},shadow:function(e,t,n,r,i,a){var o=aQ(e,i,a),s=r[1]-r[0],c=oQ(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:rQ([l,r[0]],[u-l,s],R$(e))}}};function R$(e){return+!e.isHorizontal()}function z$(e,t){var n=e.getRect();return[n[P$[t]],n[P$[t]]+n[F$[t]]]}var B$=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`single`,t}(Tx);function V$(e){RT(FQ),wL.registerAxisPointerClass(`SingleAxisPointer`,I$),e.registerComponentView(B$),e.registerComponentView(E$),e.registerComponentModel(RL),HI(e,`single`,RL,RL.defaultOption),e.registerCoordinateSystem(`single`,N$)}var H$=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t,n,r){var i=iv(t);e.prototype.init.apply(this,arguments),U$(t,i)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),U$(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type=`calendar`,t.layoutMode=`box`,t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:`horizontal`,splitLine:{show:!0,lineStyle:{color:Z.color.axisLine,width:1,type:`solid`}},itemStyle:{color:Z.color.neutral00,borderWidth:1,borderColor:Z.color.neutral10},dayLabel:{show:!0,firstDay:0,position:`start`,margin:Z.size.s,color:Z.color.secondary},monthLabel:{show:!0,position:`start`,margin:Z.size.s,align:`center`,formatter:null,color:Z.color.secondary},yearLabel:{show:!0,position:null,margin:Z.size.xl,formatter:null,color:Z.color.quaternary,fontFamily:`sans-serif`,fontWeight:`bolder`,fontSize:20}},t}(sv);function U$(e,t){var n=e.cellSize,r=B(n)?n:e.cellSize=[n,n];r.length===1&&(r[1]=r[0]),rv(e,t,{type:`box`,ignoreSize:R([0,1],function(e){return tv(t,e)&&(r[e]=`auto`),r[e]!=null&&r[e]!==`auto`})})}var W$=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=this.group;r.removeAll();var i=e.coordinateSystem,a=i.getRangeInfo(),o=i.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,a,r),this._renderLines(e,a,o,r),this._renderYearText(e,a,o,r),this._renderMonthText(e,s,o,r),this._renderWeekText(e,s,a,o,r)},t.prototype._renderDayRect=function(e,t,n){for(var r=e.coordinateSystem,i=e.getModel(`itemStyle`).getItemStyle(),a=r.getCellWidth(),o=r.getCellHeight(),s=t.start.time;s<=t.end.time;s=r.getNextNDay(s,1).time){var c=r.dataToCalendarLayout([s],!1).tl,l=new Sd({shape:{x:c[0],y:c[1],width:a,height:o},cursor:`default`,style:i});n.add(l)}},t.prototype._renderLines=function(e,t,n,r){var i=this,a=e.coordinateSystem,o=e.getModel([`splitLine`,`lineStyle`]).getLineStyle(),s=e.get([`splitLine`,`show`]),c=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var l=t.start,u=0;l.time<=t.end.time;u++){f(l.formatedDate),u===0&&(l=a.getDateInfo(t.start.y+`-`+t.start.m));var d=l.date;d.setMonth(d.getMonth()+1),l=a.getDateInfo(d)}f(a.getNextNDay(t.end.time,1).formatedDate);function f(t){i._firstDayOfMonth.push(a.getDateInfo(t)),i._firstDayPoints.push(a.dataToCalendarLayout([t],!1).tl);var c=i._getLinePointsOfOneWeek(e,t,n);i._tlpoints.push(c[0]),i._blpoints.push(c[c.length-1]),s&&i._drawSplitline(c,o,r)}s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,c,n),o,r),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,c,n),o,r)},t.prototype._getEdgesPoints=function(e,t,n){var r=[e[0].slice(),e[e.length-1].slice()],i=n===`horizontal`?0:1;return r[0][i]=r[0][i]-t/2,r[1][i]=r[1][i]+t/2,r},t.prototype._drawSplitline=function(e,t,n){var r=new cm({z2:20,shape:{points:e},style:t});n.add(r)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var r=e.coordinateSystem,i=r.getDateInfo(t),a=[],o=0;o<7;o++){var s=r.getNextNDay(i.time,o),c=r.dataToCalendarLayout([s.time],!1);a[2*s.day]=c.tl,a[2*s.day+1]=c[n===`horizontal`?`bl`:`tr`]}return a},t.prototype._formatterLabel=function(e,t){return H(e)&&e?E_(e,t):V(e)?e(t):t.nameMap},t.prototype._yearTextPositionControl=function(e,t,n,r,i){var a=t[0],o=t[1],s=[`center`,`bottom`];r===`bottom`?(o+=i,s=[`center`,`top`]):r===`left`?a-=i:r===`right`?(a+=i,s=[`center`,`top`]):o-=i;var c=0;return(r===`left`||r===`right`)&&(c=Math.PI/2),{rotation:c,x:a,y:o,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,n,r){var i=e.getModel(`yearLabel`);if(i.get(`show`)){var a=i.get(`margin`),o=i.get(`position`);o||=n===`horizontal`?`left`:`top`;var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(s[0][0]+s[1][0])/2,l=(s[0][1]+s[1][1])/2,u=n===`horizontal`?0:1,d={top:[c,s[u][1]],bottom:[c,s[1-u][1]],left:[s[1-u][0],l],right:[s[u][0],l]},f=t.start.y;+t.end.y>+t.start.y&&(f=f+`-`+t.end.y);var p=i.get(`formatter`),m={start:t.start.y,end:t.end.y,nameMap:f},h=new Dd({z2:30,style:Uh(i,{text:this._formatterLabel(p,m)}),silent:i.get(`silent`)});h.attr(this._yearTextPositionControl(h,d[o],n,o,a)),r.add(h)}},t.prototype._monthTextPositionControl=function(e,t,n,r,i){var a=`left`,o=`top`,s=e[0],c=e[1];return n===`horizontal`?(c+=i,t&&(a=`center`),r===`start`&&(o=`bottom`)):(s+=i,t&&(o=`middle`),r===`start`&&(a=`right`)),{x:s,y:c,align:a,verticalAlign:o}},t.prototype._renderMonthText=function(e,t,n,r){var i=e.getModel(`monthLabel`);if(i.get(`show`)){var a=i.get(`nameMap`),o=i.get(`margin`),s=i.get(`position`),c=i.get(`align`),l=[this._tlpoints,this._blpoints];(!a||H(a))&&(a&&(t=Og(a)||t),a=t.get([`time`,`monthAbbr`])||[]);var u=s===`start`?0:1,d=n===`horizontal`?0:1;o=s===`start`?-o:o;for(var f=c===`center`,p=i.get(`silent`),m=0;m=i.start.time&&r.timeo.end.time&&t.reverse(),t},e.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var r=Math.floor(t[1].time/G$)-Math.floor(t[0].time/G$)+1,i=new Date(t[0].time),a=i.getDate(),o=t[1].date.getDate();i.setDate(a+r-1);var s=i.getDate();if(s!==o)for(var c=i.getTime()-t[1].time>0?1:-1;(s=i.getDate())!==o&&(i.getTime()-t[1].time)*c>0;)r-=c,i.setDate(s-c);var l=Math.floor((r+t[0].day+6)/7),u=n?-l+1:l-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var r=this._getRangeInfo(n);if(e>r.weeks||e===0&&tr.lweek)return null;var i=(e-1)*7-r.fweek+t,a=new Date(r.start.time);return a.setDate(+r.start.d+i),this.getDateInfo(a)},e.create=function(t,n){var r=[];return t.eachComponent(`calendar`,function(i){var a=new e(i,t,n);r.push(a),i.coordinateSystem=a}),t.eachComponent(function(e,t){B_({targetModel:t,coordSysType:`calendar`,coordSysProvider:V_})}),r},e.dimensions=[`time`,`value`],e}();function q$(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function J$(e){e.registerComponentModel(H$),e.registerComponentView(W$),e.registerCoordinateSystem(`calendar`,K$)}var Y$={level:1,leaf:2,nonLeaf:3},X$={none:0,all:1,body:2,corner:3};function Z$(e,t,n){var r=t[Km[n]].getCell(e);return!r&&He(e)&&e<0&&(r=t[Km[1-n]].getUnitLayoutInfo(n,Math.round(e))),r}function Q$(e){var t=e||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function $$(e,t,n,r,i){e1(e[0],t,i,n,r,0),e1(e[1],t,i,n,r,1)}function e1(e,t,n,r,i,a){e[0]=1/0,e[1]=-1/0;var o=r[a],s=B(o)?o:[o],c=s.length,l=!!n;if(c>=1?(t1(e,t,s,l,i,a,0),c>1&&t1(e,t,s,l,i,a,c-1)):e[0]=e[1]=NaN,l){var u=-i[Km[1-a]].getLocatorCount(a),d=i[Km[a]].getLocatorCount(a)-1;n===X$.body?u=ss(0,u):n===X$.corner&&(d=os(-1,d)),d=t[0]&&e[0]<=t[1]}function s1(e,t){e.id.set(t[0][0],t[1][0]),e.span.set(t[0][1]-e.id.x+1,t[1][1]-e.id.y+1)}function c1(e,t){e[0][0]=t[0][0],e[0][1]=t[0][1],e[1][0]=t[1][0],e[1][1]=t[1][1]}function l1(e,t,n,r){var i=Z$(t[r][0],n,r),a=Z$(t[r][1],n,r);e[Km[r]]=e[qm[r]]=NaN,i&&a&&(e[Km[r]]=i.xy,e[qm[r]]=a.xy+a.wh-i.xy)}function u1(e,t,n,r){return e[Km[t]]=n,e[Km[1-t]]=r,e}function d1(e){return e&&(e.type===Y$.leaf||e.type===Y$.nonLeaf)?e:null}function f1(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var p1=function(){function e(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e===`x`?0:1,this._model=t,this._uniqueValueGen=m1(e);var n=t.get(`data`,!0),r=t.get(`length`,!0);if(n!=null&&!B(n)&&(n=[]),n)this._initByDimModelData(n);else if(r!=null){n=Array(r);for(var i=0;i=1,y=n[Km[r]],b=a.getLocatorCount(r)-1,x=new Rc;for(o.resetLayoutIterator(x,r);x.next();)S(x.item);for(a.resetLayoutIterator(x,r);x.next();)S(x.item);function S(e){Ye(e.wh)&&(e.wh=_),e.xy=y,e.id[Km[r]]===b&&!v&&(e.wh=n[Km[r]]+n[qm[r]]-e.xy),y+=e.wh}}function W1(e,t){for(var n=t[Km[e]].resetCellIterator();n.next();){var r=n.item;K1(r.rect,e,r.id,r.span,t),K1(r.rect,1-e,r.id,r.span,t),r.type===Y$.nonLeaf&&(r.xy=r.rect[Km[e]],r.wh=r.rect[qm[e]])}}function G1(e,t){e.travelExistingCells(function(e){var n=e.span;if(n){var r=e.spanRect,i=e.id;K1(r,0,i,n,t),K1(r,1,i,n,t)}})}function K1(e,t,n,r,i){e[qm[t]]=0;var a=n[Km[t]]<0?i[Km[1-t]]:i[Km[t]],o=a.getUnitLayoutInfo(t,n[Km[t]]);if(e[Km[t]]=o.xy,e[qm[t]]=o.wh,r[Km[t]]>1){var s=a.getUnitLayoutInfo(t,n[Km[t]]+r[Km[t]]-1);e[qm[t]]=s.xy+s.wh-o.xy}}function q1(e,t,n){return J1(ys(e,n[qm[t]]),n[qm[t]])}function J1(e,t){return Math.max(Math.min(e,W(t,1/0)),0)}function Y1(e){var t=e.matrixModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}var X1={inBody:1,inCorner:2,outside:3},Z1={x:null,y:null,point:[]};function Q1(e,t,n,r,i){var a=n[Km[t]],o=n[Km[1-t]],s=a.getUnitLayoutInfo(t,a.getLocatorCount(t)-1),c=a.getUnitLayoutInfo(t,0),l=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),u=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,d=e.point[t]=r[t];if(!c&&!u){e[Km[t]]=X1.outside;return}if(i===X$.body){c?(e[Km[t]]=X1.inBody,d=os(s.xy+s.wh,ss(c.xy,d)),e.point[t]=d):e[Km[t]]=X1.outside;return}else if(i===X$.corner){u?(e[Km[t]]=X1.inCorner,d=os(u.xy+u.wh,ss(l.xy,d)),e.point[t]=d):e[Km[t]]=X1.outside;return}var f=c?c.xy:u?u.xy+u.wh:NaN,p=l?l.xy:f,m=s?s.xy+s.wh:f;if(dm){if(!i){e[Km[t]]=X1.outside;return}d=m}e.point[t]=d,e[Km[t]]=f<=d&&d<=m?X1.inBody:p<=d&&d<=f?X1.inCorner:X1.outside}function $1(e,t,n,r){var i=1-n;if(e[Km[n]]!==X1.outside)for(r[Km[n]].resetCellIterator(H1);H1.next();){var a=H1.item;if(n0(e.point[n],a.rect,n)&&n0(e.point[i],a.rect,i)){t[n]=a.ordinal,t[i]=a.id[Km[i]];return}}}function e0(e,t,n,r){if(e[Km[n]]!==X1.outside){for((e[Km[n]]===X1.inCorner?r[Km[1-n]]:r[Km[n]]).resetLayoutIterator(V1,n);V1.next();)if(t0(e.point[n],V1.item)){t[n]=V1.item.id[Km[n]];return}}}function t0(e,t){return t.xy<=e&&e<=t.xy+t.wh}function n0(e,t,n){return t[Km[n]]<=e&&e<=t[Km[n]]+t[qm[n]]}function r0(e){e.registerComponentModel(S1),e.registerComponentView(k1),e.registerCoordinateSystem(`matrix`,z1)}function i0(e,t){var n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),t.parentId==null){var r=t.parentOption;r?t.parentId=r.id:n&&(t.parentId=n.parentId)}t.parentOption=null}function a0(e,t){var n;return L(t,function(t){e[t]!=null&&e[t]!==`auto`&&(n=!0)}),n}function o0(e,t,n){var r=F({},n),i=e[t],a=n.$action||`merge`;a===`merge`?i?(De(i,r,!0),rv(i,r,{ignoreSize:!0}),av(n,i),l0(n,i),l0(n,i,`shape`),l0(n,i,`style`),l0(n,i,`extra`),n.clipPath=i.clipPath):e[t]=r:a===`replace`?e[t]=r:a===`remove`&&i&&(e[t]=null)}var s0=[`transition`,`enterFrom`,`leaveTo`],c0=s0.concat([`enterAnimation`,`updateAnimation`,`leaveAnimation`]);function l0(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),!(!e||!t))for(var r=n?s0:c0,i=0;i=0;c--){var l=n[c],u=_c(l.id,null),d=u==null?null:i.get(u);if(d){var f=d.parent,h=p0(f),g=f===r?{width:a,height:o}:{width:h.width,height:h.height},_={},v=ev(d,l,g,null,{hv:l.hv,boundingMode:l.bounding},_);if(!p0(d).isNew&&v){for(var y=l.transition,b={},x=0;x=0)?b[S]=C:d[S]=C}Im(d,b,e,0)}else d.attr(_)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each(function(n){_0(n,p0(n).option,t,e._lastGraphicModel)}),this._elMap=G()},t.prototype.dispose=function(){this._clear()},t.type=`graphic`,t}(Tx);function h0(e){var t=new(K(f0,e)?f0[e]:Qm(e))({});return p0(t).type=e,t}function g0(e,t,n,r){var i=h0(n);return t.add(i),r.set(e,i),p0(i).id=e,p0(i).isNew=!0,i}function _0(e,t,n,r){e&&e.parent&&(e.type===`group`&&e.traverse(function(e){_0(e,t,n,r)}),RX(e,t,r),n.removeKey(p0(e).id))}function v0(e,t,n,r){e.isGroup||L([[`cursor`,eu.prototype.cursor],[`zlevel`,r||0],[`z`,n||0],[`z2`,0]],function(n){var r=n[0];K(t,r)?e[r]=W(t[r],n[1]):e[r]??(e[r]=n[1])}),L(Re(t),function(n){if(n.indexOf(`on`)===0){var r=t[n];e[n]=V(r)?r:null}}),K(t,`draggable`)&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function y0(e){return e=F({},e),L([`id`,`parentId`,`$action`,`hv`,`bounding`,`textContent`,`clipPath`].concat(U_),function(t){delete e[t]}),e}function b0(e,t,n){var r=Vd(e).eventData;!e.silent&&!e.ignore&&!r&&(r=Vd(e).eventData={componentType:`graphic`,componentIndex:t.componentIndex,name:e.name}),r&&(r.info=n.info)}function x0(e){e.registerComponentModel(d0),e.registerComponentView(m0),e.registerPreprocessor(function(e){var t=e.graphic;B(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var S0=[`x`,`y`,`radius`,`angle`,`single`],C0=Tc(),w0=[`cartesian2d`,`polar`,`singleAxis`];function T0(e){return je(w0,e.get(`coordinateSystem`))>=0}function E0(e){return e+`Axis`}function D0(e,t){var n=G(),r=[],i=G();e.eachComponent({mainType:`dataZoom`,query:t},function(e){i.get(e.uid)||s(e)});var a;do a=!1,e.eachComponent(`dataZoom`,o);while(a);function o(e){!i.get(e.uid)&&c(e)&&(s(e),a=!0)}function s(e){i.set(e.uid,!0),r.push(e),l(e)}function c(e){var t=!1;return e.eachTargetAxis(function(e,r){var i=n.get(e);i&&i[r]&&(t=!0)}),t}function l(e){e.eachTargetAxis(function(e,t){(n.get(e)||n.set(e,[]))[t]=!0})}return r}function O0(e){var t=e.ecModel,n={infoList:[],infoMap:G()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(E0(e),r);if(i){var a=i.getCoordSysModel();if(a){var o=a.uid,s=n.infoMap.get(o);s||(s={model:a,axisModels:[]},n.infoList.push(s),n.infoMap.set(o,s)),s.axisModels.push(i)}}}),n}function k0(e){var t=C0(zS(e));return t.axisProxyMap||=G()}function A0(e){if(e)return k0(e.ecModel).get(e.uid)}function j0(e,t){k0(e.ecModel).set(e.uid,t)}function M0(e,t){var n=t.getAxisModel().axis.__alignTo;return n&&e.getAxisProxy(n.dim,n.model.componentIndex)?A0(n.model):null}var N0=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),P0=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=[`percent`,`percent`],n}return t.prototype.init=function(e,t,n){var r=F0(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=F0(e);De(this.option,e,!0),De(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;L([[`start`,`startValue`],[`end`,`endValue`]],function(e,r){this._rangePropMode[r]===`value`&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get(`orient`,!0),t=this._targetAxisInfoMap=G();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||`horizontal`,this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return L(S0,function(n){var r=this.getReferringComponents(E0(n),Ac);if(r.specified){t=!0;var i=new N0;L(r.models,function(e){i.add(e.componentIndex)}),e.set(n,i)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i=t===`vertical`?`y`:`x`,a=n.findComponents({mainType:i+`Axis`});o(a,i)}if(r){var a=n.findComponents({mainType:`singleAxis`,filter:function(e){return e.get(`orient`,!0)===t}});o(a,`single`)}function o(t,n){var i=t[0];if(i){var a=new N0;if(a.add(i.componentIndex),e.set(n,a),r=!1,n===`x`||n===`y`){var o=i.getReferringComponents(`grid`,kc).models[0];o&&L(t,function(e){i.componentIndex!==e.componentIndex&&o===e.getReferringComponents(`grid`,kc).models[0]&&a.add(e.componentIndex)})}}}r&&L(S0,function(t){if(r){var i=n.findComponents({mainType:E0(t),filter:function(e){return e.get(`type`,!0)===`category`}});if(i[0]){var a=new N0;a.add(i[0].componentIndex),e.set(t,a),r=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){!e&&(e=t)},this),e===`y`?`vertical`:`horizontal`},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty(`throttle`)&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get(`rangeMode`);L([[`start`,`startValue`],[`end`,`endValue`]],function(r,i){var a=e[r[0]]!=null,o=e[r[1]]!=null;a&&!o?t[i]=`percent`:!a&&o?t[i]=`value`:n?t[i]=n[i]:a&&(t[i]=`percent`)})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){e??=this.ecModel.getComponent(E0(t),n)},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){L(n.indexList,function(n){e.call(t,r,n)})})},t.prototype.getAxisProxy=function(e,t){return A0(this.getAxisModel(e,t))},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(E0(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;L([[`start`,`startValue`],[`end`,`endValue`]],function(r){(e[r[0]]!=null||e[r[1]]!=null)&&(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;L([`start`,`startValue`,`end`,`endValue`],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent},t.prototype.getValueRange=function(e,t){if(e==null&&t==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getWindow().value}else return this.getAxisProxy(e,t).getWindow().value},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return A0(e);for(var t,n=this._targetAxisInfoMap.keys(),r=0;ra[1];if(u&&!d&&!f)return!0;u&&(i=!0),d&&(t=!0),f&&(n=!0)}return i&&t&&n})}else L(r,function(n){if(i===`empty`)e.setData(t=t.map(n,function(e){return o(e)?e:NaN}));else{var r={};r[n]=a,t.selectRange(r)}});L(r,function(e){t.setApproximateExtent(a,e)})}});function o(e){return e>=a[0]&&e<=a[1]}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._extent;L([`min`,`max`],function(r){var i=t.get(r+`Span`),a=t.get(r+`ValueSpan`);a!=null&&(a=this.getAxisModel().axis.scale.parse(a)),a==null?i!=null&&(a=_s(i,[0,100],n,!0)-n[0]):i=_s(n[0]+a,n,[0,100],!0),e[r+`Span`]=i,e[r+`ValueSpan`]=a},this)},e}(),B0={dirtyOnOverallProgress:!0,getTargetSeries:function(e){function t(t){e.eachComponent(`dataZoom`,function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(E0(r),i),n)})})}var n=[];t(function(t,r,i,a){if(!A0(i)){var o=new z0(t,r,a,e);n.push(o),j0(i,o)}});var r=G();return L(n,function(e){L(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset:function(e,t){e.eachComponent(`dataZoom`,function(e){var n=[];e.eachTargetAxis(function(t,r){var i=e.getAxisProxy(t,r),a=M0(e,i);a?n.push([i,a]):i.reset(e,null)}),L(n,function(t){t[0].reset(e,t[1].getWindow().percentInverted)}),e.eachTargetAxis(function(n,r){e.getAxisProxy(n,r).filterData(e,t)})}),e.eachComponent(`dataZoom`,function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getWindow(),r=n.percent,i=n.value;e.setCalculatedRange({start:r[0],end:r[1],startValue:i[0],endValue:i[1]})}})}};function V0(e){e.registerAction(`dataZoom`,function(e,t){L(D0(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var H0=Yc();function U0(e){H0(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,B0),V0(e),e.registerSubTypeDefaulter(`dataZoom`,function(){return`slider`})})}function W0(e){e.registerComponentModel(I0),e.registerComponentView(R0),U0(e)}var G0=function(){function e(){}return e}(),K0={};function q0(e,t){K0[e]=t}function J0(e){return K0[e]}var Y0=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t,n,r){var i=r.getTheme().get(`toolbox`),a=i?i.feature:null;a&&(this._themeFeatureOption=F({},a),i.feature={}),e.prototype.init.call(this,t,n,r),a&&(i.feature=a)},t.prototype.optionUpdated=function(){L(this.option.feature,function(e,t){var n=this._themeFeatureOption,r=J0(t);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(this.ecModel)),n&&n[t]&&(De(e,n[t]),n[t]=null),De(e,r.defaultOption))},this)},t.type=`toolbox`,t.layoutMode={type:`box`,ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:`horizontal`,left:`right`,top:`top`,backgroundColor:`transparent`,borderColor:Z.color.border,borderRadius:0,borderWidth:0,padding:Z.size.m,itemSize:15,itemGap:Z.size.s,showTitle:!0,iconStyle:{borderColor:Z.color.accent50,color:`none`},emphasis:{iconStyle:{borderColor:Z.color.accent70}},tooltip:{show:!1,position:`bottom`}},t}(sv);function X0(e,t){var n=x_(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Sd({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var Z0=function(e){M(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n,r){var i=this.group;if(i.removeAll(),!e.get(`show`))return;var a=+e.get(`itemSize`),o=e.get(`orient`)===`vertical`,s=e.get(`feature`)||{},c=this._features||=G(),l=[];L(s,function(e,t){l.push(t)}),new VT(this._featureNames||[],l).add(u).update(u).remove(Be(u,null)).execute(),this._featureNames=Ie(l,function(e){return c.hasKey(e)});function u(i,a){var o=i!=null&&a==null,u=i!=null&&a!=null,f=i==null,p=o||u?l[i]:l[a],m=s[p],h=o||u?new fg(m,e,t):null,g=h&&h.get(`show`),_;if(o){if(!g)return;if(Q0(p))_={onclick:h.option.onclick,featureName:p};else{var v=J0(p);if(!v)return;_=new v}c.set(p,_)}else _=c.get(p);if(f||!g){$0(_)&&_.dispose&&_.dispose(t,n),c.removeKey(p);return}r&&r.newTitle!=null&&r.featureName===p&&(m.title=r.newTitle),o&&(_.uid=mg(`toolbox-feature`)),_.model=h,_.ecModel=t,_.api=n,d(h,_,p),h.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&(t===`emphasis`?Pf:Ff)(r[e])},$0(_)&&_.render&&_.render(h,t,n,r)}function d(r,s,c){var l=r.getModel(`iconStyle`),u=r.getModel([`emphasis`,`iconStyle`]),d=s instanceof G0&&s.getIcons?s.getIcons():r.get(`icon`),f=r.get(`title`)||{},p,m;H(d)?(p={},p[c]=d):p=d,H(f)?(m={},m[c]=f):m=f;var h=r.iconPaths={};L(p,function(c,d){var f=hh(c,{},{x:-a/2,y:-a/2,width:a,height:a});f.setStyle(l.getItemStyle());var p=f.ensureState(`emphasis`);p.style=u.getItemStyle();var g=new Dd({style:{text:m[d],align:u.get(`textAlign`),borderRadius:u.get(`textBorderRadius`),padding:u.get(`textPadding`),fill:null,font:Zh({fontStyle:u.get(`textFontStyle`),fontFamily:u.get(`textFontFamily`),fontSize:u.get(`textFontSize`),fontWeight:u.get(`textFontWeight`)},t)},ignore:!0});f.setTextContent(g),Ch({el:f,componentModel:e,itemName:d,formatterParamsExtra:{title:m[d]}}),f.__title=m[d],f.on(`mouseover`,function(){var t=u.getItemStyle(),r=o?e.get(`right`)==null&&e.get(`left`)!==`right`?`right`:`left`:e.get(`bottom`)==null&&e.get(`top`)!==`bottom`?`bottom`:`top`;g.setStyle({fill:u.get(`textFill`)||t.fill||t.stroke||Z.color.neutral99,backgroundColor:u.get(`textBackgroundColor`)}),f.setTextConfig({position:u.get(`textPosition`)||r}),g.ignore=!e.get(`showTitle`),n.enterEmphasis(this)}).on(`mouseout`,function(){r.get([`iconStatus`,d])!==`emphasis`&&n.leaveEmphasis(this),g.hide()}),(r.get([`iconStatus`,d])===`emphasis`?Pf:Ff)(f),i.add(f),f.on(`click`,z(s.onclick,s,t,n,d)),h[d]=f})}var f=$_(e,n).refContainer,p=e.getBoxLayoutParams(),m=e.get(`padding`),h=X_(p,f,m);K_(e.get(`orient`),i,e.get(`itemGap`),h.width,h.height),ev(i,p,f,m),i.add(X0(i.getBoundingRect(),e)),o||i.eachChild(function(e){var t=e.__title,r=e.ensureState(`emphasis`),o=r.textConfig||={},s=e.getTextContent(),c=s&&s.ensureState(`emphasis`);if(c&&!V(c)&&t){var l=c.style||={},u=yo(t,Dd.makeFont(l)),d=e.x+i.x,f=e.y+i.y+a,p=!1;f+u.height>n.getHeight()&&(o.position=`top`,p=!0);var m=p?-5-u.height:a+10;d+u.width/2>n.getWidth()?(o.position=[`100%`,m],l.align=`right`):d-u.width/2<0&&(o.position=[0,m],l.align=`left`)}})},t.prototype.updateView=function(e,t,n,r){L(this._features,function(e){e&&e instanceof G0&&e.updateView&&e.updateView(e.model,t,n,r)})},t.prototype.dispose=function(e,t){L(this._features,function(n){n&&n instanceof G0&&n.dispose&&n.dispose(e,t)})},t.type=`toolbox`,t}(Tx);function Q0(e){return e.indexOf(`my`)===0}function $0(e){return e instanceof G0}var e2=function(e){M(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(e,t){var n=this.model,r=n.get(`name`)||e.get(`title.0.text`)||`echarts`,i=t.getZr().painter.getType()===`svg`,a=i?`svg`:n.get(`type`,!0)||`png`,o=t.getConnectedDataURL({type:a,backgroundColor:n.get(`backgroundColor`,!0)||e.get(`backgroundColor`)||Z.color.neutral00,connectedBackgroundColor:n.get(`connectedBackgroundColor`),excludeComponents:n.get(`excludeComponents`),pixelRatio:n.get(`pixelRatio`)}),s=N.browser;if(typeof MouseEvent==`function`&&(s.newEdge||!s.ie&&!s.edge)){var c=document.createElement(`a`);c.download=r+`.`+a,c.target=`_blank`,c.href=o;var l=new MouseEvent(`click`,{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(l)}else if(window.navigator.msSaveOrOpenBlob||i){var u=o.split(`,`),d=u[0].indexOf(`base64`)>-1,f=i?decodeURIComponent(u[1]):u[1];d&&(f=window.atob(f));var p=r+`.`+a;if(window.navigator.msSaveOrOpenBlob){for(var m=f.length,h=new Uint8Array(m);m--;)h[m]=f.charCodeAt(m);var g=new Blob([h]);window.navigator.msSaveOrOpenBlob(g,p)}else{var _=document.createElement(`iframe`);document.body.appendChild(_);var v=_.contentWindow,y=v.document;y.open(`image/svg+xml`,`replace`),y.write(f),y.close(),v.focus(),y.execCommand(`SaveAs`,!0,p),document.body.removeChild(_)}}else{var b=n.get(`lang`),x=``,S=window.open();S.document.write(x),S.document.title=r}},t.getDefaultOption=function(e){return{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:Z.color.neutral00,name:``,excludeComponents:[`toolbox`],lang:e.getLocaleModel().get([`toolbox`,`saveAsImage`,`lang`])}},t}(G0),t2=`__ec_magicType_stack__`,n2=[[`line`,`bar`],[`stack`]],r2=function(e){M(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,t=e.get(`icon`),n={};return L(e.get(`type`),function(e){t[e]&&(n[e]=t[e])}),n},t.getDefaultOption=function(e){return{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:{}}},t.prototype.onclick=function(e,t,n){var r=this.model,i=r.get([`seriesIndex`,n]);if(i2[n]){var a={series:[]};L(n2,function(e){je(e,n)>=0&&L(e,function(e){r.setIconStatus(e,`normal`)})}),r.setIconStatus(n,`emphasis`),e.eachComponent({mainType:`series`,query:i==null?null:{seriesIndex:i}},function(e){var t=e.subType,i=e.id,o=i2[n](t,i,e,r);o&&(I(o,e.option),a.series.push(o));var s=e.coordinateSystem;if(s&&s.type===`cartesian2d`&&(n===`line`||n===`bar`)){var c=s.getAxesByScale(`ordinal`)[0];if(c){var l=c.dim+`Axis`,u=e.getReferringComponents(l,kc).models[0].componentIndex;a[l]=a[l]||[];for(var d=0;d<=u;d++)a[l][u]=a[l][u]||{};a[l][u].boundaryGap=n===`bar`}}});var o,s=n;n===`stack`&&(o=De({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),r.get([`iconStatus`,n])!==`emphasis`&&(s=`tiled`)),t.dispatchAction({type:`changeMagicType`,currentType:s,newOption:a,newTitle:o,featureName:`magicType`})}},t}(G0),i2={line:function(e,t,n,r){if(e===`bar`)return De({id:t,type:`line`,data:n.get(`data`),stack:n.get(`stack`),markPoint:n.get(`markPoint`),markLine:n.get(`markLine`)},r.get([`option`,`line`])||{},!0)},bar:function(e,t,n,r){if(e===`line`)return De({id:t,type:`bar`,data:n.get(`data`),stack:n.get(`stack`),markPoint:n.get(`markPoint`),markLine:n.get(`markLine`)},r.get([`option`,`bar`])||{},!0)},stack:function(e,t,n,r){var i=n.get(`stack`)===t2;if(e===`line`||e===`bar`)return r.setIconStatus(`stack`,i?`normal`:`emphasis`),De({id:t,stack:i?``:t2},r.get([`option`,`stack`])||{},!0)}};xT({type:`changeMagicType`,event:`magicTypeChanged`,update:`prepareAndUpdate`},function(e,t){t.mergeOption(e.newOption)});var a2=Array(60).join(`-`),o2=` `;function s2(e){var t={},n=[],r=[];return e.eachRawSeries(function(e){var i=e.coordinateSystem;if(i&&(i.type===`cartesian2d`||i.type===`polar`)){var a=i.getBaseAxis();if(a.type===`category`){var o=$P(a);t[o]||(t[o]={categoryAxis:a,valueAxis:i.getOtherAxis(a),series:[]},r.push({axisDim:a.dim,axisIndex:a.index})),t[o].series.push(e)}else n.push(e)}else n.push(e)}),{seriesGroupByCategoryAxis:t,other:n,meta:r}}function c2(e){var t=[];return L(e,function(e,n){var r=e.categoryAxis,i=e.valueAxis.dim,a=[` `].concat(R(e.series,function(e){return e.name})),o=[r.model.getCategories()];L(e.series,function(e){var t=e.getRawData();o.push(e.getRawData().mapArray(t.mapDimension(i),function(e){return e}))});for(var s=[a.join(o2)],c=0;c=0)return!0}var p2=RegExp(`[`+o2+`]+`,`g`);function m2(e){for(var t=e.split(/\n+/g),n=d2(t.shift()).split(p2),r=[],i=R(n,function(e){return{name:e,data:[]}}),a=0;a=0&&!n[i][r];i--);if(i<0){var a=e.queryComponents({mainType:`dataZoom`,subType:`select`,id:r})[0];if(a){var o=a.getPercentRange();n[0][r]={dataZoomId:r,start:o[0],end:o[1]}}}}),n.push(t)}function S2(e){var t=T2(e),n=t[t.length-1];t.length>1&&t.pop();var r={};return y2(n,function(e,n){for(var i=t.length-1;i>=0;i--)if(e=t[i][n],e){r[n]=e;break}}),r}function C2(e){b2(e).snapshots=null}function w2(e){return T2(e).length}function T2(e){var t=b2(e);return t.snapshots||=[{}],t.snapshots}var E2=function(e){M(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(e,t){C2(e),t.dispatchAction({type:`restore`,from:this.uid})},t.getDefaultOption=function(e){return{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`])}},t}(G0);xT({type:`restore`,event:`restore`,update:`prepareAndUpdate`},function(e,t){t.resetOption(`recreate`)});var D2=[`grid`,`xAxis`,`yAxis`,`geo`,`graph`,`polar`,`radiusAxis`,`angleAxis`,`bmap`],O2=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=A2(t,e);L(j2,function(e,t){(!n||!n.include||je(n.include,t)>=0)&&e(i,r._targetInfoList)})}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(e,t,n){if((e.coordRanges||=[]).push(t),!e.coordRange){e.coordRange=t;var r=P2[e.brushType](0,n,t);e.__rangeOffset={offset:I2[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}}),e},e.prototype.matchOutputRanges=function(e,t,n){L(e,function(e){var r=this.findTargetInfo(e,t);r&&r!==!0&&L(r.coordSyses,function(r){n(e,P2[e.brushType](1,r,e.range,!0).values,r,t)})},this)},e.prototype.setInputRanges=function(e,t){L(e,function(e){var n=this.findTargetInfo(e,t);if(e.range=e.range||[],n&&n!==!0){e.panelId=n.panelId;var r=P2[e.brushType](0,n.coordSys,e.coordRange),i=e.__rangeOffset;e.range=i?I2[e.brushType](r.values,i.offset,R2(r.xyMinMax,i.xyMinMax)):r.values}},this)},e.prototype.makePanelOpts=function(e,t){return R(this._targetInfoList,function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:eq(r),isTargetByCursor:nq(r,e,n.coordSysModel),getLinearBrushOtherExtent:tq(r)}})},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return r===!0||r&&je(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=A2(t,e),i=0;ie[1]&&e.reverse(),e}function A2(e,t){return Dc(e,t,{includeMainTypes:D2})}var j2={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,a=G(),o={},s={};!n&&!r&&!i||(L(n,function(e){var t=e.axis.grid.model;a.set(t.id,t),o[t.id]=!0}),L(r,function(e){var t=e.axis.grid.model;a.set(t.id,t),s[t.id]=!0}),L(i,function(e){a.set(e.id,e),o[e.id]=!0,s[e.id]=!0}),a.each(function(e){var i=e.coordinateSystem,a=[];L(i.getCartesians(),function(e,t){(je(n,e.getAxis(`x`).model)>=0||je(r,e.getAxis(`y`).model)>=0)&&a.push(e)}),t.push({panelId:`grid--`+e.id,gridModel:e,coordSysModel:e,coordSys:a[0],coordSyses:a,getPanelRect:N2.grid,xAxisDeclared:o[e.id],yAxisDeclared:s[e.id]})}))},geo:function(e,t){L(e.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:`geo--`+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:N2.geo})})}},M2=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],N2={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys.view,t=Oz(null,e);return Jn(t,t,Ez(null,e)),t}},P2={lineX:Be(F2,0),lineY:Be(F2,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),a=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),o=[k2([i[0],a[0]]),k2([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,n,r){var i=[Bc(),Bc()];return{values:R(n,function(n){var a=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],a[0]),i[1][0]=Math.min(i[1][0],a[1]),i[0][1]=Math.max(i[0][1],a[0]),i[1][1]=Math.max(i[1][1],a[1]),a}),xyMinMax:i}}};function F2(e,t,n,r){var i=n.getAxis([`x`,`y`][e]),a=k2(R([0,1],function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))})),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}var I2={lineX:Be(L2,0),lineY:Be(L2,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return R(e,function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]})}};function L2(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function R2(e,t){var n=z2(e),r=z2(t),i=[n[0]/r[0],n[1]/r[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function z2(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var B2=L,V2=bc(`toolbox-dataZoom_`),H2={x:`width`,y:`height`},U2=function(e){M(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n,r){this._brushController||(this._brushController=new _K(n.getZr()),this._brushController.on(`brush`,z(this._onBrush,this)).mount()),q2(e,t,this,r,n),K2(e,t)},t.prototype.onclick=function(e,t,n){W2[n].call(this)},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(!e.isEnd||!t.length)return;var n={},r=this.ecModel;this._brushController.updateCovers([]),new O2(G2(this.model),r,{include:[`grid`]}).matchOutputRanges(t,r,function(e,t,n){if(n.type===`cartesian2d`){var r=n.master.getRect().clone(),a=e.brushType;a===`rect`?(i(`x`,n,r,t[0]),i(`y`,n,r,t[1])):i({lineX:`x`,lineY:`y`}[a],n,r,t)}}),x2(r,n),this._dispatchZoomAction(n);function i(e,t,i,o){var s=t.getAxis(e),c=s.model,l=a(e,c,r),u=l.findRepresentativeAxisProxy(c).getMinMaxSpan(),d=s.scale.getExtent();(u.minValueSpan!=null||u.maxValueSpan!=null)&&(o=YG(0,o.slice(),d,0,u.minValueSpan,u.maxValueSpan));var f=Os(d,i[H2[e]],.5);l&&(n[l.id]={dataZoomId:l.id,startValue:isFinite(f)?Ss(o[0],f):o[0],endValue:isFinite(f)?Ss(o[1],f):o[1]})}function a(e,t,n){var r;return n.eachComponent({mainType:`dataZoom`,subType:`select`},function(n){n.getAxisModel(e,t.componentIndex)&&(r=n)}),r}},t.prototype._dispatchZoomAction=function(e){var t=[];B2(e,function(e,n){t.push(P(e))}),t.length&&this.api.dispatchAction({type:`dataZoom`,from:this.uid,batch:t})},t.getDefaultOption=function(e){return{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:Z.color.backgroundTint}}},t}(G0),W2={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:`takeGlobalCursor`,key:`dataZoomSelect`,dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(S2(this.ecModel))}};function G2(e){var t={xAxisIndex:e.get(`xAxisIndex`,!0),yAxisIndex:e.get(`yAxisIndex`,!0),xAxisId:e.get(`xAxisId`,!0),yAxisId:e.get(`yAxisId`,!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex=`all`),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex=`all`),t}function K2(e,t){e.setIconStatus(`back`,w2(t)>1?`emphasis`:`normal`)}function q2(e,t,n,r,i){var a=n._isZoomActive;r&&r.type===`takeGlobalCursor`&&(a=r.key===`dataZoomSelect`&&r.dataZoomSelectActive),n._isZoomActive=a,e.setIconStatus(`zoom`,a?`emphasis`:`normal`);var o=new O2(G2(e),t,{include:[`grid`]}).makePanelOpts(i,function(e){return e.xAxisDeclared&&!e.yAxisDeclared?`lineX`:!e.xAxisDeclared&&e.yAxisDeclared?`lineY`:`rect`});n._brushController.setPanels(o).enableBrush(a&&o.length?{brushType:`auto`,brushStyle:e.getModel(`brushStyle`).getItemStyle()}:!1)}Dv(`dataZoom`,function(e){var t=e.getComponent(`toolbox`,0),n=[`feature`,`dataZoom`];if(!t||t.get(n)==null)return;var r=t.getModel(n),i=[],a=Dc(e,G2(r));B2(a.xAxisModels,function(e){return o(e,`xAxis`,`xAxisIndex`)}),B2(a.yAxisModels,function(e){return o(e,`yAxis`,`yAxisIndex`)});function o(e,t,n){var a=e.componentIndex,o={type:`select`,$fromToolbox:!0,filterMode:r.get(`filterMode`,!0)||`filter`,id:V2+t+a};o[n]=a,i.push(o)}return i});function J2(e){e.registerComponentModel(Y0),e.registerComponentView(Z0),q0(`saveAsImage`,e2),q0(`magicType`,r2),q0(`dataView`,_2),q0(`dataZoom`,U2),q0(`restore`,E2),RT(W0)}var Y2=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Z.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Z.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Z.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Z.color.tertiary,fontSize:14}},t}(sv);function X2(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function Z2(e){if(N.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function s4(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(N.transformSupported?``+r4+i:`,left`+i+`,top`+i)),n4+`:`+a}function c4(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!N.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=N.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+r4+`:`+o+`;`:[[`top`,0],[`left`,0],[Q2,o]]}function l4(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=W(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),L([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function u4(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=cx(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(s4(a,n,r)),o&&i.push(`background-color:`+o),L([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=b_(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(l4(d)),f!=null&&i.push(`padding:`+x_(f).join(`px `)+`px`),i.join(`;`)+`;`}function d4(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Yt(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var f4=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,N.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(H(i)?document.querySelector(i):Ge(i)?i:V(i)&&i(e.getDom()));d4(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;dn(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=t4(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=i4+u4(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+c4(i[0],i[1],!0)+(`border-color:`+A_(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(H(i)&&n.get(`trigger`)===`item`&&!X2(n)&&(o=o4(n,r,i)),H(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,B(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(!(r.from===this.uid||N.node||!n.getDom())){var i=b4(r,n);this._ticket=``;var a=r.dataByCoordSys,o=T4(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=_4;c.x=r.x,c.y=r.y,c.update(),Vd(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=SQ(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(b4(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(!(i==null||a==null||o==null)){var s=t.getSeriesByIndex(i);if(s&&y4([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(Vd(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;OS(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Vd(e).dataIndex==null?Vd(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=z(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=y4([t.tooltipOption],r),o=this._renderMode,s=[],c=Jb(`section`,{blocks:[],noHeader:!0}),l=[],u=new lx;L(e,function(e){L(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(!(!t||i==null)){var f=$Z(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=Jb(`section`,{header:f,noHeader:!tt(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),L(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=RD(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,A_(m.color),o);var h=ib(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=y4([a],r).get(`valueFormatter`);p.blocks.push(_?F({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=ex(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` `:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Vd(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=y4([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(!(m!=null&&m!==`item`)){var h=s.getDataParams(c,l),g=new lx;h.marker=g.makeTooltipMarker(`item`,A_(h.color),d);var _=ib(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?ex(y?F({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Vd(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(H(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=P(a),a.content=rn(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=y4(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new lx;this._showOrMove(d,function(){var n=P(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,!(!e.get(`showContent`)||!e.get(`show`))){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u)if(H(u)){var p=e.ecModel.get(`useUTC`),m=B(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=e_(m.axisValue,d,p)),d=T_(d,n,!0)}else if(V(u)){var g=z(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u;l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||B(t))return{color:r||i};if(!B(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),V(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),B(t))n=X(t[0],s),r=X(t[1],c);else if(U(t)){var p=t;p.width=l[0],p.height=l[1];var m=X_(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(H(t)&&o){var h=C4(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=x4(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=w4(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=w4(d)?l[1]/2:d===`bottom`?l[1]:0),X2(e)){var h=S4(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&L(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&L(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&L(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&L(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){N.node||!t.getDom()||(Bx(this,`_updatePosition`),this._tooltipContent.dispose(),bQ(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(Tx);function y4(e,t,n){var r=t.ecModel,i;n?(i=new fg(n,r,r),i=new fg(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof fg&&(o=o.get(`tooltip`,!0)),H(o)&&(o={formatter:o}),o&&(i=new fg(o,i,r)))}return i}function b4(e,t){return e.dispatchAction||z(t.dispatchAction,t)}function x4(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function S4(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function C4(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function w4(e){return e===`center`||e===`middle`}function T4(e,t,n){var r=Oc(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=jc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Vd(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function E4(e){RT(FQ),e.registerComponentModel(Y2),e.registerComponentView(v4),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},ft),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},ft)}var D4=[`rect`,`polygon`,`keep`,`clear`];function O4(e,t){var n=rc(e?e.brush:[]);if(n.length){var r=[];L(n,function(e){var t=e.hasOwnProperty(`toolbox`)?e.toolbox:[];t instanceof Array&&(r=r.concat(t))});var i=e&&e.toolbox;B(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||={},o=a.brush||={},s=o.type||=[];s.push.apply(s,r),Zc(s,function(e){return e+``},null),t&&!s.length&&s.push.apply(s,D4)}}var k4=L;function A4(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function j4(e,t,n){var r={};return k4(t,function(t){var a=r[t]=i();k4(e[t],function(e,r){if(nU.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new nU(i),r===`opacity`&&(i=P(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new nU(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function M4(e,t,n){var r;L(n,function(e){t.hasOwnProperty(e)&&A4(t[e])&&(r=!0)}),r&&L(n,function(n){t.hasOwnProperty(n)&&A4(t[n])?e[n]=P(t[n]):delete e[n]})}function N4(e,t,n,r,i,a){var o={};L(e,function(e){o[e]=nU.prepareVisualTypes(t[e])});var s;function c(e){return SS(n,s,e)}function l(e,t){wS(n,s,e,t)}a==null?n.each(u):n.each([a],u);function u(e,u){s=a==null?e:u;var d=n.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var f=r.call(i,e),p=t[f],m=o[f],h=0,g=m.length;ht[0][1]&&(t[0][1]=a[0]),a[1]t[1][1]&&(t[1][1]=a[1])}return t&&X4(t)}};function X4(e){return new J(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var Z4=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new _K(t.getZr())).on(`brush`,z(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){H4(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:`brush`,brushId:t,areas:P(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:`brushEnd`,brushId:t,areas:P(n),$from:t})},t.type=`brush`,t}(Tx),Q4=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&M4(n,e,[`inBrush`,`outOfBrush`]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},r.hasOwnProperty(`liftZ`)||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=R(e,function(e){return $4(this.option,e)},this))},t.prototype.setBrushOption=function(e){this.brushOption=$4(this.option,e),this.brushType=this.brushOption.brushType},t.type=`brush`,t.dependencies=[`geo`,`grid`,`xAxis`,`yAxis`,`parallel`,`series`],t.defaultOption={seriesIndex:`all`,brushType:`rect`,brushMode:`single`,transformable:!0,brushStyle:{borderWidth:1,color:Z.color.backgroundTint,borderColor:Z.color.borderTint},throttleType:`fixRate`,throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:Z.color.disabled},t}(sv);function $4(e,t){return De({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new fg(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var e3=[`rect`,`polygon`,`lineX`,`lineY`,`keep`,`clear`],t3=function(e){M(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n){var r,i,a;t.eachComponent({mainType:`brush`},function(e){r=e.brushType,i=e.brushOption.brushMode||`single`,a||=!!e.areas.length}),this._brushType=r,this._brushMode=i,L(e.get(`type`,!0),function(t){e.setIconStatus(t,(t===`keep`?i===`multiple`:t===`clear`?a:t===r)?`emphasis`:`normal`)})},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get(`icon`,!0),n={};return L(e.get(`type`,!0),function(e){t[e]&&(n[e]=t[e])}),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,i=this._brushMode;n===`clear`?(t.dispatchAction({type:`axisAreaSelect`,intervals:[]}),t.dispatchAction({type:`brush`,command:`clear`,areas:[]})):t.dispatchAction({type:`takeGlobalCursor`,key:`brush`,brushOption:{brushType:n===`keep`?r:r!==n&&n,brushMode:n===`keep`?i===`multiple`?`single`:`multiple`:i}})},t.getDefaultOption=function(e){return{show:!0,type:e3.slice(),icon:{rect:`M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13`,polygon:`M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2`,lineX:`M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4`,lineY:`M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4`,keep:`M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z`,clear:`M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2`},title:e.getLocaleModel().get([`toolbox`,`brush`,`title`])}},t}(G0);function n3(e){e.registerComponentView(Z4),e.registerComponentModel(Q4),e.registerPreprocessor(O4),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,U4),e.registerAction({type:`brush`,event:`brush`,update:`updateVisual`},function(e,t){t.eachComponent({mainType:`brush`,query:e},function(t){t.setAreas(e.areas)})}),e.registerAction({type:`brushSelect`,event:`brushSelected`,update:`none`},ft),e.registerAction({type:`brushEnd`,event:`brushEnd`,update:`none`},ft),q0(`brush`,t3)}var r3=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.type=`title`,t.defaultOption={z:6,show:!0,text:``,target:`blank`,subtext:``,subtarget:`blank`,left:`center`,top:Z.size.m,backgroundColor:Z.color.transparent,borderColor:Z.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:`bold`,color:Z.color.primary},subtextStyle:{fontSize:12,color:Z.color.quaternary}},t}(sv),i3=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=W(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new Dd({style:Uh(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new Dd({style:Uh(a,{text:u,fill:a.getTextColor(),y:l.height+e.get(`itemGap`),verticalAlign:`top`},{disableBox:!0}),z2:10}),f=e.get(`link`),p=e.get(`sublink`),m=e.get(`triggerEvent`,!0);c.silent=!f&&!m,d.silent=!p&&!m,f&&c.on(`click`,function(){j_(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){j_(p,`_`+e.get(`subtarget`))}),Vd(c).eventData=Vd(d).eventData=m?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(d);var h=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=h.width,g.height=h.height;var _=X_(g,$_(e,n).refContainer,e.get(`padding`));o||(o=e.get(`left`)||e.get(`right`),o===`middle`&&(o=`center`),o===`right`?_.x+=_.width:o===`center`&&(_.x+=_.width/2)),s||(s=e.get(`top`)||e.get(`bottom`),s===`center`&&(s=`middle`),s===`bottom`?_.y+=_.height:s===`middle`&&(_.y+=_.height/2),s||=`top`),r.x=_.x,r.y=_.y,r.markRedraw();var v={align:o,verticalAlign:s};c.setStyle(v),d.setStyle(v),h=r.getBoundingRect();var y=_.margin,b=e.getItemStyle([`color`,`opacity`]);b.fill=e.get(`backgroundColor`);var x=new Sd({shape:{x:h.x-y[3],y:h.y-y[0],width:h.width+y[1]+y[3],height:h.height+y[0]+y[2],r:e.get(`borderRadius`)},style:b,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type=`title`,t}(Tx);function a3(e){e.registerComponentModel(r3),e.registerComponentView(i3)}var o3=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode=`box`,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e??=this.option.currentIndex;var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-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,t=e.data||[],n=e.axisType,r=this._names=[],i;n===`category`?(i=[],L(t,function(e,t){var n=_c(oc(e),``),a;U(e)?(a=P(e),a.value=t):a=t,i.push(a),r.push(n)})):i=t;var a={category:`ordinal`,time:`time`,value:`number`}[n]||`number`;(this._data=new hE([{name:`value`,type:a}],this)).initData(i,r)},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:Z.size.m,controlPosition:`left`,autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:Z.color.secondary},data:[]},t}(sv),s3=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`timeline.slider`,t.defaultOption=_g(o3.defaultOption,{backgroundColor:`rgba(0,0,0,0)`,borderColor:Z.color.border,borderWidth:0,orient:`horizontal`,inverse:!1,tooltip:{trigger:`item`},symbol:`circle`,symbolSize:12,lineStyle:{show:!0,width:2,color:Z.color.accent10},label:{position:`auto`,show:!0,interval:`auto`,rotate:0,color:Z.color.tertiary},itemStyle:{color:Z.color.accent20,borderWidth:0},checkpointStyle:{symbol:`circle`,symbolSize:15,color:Z.color.accent50,borderColor:Z.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`rgba(0, 0, 0, 0)`,animation:!0,animationDuration:300,animationEasing:`quinticInOut`},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:`left`,playIcon:`path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z`,stopIcon:`path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z`,nextIcon:`path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z`,prevIcon:`path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z`,prevBtnSize:18,nextBtnSize:18,color:Z.color.accent50,borderColor:Z.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:Z.color.accent60},itemStyle:{color:Z.color.accent60,borderColor:Z.color.accent60},controlStyle:{color:Z.color.accent70,borderColor:Z.color.accent70}},progress:{lineStyle:{color:Z.color.accent30},itemStyle:{color:Z.color.accent40}},data:[]}),t}(o3);Ne(s3,rb.prototype);var c3=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`timeline`,t}(Tx),l3=function(e){M(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r)||this;return a.type=i||`value`,a}return t.prototype.getLabelModel=function(){return this.model.getModel(`label`)},t.prototype.isHorizontal=function(){return this.model.get(`orient`)===`horizontal`},t}(Hk),u3=Math.PI,d3=Tc(),f3=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){this.api=t},t.prototype.render=function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get(`show`,!0)){var r=this._layout(e,n),i=this._createGroup(`_mainGroup`),a=this._createGroup(`_labelGroup`),o=this._axis=this._createAxis(r,e);e.formatTooltip=function(e){return Jb(`nameValue`,{noName:!0,value:o.scale.getLabel({value:e})})},L([`AxisLine`,`AxisTick`,`Control`,`CurrentPointer`],function(t){this[`_render`+t](r,i,o,e)},this),this._renderAxisLabel(r,a,o,e),this._position(r,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,t){var n=e.get([`label`,`position`]),r=e.get(`orient`),i=p3(e,t),a=n==null||n===`auto`?r===`horizontal`?i.y+i.height/2=0||a===`+`?`left`:`right`},s={horizontal:a>=0||a===`+`?`top`:`bottom`,vertical:`middle`},c={horizontal:0,vertical:u3/2},l=r===`vertical`?i.height:i.width,u=e.getModel(`controlStyle`),d=u.get(`show`,!0),f=d?u.get(`itemSize`):0,p=d?u.get(`itemGap`):0,m=f+p,h=e.get([`label`,`rotate`])||0;h=h*u3/180;var g,_,v,y=u.get(`position`,!0),b=d&&u.get(`showPlayBtn`,!0),x=d&&u.get(`showPrevBtn`,!0),S=d&&u.get(`showNextBtn`,!0),C=0,w=l;y===`left`||y===`bottom`?(b&&(g=[0,0],C+=m),x&&(_=[C,0],C+=m),S&&(v=[w-f,0],w-=m)):(b&&(g=[w-f,0],w-=m),x&&(_=[0,0],C+=m),S&&(v=[w-f,0],w-=m));var T=[C,w];return e.get(`inverse`)&&T.reverse(),{viewRect:i,mainLength:l,orient:r,rotation:c[r],labelRotation:h,labelPosOpt:a,labelAlign:e.get([`label`,`align`])||o[r],labelBaseline:e.get([`label`,`verticalAlign`])||e.get([`label`,`baseline`])||s[r],playPosition:g,prevBtnPosition:_,nextBtnPosition:v,axisExtent:T,controlSize:f,controlGap:p}},t.prototype._position=function(e,t){var n=this._mainGroup,r=this._labelGroup,i=e.viewRect;if(e.orient===`vertical`){var a=Sn(),o=i.x,s=i.y+i.height;En(a,a,[-o,-s]),Dn(a,a,-u3/2),En(a,a,[o,s]),i=i.clone(),i.applyTransform(a)}var c=g(i),l=g(n.getBoundingRect()),u=g(r.getBoundingRect()),d=[n.x,n.y],f=[r.x,r.y];f[0]=d[0]=c[0][0];var p=e.labelPosOpt;if(p==null||H(p)){var m=p===`+`?0:1;_(d,l,c,1,m),_(f,u,c,1,1-m)}else{var m=p>=0?0:1;_(d,l,c,1,m),f[1]=d[1]+p}n.setPosition(d),r.setPosition(f),n.rotation=r.rotation=e.rotation,h(n),h(r);function h(e){e.originX=c[0][0]-e.x,e.originY=c[1][0]-e.y}function g(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function _(e,t,n,r,i){e[r]+=n[r][i]-t[r][i]}},t.prototype._createAxis=function(e,t){var n=t.getData(),r=t.get(`axisType`)||t.get(`type`);r!==`category`&&r!==`time`&&(r=`value`);var i=ND(t,r,!1);i.getTicks=function(){return n.mapArray([`value`],function(e){return{value:e}})};var a=n.getDataExtent(`value`);i.setExtent(a[0],a[1]),BO(i,{fixMinMax:[!0,!0]});var o=new l3(`value`,i,e.axisExtent,r);return o.model=t,o},t.prototype._createGroup=function(e){var t=this[e]=new Y;return this.group.add(t),t},t.prototype._renderAxisLine=function(e,t,n,r){var i=n.getExtent();if(r.get([`lineStyle`,`show`])){var a=new dm({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:F({lineCap:`round`},r.getModel(`lineStyle`).getLineStyle()),silent:!0,z2:1});t.add(a);var o=this._progressLine=new dm({shape:{x1:i[0],x2:this._currentPointer?this._currentPointer.x:i[0],y1:0,y2:0},style:I({lineCap:`round`,lineWidth:a.style.lineWidth},r.getModel([`progress`,`lineStyle`]).getLineStyle()),silent:!0,z2:1});t.add(o)}},t.prototype._renderAxisTick=function(e,t,n,r){var i=this,a=r.getData(),o=n.scale.getTicks();this._tickSymbols=[],L(o,function(e){var o=n.dataToCoord(e.value),s=a.getItemModel(e.value),c=s.getModel(`itemStyle`),l=s.getModel([`emphasis`,`itemStyle`]),u=s.getModel([`progress`,`itemStyle`]),d=h3(s,c,t,{x:o,y:0,onclick:z(i._changeTimeline,i,e.value)});d.ensureState(`emphasis`).style=l.getItemStyle(),d.ensureState(`progress`).style=u.getItemStyle(),Zf(d);var f=Vd(d);s.get(`tooltip`)?(f.dataIndex=e.value,f.dataModel=r):f.dataIndex=f.dataModel=null,i._tickSymbols.push(d)})},t.prototype._renderAxisLabel=function(e,t,n,r){var i=this;if(n.getLabelModel().get(`show`)){var a=r.getData(),o=n.getViewLabels();this._tickLabels=[],L(o,function(r){if(!r.tick.offInterval){var o=r.tick.value,s=a.getItemModel(o),c=s.getModel(`label`),l=s.getModel([`emphasis`,`label`]),u=s.getModel([`progress`,`label`]),d=new Dd({x:n.dataToCoord(o),y:0,rotation:e.labelRotation-e.rotation,onclick:z(i._changeTimeline,i,o),silent:!1,style:Uh(c,{text:r.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});d.ensureState(`emphasis`).style=Uh(l),d.ensureState(`progress`).style=Uh(u),t.add(d),Zf(d),d3(d).dataIndex=o,i._tickLabels.push(d)}})}},t.prototype._renderControl=function(e,t,n,r){var i=e.controlSize,a=e.rotation,o=r.getModel(`controlStyle`).getItemStyle(),s=r.getModel([`emphasis`,`controlStyle`]).getItemStyle(),c=r.getPlayState(),l=r.get(`inverse`,!0);u(e.nextBtnPosition,`next`,z(this._changeTimeline,this,l?`-`:`+`)),u(e.prevBtnPosition,`prev`,z(this._changeTimeline,this,l?`+`:`-`)),u(e.playPosition,c?`stop`:`play`,z(this._handlePlayClick,this,!c),!0);function u(e,n,c,l){if(e){var u=Co(W(r.get([`controlStyle`,n+`BtnSize`]),i),i),d=[0,-u/2,u,u],f=m3(r,n+`Icon`,d,{x:e[0],y:e[1],originX:i/2,originY:0,rotation:l?-a:0,rectHover:!0,style:o,onclick:c});f.ensureState(`emphasis`).style=s,t.add(f),Zf(f)}}},t.prototype._renderCurrentPointer=function(e,t,n,r){var i=r.getData(),a=r.getCurrentIndex(),o=i.getItemModel(a).getModel(`checkpointStyle`),s=this,c={onCreate:function(e){e.draggable=!0,e.drift=z(s._handlePointerDrag,s),e.ondragend=z(s._handlePointerDragend,s),g3(e,s._progressLine,a,n,r,!0)},onUpdate:function(e){g3(e,s._progressLine,a,n,r)}};this._currentPointer=h3(o,o,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:`timelinePlayChange`,playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,t){var n=this._toAxisCoord(e)[0],r=this._axis,i=ws(r.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var j3={min:Be(A3,`min`),max:Be(A3,`max`),average:Be(A3,`average`),median:Be(A3,`median`)};function M3(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!k3(t)&&!B(t.coord)&&B(i)){var a=N3(t,n,r,e);if(t=P(t),t.type&&j3[t.type]&&a.baseAxis&&a.valueAxis){var o=je(i,a.baseAxis.dim),s=je(i,a.valueAxis.dim),c=j3[t.type](n,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=c[0],t.value=c[1]}else t.coord=[t.xAxis==null?t.radiusAxis:t.xAxis,t.yAxis==null?t.angleAxis:t.yAxis]}if(t.coord==null||!B(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&j3[t.type]){var u=r.getOtherAxis(l);u&&(t.value=R3(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)j3[d[f]]&&(d[f]=R3(n,n.mapDimension(i[f]),d[f]));return t}}function N3(e,t,n,r){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex==null?e.valueDim:t.getDimension(e.valueIndex),i.valueAxis=n.getAxis(P3(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function P3(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function F3(e,t){return e&&e.containData&&t.coord&&!O3(t)?e.containData(t.coord):!0}function I3(e,t,n){return e&&e.containZone&&t.coord&&n.coord&&!O3(t)&&!O3(n)?e.containZone(t.coord,n.coord):!0}function L3(e,t){return e?function(e,n,r,i){return cb(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return cb(e.value,t[i])}}function R3(e,t,n){if(n===`average`){var r=0,i=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,i++)}),r/i}else if(n===`median`)return e.getMedian(t);else return e.getDataExtent(t)[+(n===`max`)]}var z3=Tc(),B3=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this.markerGroupMap=G()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){z3(e).keep=!1}),t.eachSeries(function(e){var i=E3.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!z3(e).keep&&r.group.remove(e.group)}),V3(t,i,this.type)},t.prototype.markKeep=function(e){z3(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;L(e,function(e){var r=E3.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?If(e):Lf(e))})})},t.type=`marker`,t}(Tx);function V3(e,t,n){e.eachSeries(function(e){var r=E3.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=Ah(r),o=a.z,s=a.zlevel;Mh(i.group,o,s)}})}function H3(e,t,n){var r=t.coordinateSystem,i=n.getWidth(),a=n.getHeight(),o=r&&r.getArea&&r.getArea();e.each(function(n){var s=e.getItemModel(n),c=s.get(`relativeTo`)===`coordinate`,l=c?o?o.width:0:i,u=c?o?o.height:0:a,d=c&&o?o.x:0,f=c&&o?o.y:0,p,m=X(s.get(`x`),l)+d,h=X(s.get(`y`),u)+f;if(!isNaN(m)&&!isNaN(h))p=[m,h];else if(t.getMarkerPosition)p=t.getMarkerPosition(e.getValues(e.dimensions,n));else if(r){var g=e.get(r.dimensions[0],n),_=e.get(r.dimensions[1],n);p=r.dataToPoint([g,_])}isNaN(m)||(p[0]=m),isNaN(h)||(p[1]=h),e.setItemLayout(n,p)})}var U3=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=E3.getMarkerModelFromSeries(e,`markPoint`);t&&(H3(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new iN),l=W3(i,e,t);t.setData(l),H3(t.getData(),e,r),l.each(function(e){var n=l.getItemModel(e),r=n.getShallow(`symbol`),i=n.getShallow(`symbolSize`),a=n.getShallow(`symbolRotate`),s=n.getShallow(`symbolOffset`),c=n.getShallow(`symbolKeepAspect`);if(V(r)||V(i)||V(a)||V(s)){var u=t.getRawValue(e),d=t.getDataParams(e);V(r)&&(r=r(u,d)),V(i)&&(i=i(u,d)),V(a)&&(a=a(u,d)),V(s)&&(s=s(u,d))}var f=n.getModel(`itemStyle`).getItemStyle(),p=n.get(`z2`),m=CS(o,`color`);f.fill||=m,l.setItemVisual(e,{z2:W(p,0),symbol:r,symbolSize:i,symbolRotate:a,symbolOffset:s,symbolKeepAspect:c,style:f})}),c.updateData(l),this.group.add(c.group),l.eachItemGraphicEl(function(e){e.traverse(function(e){Vd(e).dataModel=t})}),this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markPoint`,t}(B3);function W3(e,t,n){var r=e?R(e&&e.dimensions,function(e){var n=t.getData();return F(F({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new hE(r,n),a=R(n.get(`data`),Be(M3,t));e&&(a=Ie(a,Be(F3,e)));var o=L3(!!e,r);return i.initData(a,null,o),i}function G3(e){e.registerComponentModel(D3),e.registerComponentView(U3),e.registerPreprocessor(function(e){C3(e.series,`markPoint`)&&(e.markPoint=e.markPoint||{})})}var K3=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markLine`,t.defaultOption={z:5,symbol:[`circle`,`arrow`],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:`item`},label:{show:!0,position:`end`,distance:5},lineStyle:{type:`dashed`},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:`linear`},t}(E3),q3=Tc(),J3=function(e,t,n,r){var i=e.getData(),a;if(B(r))a=r;else{var o=r.type;if(o===`min`||o===`max`||o===`average`||o===`median`||r.xAxis!=null||r.yAxis!=null){var s=void 0,c=void 0;if(r.yAxis!=null||r.xAxis!=null)s=t.getAxis(r.yAxis==null?`x`:`y`),c=Xe(r.yAxis,r.xAxis);else{var l=N3(r,i,t,e);s=l.valueAxis,c=R3(i,DE(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=P(r),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var m=n.get(`precision`);m>=0&&He(c)&&(c=+c.toFixed(Math.min(m,20))),f.coord[u]=p.coord[u]=c,a=[f,p,{type:o,valueIndex:r.valueIndex,value:c}]}else a=[]}var h=[M3(e,a[0]),M3(e,a[1]),F({},a[2])];return h[2].type=h[2].type||null,De(h[2],h[0]),De(h[2],h[1]),h};function Y3(e){return!isNaN(e)&&!isFinite(e)}function X3(e,t,n,r){var i=1-e,a=r.dimensions[e];return Y3(t[i])&&Y3(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function Z3(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(X3(1,n,r,e)||X3(0,n,r,e)))return!0}return F3(e,t[0])&&F3(e,t[1])}function Q3(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=X(o.get(`x`),i.getWidth()),l=X(o.get(`y`),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition)s=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=a.dimensions,d=e.get(u[0],t),f=e.get(u[1],t);s=a.dataToPoint([d,f])}if(DN(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;Y3(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):Y3(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var $3=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=E3.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=q3(t).from,a=q3(t).to;i.each(function(t){Q3(i,t,!0,e,n),Q3(a,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),a.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new DW);this.group.add(c.group);var l=e6(i,e,t),u=l.from,d=l.to,f=l.line;q3(t).from=u,q3(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);B(p)||(p=[p,p]),B(m)||(m=[m,m]),B(h)||(h=[h,h]),B(g)||(g=[g,g]),l.from.each(function(e){_(u,e,!0),_(d,e,!1)}),f.each(function(e){var t=f.getItemModel(e),n=t.getModel(`lineStyle`).getLineStyle();f.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]);var r=t.get(`z2`);n.stroke??=u.getItemVisual(e,`style`).fill,f.setItemVisual(e,{z2:W(r,0),fromSymbolKeepAspect:u.getItemVisual(e,`symbolKeepAspect`),fromSymbolOffset:u.getItemVisual(e,`symbolOffset`),fromSymbolRotate:u.getItemVisual(e,`symbolRotate`),fromSymbolSize:u.getItemVisual(e,`symbolSize`),fromSymbol:u.getItemVisual(e,`symbol`),toSymbolKeepAspect:d.getItemVisual(e,`symbolKeepAspect`),toSymbolOffset:d.getItemVisual(e,`symbolOffset`),toSymbolRotate:d.getItemVisual(e,`symbolRotate`),toSymbolSize:d.getItemVisual(e,`symbolSize`),toSymbol:d.getItemVisual(e,`symbol`),style:n})}),c.updateData(f),l.line.eachItemGraphicEl(function(e){Vd(e).dataModel=t,e.traverse(function(e){Vd(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);Q3(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=CS(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:W(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:W(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:W(a.get(`symbolSize`),m[+!i]),symbol:W(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(B3);function e6(e,t,n){var r=e?R(e&&e.dimensions,function(e){var n=t.getData();return F(F({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new hE(r,n),a=new hE(r,n),o=new hE([],n),s=R(n.get(`data`),Be(J3,t,e,n));e&&(s=Ie(s,Be(Z3,e)));var c=L3(!!e,r);return i.initData(R(s,function(e){return e[0]}),null,c),a.initData(R(s,function(e){return e[1]}),null,c),o.initData(R(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function t6(e){e.registerComponentModel(K3),e.registerComponentView($3),e.registerPreprocessor(function(e){C3(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var n6=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markArea`,t.defaultOption={z:1,tooltip:{trigger:`item`},animation:!1,label:{show:!0,position:`top`},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:`top`}}},t}(E3),r6=Tc(),i6=function(e,t,n,r){var i=r[0],a=r[1];if(!(!i||!a)){var o=M3(e,i),s=M3(e,a),c=o.coord,l=s.coord;c[0]=Xe(c[0],-1/0),c[1]=Xe(c[1],-1/0),l[0]=Xe(l[0],1/0),l[1]=Xe(l[1],1/0);var u=Oe([{},o,s]);return u.coord=[o.coord,s.coord],u.x0=o.x,u.y0=o.y,u.x1=s.x,u.y1=s.y,u}};function a6(e){return!isNaN(e)&&!isFinite(e)}function o6(e,t,n,r){var i=1-e;return a6(t[i])&&a6(n[i])}function s6(e,t){var n=t.coord[0],r=t.coord[1],i={coord:n,x:t.x0,y:t.y0},a={coord:r,x:t.x1,y:t.y1};return DN(e,`cartesian2d`)?n&&r&&(o6(1,n,r,e)||o6(0,n,r,e))?!0:I3(e,i,a):F3(e,i)||F3(e,a)}function c6(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=X(o.get(n[0]),i.getWidth()),l=X(o.get(n[1]),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition){var u=e.getValues([`x0`,`y0`],t),d=e.getValues([`x1`,`y1`],t),f=a.clampData(u),p=a.clampData(d),m=[];n[0]===`x0`?m[0]=f[0]>p[0]?d[0]:u[0]:m[0]=f[0]>p[0]?u[0]:d[0],n[1]===`y0`?m[1]=f[1]>p[1]?d[1]:u[1]:m[1]=f[1]>p[1]?u[1]:d[1],s=r.getMarkerPosition(m,n,!0)}else{var h=e.get(n[0],t),g=e.get(n[1],t),_=[h,g];a.clampData&&a.clampData(_,_),s=a.dataToPoint(_,!0)}if(DN(a,`cartesian2d`)){var v=a.getAxis(`x`),y=a.getAxis(`y`),h=e.get(n[0],t),g=e.get(n[1],t);a6(h)?s[0]=v.toGlobalCoord(v.getExtent()[n[0]===`x0`?0:1]):a6(g)&&(s[1]=y.toGlobalCoord(y.getExtent()[n[1]===`y0`?0:1]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}return s}var l6=[[`x0`,`y0`],[`x1`,`y0`],[`x1`,`y1`],[`x0`,`y1`]],u6=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=E3.getMarkerModelFromSeries(e,`markArea`);if(t){var r=t.getData();r.each(function(t){var i=R(l6,function(i){return c6(r,t,i,e,n)});r.setItemLayout(t,i),r.getItemGraphicEl(t).setShape(`points`,i)})}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,{group:new Y});this.group.add(c.group),this.markKeep(c);var l=d6(i,e,t);t.setData(l),l.each(function(t){var n=R(l6,function(n){return c6(l,t,n,e,r)}),a=i.getAxis(`x`).scale,s=i.getAxis(`y`).scale,c=a.getExtent(),u=s.getExtent(),d=[a.parse(l.get(`x0`,t)),a.parse(l.get(`x1`,t))],f=[s.parse(l.get(`y0`,t)),s.parse(l.get(`y1`,t))];ws(d),ws(f);var p=c[0]>d[1]||c[1]f[1]||u[1]=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`,bottom:Z.size.m,align:`auto`,backgroundColor:Z.color.transparent,borderColor:Z.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Z.color.disabled,inactiveBorderColor:Z.color.disabled,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:Z.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Z.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Z.color.tertiary,borderWidth:1,borderColor:Z.color.border},emphasis:{selectorLabel:{show:!0,color:Z.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(sv),h6=Be,g6=L,_6=Y,v6=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new _6),this.group.add(this._selectorGroup=new _6),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=$_(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=X_(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=X_(I({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=X0(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=G(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),g6(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` `)){var p=new _6;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f))if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,h6(x6,f,null,r,d)).on(`mouseover`,h6(S6,m.name,null,r,d)).on(`mouseout`,h6(C6,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Vd(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=yi(h.fill);_&&_[3]===0&&(_[3]=.2,h=F(F({},h),{fill:Ai(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,h6(x6,null,f,r,d)).on(`mouseover`,h6(S6,null,f,r,d)).on(`mouseout`,h6(C6,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Vd(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Vd(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();g6(e,function(e){var r=e.type,i=new Dd({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Vh(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),Zf(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=y6(c,r,o,s,d,m,u),y=new _6,b=r.getModel(`textStyle`);if(V(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(b6({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;H(w)&&w?T=w.replace(`{name}`,t??``):V(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Dd({style:Uh(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Sd({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Ch({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),Zf(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();K_(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){K_(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}else return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(Tx);function y6(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),g6(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:zC(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function b6(e){var t=e.icon||`roundRect`,n=XS(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Z.color.neutral00,n.style.lineWidth=2),n}function x6(e,t,n,r){C6(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),S6(e,t,n,r)}function S6(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function C6(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function w6(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),T6(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){L(i,function(t,n){e[t?`select`:`unSelect`](n)}),T6(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function T6(e,t){var n=t||{};return L(e.getData(),function(t){var r=t.get(`name`);if(!(r===` `||r===``)){var i=e.isSelected(r);K(n,r)?n[r]=n[r]&&i:n[r]=i}}),n}function E6(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,Be(w6,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,Be(w6,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,Be(w6,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,Be(w6,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,Be(w6,`unSelect`))}var D6=rl(O6);function O6(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=W(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Sd({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Im(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;L([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,H(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=N6[i],o=P6[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(v6);function I6(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function L6(e){RT(k6),e.registerComponentModel(A6),e.registerComponentView(F6),I6(e)}function R6(e){RT(k6),RT(L6)}var z6=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.inside`,t.defaultOption=_g(P0.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(P0),B6=Tc();function V6(e,t,n){B6(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function H6(e,t){for(var n=B6(e).coordSysRecordMap,r=n.keys(),i=0;ia[i+r]&&(r=n),o&&=t.get(`preventDefaultMouseMove`,!0),s=W(t.get(`cursorGrab`,!0),s),c=W(t.get(`cursorGrabbing`,!0),c)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:s,cursorGrabbing:c}}}function J6(e){e.registerUpdateLifecycle(`coordsys:aftercreate`,function(e,t){var n=B6(t),r=n.coordSysRecordMap||=G();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){L(O0(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,W6(t,n.model));(a.dataZoomInfoMap||=G()).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var n=e.controller,i,a=e.dataZoomInfoMap;if(a){var o=a.keys()[0];o!=null&&(i=a.get(o))}if(!i){U6(r,e);return}var s=q6(a,e,t);n.enable(s.controlType,s.opt),zx(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)})})}var Y6=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataZoom.inside`,t}return t.prototype.render=function(t,n,r){if(e.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),V6(r,t,{pan:z(X6.pan,this),zoom:z(X6.zoom,this),scrollMove:z(X6.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){H6(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(L0),X6={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=Q6[t](null,[r.originX,r.originY],o,n,e),c=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],l=Math.max(1/r.scale,0);a[0]=(a[0]-c)*l+c,a[1]=(a[1]-c)*l+c;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(YG(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:Z6(function(e,t,n,r,i,a){var o=Q6[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:Z6(function(e,t,n,r,i,a){return Q6[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function Z6(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(YG(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}var Q6={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return e||=[0,0],a.dim===`x`?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem,c=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),n.mainType===`radiusAxis`?(o.pixel=t[0]-e[0],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,n,r,i){var a=n.axis,o=i.model.coordinateSystem.getRect(),s={};return e||=[0,0],a.orient===`horizontal`?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function $6(e){U0(e),e.registerComponentModel(z6),e.registerComponentView(Y6),J6(e)}var e8=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.slider`,t.layoutMode=`box`,t.defaultOption=_g(P0.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:Z.color.accent10,borderRadius:0,backgroundColor:Z.color.transparent,dataBackground:{lineStyle:{color:Z.color.accent30,width:.5},areaStyle:{color:Z.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:Z.color.accent40,width:.5},areaStyle:{color:Z.color.accent20,opacity:.3}},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:Z.color.neutral00,borderColor:Z.color.accent20},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:Z.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:Z.color.tertiary},brushSelect:!0,brushStyle:{color:Z.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:Z.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(P0),t8=Sd,n8=1,r8=30,i8=7,a8=`horizontal`,o8=`vertical`,s8=5,c8=[`line`,`bar`,`candlestick`,`scatter`],l8={easing:`cubicOut`,duration:100,delay:0},u8=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return t.prototype.init=function(e,t){this.api=t,this._onBrush=z(this._onBrush,this),this._onBrushEnd=z(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),zx(this,`_dispatchZoomAction`,t.get(`throttle`),`fixRate`),this._orient=t.getOrient(),t.get(`show`)===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!==`dataZoom`||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Bx(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 t=this._displayables.sliderGroup=new Y;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get(`brushSelect`)?i8:0,r=$_(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===a8?{right:r.width-i.x-i.width,top:r.height-r8-a-n,width:i.width,height:r8}:{right:a,top:i.y,width:r8,height:i.height},s=iv(e.option);L([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=X_(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===o8&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get(`inverse`),a=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n===a8&&!i?{scaleY:o?1:-1,scaleX:1}:n===a8&&i?{scaleY:o?1:-1,scaleX:-1}:n===o8&&!i?{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2});var s=e.getBoundingRect([a]),c=isNaN(s.x)?0:s.x,l=isNaN(s.y)?0:s.y;e.x=t.x-c,e.y=t.y-l,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get(`brushSelect`);n.add(new t8({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new t8({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:z(this._onClickPanel,this)}),a=this.api.getZr();r?(i.on(`mousedown`,this._onBrushStart,this),i.cursor=`crosshair`,a.on(`mousemove`,this._onBrush),a.on(`mouseup`,this._onBrushEnd)):(a.off(`mousemove`,this._onBrush),a.off(`mouseup`,this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),o=a&&i.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(o==null)return;var s=this._shadowPolygonPts,c=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var l=i.getDataExtent(e.thisDim),u=i.getDataExtent(o),d=(u[1]-u[0])*.3;u=[u[0]-d,u[1]+d];var f=[0,t[1]],p=[0,t[0]],m=[[t[0],0],[0,0]],h=[],g=p[1]/Math.max(1,i.count()-1),_=t[0]/(l[1]-l[0]),v=e.thisAxis.type===`time`,y=-g,b=Math.round(i.count()/t[0]),x;i.each([e.thisDim,o],function(e,t,n){if(b>0&&n%b){v||(y+=g);return}y=v?(+e-l[0])*_:y+g;var r=t==null||isNaN(t)||t===``,i=r?0:_s(t,u,f,!0);r&&!x&&n?(m.push([m[m.length-1][0],0]),h.push([h[h.length-1][0],0])):!r&&x&&(m.push([y,0]),h.push([y,0])),r||(m.push([y,i]),h.push([y,i])),x=r}),s=this._shadowPolygonPts=m,c=this._shadowPolylinePts=h}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];var S=this.dataZoomModel;function C(e){var t=S.getModel(e?`selectedDataBackground`:`dataBackground`),n=new Y,r=new om({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new cm({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel(`lineStyle`).getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}for(var w=0;w<3;w++){var T=C(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get(`showDataShadow`);if(t!==!1){var n,r=this.ecModel;return e.eachTargetAxis(function(i,a){L(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!n&&!(t!==!0&&je(c8,e.get(`type`))<0)){var o=r.getComponent(E0(i),a).axis,s=f8(i),c,l=e.coordinateSystem;s!=null&&l.getOtherAxis&&(c=l.getOtherAxis(o).inverse),s=e.getData().mapDimension(s),n={thisAxis:o,series:e,thisDim:e.getData().mapDimension(i),otherDim:s,otherAxisInverse:c}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,a=this._size,o=this.dataZoomModel,s=this.api,c=o.get(`borderRadius`)||0,l=o.get(`brushSelect`),u=t.filler=new t8({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new t8({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1],r:c},style:{stroke:o.get(`dataBackgroundColor`)||o.get(`borderColor`),lineWidth:n8,fill:Z.color.transparent}})),L([0,1],function(t){var a=o.get(`handleIcon`);!qS[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=XS(a,-1,0,2,2,null,!0);s.attr({cursor:p8(this._orient),draggable:!0,drift:z(this._onDragMove,this,t),ondragend:z(this._onDragEnd,this),onmouseover:z(this._onOverDataInfoTriggerArea,this,!0),onmouseout:z(this._onOverDataInfoTriggerArea,this,!1),z2:5});var c=s.getBoundingRect(),l=o.get(`handleSize`);this._handleHeight=X(l,this._size[1]),this._handleWidth=c.width/c.height*this._handleHeight,s.setStyle(o.getModel(`handleStyle`).getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState(`emphasis`).style=o.getModel([`emphasis`,`handleStyle`]).getItemStyle(),Zf(s);var u=o.get(`handleColor`);u!=null&&(s.style.fill=u),i.add(n[t]=s);var d=o.getModel(`textStyle`),f=(o.get(`handleLabel`)||{}).show||!1;e.add(r[t]=new Dd({silent:!0,invisible:!f,style:Uh(d,{x:0,y:0,text:``,verticalAlign:`middle`,align:`center`,fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var d=u;if(l){var f=X(o.get(`moveHandleSize`),a[1]),p=t.moveHandle=new Sd({style:o.getModel(`moveHandleStyle`).getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:a[1]-.5,height:f}}),m=f*.8,h=t.moveHandleIcon=XS(o.get(`moveHandleIcon`),-m/2,-m/2,m,m,Z.color.neutral00,!0);h.silent=!0,h.y=a[1]+f/2-.5,p.ensureState(`emphasis`).style=o.getModel([`emphasis`,`moveHandleStyle`]).getItemStyle();var g=Math.min(a[1]/2,Math.max(f,10));d=t.moveZone=new Sd({invisible:!0,shape:{y:a[1]-g,height:f+g}}),d.on(`mouseover`,function(){s.enterEmphasis(p)}).on(`mouseout`,function(){s.leaveEmphasis(p)}),i.add(p),i.add(h),i.add(d)}d.attr({draggable:!0,cursor:`grab`,drift:z(this._onActualMoveZoneDrift,this),ondragstart:z(this._onActualMoveZoneDragStart,this),ondragend:z(this._onActualMoveZoneDragEnd,this),onmouseover:z(this._onOverDataInfoTriggerArea,this,!0),onmouseout:z(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[_s(e[0],[0,100],t,!0),_s(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];YG(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:_s(a.minSpan,o,i,!0),a.maxSpan==null?null:_s(a.maxSpan,o,i,!0));var s=this._range,c=this._range=ws([_s(r[0],i,o,!0),_s(r[1],i,o,!0)]);return!s||s[0]!==c[0]||s[1]!==c[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=ws(n.slice()),i=this._size;L([0,1],function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scaleX:a/2,scaleY:a/2,x:n[e]+(e?-1:1),y:i[1]/2-a/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var a={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(a),t.moveZone.setShape(a),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr(`x`,a.x+a.width/2));for(var o=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],c=0;ct[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval(`all`,n[0]-i);this._updateView(),a&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new q(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr(`ignore`,!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100],a=this._handleEnds=[n.x,n.x+n.width],o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();YG(0,a,r,0,o.minSpan==null?null:_s(o.minSpan,i,r,!0),o.maxSpan==null?null:_s(o.maxSpan,i,r,!0)),this._range=ws([_s(a[0],r,i,!0),_s(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(hn(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new t8({silent:!0,style:r.getModel(`brushStyle`).getItemStyle()}),n.sliderGroup.add(i)),i.attr(`ignore`,!1);var a=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),c=o.transformCoordToLocal(a.x,a.y),l=this._size;s[0]=Math.max(Math.min(l[0],s[0]),0),i.setShape({x:c[0],y:0,width:s[0]-c[0],height:l[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:`dataZoom`,from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?l8:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=O0(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:r*.2,y:i*.2,width:r*.6,height:i*.6}}return e},t.type=`dataZoom.slider`,t}(L0);function d8(e,t,n,r){var i=e.get(`labelFormatter`),a=e.get(`labelPrecision`);(a==null||a===`auto`)&&(a=n.valuePrecision);var o=n.value[t],s=o==null||isNaN(o)?``:QE(r)||XE(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?Ss(o,a,!0):o+``;return V(i)?i(o,s):H(i)?i.replace(`{value}`,s):s}function f8(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function p8(e){return e===`vertical`?`ns-resize`:`ew-resize`}function m8(e){e.registerComponentModel(e8),e.registerComponentView(u8),U0(e)}function h8(e){RT($6),RT(m8)}var g8={get:function(e,t,n){var r=P((_8[e]||{})[t]);return n&&B(r)?r[r.length-1]:r}},_8={color:{active:[`#006edd`,`#e0ffff`],inactive:[Z.color.transparent]},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]}},v8=nU.mapVisual,y8=nU.eachVisual,b8=B,x8=L,S8=ws,C8=_s,w8=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&M4(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=z(e,this),this.controllerVisuals=j4(this.option.controller,t,e),this.targetVisuals=j4(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return x8(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=jc(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return R(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){L(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],B(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(H(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(V(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=S8([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=Le(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};De(r,n),De(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){b8(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},x8(r,function(e,t){if(nU.isValidType(t)){var n=g8.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;x8(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??=t&&P(t)||(a?i:[i]),c.symbolSize??=n&&P(n)||(a?s[0]:[s[0],s[0]]),c.symbol=v8(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;y8(l,function(e){e>u&&(u=e)}),c.symbolSize=v8(l,function(e){return C8(e,[0,u],[0,s[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,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Z.color.transparent,borderColor:Z.color.borderTint,contentColor:Z.color.theme[0],inactiveColor:Z.color.disabled,borderWidth:0,padding:Z.size.m,textGap:10,precision:0,textStyle:{color:Z.color.secondary}},t}(sv),T8=[20,140],E8=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=T8[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=T8[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):B(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),L(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=ws((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=D8(this,`outOfRange`,this.getExtent()),n=D8(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Y(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);N8([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=M8(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=ch(n.handleLabelPoints[l],sh(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=M8(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=ch(c.indicatorLabelPoint,sh(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||V8(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=Cc(u,d);this._dispatchHighDown(`downplay`,j8(f[0],n)),this._dispatchHighDown(`highlight`,j8(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(OS(e.target,function(e){var n=Vd(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function K8(e,t,n,r){for(var i=t.targetVisuals[r],a=nU.prepareVisualTypes(i),o={color:CS(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(U8,W8),L(G8,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(J8))}function Q8(e){e.registerComponentModel(E8),e.registerComponentView(R8),Z8(e)}var $8=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],e5[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=P(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=R(this._pieceList,function(e){return e=P(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=nU.listVisualTypes(),i=this.isCategory();L(t.pieces,function(e){L(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),L(n,function(e,n){var r=!1;L(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&L(this.stateList,function(e){(t[e]||(t[e]={}))[n]=g8.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,L(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;L(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!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=P(e)},t.prototype.getValueState=function(e){var t=nU.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){nU.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return L(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=_g(w8.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}(w8),e5={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function t5(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var n5=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Xe(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),L(o.viewPieceList,function(o){var s=o.piece,u=new Y;u.onclick=z(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Dd({style:Uh(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:W(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),K_(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:j8(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return A8(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Y,o=this.visualMapModel.textStyleModel;a.add(new Dd({style:Uh(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=R(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=XS(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=P(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,L(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(O8);function r5(e){e.registerComponentModel($8),e.registerComponentView(n5),Z8(e)}function i5(e){RT(Q8),RT(r5)}var a5=function(){function e(e){this._thumbnailModel=e}return e.prototype.reset=function(e){this._renderVersion=e.getECUpdateCycleVersion()},e.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:jh(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},e.prototype.updateWindow=function(e,t){var n=t.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},e}(),o5=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return t.prototype.optionUpdated=function(e,t){this._updateBridge()},t.prototype._updateBridge=function(){var e=this._birdge=this._birdge||new a5(this);this._target=null,this.ecModel.eachSeries(function(e){HW(e,null)}),this.shouldShow()&&HW(this.getTarget().baseMapProvider,e)},t.prototype.shouldShow=function(){return this.getShallow(`show`,!0)},t.prototype.getBridge=function(){return this._birdge},t.prototype.getTarget=function(){if(this._target)return this._target;var e=this.getReferringComponents(`series`,{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return e?e.subType!==`graph`&&(e=null):e=this.ecModel.queryComponents({mainType:`series`,subType:`graph`})[0],this._target={baseMapProvider:e},this._target},t.type=`thumbnail`,t.layoutMode=`box`,t.dependencies=[`series`,`geo`],t.defaultOption={show:!0,right:1,bottom:1,height:`25%`,width:`25%`,itemStyle:{borderColor:Z.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:Z.color.neutral30,borderColor:Z.color.neutral40,opacity:.3},z:10},t}(sv),s5=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this._api=n,this._model=e,this._coordSys||=new wz,!this._isEnabled()){this._clear();return}this._renderVersion=n.getECUpdateCycleVersion();var r=this.group;r.removeAll();var i=e.getModel(`itemStyle`),a=i.getItemStyle();a.fill??=t.get(`backgroundColor`)||Z.color.neutral00;var o=$_(e,n).refContainer,s=X_(q_(e,!0),o),c=a.lineWidth||0,l=this._contentRect=bh(s.clone(),c/2,!0,!0),u=new Y;r.add(u),u.setClipPath(new Sd({shape:l.plain()}));var d=this._targetGroup=new Y;u.add(d);var f=s.plain();f.r=i.getShallow(`borderRadius`,!0),r.add(this._bgRect=new Sd({style:a,shape:f,silent:!1,cursor:`grab`}));var p=e.getModel(`windowStyle`),m=p.getShallow(`borderRadius`,!0);u.add(this._windowRect=new Sd({shape:{x:0,y:0,width:0,height:0,r:m},style:p.getItemStyle(),silent:!1,cursor:`grab`})),this._dealRenderContent(),this._dealUpdateWindow(),l5(e,this)},t.prototype.renderContent=function(e){this._bridgeRendered=e,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),l5(this._model,this))},t.prototype._dealRenderContent=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var t=this._targetGroup,n=this._coordSys,r=this._contentRect;if(t.removeAll(),e){var i=e.group,a=i.getBoundingRect();t.add(i),this._bgRect.z2=e.z2Range.min-10,Iz(n,a.x,a.y,a.width,a.height);var o=X_({left:`center`,top:`center`,aspect:a.width/a.height},r);Lz(n,o.x,o.y,o.width,o.height),Az(i,n,0),i.dirty(),this._windowRect.z2=e.z2Range.max+10,this._resetRoamController(e.roamType)}}},t.prototype.updateWindow=function(e){var t=this._bridgeRendered;t&&t.renderVersion===e.renderVersion&&(t.targetTrans=e.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var t=kn([],e.targetTrans),n=Tn([],Ez(null,this._coordSys),t);this._transThisToTarget=kn([],n);var r=e.viewportRect;r=r?r.clone():new J(0,0,this._api.getWidth(),this._api.getHeight()),r.applyTransform(n);var i=this._windowRect,a=i.shape.r;i.setShape(I({r:a},r))}},t.prototype._resetRoamController=function(e){var t=this,n=this._api,r=this._roamController;if(r||=this._roamController=new yR(n.getZr()),!e||!this._isEnabled()){r.disable();return}r.enable(e,{api:n,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(e,n,r){return t._contentRect.contain(n,r)}}}),r.off(`pan`).off(`zoom`).on(`pan`,z(this._onPan,this)).on(`zoom`,z(this._onZoom,this))},t.prototype._onPan=function(e){var t=this._transThisToTarget;if(!(!this._isEnabled()||!t)){var n=Rt([],[e.oldX,e.oldY],t),r=Rt([],[e.oldX-e.dx,e.oldY-e.dy],t);this._api.dispatchAction(c5(this._model.getTarget().baseMapProvider,{dx:r[0]-n[0],dy:r[1]-n[1]}))}},t.prototype._onZoom=function(e){var t=this._transThisToTarget;if(!(!this._isEnabled()||!t)){var n=Rt([],[e.originX,e.originY],t);this._api.dispatchAction(c5(this._model.getTarget().baseMapProvider,{zoom:1/e.scale,originX:n[0],originY:n[1]}))}},t.prototype._isEnabled=function(){var e=this._model;return!(!e||!e.shouldShow()||!e.getTarget().baseMapProvider)},t.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},t.prototype.remove=function(){this._clear()},t.prototype.dispose=function(){this._clear()},t.type=`thumbnail`,t}(Tx);function c5(e,t){var n={type:e.mainType===`series`?e.subType+`Roam`:e.mainType+`Roam`};return n[e.mainType+`Id`]=e.id,F(n,t),n}function l5(e,t){var n=Ah(e);Mh(t.group,n.z,n.zlevel)}function u5(e){e.registerComponentModel(o5),e.registerComponentView(s5)}var d5={label:{enabled:!0},decal:{show:!1}},f5=Tc(),p5=Tc(),m5=rl(h5);function h5(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=p5(e).scope||(p5(e).scope={}),i=P(d5);De(i.label,e.getLocaleModel().get(`aria`),!1),De(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=G();e.eachSeries(function(e){e.isColorBySeries()||(f5(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(V(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=Mv(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=f5(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=Mv(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?F(F({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=I(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_":`gt`,">=":`gte`,"=":`eq`,"!=":`ne`,"<>":`ne`},y5=function(){function e(e){(this._condVal=H(e)?new RegExp(e):Je(e)?e:null)??$s(``)}return e.prototype.evaluate=function(e){var t=typeof e;return H(t)?this._condVal.test(e):He(t)?this._condVal.test(e+``):!1},e}(),b5=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),x5=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&r.push(i),i=[e,t]}function u(e,t,n,r){z5(e,n)&&z5(t,r)||i.push(e,t,n,r,n,r)}function d(e,t,n,r,a,o){var s=Math.abs(t-e),c=Math.tan(s/4)*4/3,l=tw:D2&&r.push(i),r}function V5(e,t,n,r,i,a,o,s,c,l){if(z5(e,n)&&z5(t,r)&&z5(i,o)&&z5(a,s)){c.push(o,s);return}var u=2/l,d=u*u,f=o-e,p=s-t,m=Math.sqrt(f*f+p*p);f/=m,p/=m;var h=n-e,g=r-t,_=i-o,v=a-s,y=h*h+g*g,b=_*_+v*v;if(y=0&&w=0){c.push(o,s);return}var T=[],E=[];Ur(e,n,i,o,.5,T),Ur(t,r,a,s,.5,E),V5(T[0],E[0],T[1],E[1],T[2],E[2],T[3],E[3],c,l),V5(T[4],E[4],T[5],E[5],T[6],E[6],T[7],E[7],c,l)}function H5(e,t){var n=B5(e),r=[];t||=1;for(var i=0;i0)for(var l=0;lMath.abs(l),d=U5([c,l],+!u,t),f=(u?s:l)/d.length,p=0;pi,o=U5([r,i],+!a,t),s=a?`width`:`height`,c=a?`height`:`width`,l=a?`x`:`y`,u=a?`y`:`x`,d=e[s]/o.length,f=0;f1?null:new q(p*c+e,p*l+t)}function J5(e,t,n){var r=new q;q.sub(r,n,t),r.normalize();var i=new q;return q.sub(i,e,t),i.dot(r)}function Y5(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function X5(e,t,n){for(var r=e.length,i=[],a=0;ao?(l.x=u.x=s+a/2,l.y=c,u.y=c+o):(l.y=u.y=c+o/2,l.x=s,u.x=s+a),X5(t,l,u)}function Q5(e,t,n,r){if(n===1)r.push(t);else{var i=Math.floor(n/2),a=e(t);Q5(e,a[0],i,r),Q5(e,a[1],n-i,r)}return r}function $5(e,t){for(var n=[],r=0;r0)for(var x=r/n,S=-r/2;S<=r/2;S+=x){for(var C=Math.sin(S),w=Math.cos(S),T=0,y=0;y0;l/=2){var u=0,d=0;(e&l)>0&&(u=1),(t&l)>0&&(d=1),s+=l*l*(3*u^d),d===0&&(u===1&&(e=l-1-e,t=l-1-t),c=e,e=t,t=c)}return s}function v7(e){var t=1/0,n=1/0,r=-1/0,i=-1/0;return R(R(e,function(e){var a=e.getBoundingRect(),o=e.getComputedTransform(),s=a.x+a.width/2+(o?o[4]:0),c=a.y+a.height/2+(o?o[5]:0);return t=Math.min(s,t),n=Math.min(c,n),r=Math.max(s,r),i=Math.max(c,i),[s,c]}),function(a,o){return{cp:a,z:_7(a[0],a[1],t,n,r,i),path:e[o]}}).sort(function(e,t){return e.z-t.z}).map(function(e){return e.path})}function y7(e){return n7(e.path,e.count)}function b7(){return{fromIndividuals:[],toIndividuals:[],count:0}}function x7(e,t,n){var r=[];function i(e){for(var t=0;t=0;i--)if(!n[i].many.length){var c=n[s].many;if(c.length<=1)if(s)s=0;else return n;var a=c.length,l=Math.ceil(a/2);n[i].many=c.slice(l,a),n[s].many=c.slice(0,l),s++}return n}var T7={clone:function(e){for(var t=[],n=1-(1-e.path.style.opacity)**(1/e.count),r=0;r0))return;var s=r.getModel(`universalTransition`).get(`delay`),c=F({setToFinal:!0},o),l,u;C7(e)&&(l=e,u=t),C7(t)&&(l=t,u=e);function d(e,t,r,i,o){var l=e.many,u=e.one;if(l.length===1&&!o){var f=t?l[0]:u,p=t?u:l[0];if(u7(f))d({many:[f],one:p},!0,r,i,!0);else{var m=s?I({delay:s(r,i)},c):c;g7(f,p,m),a(f,p,f,p,m)}}else for(var h=I({dividePath:T7[n],individualDelay:s&&function(e,t,n,a){return s(e+r,i)}},c),g=t?x7(l,u,h):S7(u,l,h),_=g.fromIndividuals,v=g.toIndividuals,y=_.length,b=0;bt.length,p=l?w7(u,l):w7(f?t:e,[f?e:t]),m=0,h=0;hO7))for(var i=n.getIndices(),a=0;a0&&r.group.traverse(function(e){e instanceof cd&&!e.animators.length&&e.animateFrom({style:{opacity:0}},i)})})}function U7(e){return e.getModel(`universalTransition`).get(`seriesKey`)||e.id}function W7(e){return B(e)?e.sort().join(`,`):e}function G7(e){if(e.hostModel)return e.hostModel.getModel(`universalTransition`).get(`divideShape`)}function K7(e,t){var n=G(),r=G(),i=G();return L(e.oldSeries,function(t,n){var a=e.oldDataGroupIds[n],o=e.oldData[n],s=U7(t),c=W7(s);r.set(c,{dataGroupId:a,data:o}),B(s)&&L(s,function(e){i.set(e,{key:c,dataGroupId:a,data:o})})}),L(t.updatedSeries,function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get(`dataGroupId`),a=e.getData(),o=U7(e),s=W7(o),c=r.get(s);if(c)n.set(s,{oldSeries:[{dataGroupId:c.dataGroupId,divide:G7(c.data),data:c.data}],newSeries:[{dataGroupId:t,divide:G7(a),data:a}]});else if(B(o)){var l=[];L(o,function(e){var t=r.get(e);t.data&&l.push({dataGroupId:t.dataGroupId,divide:G7(t.data),data:t.data})}),l.length&&n.set(s,{oldSeries:l,newSeries:[{dataGroupId:t,data:a,divide:G7(a)}]})}else{var u=i.get(o);if(u){var d=n.get(u.key);d||(d={oldSeries:[{dataGroupId:u.dataGroupId,data:u.data,divide:G7(u.data)}],newSeries:[]},n.set(u.key,d)),d.newSeries.push({dataGroupId:t,data:a,divide:G7(a)})}}}}),n}function q7(e,t){for(var n=0;n=0&&i.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:G7(t.oldData[n]),groupIdDim:e.dimension})}),L(rc(e.to),function(e){var r=q7(n.updatedSeries,e);if(r>=0){var i=n.updatedSeries[r].getData();a.push({dataGroupId:t.oldDataGroupIds[r],data:i,divide:G7(i),groupIdDim:e.dimension})}}),i.length>0&&a.length>0&&H7(i,a,r)}function Y7(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){L(rc(n.seriesTransition),function(e){L(rc(e.to),function(e){for(var t=n.updatedSeries,r=0;ro.vmin?n+=o.vmin-r+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:n+=e-r,r=o.vmax,i=!1;break}n+=o.vmin-r+o.gapReal,r=o.vmax}return i&&(n+=e-r),n},transformOut:function(e,t){if(t&&t.depth===2)return e;for(var n=Q7,r=$7,i=!0,a=0,o=0;oc?s.vmin+(e-c)/(l-c)*(s.vmax-s.vmin):r+e-n,r=s.vmax,i=!1;break}n=l,r=s.vmax}return i&&(a=r+e-n),a}},e}();function Z7(e,t){return new X7(e,t)}var Q7=0,$7=0;function e9(e,t){var n=0,r={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};L(e.breaks,function(e){var i=e.gapParsed;i.type===`tpPrct`&&(n+=i.val);var o=r9(e,t);if(o){var s=o.vmin!==e.vmin,c=o.vmax!==e.vmax,l=o.vmax-o.vmin;if(!(s&&c))if(s||c){var u=s?`S`:`E`;a[u][i.type].has=!0,a[u][i.type].span=l,a[u][i.type].inExtFrac=l/(e.vmax-e.vmin),a[u][i.type].val=i.val}else r[i.type].span+=l,r[i.type].val+=i.val}});var o=n*(0+(t[1]-t[0])+(r.tpAbs.val-r.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-r.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-r.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));L(e.breaks,function(e){var t=e.gapParsed;t.type===`tpPrct`&&(e.gapReal=n===0?0:ss(o,0)*t.val/n),t.type===`tpAbs`&&(e.gapReal=t.val),e.gapReal??=0})}function t9(e,t,n,r,i,a){e!==`no`&&L(n,function(n){var o=r9(n,a);if(o)for(var s=t.length-1;s>=0;s--){var c=t[s],l=r(c),u=i*3/4;l>o.vmin-u&&lt[0]&&n=0&&e<.99999}L(e,function(e){if(!(!e||e.start==null||e.end==null)&&!e.isExpanded){var a={breakOption:P(e),vmin:t.parse(e.start),vmax:t.parse(e.end),gapParsed:{type:`tpAbs`,val:0},gapReal:null};if(e.gap!=null){var o=!1;if(H(e.gap)){var s=tt(e.gap);if(s.match(/%$/)){var c=parseFloat(s)/100;i(c,`Percent gap`)||(c=0),a.gapParsed.type=`tpPrct`,a.gapParsed.val=c,o=!0}}if(!o){var l=t.parse(e.gap);(!isFinite(l)||l<0)&&(l=0),a.gapParsed.type=`tpAbs`,a.gapParsed.val=l}}if(a.vmin===a.vmax&&(a.gapParsed.type=`tpAbs`,a.gapParsed.val=0),n&&n.noNegative&&L([`vmin`,`vmax`],function(e){a[e]<0&&(a[e]=0)}),a.vmin>a.vmax){var u=a.vmax;a.vmax=a.vmin,a.vmin=u}r.push(a)}}),r.sort(function(e,t){return e.vmin-t.vmin});var a=-1/0;return L(r,function(e,t){a>e.vmin&&(r[t]=null),a=e.vmax}),{breaks:Ie(r,function(e){return!!e})}}function a9(e,t){return o9(t)===o9(e)}function o9(e){return e.start+`_\0_`+e.end}function s9(e,t,n){var r=[];L(e,function(e,n){var i=t(e);i&&i.type===`vmin`&&r.push([n])}),L(e,function(n,i){var a=t(n);if(a&&a.type===`vmax`){var o=Le(r,function(n){return a9(t(e[n[0]]).parsedBreak.breakOption,a.parsedBreak.breakOption)});o&&o.push(i)}});var i=[];return L(r,function(t){t.length===2&&i.push(n?t:[e[t[0]],e[t[1]]])}),i}function c9(e,t,n,r){if(t.break){var i=t.break.parsedBreak,a=Le(n,function(e){return a9(e.breakOption,t.break.parsedBreak.breakOption)}),o={lookup:r,depth:2},s={vmin:e.transformOut(i.vmin,o),vmax:e.transformOut(i.vmax,o),breakOption:i.breakOption,gapParsed:P(a.gapParsed),gapReal:i.gapReal};return{tickVal:s[t.break.type],vBreak:{type:t.break.type,parsedBreak:s}}}}function l9(e,t,n,r,i){i.original=i9(e,t,n);var a=i.transformed=i9(e,t,n),o=i.lookup;a.breaks=R(a.breaks,function(e,n){var i={depth:2},a=t.transformIn(e.vmin,i),s=t.transformIn(e.vmax,i),c={type:e.gapParsed.type,val:e.gapParsed.type===`tpAbs`?t.transformIn(e.vmin+e.gapParsed.val,i)-a:e.gapParsed.val};return o.from[r+n]=a,o.to[r+n]=e.vmin,o.from[r+n+1]=s,o.to[r+n+1]=e.vmax,{vmin:a,vmax:s,gapParsed:c,gapReal:e.gapReal,breakOption:e.breakOption}})}var u9={vmin:`start`,vmax:`end`};function d9(e,t){return t&&(e||={},e.break={type:u9[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function f9(){jg({createBreakScaleMapper:Z7,pruneTicksByBreak:t9,addBreaksToTicks:n9,parseAxisBreakOption:i9,identifyAxisBreak:a9,serializeAxisBreakIdentifier:o9,retrieveAxisBreakPairs:s9,getTicksBreakOutwardTransform:c9,parseAxisBreakOptionInwardTransform:l9,makeAxisLabelFormatterParamBreak:d9})}var p9=Tc();function m9(e,t){var n=Le(e,function(e){return Mg().identifyAxisBreak(e.parsedBreak.breakOption,t.breakOption)});return n||e.push(n={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),n}function h9(e){L(e,function(e){return e.shouldRemove=!0})}function g9(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function _9(e,t,n,r,i){var a=n.axis;if(a.scale.isBlank()||!Mg())return;var o=Mg().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:`only_break`}),function(e){return e.break},!1);if(!o.length)return;var s=n.getModel(`breakArea`),c=s.get(`zigzagAmplitude`),l=s.get(`zigzagMinSpan`),u=s.get(`zigzagMaxSpan`);l=Math.max(2,l||0),u=Math.max(l,u||0);var d=s.get(`expandOnClick`),f=s.get(`zigzagZ`),p=s.getModel(`itemStyle`).getItemStyle(),m=p.stroke,h=p.lineWidth,g=p.lineDash,_=p.fill,v=new Y({ignoreModelZ:!0}),y=a.isHorizontal(),b=p9(t).visualList||(p9(t).visualList=[]);h9(b);for(var x=function(e){var t=o[e][0].break.parsedBreak,r=[];r[0]=a.toGlobalCoord(a.dataToCoord(t.vmin,!0)),r[1]=a.toGlobalCoord(a.dataToCoord(t.vmax,!0)),r[1]=y;D&&(w=y);var O=[],k=[];O[d]=n,k[d]=i,!E&&!D&&(O[d]+=C?-c:c,k[d]-=C?c:-c),O[v]=w,k[v]=w,x.push(O),S.push(k);var A=void 0;if(Tn[1]&&n.reverse(),{coordPair:n,brkId:Mg().serializeAxisBreakIdentifier(t.breakOption)}});s.sort(function(e,t){return e.coordPair[0]-t.coordPair[0]});for(var c=o[0],l=null,u=0;u=0?c[0].width:c[1].width)+u.x)/2-l.x,f=Math.min(d,d-u.x),p=Math.max(d,d-u.x);s=(d-(p<0?p:f>0?f:0))/u.x}var m=new q,h=new q;q.scale(m,r,-s),q.scale(h,r,1-s),kA(n[0],m),kA(n[1],h)}function b9(e,t){var n={breaks:[]};return L(t.breaks,function(r){if(r){var i=Le(e.get(`breaks`,!0),function(e){return Mg().identifyAxisBreak(e,r)});if(i){var a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===`expandAxisBreak`?!0:a===`collapseAxisBreak`?!1:a===`toggleAxisBreak`?!i.isExpanded:i.isExpanded,n.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),n}function x9(){iP({adjustBreakLabelPair:y9,buildAxisBreakLine:v9,rectCoordBuildBreakAxis:_9,updateModelAxisBreak:b9})}function S9(e){mP(e),f9(),x9()}function C9(){oL(w9)}function w9(e,t){L(e,function(e){if(!e.model.get([`axisLabel`,`inside`])){var n=T9(e);if(n){var r=e.isHorizontal()?`height`:`width`,i=e.model.get([`axisLabel`,`margin`]);t[r]-=n[r]+i,e.position===`top`?t.y+=n.height+i:e.position===`left`&&(t.x+=n.width+i)}}})}function T9(e){var t=e.model,n=e.scale;if(!t.get([`axisLabel`,`show`])||n.isBlank())return;var r,i,a=n.getExtent();n instanceof sD?i=n.count():(r=n.getTicks(),i=r.length);var o=e.getLabelModel(),s=LD(e),c,l=1;i>40&&(l=Math.ceil(i/40));for(var u=0;uHk,ChartView:()=>kx,ComponentModel:()=>sv,ComponentView:()=>Tx,List:()=>hE,Model:()=>fg,PRIORITY:()=>fw,SeriesModel:()=>hx,color:()=>ai,connect:()=>lT,dataTool:()=>FT,dependencies:()=>JC,disConnect:()=>dT,disconnect:()=>uT,dispose:()=>fT,env:()=>N,extendChartView:()=>Jk,extendComponentModel:()=>Gk,extendComponentView:()=>Kk,extendSeriesModel:()=>qk,format:()=>pk,getCoordinateSystemDimensions:()=>CT,getInstanceByDom:()=>pT,getInstanceById:()=>mT,getMap:()=>MT,graphic:()=>fk,helper:()=>HO,init:()=>cT,innerDrawElementOnCanvas:()=>MC,matrix:()=>xn,number:()=>uk,parseGeoJSON:()=>lk,parseGeoJson:()=>lk,registerAction:()=>xT,registerCoordinateSystem:()=>ST,registerCustomSeries:()=>wT,registerLayout:()=>TT,registerLoading:()=>kT,registerLocale:()=>Eg,registerMap:()=>jT,registerPostInit:()=>vT,registerPostUpdate:()=>yT,registerPreprocessor:()=>gT,registerProcessor:()=>_T,registerTheme:()=>hT,registerTransform:()=>NT,registerUpdateLifecycle:()=>bT,registerVisual:()=>ET,setCanvasCreator:()=>AT,setPlatformAPI:()=>ue,throttle:()=>Rx,time:()=>dk,use:()=>RT,util:()=>mk,vector:()=>ht,version:()=>qC,zrUtil:()=>de,zrender:()=>Ho});RT([JM]),RT([wM]),RT([tP,oI,kI,KL,fR,sV,nH,DU,JW,oG,pG,wG,fq,Gq,uJ,zJ,GJ,oY,pY,VY,ZY,gX,BZ]),RT(IQ),RT(C$),RT(tV),RT(V$),RT(dq),RT(J$),RT(r0),RT(x0),RT(J2),RT(E4),RT(FQ),RT(n3),RT(a3),RT(S3),RT(G3),RT(t6),RT(f6),RT(R6),RT(h8),RT($6),RT(m8),RT(i5),RT(Q8),RT(r5),RT(u5),RT(_5),RT(P5),RT(L5),RT(Y7),RT(KA),RT(S9),RT(C9),RT(qL);var D9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=1;e.default=function(){return`${t++}`}})),O9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,n=null;return function(){var r=this,i=[...arguments];clearTimeout(n),n=setTimeout(function(){e.apply(r,i)},t)}}})),k9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SizeSensorId=e.SensorTabIndex=e.SensorClassName=void 0,e.SizeSensorId=`size-sensor-id`,e.SensorClassName=`size-sensor-object`,e.SensorTabIndex=`-1`})),A9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSensor=void 0;var t=r(O9()),n=k9();function r(e){return e&&e.__esModule?e:{default:e}}e.createSensor=function(e,r){var i=void 0,a=[],o=function(){getComputedStyle(e).position===`static`&&(e.style.position=`relative`);var t=document.createElement(`object`);return t.onload=function(){t.contentDocument.defaultView.addEventListener(`resize`,s),s()},t.style.display=`block`,t.style.position=`absolute`,t.style.top=`0`,t.style.left=`0`,t.style.height=`100%`,t.style.width=`100%`,t.style.overflow=`hidden`,t.style.pointerEvents=`none`,t.style.zIndex=`-1`,t.style.opacity=`0`,t.setAttribute(`class`,n.SensorClassName),t.setAttribute(`tabindex`,n.SensorTabIndex),t.type=`text/html`,e.appendChild(t),t.data=`about:blank`,t},s=(0,t.default)(function(){a.forEach(function(t){t(e)})}),c=function(e){i||=o(),a.indexOf(e)===-1&&a.push(e)},l=function(){i&&i.parentNode&&(i.contentDocument&&i.contentDocument.defaultView.removeEventListener(`resize`,s),i.parentNode.removeChild(i),e.removeAttribute(n.SizeSensorId),i=void 0,a=[],r&&r())};return{element:e,bind:c,destroy:l,unbind:function(e){var t=a.indexOf(e);t!==-1&&a.splice(t,1),a.length===0&&i&&l()}}}})),j9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSensor=void 0;var t=k9(),n=r(O9());function r(e){return e&&e.__esModule?e:{default:e}}e.createSensor=function(e,r){var i=void 0,a=[],o=(0,n.default)(function(){a.forEach(function(t){t(e)})}),s=function(){var t=new ResizeObserver(o);return t.observe(e),o(),t},c=function(e){i||=s(),a.indexOf(e)===-1&&a.push(e)},l=function(){i&&i.disconnect(),a=[],i=void 0,e.removeAttribute(t.SizeSensorId),r&&r()};return{element:e,bind:c,destroy:l,unbind:function(e){var t=a.indexOf(e);t!==-1&&a.splice(t,1),a.length===0&&i&&l()}}}})),M9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSensor=void 0;var t=A9(),n=j9();e.createSensor=typeof ResizeObserver<`u`?n.createSensor:t.createSensor})),N9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.removeSensor=e.getSensor=e.Sensors=void 0;var t=i(D9()),n=M9(),r=k9();function i(e){return e&&e.__esModule?e:{default:e}}var a=e.Sensors={};function o(e){e&&a[e]&&delete a[e]}e.getSensor=function(e){var i=e.getAttribute(r.SizeSensorId);if(i&&a[i])return a[i];var s=(0,t.default)();e.setAttribute(r.SizeSensorId,s);var c=(0,n.createSensor)(e,function(){return o(s)});return a[s]=c,c},e.removeSensor=function(e){var t=e.element.getAttribute(r.SizeSensorId);e.destroy(),o(t)}})),P9=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ver=e.clear=e.bind=void 0;var t=N9();e.bind=function(e,n){var r=(0,t.getSensor)(e);return r.bind(n),function(){r.unbind(n)}},e.clear=function(e){var n=(0,t.getSensor)(e);(0,t.removeSensor)(n)},e.ver=`1.0.3`}))();function F9(e,t){var n={};return t.forEach(function(t){n[t]=e[t]}),n}function I9(e){return typeof e==`function`}function L9(e){return typeof e==`string`}var R9=e(n(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}}))()),z9=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.echarts=E9,n}return t}(function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.echarts=t.echarts,n.ele=null,n.isInitialResize=!0,n.eventHandlerRefs={},n}return t.prototype.componentDidMount=function(){this.renderNewEcharts()},t.prototype.componentDidUpdate=function(e){var t=this.props.shouldSetOption;if(!(I9(t)&&!t(e,this.props))){if(!(0,R9.default)(e.theme,this.props.theme)||!(0,R9.default)(e.opts,this.props.opts)){this.dispose(),this.renderNewEcharts();return}var n=this.getEchartsInstance();(0,R9.default)(e.onEvents,this.props.onEvents)||(this.unbindEvents(n),this.bindEvents(n,this.props.onEvents));var r=[`option`,`notMerge`,`replaceMerge`,`lazyUpdate`,`showLoading`,`loadingOption`];(0,R9.default)(F9(this.props,r),F9(e,r))||this.updateEChartsOption(),(!(0,R9.default)(e.style,this.props.style)||!(0,R9.default)(e.className,this.props.className))&&this.resize()}},t.prototype.componentWillUnmount=function(){this.dispose()},t.prototype.initEchartsInstance=function(){return E(this,void 0,void 0,function(){var e=this;return T(this,function(t){return[2,new Promise(function(t){e.echarts.init(e.ele,e.props.theme,e.props.opts),e.getEchartsInstance().on(`finished`,function(){var n=e.ele.clientWidth,r=e.ele.clientHeight;e.echarts.dispose(e.ele);var i=O({width:n,height:r},e.props.opts);t(e.echarts.init(e.ele,e.props.theme,i))})})]})})},t.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)},t.prototype.dispose=function(){if(this.ele){try{(0,P9.clear)(this.ele)}catch(e){console.warn(e)}this.echarts.dispose(this.ele)}},t.prototype.renderNewEcharts=function(){return E(this,void 0,void 0,function(){var e,t,n,r,i,a,o=this;return T(this,function(s){switch(s.label){case 0:return e=this.props,t=e.onEvents,n=e.onChartReady,r=e.autoResize,i=r===void 0||r,[4,this.initEchartsInstance()];case 1:return s.sent(),a=this.updateEChartsOption(),this.bindEvents(a,t||{}),I9(n)&&n(a),this.ele&&i&&(0,P9.bind)(this.ele,function(){o.resize()}),[2]}})})},t.prototype.bindEvents=function(e,t){var n=this,r=function(t,r){if(L9(t)&&I9(r)){var i=function(t){r(t,e)};e.on(t,i),n.eventHandlerRefs[t]=i}};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&r(i,t[i])},t.prototype.unbindEvents=function(e){for(var t=0,n=Object.entries(this.eventHandlerRefs);t{try{l(!0),d(null),p(null);let n=await e(...t);return s(n.data.data),d(!0),r&&r(n.data.data,n),n}catch(e){let t=e;p(t),d(!1),i&&i(t);return}finally{l(!1),a&&a()}},[e,r,i,a]);return(0,j.useState)(()=>{n||m()}),{data:o,loading:c,success:u,error:f,run:m}}var V9=()=>a({url:`/dashboard/analysis`,method:`get`}),$=i(),{useToken:H9}=h,U9=e=>`¥ `+Number(e??0).toLocaleString(`zh-CN`,{minimumFractionDigits:2,maximumFractionDigits:2}),W9={overview:{sales:{total:0,today:0,week:0,growth:null,trend7:[]},orders:{total:0,today:0,week:0,growth:null,trend7:[]},purchase:{total:0,today:0,week:0,growth:null,trend7:[]},receivable:{bill_total:0,received:0,unreceived:0}},trend:[],order_status:[],category_sales:[],top_products:[],top_stores:[],recon:{bills:[],pending_payment:{count:0,amount:0}},latest_orders:[],archives:{stores:0,products:0,suppliers:0,users:0}},G9=({growth:e})=>{let{token:t}=H9();if(e===null)return(0,$.jsx)(`span`,{style:{color:t.colorTextTertiary},children:`—`});let n=e>=0;return(0,$.jsxs)(`span`,{style:{color:n?t.colorError:t.colorSuccess},children:[n?(0,$.jsx)(_,{}):(0,$.jsx)(g,{}),` `,Math.abs(e).toFixed(1),`%`]})},K9=({title:e,value:t,sub:n,growth:r,chart:i})=>{let{token:a}=H9();return(0,$.jsxs)(c,{variant:`borderless`,children:[(0,$.jsx)(`div`,{children:e}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between pt-4 pb-2`,children:[(0,$.jsx)(`div`,{className:`text-3xl font-semibold`,children:t}),i]}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsx)(`span`,{style:{color:a.colorTextSecondary},children:n}),r!==void 0&&(0,$.jsx)(G9,{growth:r})]})]})},q9=({index:e})=>{let{token:t}=H9(),n=e+1;return n<=3?(0,$.jsx)(`span`,{className:`inline-flex items-center justify-center rounded-full text-white text-xs font-semibold`,style:{width:20,height:20,background:[`#faad14`,`#8c8c8c`,`#ad6800`][n-1]},children:n}):(0,$.jsx)(`span`,{style:{color:t.colorTextTertiary,paddingLeft:6},children:n})},J9=()=>{let{token:e}=H9(),{t}=C(),{data:n,loading:r}=B9(V9),i=n??W9,{overview:a,recon:h,archives:g}=i,_=(e,t,n)=>({grid:{left:2,right:2,top:6,bottom:0},xAxis:{type:`category`,show:!1},yAxis:{type:`value`,show:!1},tooltip:{show:!1},series:[t===`bar`?{data:e,type:t,barWidth:8,itemStyle:{color:n,borderRadius:[3,3,0,0]}}:{data:e,type:t,smooth:!0,symbol:`none`,lineStyle:{color:n,width:2},areaStyle:{color:n,opacity:.15}}]}),w={tooltip:{trigger:`axis`,axisPointer:{type:`cross`},borderWidth:0,backgroundColor:e.colorBgElevated,textStyle:{color:e.colorText}},legend:{data:[t(`dashboard.analysis.amountAxis`),t(`dashboard.analysis.ordersAxis`)],textStyle:{color:e.colorText}},grid:{left:`3%`,right:`4%`,bottom:`3%`,containLabel:!0},xAxis:{type:`category`,data:i.trend.map(e=>e.date.slice(5)),axisLabel:{color:e.colorTextSecondary},axisLine:{lineStyle:{color:e.colorBorder}}},yAxis:[{type:`value`,name:t(`dashboard.analysis.amountAxis`),nameTextStyle:{color:e.colorTextSecondary},axisLabel:{color:e.colorTextSecondary},splitLine:{lineStyle:{color:e.colorBorderSecondary}}},{type:`value`,name:t(`dashboard.analysis.ordersAxis`),nameTextStyle:{color:e.colorTextSecondary},axisLabel:{color:e.colorTextSecondary},splitLine:{show:!1}}],series:[{name:t(`dashboard.analysis.amountAxis`),type:`bar`,data:i.trend.map(e=>e.amount),barMaxWidth:20,itemStyle:{color:e.colorPrimary,borderRadius:[4,4,0,0]}},{name:t(`dashboard.analysis.ordersAxis`),type:`line`,yAxisIndex:1,smooth:!0,symbol:`none`,data:i.trend.map(e=>e.orders),itemStyle:{color:e.colorSuccess},lineStyle:{width:2}}]},T={0:e.colorTextDisabled,1:e.colorPrimary,2:e.colorWarning,3:`#13c2c2`,4:e.colorSuccess,9:e.colorError},E={tooltip:{trigger:`item`},legend:{bottom:0,left:`center`,textStyle:{color:e.colorText}},series:[{name:t(`dashboard.analysis.orderStatusDistribution`),type:`pie`,radius:[`45%`,`70%`],center:[`50%`,`42%`],avoidLabelOverlap:!1,itemStyle:{borderRadius:e.borderRadius,borderColor:e.colorBgContainer,borderWidth:2},label:{show:!1},emphasis:{label:{show:!0,fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong}},labelLine:{show:!1},data:i.order_status.map(t=>({value:t.count,name:t.name,itemStyle:{color:T[t.status]??e.colorTextDisabled}}))}]},D={tooltip:{trigger:`item`},legend:{bottom:0,left:`center`,textStyle:{color:e.colorText}},series:[{name:t(`dashboard.analysis.categorySales`),type:`pie`,radius:[`40%`,`68%`],center:[`50%`,`42%`],avoidLabelOverlap:!1,itemStyle:{borderRadius:e.borderRadius,borderColor:e.colorBgContainer,borderWidth:2},label:{show:!1},emphasis:{label:{show:!0,fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong}},labelLine:{show:!1},data:i.category_sales.map(e=>({value:e.amount,name:e.name}))}]};return(0,$.jsx)(l,{spinning:r,children:(0,$.jsxs)(d,{gutter:[20,20],children:[(0,$.jsx)(u,{xxl:6,lg:12,xs:24,children:(0,$.jsx)(K9,{title:t(`dashboard.analysis.salesAmount`),value:U9(a.sales.total),sub:(0,$.jsxs)($.Fragment,{children:[t(`dashboard.analysis.today`),` `,U9(a.sales.today),` ·`,` `,t(`dashboard.analysis.thisWeek`),` `,U9(a.sales.week)]}),growth:a.sales.growth,chart:(0,$.jsx)(z9,{style:{width:130,height:64},option:_(a.sales.trend7,`bar`,e.colorPrimary)})})}),(0,$.jsx)(u,{xxl:6,lg:12,xs:24,children:(0,$.jsx)(K9,{title:t(`dashboard.analysis.orderCount`),value:a.orders.total.toLocaleString(),sub:(0,$.jsxs)($.Fragment,{children:[t(`dashboard.analysis.today`),` `,a.orders.today,` ·`,` `,t(`dashboard.analysis.thisWeek`),` `,a.orders.week]}),growth:a.orders.growth,chart:(0,$.jsx)(z9,{style:{width:130,height:64},option:_(a.orders.trend7,`line`,e.colorSuccess)})})}),(0,$.jsx)(u,{xxl:6,lg:12,xs:24,children:(0,$.jsx)(K9,{title:t(`dashboard.analysis.purchaseAmount`),value:U9(a.purchase.total),sub:(0,$.jsxs)($.Fragment,{children:[t(`dashboard.analysis.today`),` `,U9(a.purchase.today),` ·`,` `,t(`dashboard.analysis.thisWeek`),` `,U9(a.purchase.week)]}),growth:a.purchase.growth,chart:(0,$.jsx)(z9,{style:{width:130,height:64},option:_(a.purchase.trend7,`bar`,e.colorWarning)})})}),(0,$.jsx)(u,{xxl:6,lg:12,xs:24,children:(0,$.jsxs)(c,{variant:`borderless`,children:[(0,$.jsx)(`div`,{children:t(`dashboard.analysis.receivable`)}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between pt-4 pb-2`,children:[(0,$.jsx)(`div`,{className:`text-3xl font-semibold`,children:U9(a.receivable.unreceived)}),(0,$.jsx)(`div`,{className:`text-3xl rounded-full flex items-center justify-center`,style:{height:64,width:64,background:e.colorPrimaryBg},children:(0,$.jsx)(x,{style:{color:e.colorPrimary}})})]}),(0,$.jsxs)(`div`,{style:{color:e.colorTextSecondary},children:[t(`dashboard.analysis.totalBillAmount`),` `,U9(a.receivable.bill_total),` ·`,` `,t(`dashboard.analysis.receivedAmount`),` `,U9(a.receivable.received)]})]})}),(0,$.jsx)(u,{xl:18,xs:24,children:(0,$.jsx)(c,{variant:`borderless`,title:t(`dashboard.analysis.salesTrend`),children:i.trend.length===0?(0,$.jsx)(s,{description:t(`dashboard.analysis.emptyTrend`)}):(0,$.jsx)(z9,{style:{width:`100%`,height:360},option:w})})}),(0,$.jsx)(u,{xl:6,xs:24,children:(0,$.jsx)(c,{variant:`borderless`,title:t(`dashboard.analysis.orderStatusDistribution`),children:(0,$.jsx)(z9,{style:{width:`100%`,height:360},option:E})})}),(0,$.jsx)(u,{xl:6,xs:24,children:(0,$.jsx)(c,{variant:`borderless`,title:t(`dashboard.analysis.categorySales`),children:i.category_sales.length===0?(0,$.jsx)(s,{description:t(`dashboard.analysis.emptyCategory`)}):(0,$.jsx)(z9,{style:{width:`100%`,height:320},option:D})})}),(0,$.jsx)(u,{xl:9,xs:24,children:(0,$.jsx)(c,{variant:`borderless`,title:t(`dashboard.analysis.topProducts`),children:(0,$.jsx)(o,{size:`small`,rowKey:`product_id`,dataSource:i.top_products,pagination:!1,columns:[{title:t(`dashboard.analysis.rank`),key:`rank`,width:60,render:(e,t,n)=>(0,$.jsx)(q9,{index:n})},{title:t(`dashboard.analysis.productName`),dataIndex:`product_name`,ellipsis:!0,render:(t,n)=>(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{children:t}),(0,$.jsx)(`div`,{style:{color:e.colorTextTertiary,fontSize:e.fontSizeSM},children:n.product_spec})]})},{title:t(`dashboard.analysis.quantity`),key:`quantity`,width:100,render:(e,t)=>`${t.quantity} ${t.unit}`},{title:t(`dashboard.analysis.amount`),dataIndex:`amount`,width:120,render:e=>U9(e)}]})})}),(0,$.jsx)(u,{xl:9,xs:24,children:(0,$.jsx)(c,{variant:`borderless`,title:t(`dashboard.analysis.topStores`),children:(0,$.jsx)(o,{size:`small`,rowKey:`store_id`,dataSource:i.top_stores,pagination:!1,columns:[{title:t(`dashboard.analysis.rank`),key:`rank`,width:60,render:(e,t,n)=>(0,$.jsx)(q9,{index:n})},{title:t(`dashboard.analysis.storeName`),dataIndex:`store_name`,ellipsis:!0},{title:t(`dashboard.analysis.orderCount`),dataIndex:`order_count`,width:90},{title:t(`dashboard.analysis.amount`),dataIndex:`amount`,width:120,render:e=>U9(e)}]})})}),(0,$.jsx)(u,{xl:10,xs:24,children:(0,$.jsxs)(c,{variant:`borderless`,title:t(`dashboard.analysis.reconOverview`),children:[(0,$.jsx)(`div`,{className:`mb-3`,style:{fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong},children:t(`dashboard.analysis.billProgress`)}),(0,$.jsx)(d,{gutter:[16,16],children:h.bills.map(n=>(0,$.jsxs)(u,{span:8,children:[(0,$.jsx)(m,{color:A[n.pay_state]?.color,children:n.name}),(0,$.jsxs)(`div`,{className:`pt-2`,children:[(0,$.jsx)(p,{value:n.count,suffix:t(`dashboard.analysis.billUnit`)||void 0}),(0,$.jsx)(`div`,{style:{color:e.colorTextSecondary},children:U9(n.amount)})]})]},n.pay_state))}),(0,$.jsx)(f,{style:{margin:`16px 0`}}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontWeight:e.fontWeightStrong},children:t(`dashboard.analysis.pendingPaymentReview`)}),(0,$.jsx)(`div`,{style:{color:e.colorTextTertiary,fontSize:e.fontSizeSM},children:t(`dashboard.analysis.pendingPaymentTip`)})]}),(0,$.jsxs)(`div`,{className:`text-right`,children:[(0,$.jsx)(p,{value:h.pending_payment.count}),(0,$.jsx)(`div`,{style:{color:e.colorTextSecondary},children:U9(h.pending_payment.amount)})]})]})]})}),(0,$.jsx)(u,{xl:14,xs:24,children:(0,$.jsx)(c,{variant:`borderless`,title:t(`dashboard.analysis.latestOrders`),children:(0,$.jsx)(o,{size:`small`,rowKey:`id`,dataSource:i.latest_orders,pagination:!1,columns:[{title:t(`dashboard.analysis.orderNo`),dataIndex:`order_no`,ellipsis:!0},{title:t(`dashboard.analysis.store`),dataIndex:`store_name`,ellipsis:!0},{title:t(`dashboard.analysis.orderDate`),dataIndex:`order_date`,width:110},{title:t(`dashboard.analysis.amount`),dataIndex:`total_amount`,width:120,render:e=>U9(e)},{title:t(`dashboard.analysis.status`),dataIndex:`status`,width:90,render:e=>(0,$.jsx)(m,{color:k[e]?.color,children:k[e]?.text})}]})})}),(0,$.jsx)(u,{xxl:6,lg:12,xs:24,children:(0,$.jsx)(c,{variant:`borderless`,children:(0,$.jsx)(p,{title:t(`dashboard.analysis.archivesStores`),value:g.stores,prefix:(0,$.jsx)(v,{style:{color:e.colorPrimary}})})})}),(0,$.jsx)(u,{xxl:6,lg:12,xs:24,children:(0,$.jsx)(c,{variant:`borderless`,children:(0,$.jsx)(p,{title:t(`dashboard.analysis.archivesProducts`),value:g.products,prefix:(0,$.jsx)(b,{style:{color:e.colorSuccess}})})})}),(0,$.jsx)(u,{xxl:6,lg:12,xs:24,children:(0,$.jsx)(c,{variant:`borderless`,children:(0,$.jsx)(p,{title:t(`dashboard.analysis.archivesSuppliers`),value:g.suppliers,prefix:(0,$.jsx)(y,{style:{color:e.colorWarning}})})})}),(0,$.jsx)(u,{xxl:6,lg:12,xs:24,children:(0,$.jsx)(c,{variant:`borderless`,children:(0,$.jsx)(p,{title:t(`dashboard.analysis.archivesUsers`),value:g.users,prefix:(0,$.jsx)(S,{style:{color:e.colorInfo}})})})})]})})};export{J9 as default};