import{ay as Jl,P as zl,bK as kA,d as Kn,G as zt,a as Me,c as _t,Z as Lc,_ as RA,cz as rg,r as $t,cA as BR,bC as EA,cB as zR,b7 as OA,h as pr,u as NA,be as VR,cb as GR,bc as FR,ca as HR,cw as BA,m as fs,an as WR,ao as $R,B as Wt,az as Ch,o as zA,I as UR,U as Kt,V as Re,W as Ct,Y as Bt,a4 as Ae,a3 as se,X as Ke,cp as VA,a2 as pa,cC as YR,cD as ZR,$ as vr,z as $a,cE as XR,aO as GA,ah as FA,aj as HA,ak as WA,aP as $A,aQ as UA,a0 as YA,a1 as qR,J as KR,bk as jR,a9 as JR,a8 as QR,cF as tE,cG as eE,cH as rE,ck as aE,cI as nE,cJ as iE,R as Ao,T as oE,cK as sE}from"./index-0205daf8.js";import{u as lE}from"./index-859cb083.js";import{S as ZA}from"./index-af89284c.js";import{_ as uE}from"./index-728b29ca.js";import{_ as XA}from"./index-6a8edab1.js";/* empty css */import{_ as qA}from"./index-6d8e3499.js";var KA=Jl("normal","exception","active","success"),fE=Jl("line","circle","dashboard"),cE=Jl("default","small"),Bv=function(){return{prefixCls:String,type:zl.oneOf(fE),percent:Number,format:{type:Function},status:zl.oneOf(KA),showInfo:{type:Boolean,default:void 0},strokeWidth:Number,strokeLinecap:String,strokeColor:{type:[String,Object],default:void 0},trailColor:String,width:Number,success:{type:Object,default:function(){return{}}},gapDegree:Number,gapPosition:String,size:zl.oneOf(cE),steps:Number,successPercent:Number,title:String}};function Ui(r){return!r||r<0?0:r>100?100:r}function Ic(r){var t=r.success,e=r.successPercent,a=e;return t&&"progress"in t&&(kA(!1,"Progress","`success.progress` is deprecated. Please use `success.percent` instead."),a=t.progress),t&&"percent"in t&&(a=t.percent),a}var vE=["from","to","direction"],hE=function(){return Me(Me({},Bv()),{},{prefixCls:String,direction:{type:String}})},dE=function(t){var e=[];return Object.keys(t).forEach(function(a){var n=parseFloat(a.replace(/%/g,""));isNaN(n)||e.push({key:n,value:t[a]})}),e=e.sort(function(a,n){return a.key-n.key}),e.map(function(a){var n=a.key,i=a.value;return"".concat(i," ").concat(n,"%")}).join(", ")},pE=function(t,e){var a=t.from,n=a===void 0?rg.blue:a,i=t.to,o=i===void 0?rg.blue:i,s=t.direction,l=s===void 0?e==="rtl"?"to left":"to right":s,u=RA(t,vE);if(Object.keys(u).length!==0){var f=dE(u);return{backgroundImage:"linear-gradient(".concat(l,", ").concat(f,")")}}return{backgroundImage:"linear-gradient(".concat(l,", ").concat(n,", ").concat(o,")")}};const gE=Kn({compatConfig:{MODE:3},name:"Line",props:hE(),setup:function(t,e){var a=e.slots,n=zt(function(){var u=t.strokeColor,f=t.direction;return u&&typeof u!="string"?pE(u,f):{background:u}}),i=zt(function(){return t.trailColor?{backgroundColor:t.trailColor}:void 0}),o=zt(function(){var u=t.percent,f=t.strokeWidth,c=t.strokeLinecap,v=t.size;return Me({width:"".concat(Ui(u),"%"),height:"".concat(f||(v==="small"?6:8),"px"),borderRadius:c==="square"?0:""},n.value)}),s=zt(function(){return Ic(t)}),l=zt(function(){var u=t.strokeWidth,f=t.size,c=t.strokeLinecap,v=t.success;return{width:"".concat(Ui(s.value),"%"),height:"".concat(u||(f==="small"?6:8),"px"),borderRadius:c==="square"?0:"",backgroundColor:v==null?void 0:v.strokeColor}});return function(){var u;return _t(Lc,null,[_t("div",{class:"".concat(t.prefixCls,"-outer")},[_t("div",{class:"".concat(t.prefixCls,"-inner"),style:i.value},[_t("div",{class:"".concat(t.prefixCls,"-bg"),style:o.value},null),s.value!==void 0?_t("div",{class:"".concat(t.prefixCls,"-success-bg"),style:l.value},null):null])]),(u=a.default)===null||u===void 0?void 0:u.call(a)])}}});var yE={percent:0,prefixCls:"vc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1},mE=function(t){var e=$t(null);return BR(function(){var a=Date.now(),n=!1;t.value.forEach(function(i){var o=(i==null?void 0:i.$el)||i;if(o){n=!0;var s=o.style;s.transitionDuration=".3s, .3s, .3s, .06s",e.value&&a-e.value<100&&(s.transitionDuration="0s, 0s")}}),n&&(e.value=Date.now())}),t},_E={gapDegree:Number,gapPosition:{type:String},percent:{type:[Array,Number]},prefixCls:String,strokeColor:{type:[Object,String,Array]},strokeLinecap:{type:String},strokeWidth:Number,trailColor:String,trailWidth:Number,transition:String},SE=["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","strokeColor"],W_=0;function $_(r){return+r.replace("%","")}function U_(r){return Array.isArray(r)?r:[r]}function Y_(r,t,e,a){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0,o=50-a/2,s=0,l=-o,u=0,f=-2*o;switch(i){case"left":s=-o,l=0,u=2*o,f=0;break;case"right":s=o,l=0,u=-2*o,f=0;break;case"bottom":l=o,f=2*o;break}var c="M 50,50 m ".concat(s,",").concat(l,` a `).concat(o,",").concat(o," 0 1 1 ").concat(u,",").concat(-f,` a `).concat(o,",").concat(o," 0 1 1 ").concat(-u,",").concat(f),v=Math.PI*2*o,h={stroke:e,strokeDasharray:"".concat(t/100*(v-n),"px ").concat(v,"px"),strokeDashoffset:"-".concat(n/2+r/100*(v-n),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s"};return{pathString:c,pathStyle:h}}const xE=Kn({compatConfig:{MODE:3},name:"VCCircle",props:EA(_E,yE),setup:function(t){W_+=1;var e=$t(W_),a=zt(function(){return U_(t.percent)}),n=zt(function(){return U_(t.strokeColor)}),i=zR(),o=OA(i,2),s=o[0],l=o[1];mE(l);var u=function(){var c=t.prefixCls,v=t.strokeWidth,h=t.strokeLinecap,d=t.gapDegree,p=t.gapPosition,g=0;return a.value.map(function(y,m){var _=n.value[m]||n.value[n.value.length-1],S=Object.prototype.toString.call(_)==="[object Object]"?"url(#".concat(c,"-gradient-").concat(e.value,")"):"",b=Y_(g,y,_,v,d,p),x=b.pathString,w=b.pathStyle;g+=y;var T={key:m,d:x,stroke:S,"stroke-linecap":h,"stroke-width":v,opacity:y===0?0:1,"fill-opacity":"0",class:"".concat(c,"-circle-path"),style:w};return _t("path",Me({ref:s(m)},T),null)})};return function(){var f=t.prefixCls,c=t.strokeWidth,v=t.trailWidth,h=t.gapDegree,d=t.gapPosition,p=t.trailColor,g=t.strokeLinecap;t.strokeColor;var y=RA(t,SE),m=Y_(0,100,p,c,h,d),_=m.pathString,S=m.pathStyle;delete y.percent;var b=n.value.find(function(w){return Object.prototype.toString.call(w)==="[object Object]"}),x={d:_,stroke:p,"stroke-linecap":g,"stroke-width":v||c,"fill-opacity":"0",class:"".concat(f,"-circle-trail"),style:S};return _t("svg",Me({class:"".concat(f,"-circle"),viewBox:"0 0 100 100"},y),[b&&_t("defs",null,[_t("linearGradient",{id:"".concat(f,"-gradient-").concat(e.value),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[Object.keys(b).sort(function(w,T){return $_(w)-$_(T)}).map(function(w,T){return _t("stop",{key:T,offset:w,"stop-color":b[w]},null)})])]),_t("path",x,null),u().reverse()])}}});function bE(r){var t=r.percent,e=r.success,a=r.successPercent,n=Ui(Ic({success:e,successPercent:a}));return[n,Ui(Ui(t)-n)]}function wE(r){var t=r.success,e=t===void 0?{}:t,a=r.strokeColor,n=e.strokeColor;return[n||rg.green,a||null]}const TE=Kn({compatConfig:{MODE:3},name:"Circle",inheritAttrs:!1,props:Bv(),setup:function(t,e){var a=e.slots,n=zt(function(){if(t.gapDegree||t.gapDegree===0)return t.gapDegree;if(t.type==="dashboard")return 75}),i=zt(function(){var v=t.width||120;return{width:typeof v=="number"?"".concat(v,"px"):v,height:typeof v=="number"?"".concat(v,"px"):v,fontSize:"".concat(v*.15+6,"px")}}),o=zt(function(){return t.strokeWidth||6}),s=zt(function(){return t.gapPosition||t.type==="dashboard"&&"bottom"||"top"}),l=zt(function(){return bE(t)}),u=zt(function(){return Object.prototype.toString.call(t.strokeColor)==="[object Object]"}),f=zt(function(){return wE({success:t.success,strokeColor:t.strokeColor})}),c=zt(function(){var v;return v={},pr(v,"".concat(t.prefixCls,"-inner"),!0),pr(v,"".concat(t.prefixCls,"-circle-gradient"),u.value),v});return function(){var v;return _t("div",{class:c.value,style:i.value},[_t(xE,{percent:l.value,strokeWidth:o.value,trailWidth:o.value,strokeColor:f.value,strokeLinecap:t.strokeLinecap,trailColor:t.trailColor,prefixCls:t.prefixCls,gapDegree:n.value,gapPosition:s.value},null),(v=a.default)===null||v===void 0?void 0:v.call(a)])}}});var CE=function(){return Me(Me({},Bv()),{},{steps:Number,size:{type:String},strokeColor:String,trailColor:String})};const AE=Kn({compatConfig:{MODE:3},name:"Steps",props:CE(),setup:function(t,e){var a=e.slots,n=zt(function(){return Math.round(t.steps*((t.percent||0)/100))}),i=zt(function(){return t.size==="small"?2:14}),o=zt(function(){for(var s=t.steps,l=t.strokeWidth,u=l===void 0?8:l,f=t.strokeColor,c=t.trailColor,v=t.prefixCls,h=[],d=0;d=100?"success":c||"normal"}),f=function(){var v=t.showInfo,h=t.format,d=t.type,p=t.percent,g=t.title,y=Ic(t);if(!v)return null;var m,_=h||(a==null?void 0:a.format)||function(b){return"".concat(b,"%")},S=d==="line";return h||a!=null&&a.format||u.value!=="exception"&&u.value!=="success"?m=_(Ui(p),Ui(y)):u.value==="exception"?m=S?_t(VR,null,null):_t(GR,null,null):u.value==="success"&&(m=S?_t(FR,null,null):_t(HR,null,null)),_t("span",{class:"".concat(i.value,"-text"),title:g===void 0&&typeof m=="string"?m:void 0},[m])};return function(){var c=t.type,v=t.steps,h=t.strokeColor,d=t.title,p=f(),g;c==="line"?g=v?_t(AE,Me(Me({},t),{},{strokeColor:typeof h=="string"?h:void 0,prefixCls:i.value,steps:v}),{default:function(){return[p]}}):_t(gE,Me(Me({},t),{},{prefixCls:i.value}),{default:function(){return[p]}}):(c==="circle"||c==="dashboard")&&(g=_t(TE,Me(Me({},t),{},{prefixCls:i.value}),{default:function(){return[p]}}));var y=Me(Me({},s.value),{},pr({},"".concat(i.value,"-status-").concat(u.value),!0));return _t("div",{class:y,title:d},[g])}}}),DE=BA(ME);var LE={small:8,middle:16,large:24},IE=function(){return{prefixCls:String,size:{type:[String,Number,Array]},direction:zl.oneOf(Jl("horizontal","vertical")).def("horizontal"),align:zl.oneOf(Jl("start","end","center","baseline")),wrap:{type:Boolean,default:void 0}}};function PE(r){return typeof r=="string"?LE[r]:r||0}var kE=Kn({compatConfig:{MODE:3},name:"ASpace",props:IE(),slots:["split"],setup:function(t,e){var a=e.slots,n=NA("space",t),i=n.prefixCls,o=n.space,s=n.direction,l=lE(),u=zt(function(){var g,y,m;return(g=(y=t.size)!==null&&y!==void 0?y:(m=o.value)===null||m===void 0?void 0:m.size)!==null&&g!==void 0?g:"small"}),f=$t(),c=$t();fs(u,function(){var g=(Array.isArray(u.value)?u.value:[u.value,u.value]).map(function(m){return PE(m)}),y=OA(g,2);f.value=y[0],c.value=y[1]},{immediate:!0});var v=zt(function(){return t.align===void 0&&t.direction==="horizontal"?"center":t.align}),h=zt(function(){var g;return WR(i.value,"".concat(i.value,"-").concat(t.direction),(g={},pr(g,"".concat(i.value,"-rtl"),s.value==="rtl"),pr(g,"".concat(i.value,"-align-").concat(v.value),v.value),g))}),d=zt(function(){return s.value==="rtl"?"marginLeft":"marginRight"}),p=zt(function(){var g={};return l.value&&(g.columnGap="".concat(f.value,"px"),g.rowGap="".concat(c.value,"px")),Me(Me({},g),t.wrap&&{flexWrap:"wrap",marginBottom:"".concat(-c.value,"px")})});return function(){var g,y,m=t.wrap,_=t.direction,S=_===void 0?"horizontal":_,b=(g=a.default)===null||g===void 0?void 0:g.call(a),x=$R(b),w=x.length;if(w===0)return null;var T=(y=a.split)===null||y===void 0?void 0:y.call(a),C="".concat(i.value,"-item"),M=f.value,D=w-1;return _t("div",{class:h.value,style:p.value},[x.map(function(I,L){var k=b.indexOf(I),R={};return l.value||(S==="vertical"?L"u"&&typeof self<"u"?xn.worker=!0:!xn.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(xn.node=!0,xn.svgSupported=!0):NE(navigator.userAgent,xn);function NE(r,t){var e=t.browser,a=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);a&&(e.firefox=!0,e.version=a[1]),n&&(e.ie=!0,e.version=n[1]),i&&(e.edge=!0,e.version=i[1],e.newEdge=+i[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in l||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}}const Nt=xn;var dm=12,jA="sans-serif",Qa=dm+"px "+jA,BE=20,zE=100,VE="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function GE(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e=0)s=o*e.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",n[u]+":0",a[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return t.clearMarkers=function(){A(e,function(f){f.parentNode&&f.parentNode.removeChild(f)})},e}function lO(r,t,e){for(var a=e?"invTrans":"trans",n=t[a],i=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),c=2*u,v=f.left,h=f.top;o.push(v,h),l=l&&i&&v===i[c]&&h===i[c+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(t.srcCoords=o,t[a]=e?K_(s,o):K_(o,s))}function nM(r){return r.nodeName.toUpperCase()==="CANVAS"}var uO=/([&<>"'])/g,fO={"&":"&","<":"<",">":">",'"':""","'":"'"};function $e(r){return r==null?"":(r+"").replace(uO,function(t,e){return fO[e]})}var cO=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Mh=[],vO=Nt.browser.firefox&&+Nt.browser.version.split(".")[0]<39;function fg(r,t,e,a){return e=e||{},a?j_(r,t,e):vO&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):j_(r,t,e),e}function j_(r,t,e){if(Nt.domSupported&&r.getBoundingClientRect){var a=t.clientX,n=t.clientY;if(nM(r)){var i=r.getBoundingClientRect();e.zrX=a-i.left,e.zrY=n-i.top;return}else if(ug(Mh,r,a,n)){e.zrX=Mh[0],e.zrY=Mh[1];return}}e.zrX=e.zrY=0}function xm(r){return r||window.event}function Dr(r,t,e){if(t=xm(t),t.zrX!=null)return t;var a=t.type,n=a&&a.indexOf("touch")>=0;if(n){var o=a!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&fg(r,o,t,e)}else{fg(r,t,t,e);var i=hO(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&cO.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function hO(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,a=r.deltaY;if(e==null||a==null)return t;var n=Math.abs(a!==0?a:e),i=a>0?-1:a<0?1:e>0?-1:1;return 3*n*i}function cg(r,t,e,a){r.addEventListener(t,e,a)}function dO(r,t,e,a){r.removeEventListener(t,e,a)}var tn=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function J_(r){return r.which===2||r.which===3}var pO=function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,a){return this._doTrack(t,e,a),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,a){var n=t.touches;if(n){for(var i={points:[],touches:[],target:e,event:t},o=0,s=n.length;o1&&a&&a.length>1){var i=Q_(a)/Q_(n);!isFinite(i)&&(i=1),t.pinchScale=i;var o=gO(a);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function Oe(){return[1,0,0,1,0,0]}function Hv(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Wv(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function Aa(r,t,e){var a=t[0]*e[0]+t[2]*e[1],n=t[1]*e[0]+t[3]*e[1],i=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=a,r[1]=n,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function Pa(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function jn(r,t,e,a){a===void 0&&(a=[0,0]);var n=t[0],i=t[2],o=t[4],s=t[1],l=t[3],u=t[5],f=Math.sin(e),c=Math.cos(e);return r[0]=n*c+s*f,r[1]=-n*f+s*c,r[2]=i*c+l*f,r[3]=-i*f+c*l,r[4]=c*(o-a[0])+f*(u-a[1])+a[0],r[5]=c*(u-a[1])-f*(o-a[0])+a[1],r}function bm(r,t,e){var a=e[0],n=e[1];return r[0]=t[0]*a,r[1]=t[1]*n,r[2]=t[2]*a,r[3]=t[3]*n,r[4]=t[4]*a,r[5]=t[5]*n,r}function Qr(r,t){var e=t[0],a=t[2],n=t[4],i=t[1],o=t[3],s=t[5],l=e*o-i*a;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-a*l,r[3]=e*l,r[4]=(a*s-o*n)*l,r[5]=(i*n-e*s)*l,r):null}function yO(r){var t=Oe();return Wv(t,r),t}var mO=function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,a=this.y-t.y;return Math.sqrt(e*e+a*a)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,a=this.y-t.y;return e*e+a*a},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,a=this.y;return this.x=t[0]*e+t[2]*a+t[4],this.y=t[1]*e+t[3]*a+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,a){t.x=e,t.y=a},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,a){t.x=e.x+a.x,t.y=e.y+a.y},r.sub=function(t,e,a){t.x=e.x-a.x,t.y=e.y-a.y},r.scale=function(t,e,a){t.x=e.x*a,t.y=e.y*a},r.scaleAndAdd=function(t,e,a,n){t.x=e.x+a.x*n,t.y=e.y+a.y*n},r.lerp=function(t,e,a,n){var i=1-n;t.x=i*e.x+n*a.x,t.y=i*e.y+n*a.y},r}();const ct=mO;var zi=Math.min,as=Math.max,vg=Math.abs,t1=["x","y"],_O=["width","height"],ei=new ct,ri=new ct,ai=new ct,ni=new ct,dr=iM(),Cl=dr.minTv,hg=dr.maxTv,Gl=[0,0],wm=function(){function r(t,e,a,n){r.set(this,t,e,a,n)}return r.set=function(t,e,a,n,i){return n<0&&(e=e+n,n=-n),i<0&&(a=a+i,i=-i),t.x=e,t.y=a,t.width=n,t.height=i,t},r.prototype.union=function(t){var e=zi(t.x,this.x),a=zi(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=as(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=as(t.y+t.height,this.y+this.height)-a:this.height=t.height,this.x=e,this.y=a},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,a=t.width/e.width,n=t.height/e.height,i=Oe();return Pa(i,i,[-e.x,-e.y]),bm(i,i,[a,n]),Pa(i,i,[t.x,t.y]),i},r.prototype.intersect=function(t,e,a){return r.intersect(this,t,e,a)},r.intersect=function(t,e,a,n){a&&ct.set(a,0,0);var i=n&&n.outIntersectRect||null,o=n&&n.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!t||!e)return!1;t instanceof r||(t=r.set(SO,t.x,t.y,t.width,t.height)),e instanceof r||(e=r.set(xO,e.x,e.y,e.width,e.height));var s=!!a;dr.reset(n,s);var l=dr.touchThreshold,u=t.x+l,f=t.x+t.width-l,c=t.y+l,v=t.y+t.height-l,h=e.x+l,d=e.x+e.width-l,p=e.y+l,g=e.y+e.height-l;if(u>f||c>v||h>d||p>g)return!1;var y=!(f=t.x&&e<=t.x+t.width&&a>=t.y&&a<=t.y+t.height},r.prototype.contain=function(t,e){return r.contain(this,t,e)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},r.applyTransform=function(t,e,a){if(!a){t!==e&&r.copy(t,e);return}if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var n=a[0],i=a[3],o=a[4],s=a[5];t.x=e.x*n+o,t.y=e.y*i+s,t.width=e.width*n,t.height=e.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}ei.x=ai.x=e.x,ei.y=ni.y=e.y,ri.x=ni.x=e.x+e.width,ri.y=ai.y=e.y+e.height,ei.transform(a),ni.transform(a),ri.transform(a),ai.transform(a),t.x=zi(ei.x,ri.x,ai.x,ni.x),t.y=zi(ei.y,ri.y,ai.y,ni.y);var l=as(ei.x,ri.x,ai.x,ni.x),u=as(ei.y,ri.y,ai.y,ni.y);t.width=l-t.x,t.height=u-t.y},r}(),SO=new wm(0,0,0,0),xO=new wm(0,0,0,0);function e1(r,t,e,a,n,i,o,s){var l=vg(t-e),u=vg(a-r),f=zi(l,u),c=t1[n],v=t1[1-n],h=_O[n];t=u||!dr.bidirectional)&&(Cl[c]=-u,Cl[v]=0,dr.useDir&&dr.calcDirMTV())))}function iM(){var r=0,t=new ct,e=new ct,a={minTv:new ct,maxTv:new ct,useDir:!1,dirMinTv:new ct,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){a.touchThreshold=0,i&&i.touchThreshold!=null&&(a.touchThreshold=as(0,i.touchThreshold)),a.negativeSize=!1,o&&(a.minTv.set(1/0,1/0),a.maxTv.set(0,0),a.useDir=!1,i&&i.direction!=null&&(a.useDir=!0,a.dirMinTv.copy(a.minTv),e.copy(a.minTv),r=i.direction,a.bidirectional=i.bidirectional==null||!!i.bidirectional,a.bidirectional||t.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var i=a.minTv,o=a.dirMinTv,s=i.y*i.y+i.x*i.x,l=Math.sin(r),u=Math.cos(r),f=l*i.y+u*i.x;if(n(f)){n(i.x)&&n(i.y)&&o.set(0,0);return}if(e.x=s*u/f,e.y=s*l/f,n(e.x)&&n(e.y)){o.set(0,0);return}(a.bidirectional||t.dot(e)>0)&&e.len()=0;c--){var v=i[c];v!==n&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(Lh.copy(v.getBoundingRect()),v.transform&&Lh.applyTransform(v.transform),Lh.intersect(f)&&s.push(v))}if(s.length)for(var h=4,d=Math.PI/12,p=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(i,r,t)}});function AO(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var a=r,n=void 0,i=!1;a;){if(a.ignoreClip&&(i=!0),!i){var o=a.getClipPath();if(o&&!o.contain(t,e))return!1}a.silent&&(n=!0);var s=a.__hostTarget;a=s?a.ignoreHostSilent?null:s:a.parent}return n?oM:!0}return!1}function r1(r,t,e,a,n){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==n&&!o.ignore&&(s=AO(o,e,a))&&(!t.topTarget&&(t.topTarget=o),s!==oM)){t.target=o;break}}}function lM(r,t,e){var a=r.painter;return t<0||t>a.getWidth()||e<0||e>a.getHeight()}const MO=sM;var uM=32,Xs=7;function DO(r){for(var t=0;r>=uM;)t|=r&1,r>>=1;return r+t}function a1(r,t,e,a){var n=t+1;if(n===e)return 1;if(a(r[n++],r[t])<0){for(;n=0;)n++;return n-t}function LO(r,t,e){for(e--;t>>1,n(i,r[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=i}}function Ih(r,t,e,a,n,i){var o=0,s=0,l=1;if(i(r,t[e+n])>0){for(s=a-n;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o>>1);i(r,t[e+f])>0?o=f+1:l=f}return l}function Ph(r,t,e,a,n,i){var o=0,s=0,l=1;if(i(r,t[e+n])<0){for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=a-n;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o>>1);i(r,t[e+f])<0?l=f:o=f+1}return l}function IO(r,t){var e=Xs,a,n,i=0,o=[];a=[],n=[];function s(h,d){a[i]=h,n[i]=d,i+=1}function l(){for(;i>1;){var h=i-2;if(h>=1&&n[h-1]<=n[h]+n[h+1]||h>=2&&n[h-2]<=n[h]+n[h-1])n[h-1]n[h+1])break;f(h)}}function u(){for(;i>1;){var h=i-2;h>0&&n[h-1]=Xs||w>=Xs);if(T)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),d===1){for(y=0;y=0;y--)r[x+y]=r[b+y];r[S]=o[_];return}for(var w=e;;){var T=0,C=0,M=!1;do if(t(o[_],r[m])<0){if(r[S--]=r[m--],T++,C=0,--d===0){M=!0;break}}else if(r[S--]=o[_--],C++,T=0,--g===1){M=!0;break}while((T|C)=0;y--)r[x+y]=r[b+y];if(d===0){M=!0;break}}if(r[S--]=o[_--],--g===1){M=!0;break}if(C=g-Ih(r[m],o,0,g,g-1,t),C!==0){for(S-=C,_-=C,g-=C,x=S+1,b=_+1,y=0;y=Xs||C>=Xs);if(M)break;w<0&&(w=0),w+=2}if(e=w,e<1&&(e=1),g===1){for(S-=d,m-=d,x=S+1,b=m+1,y=d-1;y>=0;y--)r[x+y]=r[b+y];r[S]=o[_]}else{if(g===0)throw new Error;for(b=S-(g-1),y=0;ys&&(l=s),n1(r,e,e+l,e+i,t),i=l}o.pushRun(e,i),o.mergeRuns(),n-=i,e+=i}while(n!==0);o.forceMergeRuns()}}var gr=1,Al=2,Qo=4,i1=!1;function kh(){i1||(i1=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function o1(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var PO=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=o1}return r.prototype.traverse=function(t,e){for(var a=0;a=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}();const kO=PO;var fM;fM=Nt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};const dg=fM;var cc={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)))},elasticOut:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-cc.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?cc.bounceIn(r*2)*.5:cc.bounceOut(r*2-1)*.5+.5}};const cM=cc;var Zu=Math.pow,On=Math.sqrt,Rc=1e-8,vM=1e-4,s1=On(3),Xu=1/3,ya=vo(),kr=vo(),cs=vo();function Ln(r){return r>-Rc&&rRc||r<-Rc}function De(r,t,e,a,n){var i=1-n;return i*i*(i*r+3*n*t)+n*n*(n*a+3*i*e)}function l1(r,t,e,a,n){var i=1-n;return 3*(((t-r)*i+2*(e-t)*n)*i+(a-e)*n*n)}function Ec(r,t,e,a,n,i){var o=a+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-n,f=s*s-3*o*l,c=s*l-9*o*u,v=l*l-3*s*u,h=0;if(Ln(f)&&Ln(c))if(Ln(s))i[0]=0;else{var d=-l/s;d>=0&&d<=1&&(i[h++]=d)}else{var p=c*c-4*f*v;if(Ln(p)){var g=c/f,d=-s/o+g,y=-g/2;d>=0&&d<=1&&(i[h++]=d),y>=0&&y<=1&&(i[h++]=y)}else if(p>0){var m=On(p),_=f*s+1.5*o*(-c+m),S=f*s+1.5*o*(-c-m);_<0?_=-Zu(-_,Xu):_=Zu(_,Xu),S<0?S=-Zu(-S,Xu):S=Zu(S,Xu);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(i[h++]=d)}else{var b=(2*f*s-3*o*c)/(2*On(f*f*f)),x=Math.acos(b)/3,w=On(f),T=Math.cos(x),d=(-s-2*w*T)/(3*o),y=(-s+w*(T+s1*Math.sin(x)))/(3*o),C=(-s+w*(T-s1*Math.sin(x)))/(3*o);d>=0&&d<=1&&(i[h++]=d),y>=0&&y<=1&&(i[h++]=y),C>=0&&C<=1&&(i[h++]=C)}}return h}function dM(r,t,e,a,n){var i=6*e-12*t+6*r,o=9*t+3*a-3*r-9*e,s=3*t-3*r,l=0;if(Ln(o)){if(hM(i)){var u=-s/i;u>=0&&u<=1&&(n[l++]=u)}}else{var f=i*i-4*o*s;if(Ln(f))n[0]=-i/(2*o);else if(f>0){var c=On(f),u=(-i+c)/(2*o),v=(-i-c)/(2*o);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function Hn(r,t,e,a,n,i){var o=(t-r)*n+r,s=(e-t)*n+t,l=(a-e)*n+e,u=(s-o)*n+o,f=(l-s)*n+s,c=(f-u)*n+u;i[0]=r,i[1]=o,i[2]=u,i[3]=c,i[4]=c,i[5]=f,i[6]=l,i[7]=a}function pM(r,t,e,a,n,i,o,s,l,u,f){var c,v=.005,h=1/0,d,p,g,y;ya[0]=l,ya[1]=u;for(var m=0;m<1;m+=.05)kr[0]=De(r,e,n,o,m),kr[1]=De(t,a,i,s,m),g=Yi(ya,kr),g=0&&g=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*i*s;if(Ln(f)){var u=-o/(2*i);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var c=On(f),u=(-o+c)/(2*i),v=(-o-c)/(2*i);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function gM(r,t,e){var a=r+e-2*t;return a===0?.5:(r-t)/a}function tu(r,t,e,a,n){var i=(t-r)*a+r,o=(e-t)*a+t,s=(o-i)*a+i;n[0]=r,n[1]=i,n[2]=s,n[3]=s,n[4]=o,n[5]=e}function yM(r,t,e,a,n,i,o,s,l){var u,f=.005,c=1/0;ya[0]=o,ya[1]=s;for(var v=0;v<1;v+=.05){kr[0]=Ee(r,e,n,v),kr[1]=Ee(t,a,i,v);var h=Yi(ya,kr);h=0&&h=1?1:Ec(0,a,i,1,l,s)&&De(0,n,o,1,s[0])}}}var BO=function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||fe,this.ondestroy=t.ondestroy||fe,this.onrestart=t.onrestart||fe,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var a=this._life,n=t-this._startTime-this._pausedTime,i=n/a;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=n%a;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=ot(t)?t:cM[t]||Tm(t)},r}();const zO=BO;var mM=function(){function r(t){this.value=t}return r}(),VO=function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new mM(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,a=t.next;e?e.next=a:this.head=a,a?a.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),GO=function(){function r(t){this._list=new VO,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var a=this._list,n=this._map,i=null;if(n[t]==null){var o=a.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=a.head;a.remove(l),delete n[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new mM(e),s.key=t,a.insertEntry(s),n[t]=s}return i},r.prototype.get=function(t){var e=this._map[t],a=this._list;if(e!=null)return e!==a.tail&&(a.remove(e),a.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}();const ys=GO;var u1={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 qr(r){return r=Math.round(r),r<0?0:r>255?255:r}function FO(r){return r=Math.round(r),r<0?0:r>360?360:r}function eu(r){return r<0?0:r>1?1:r}function Rh(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?qr(parseFloat(t)/100*255):qr(parseInt(t,10))}function Nn(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?eu(parseFloat(t)/100):eu(parseFloat(t))}function Eh(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function In(r,t,e){return r+(t-r)*e}function Mr(r,t,e,a,n){return r[0]=t,r[1]=e,r[2]=a,r[3]=n,r}function gg(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var _M=new ys(20),qu=null;function Do(r,t){qu&&gg(qu,t),qu=_M.put(r,qu||t.slice())}function lr(r,t){if(r){t=t||[];var e=_M.get(r);if(e)return gg(t,e);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in u1)return gg(t,u1[a]),Do(r,t),t;var n=a.length;if(a.charAt(0)==="#"){if(n===4||n===5){var i=parseInt(a.slice(1,4),16);if(!(i>=0&&i<=4095)){Mr(t,0,0,0,1);return}return Mr(t,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,n===5?parseInt(a.slice(4),16)/15:1),Do(r,t),t}else if(n===7||n===9){var i=parseInt(a.slice(1,7),16);if(!(i>=0&&i<=16777215)){Mr(t,0,0,0,1);return}return Mr(t,(i&16711680)>>16,(i&65280)>>8,i&255,n===9?parseInt(a.slice(7),16)/255:1),Do(r,t),t}return}var o=a.indexOf("("),s=a.indexOf(")");if(o!==-1&&s+1===n){var l=a.substr(0,o),u=a.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Mr(t,+u[0],+u[1],+u[2],1):Mr(t,0,0,0,1);f=Nn(u.pop());case"rgb":if(u.length>=3)return Mr(t,Rh(u[0]),Rh(u[1]),Rh(u[2]),u.length===3?f:Nn(u[3])),Do(r,t),t;Mr(t,0,0,0,1);return;case"hsla":if(u.length!==4){Mr(t,0,0,0,1);return}return u[3]=Nn(u[3]),yg(u,t),Do(r,t),t;case"hsl":if(u.length!==3){Mr(t,0,0,0,1);return}return yg(u,t),Do(r,t),t;default:return}}Mr(t,0,0,0,1)}}function yg(r,t){var e=(parseFloat(r[0])%360+360)%360/360,a=Nn(r[1]),n=Nn(r[2]),i=n<=.5?n*(a+1):n+a-n*a,o=n*2-i;return t=t||[],Mr(t,qr(Eh(o,i,e+1/3)*255),qr(Eh(o,i,e)*255),qr(Eh(o,i,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function HO(r){if(r){var t=r[0]/255,e=r[1]/255,a=r[2]/255,n=Math.min(t,e,a),i=Math.max(t,e,a),o=i-n,s=(i+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+n):u=o/(2-i-n);var f=((i-t)/6+o/2)/o,c=((i-e)/6+o/2)/o,v=((i-a)/6+o/2)/o;t===i?l=v-c:e===i?l=1/3+f-v:a===i&&(l=2/3+c-f),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return r[3]!=null&&h.push(r[3]),h}}function mg(r,t){var e=lr(r);if(e){for(var a=0;a<3;a++)t<0?e[a]=e[a]*(1-t)|0:e[a]=(255-e[a])*t+e[a]|0,e[a]>255?e[a]=255:e[a]<0&&(e[a]=0);return Ma(e,e.length===4?"rgba":"rgb")}}function Oh(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var a=r*(t.length-1),n=Math.floor(a),i=Math.ceil(a),o=t[n],s=t[i],l=a-n;return e[0]=qr(In(o[0],s[0],l)),e[1]=qr(In(o[1],s[1],l)),e[2]=qr(In(o[2],s[2],l)),e[3]=eu(In(o[3],s[3],l)),e}}function WO(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var a=r*(t.length-1),n=Math.floor(a),i=Math.ceil(a),o=lr(t[n]),s=lr(t[i]),l=a-n,u=Ma([qr(In(o[0],s[0],l)),qr(In(o[1],s[1],l)),qr(In(o[2],s[2],l)),eu(In(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:n,rightIndex:i,value:a}:u}}function Bn(r,t,e,a){var n=lr(r);if(r)return n=HO(n),t!=null&&(n[0]=FO(ot(t)?t(n[0]):t)),e!=null&&(n[1]=Nn(ot(e)?e(n[1]):e)),a!=null&&(n[2]=Nn(ot(a)?a(n[2]):a)),Ma(yg(n),"rgba")}function Oc(r,t){var e=lr(r);if(e&&t!=null)return e[3]=eu(t),Ma(e,"rgba")}function Ma(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function Nc(r,t){var e=lr(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var f1=new ys(100);function _g(r){if(Q(r)){var t=f1.get(r);return t||(t=mg(r,-.1),f1.put(r,t)),t}else if(Vv(r)){var e=$({},r);return e.colorStops=Y(r.colorStops,function(a){return{offset:a.offset,color:mg(a.color,-.1)}}),e}return r}var Bc=Math.round;function ru(r){var t;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var e=lr(r);e&&(r="rgb("+e[0]+","+e[1]+","+e[2]+")",t=e[3])}return{color:r,opacity:t??1}}var c1=1e-4;function Pn(r){return r-c1}function Ku(r){return Bc(r*1e3)/1e3}function Sg(r){return Bc(r*1e4)/1e4}function $O(r){return"matrix("+Ku(r[0])+","+Ku(r[1])+","+Ku(r[2])+","+Ku(r[3])+","+Sg(r[4])+","+Sg(r[5])+")"}var UO={left:"start",right:"end",center:"middle",middle:"middle"};function YO(r,t,e){return e==="top"?r+=t/2:e==="bottom"&&(r-=t/2),r}function ZO(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function XO(r){var t=r.style,e=r.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),e[0],e[1]].join(",")}function SM(r){return r&&!!r.image}function qO(r){return r&&!!r.svgElement}function Cm(r){return SM(r)||qO(r)}function xM(r){return r.type==="linear"}function bM(r){return r.type==="radial"}function wM(r){return r&&(r.type==="linear"||r.type==="radial")}function $v(r){return"url(#"+r+")"}function TM(r){var t=r.getGlobalScale(),e=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(e)/Math.log(10)),1)}function CM(r){var t=r.x||0,e=r.y||0,a=(r.rotation||0)*sc,n=nt(r.scaleX,1),i=nt(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(t||e)&&l.push("translate("+t+"px,"+e+"px)"),a&&l.push("rotate("+a+")"),(n!==1||i!==1)&&l.push("scale("+n+","+i+")"),(o||s)&&l.push("skew("+Bc(o*sc)+"deg, "+Bc(s*sc)+"deg)"),l.join(" ")}var KO=function(){return Nt.hasGlobalWindow&&ot(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),xg=Array.prototype.slice;function Ha(r,t,e){return(t-r)*e+r}function Nh(r,t,e,a){for(var n=t.length,i=0;ia?t:r,i=Math.min(e,a),o=n[i-1]||{color:[0,0,0,0],offset:0},s=i;so;if(s)a.length=o;else for(var l=i;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,a){this._needsSort=!0;var n=this.keyframes,i=n.length,o=!1,s=h1,l=e;if(Ye(e)){var u=tN(e);s=u,(u===1&&!Pt(e[0])||u===2&&!Pt(e[0][0]))&&(o=!0)}else if(Pt(e)&&!Ue(e))s=Ju;else if(Q(e))if(!isNaN(+e))s=Ju;else{var f=lr(e);f&&(l=f,s=Ml)}else if(Vv(e)){var c=$({},l);c.colorStops=Y(e.colorStops,function(h){return{offset:h.offset,color:lr(h.color)}}),xM(e)?s=bg:bM(e)&&(s=wg),l=c}i===0?this.valType=s:(s!==this.valType||s===h1)&&(o=!0),this.discrete=this.discrete||o;var v={time:t,value:l,rawValue:e,percent:0};return a&&(v.easing=a,v.easingFunc=ot(a)?a:cM[a]||Tm(a)),n.push(v),v},r.prototype.prepare=function(t,e){var a=this.keyframes;this._needsSort&&a.sort(function(p,g){return p.time-g.time});for(var n=this.valType,i=a.length,o=a[i-1],s=this.discrete,l=Qu(n),u=d1(n),f=0;f=0&&!(o[f].percent<=e);f--);f=v(f,s-2)}else{for(f=c;fe);f++);f=v(f-1,s-2)}d=o[f+1],h=o[f]}if(h&&d){this._lastFr=f,this._lastFrP=e;var g=d.percent-h.percent,y=g===0?1:v((e-h.percent)/g,1);d.easingFunc&&(y=d.easingFunc(y));var m=a?this._additiveValue:u?qs:t[l];if((Qu(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)t[l]=y<1?h.rawValue:d.rawValue;else if(Qu(i))i===hc?Nh(m,h[n],d[n],y):jO(m,h[n],d[n],y);else if(d1(i)){var _=h[n],S=d[n],b=i===bg;t[l]={type:b?"linear":"radial",x:Ha(_.x,S.x,y),y:Ha(_.y,S.y,y),colorStops:Y(_.colorStops,function(w,T){var C=S.colorStops[T];return{offset:Ha(w.offset,C.offset,y),color:vc(Nh([],w.color,C.color,y))}}),global:S.global},b?(t[l].x2=Ha(_.x2,S.x2,y),t[l].y2=Ha(_.y2,S.y2,y)):t[l].r=Ha(_.r,S.r,y)}else if(u)Nh(m,h[n],d[n],y),a||(t[l]=vc(m));else{var x=Ha(h[n],d[n],y);a?this._additiveValue=x:t[l]=x}a&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,a=this.propName,n=this._additiveValue;e===Ju?t[a]=t[a]+n:e===Ml?(lr(t[a],qs),ju(qs,qs,n,1),t[a]=vc(qs)):e===hc?ju(t[a],t[a],n,1):e===AM&&v1(t[a],t[a],n,1)},r}(),Am=function(){function r(t,e,a,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n){ym("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=a}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,a){return this.whenWithKeys(t,e,It(e),a)},r.prototype.whenWithKeys=function(t,e,a,n){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,Fl(u),n),this._trackKeys.push(s)}l.addKeyframe(t,Fl(e[s]),n)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,a=0;a0)){this._started=1;for(var e=this,a=[],n=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,t[n]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r}();function ns(){return new Date().getTime()}var rN=function(r){z(t,r);function t(e){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,e=e||{},a.stage=e.stage||{},a}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 a=e.getClip();a&&this.addClip(a)},t.prototype.removeClip=function(e){if(e.animation){var a=e.prev,n=e.next;a?a.next=n:this._head=n,n?n.prev=a:this._tail=a,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var a=e.getClip();a&&this.removeClip(a),e.animation=null},t.prototype.update=function(e){for(var a=ns()-this._pausedTime,n=a-this._time,i=this._head;i;){var o=i.next,s=i.step(a,n);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=a,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function a(){e._running&&(dg(a),!e._paused&&e.update())}dg(a)},t.prototype.start=function(){this._running||(this._time=ns(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=ns(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=ns()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var a=e.next;e.prev=e.next=e.animation=null,e=a}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,a){a=a||{},this.start();var n=new Am(e,a.loop);return this.addAnimator(n),n},t}(Fr);const aN=rN;var nN=300,Bh=Nt.domSupported,zh=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=Y(r,function(n){var i=n.replace("mouse","pointer");return e.hasOwnProperty(i)?i:n});return{mouse:r,touch:t,pointer:a}}(),p1={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},g1=!1;function Tg(r){var t=r.pointerType;return t==="pen"||t==="touch"}function iN(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Vh(r){r&&(r.zrByTouch=!0)}function oN(r,t){return Dr(r.dom,new sN(r,t),!0)}function MM(r,t){for(var e=t,a=!1;e&&e.nodeType!==9&&!(a=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return a}var sN=function(){function r(t,e){this.stopPropagation=fe,this.stopImmediatePropagation=fe,this.preventDefault=fe,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r}(),Ur={mousedown:function(r){r=Dr(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Dr(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Dr(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Dr(this.dom,r);var t=r.toElement||r.relatedTarget;MM(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){g1=!0,r=Dr(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){g1||(r=Dr(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Dr(this.dom,r),Vh(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Ur.mousemove.call(this,r),Ur.mousedown.call(this,r)},touchmove:function(r){r=Dr(this.dom,r),Vh(r),this.handler.processGesture(r,"change"),Ur.mousemove.call(this,r)},touchend:function(r){r=Dr(this.dom,r),Vh(r),this.handler.processGesture(r,"end"),Ur.mouseup.call(this,r),+new Date-+this.__lastTouchMoment_1||r<-_1}var oi=[],Lo=[],Fh=Oe(),Hh=Math.abs,hN=function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return ii(this.rotation)||ii(this.x)||ii(this.y)||ii(this.scaleX-1)||ii(this.scaleY-1)||ii(this.skewX)||ii(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),a=this.transform;if(!(e||t)){a&&(m1(a),this.invTransform=null);return}a=a||Oe(),e?this.getLocalTransform(a):m1(a),t&&(e?Aa(a,t,a):Wv(a,t)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(oi);var a=oi[0]<0?-1:1,n=oi[1]<0?-1:1,i=((oi[0]-a)*e+a)/oi[0]||0,o=((oi[1]-n)*e+n)/oi[1]||0;t[0]*=i,t[1]*=i,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Oe(),Qr(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],a=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),i=Math.PI/2+n-Math.atan2(t[3],t[2]);a=Math.sqrt(a)*Math.cos(i),e=Math.sqrt(e),this.skewX=i,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=a,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||Oe(),Aa(Lo,t.invTransform,e),e=Lo);var a=this.originX,n=this.originY;(a||n)&&(Fh[4]=a,Fh[5]=n,Aa(Lo,e,Fh),Lo[4]-=a,Lo[5]-=n,e=Lo),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var a=[t,e],n=this.invTransform;return n&&ce(a,a,n),a},r.prototype.transformCoordToGlobal=function(t,e){var a=[t,e],n=this.transform;return n&&ce(a,a,n),a},r.prototype.getLineScale=function(){var t=this.transform;return t&&Hh(t[0]-1)>1e-10&&Hh(t[3]-1)>1e-10?Math.sqrt(Hh(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){Vc(this,t)},r.getLocalTransform=function(t,e){e=e||[];var a=t.originX||0,n=t.originY||0,i=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,f=t.x,c=t.y,v=t.skewX?Math.tan(t.skewX):0,h=t.skewY?Math.tan(-t.skewY):0;if(a||n||s||l){var d=a+s,p=n+l;e[4]=-d*i-v*p*o,e[5]=-p*o-h*d*i}else e[4]=e[5]=0;return e[0]=i,e[3]=o,e[1]=h*i,e[2]=v*o,u&&jn(e,e,u),e[4]+=a+f,e[5]+=n+c,e},r.initDefaultProps=function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),r}(),ka=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Vc(r,t){for(var e=0;e=S1)){r=r||Qa;for(var t=[],e=+new Date,a=0;a<=127;a++)t[a]=Jr.measureText(String.fromCharCode(a),r).width;var n=+new Date-e;return n>16?Wh=S1:n>2&&Wh++,t}}var Wh=0,S1=5;function LM(r,t){return r.asciiWidthMapTried||(r.asciiWidthMap=dN(r.font),r.asciiWidthMapTried=!0),0<=t&&t<=127?r.asciiWidthMap!=null?r.asciiWidthMap[t]:r.asciiCharWidth:r.stWideCharWidth}function La(r,t){var e=r.strWidthCache,a=e.get(t);return a==null&&(a=Jr.measureText(t,r.font).width,e.put(t,a)),a}function x1(r,t,e,a){var n=La(Da(t),r),i=Iu(t),o=ms(0,n,e),s=Zi(0,i,a),l=new dt(o,s,n,i);return l}function Uv(r,t,e,a){var n=((r||"")+"").split(` `),i=n.length;if(i===1)return x1(n[0],t,e,a);for(var o=new dt(0,0,0,0),s=0;s=0?parseFloat(r)/100*t:parseFloat(r):r}function Gc(r,t,e){var a=t.position||"inside",n=t.distance!=null?t.distance:5,i=e.height,o=e.width,s=i/2,l=e.x,u=e.y,f="left",c="top";if(a instanceof Array)l+=ta(a[0],e.width),u+=ta(a[1],e.height),f=null,c=null;else switch(a){case"left":l-=n,u+=s,f="right",c="middle";break;case"right":l+=n+o,u+=s,c="middle";break;case"top":l+=o/2,u-=n,f="center",c="bottom";break;case"bottom":l+=o/2,u+=i+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",c="middle";break;case"insideLeft":l+=n,u+=s,c="middle";break;case"insideRight":l+=o-n,u+=s,f="right",c="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=i-n,f="center",c="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=i-n,c="bottom";break;case"insideBottomRight":l+=o-n,u+=i-n,f="right",c="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=c,r}var $h="__zr_normal__",Uh=ka.concat(["ignore"]),pN=Ia(ka,function(r,t){return r[t]=!0,r},{ignore:!1}),Io={},gN=new dt(0,0,0,0),ef=[],Mm=function(){function r(t){this.id=tM(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,a){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var a=this.textConfig,n=a.local,i=e.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=n?this:null;var u=!1;i.copyTransform(e);var f=a.position!=null,c=a.autoOverflowArea,v=void 0;if((c||f)&&(v=gN,a.layoutRect?v.copy(a.layoutRect):v.copy(this.getBoundingRect()),n||v.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(Io,a,v):Gc(Io,a,v),i.x=Io.x,i.y=Io.y,o=Io.align,s=Io.verticalAlign;var h=a.origin;if(h&&a.rotation!=null){var d=void 0,p=void 0;h==="center"?(d=v.width*.5,p=v.height*.5):(d=ta(h[0],v.width),p=ta(h[1],v.height)),u=!0,i.originX=-i.x+d+(n?0:v.x),i.originY=-i.y+p+(n?0:v.y)}}a.rotation!=null&&(i.rotation=a.rotation);var g=a.offset;g&&(i.x+=g[0],i.y+=g[1],u||(i.originX=-g[0],i.originY=-g[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(c){var m=y.overflowRect=y.overflowRect||new dt(0,0,0,0);i.getLocalTransform(ef),Qr(ef,ef),dt.copy(m,v),m.applyTransform(ef)}else y.overflowRect=null;var _=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,S=void 0,b=void 0,x=void 0;_&&this.canBeInsideText()?(S=a.insideFill,b=a.insideStroke,(S==null||S==="auto")&&(S=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(S),x=!0)):(S=a.outsideFill,b=a.outsideStroke,(S==null||S==="auto")&&(S=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(S),x=!0)),S=S||"#000",(S!==y.fill||b!==y.stroke||x!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=S,y.stroke=b,y.autoStroke=x,y.align=o,y.verticalAlign=s,e.setDefaultTextStyle(y)),e.__dirty|=gr,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Dg:Mg},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),a=typeof e=="string"&&lr(e);a||(a=[255,255,255,1]);for(var n=a[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)a[o]=a[o]*n+(i?0:255)*(1-n);return a[3]=1,Ma(a,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},$(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(ht(t))for(var a=t,n=It(a),i=0;i0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState($h,!1,t)},r.prototype.useState=function(t,e,a,n){var i=t===$h,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(bt(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!i){ym("State "+t+" not exists.");return}i||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!a&&!this.__inHover&&l&&l.duration>0,l);var c=this._textContent,v=this._textGuide;return c&&c.useState(t,e,a,f),v&&v.useState(t,e,a,f),i?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~gr),u}}},r.prototype.useStates=function(t,e,a){if(!t.length)this.clearStates();else{var n=[],i=this.currentStates,o=t.length,s=o===i.length;if(s){for(var l=0;l0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(t,e,v),g&&g.useStates(t,e,v),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~gr)}},r.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var e=t.__hostTarget;t=e?t.ignoreHostSilent?null:e:t.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var a=this.currentStates.slice();a.splice(e,1),this.useStates(a)}},r.prototype.replaceState=function(t,e,a){var n=this.currentStates.slice(),i=bt(n,t),o=bt(n,e)>=0;i>=0?o?n.splice(i,1):n[i]=e:a&&!o&&n.push(e),this.useStates(n)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},a,n=0;n=0&&i.splice(o,1)}),this.animators.push(t),a&&a.animation.addAnimator(t),a&&a.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var a=this.animators,n=a.length,i=[],o=0;o0&&e.during&&i[0].during(function(d,p){e.during(p)});for(var v=0;v0||n.force&&!o.length){var T=void 0,C=void 0,M=void 0;if(s){C={},v&&(T={});for(var S=0;S<_;S++){var y=p[S];C[y]=e[y],v?T[y]=a[y]:e[y]=a[y]}}else if(v){M={};for(var S=0;S<_;S++){var y=p[S];M[y]=Fl(e[y]),mN(e,a,y)}}var b=new Am(e,!1,!1,c?Ft(d,function(I){return I.targetName===t}):null);b.targetName=t,n.scope&&(b.scope=n.scope),v&&T&&b.whenWithKeys(0,T,p),M&&b.whenWithKeys(0,M,p),b.whenWithKeys(u??500,s?C:a,p).delay(f||0),r.addAnimator(b,t),o.push(b)}}const PM=Mm;var kM=function(r){z(t,r);function t(e){var a=r.call(this)||this;return a.isGroup=!0,a._children=[],a.attr(e),a}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 a=this._children,n=0;n=0&&(n.splice(i,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,a){var n=bt(this._children,e);return n>=0&&this.replaceAt(a,n),this},t.prototype.replaceAt=function(e,a){var n=this._children,i=n[a];if(e&&e!==this&&e.parent!==this&&e!==i){n[a]=e,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var a=this.__zr;a&&a!==e.__zr&&e.addSelfToZr(a),a&&a.refresh()},t.prototype.remove=function(e){var a=this.__zr,n=this._children,i=bt(n,e);return i<0?this:(n.splice(i,1),e.parent=null,a&&e.removeSelfFromZr(a),a&&a.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,a=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,a){return this._disposed||this.handler.on(t,e,a),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(r<=n)return o;if(r>=i)return s}else{if(r>=n)return o;if(r<=i)return s}else{if(r===n)return o;if(r===i)return s}return(r-n)/l*u+o}var J=DN;function DN(r,t,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Fc(r,t,e)}function Fc(r,t,e){return Q(r)?MN(r).match(/%$/)?parseFloat(r)/100*t+(e||0):parseFloat(r):r==null?NaN:+r}function de(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),EM),r=(+r).toFixed(t),e?r:+r}function Br(r){return r.sort(function(t,e){return t-e}),r}function xa(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return LN(r)}function LN(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),a=e>0?+t.slice(e+1):0,n=e>0?e:t.length,i=t.indexOf("."),o=i<0?0:n-1-i;return Math.max(0,o-a)}function OM(r,t){var e=Math.log,a=Math.LN10,n=Math.floor(e(r[1]-r[0])/a),i=Math.round(e(Sa(t[1]-t[0]))/a),o=Math.min(Math.max(-n+i,0),20);return isFinite(o)?o:20}function IN(r,t){var e=Ia(r,function(h,d){return h+(isNaN(d)?0:d)},0);if(e===0)return[];for(var a=Math.pow(10,t),n=Y(r,function(h){return(isNaN(h)?0:h)/e*a*100}),i=a*100,o=Y(n,function(h){return Math.floor(h)}),s=Ia(o,function(h,d){return h+d},0),l=Y(n,function(h,d){return h-o[d]});su&&(u=l[c],f=c);++o[f],l[f]=0,++s}return Y(o,function(h){return h/a})}function PN(r,t){var e=Math.max(xa(r),xa(t)),a=r+t;return e>EM?a:de(a,e)}var T1=9007199254740991;function NM(r){var t=Math.PI*2;return(r%t+t)%t}function au(r){return r>-w1&&r=10&&t++,t}function BM(r,t){var e=Dm(r),a=Math.pow(10,e),n=r/a,i;return t?n<1.5?i=1:n<2.5?i=2:n<4?i=3:n<7?i=5:i=10:n<1?i=1:n<2?i=2:n<3?i=3:n<5?i=5:i=10,r=i*a,e>=-20?+r.toFixed(e<0?-e:0):r}function Xh(r,t){var e=(r.length-1)*t+1,a=Math.floor(e),n=+r[a-1],i=e-a;return i?n+i*(r[a]-n):n}function C1(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,a=0;a0?t.length:0),this.item=null,this.key=NaN,this},r.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},r}();function qh(r){r.option=r.parentModel=r.ecModel=null}var JN=".",si="___EC__COMPONENT__CONTAINER___",XM="___EC__EXTENDED_CLASS___";function ba(r){var t={main:"",sub:""};if(r){var e=r.split(JN);t.main=e[0]||"",t.sub=e[1]||""}return t}function QN(r){Ze(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function tB(r){return!!(r&&r[XM])}function Pm(r,t){r.$constructor=r,r.extend=function(e){var a=this,n;return eB(a)?n=function(i){z(o,i);function o(){return i.apply(this,arguments)||this}return o}(a):(n=function(){(e.$constructor||a).apply(this,arguments)},YE(n,this)),$(n.prototype,e),n[XM]=!0,n.extend=this.extend,n.superCall=nB,n.superApply=iB,n.superClass=a,n}}function eB(r){return ot(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function qM(r,t){r.extend=t.extend}var rB=Math.round(Math.random()*10);function aB(r){var t=["__\0is_clz",rB++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function nB(r,t){for(var e=[],a=2;a=0||i&&bt(i,l)<0)){var u=a.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var oB=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],sB=no(oB),lB=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return sB(this,t,e)},r}(),Pg=new ys(50);function uB(r){if(typeof r=="string"){var t=Pg.get(r);return t&&t.image}else return r}function km(r,t,e,a,n){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var i=Pg.get(r),o={hostEl:e,cb:a,cbPayload:n};return i?(t=i.image,!Zv(t)&&i.pending.push(o)):(t=Jr.loadImage(r,I1,I1),t.__zrImageSrc=r,Pg.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function I1(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;u++)l-=s;var f=La(o,e);return f>l&&(e="",f=0),l=r-f,n.ellipsis=e,n.ellipsisWidth=f,n.contentWidth=l,n.containerWidth=r,n}function jM(r,t,e){var a=e.containerWidth,n=e.contentWidth,i=e.fontMeasureInfo;if(!a){r.textLine="",r.isTruncated=!1;return}var o=La(i,t);if(o<=a){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=n||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?cB(t,n,i):o>0?Math.floor(t.length*n/o):0;t=t.substr(0,l),o=La(i,t)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function cB(r,t,e){for(var a=0,n=0,i=r.length;ng&&h){var _=Math.floor(g/v);d=d||y.length>_,y=y.slice(0,_),m=y.length*v}if(n&&f&&p!=null)for(var S=KM(p,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),b={},x=0;xd&&jh(i,o.substring(d,g),t,h),jh(i,p[2],t,h,p[1]),d=Kh.lastIndex}dc){var B=i.lines.length;I>0?(C.tokens=C.tokens.slice(0,I),w(C,D,M),i.lines=i.lines.slice(0,T+1)):i.lines=i.lines.slice(0,T),i.isTruncated=i.isTruncated||i.lines.length0&&d+a.accumWidth>a.width&&(f=t.split(` `),u=!0),a.accumWidth=d}else{var p=JM(t,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=p.accumWidth+h,c=p.linesWidths,f=p.lines}}f||(f=t.split(` `));for(var g=Da(l),y=0;y=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var yB=Ia(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function mB(r){return gB(r)?!!yB[r]:!0}function JM(r,t,e,a,n){for(var i=[],o=[],s="",l="",u=0,f=0,c=Da(t),v=0;ve:n+f+d>e){f?(s||l)&&(p?(s||(s=l,l="",u=0,f=u),i.push(s),o.push(f-u),l+=h,u+=d,s="",f=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(f),s=h,f=d)):p?(i.push(l),o.push(u),l=h,u=d):(i.push(h),o.push(d));continue}f+=d,p?(l+=h,u+=d):(l&&(s+=l,l="",u=0),s+=h)}return l&&(s+=l),s&&(i.push(s),o.push(f)),i.length===1&&(f+=n),{accumWidth:f,lines:i,linesWidths:o}}function k1(r,t,e,a,n,i){if(r.baseX=e,r.baseY=a,r.outerWidth=r.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;dt.set(R1,ms(e,o,n),Zi(a,s,i),o,s),dt.intersect(t,R1,null,E1);var l=E1.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=ms(l.x,l.width,n,!0),r.baseY=Zi(l.y,l.height,i,!0)}}var R1=new dt(0,0,0,0),E1={outIntersectRect:{},clamp:!0};function Rm(r){return r!=null?r+="":r=""}function _B(r){var t=Rm(r.text),e=r.font,a=La(Da(e),t),n=Iu(e);return kg(r,a,n,null)}function kg(r,t,e,a){var n=new dt(ms(r.x||0,t,r.textAlign),Zi(r.y||0,e,r.textBaseline),t,e),i=a??(QM(r)?r.lineWidth:0);return i>0&&(n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i),n}function QM(r){var t=r.stroke;return t!=null&&t!=="none"&&r.lineWidth>0}var Rg="__zr_style_"+Math.round(Math.random()*10),Xi={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Xv={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Xi[Rg]=!0;var O1=["z","z2","invisible"],SB=["invisible"],xB=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var a=It(e),n=0;n1e-4){s[0]=r-e,s[1]=t-a,l[0]=r+e,l[1]=t+a;return}if(rf[0]=ed(n)*e+r,rf[1]=td(n)*a+t,af[0]=ed(i)*e+r,af[1]=td(i)*a+t,u(s,rf,af),f(l,rf,af),n=n%li,n<0&&(n=n+li),i=i%li,i<0&&(i=i+li),n>i&&!o?i+=li:nn&&(nf[0]=ed(h)*e+r,nf[1]=td(h)*a+t,u(s,nf,s),f(l,nf,l))}var Yt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ui=[],fi=[],oa=[],vn=[],sa=[],la=[],rd=Math.min,ad=Math.max,ci=Math.cos,vi=Math.sin,Ba=Math.abs,Eg=Math.PI,bn=Eg*2,nd=typeof Float32Array<"u",Ks=[];function id(r){var t=Math.round(r/Eg*1e8)/1e8;return t%2*Eg}function Kv(r,t){var e=id(r[0]);e<0&&(e+=bn);var a=e-r[0],n=r[1];n+=a,!t&&n-e>=bn?n=e+bn:t&&e-n>=bn?n=e-bn:!t&&e>n?n=e+(bn-id(e-n)):t&&e0&&(this._ux=Ba(a/zc/t)||0,this._uy=Ba(a/zc/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Yt.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var a=Ba(t-this._xi),n=Ba(e-this._yi),i=a>this._ux||n>this._uy;if(this.addData(Yt.L,t,e),this._ctx&&i&&this._ctx.lineTo(t,e),i)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=a*a+n*n;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,a,n,i,o){return this._drawPendingPt(),this.addData(Yt.C,t,e,a,n,i,o),this._ctx&&this._ctx.bezierCurveTo(t,e,a,n,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,a,n){return this._drawPendingPt(),this.addData(Yt.Q,t,e,a,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,a,n),this._xi=a,this._yi=n,this},r.prototype.arc=function(t,e,a,n,i,o){this._drawPendingPt(),Ks[0]=n,Ks[1]=i,Kv(Ks,o),n=Ks[0],i=Ks[1];var s=i-n;return this.addData(Yt.A,t,e,a,a,n,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,a,n,i,o),this._xi=ci(i)*a+t,this._yi=vi(i)*a+e,this},r.prototype.arcTo=function(t,e,a,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,a,n,i),this},r.prototype.rect=function(t,e,a,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,a,n),this.addData(Yt.R,t,e,a,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Yt.Z);var t=this._ctx,e=this._x0,a=this._y0;return t&&t.closePath(),this._xi=e,this._yi=a,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){if(this._saveData){var e=t.length;!(this.data&&this.data.length===e)&&nd&&(this.data=new Float32Array(e));for(var a=0;a0&&o))for(var s=0;sf.length&&(this._expandData(),f=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){oa[0]=oa[1]=sa[0]=sa[1]=Number.MAX_VALUE,vn[0]=vn[1]=la[0]=la[1]=-Number.MAX_VALUE;var t=this.data,e=0,a=0,n=0,i=0,o;for(o=0;oa||Ba(_)>n||v===e-1)&&(p=Math.sqrt(m*m+_*_),i=g,o=y);break}case Yt.C:{var S=t[v++],b=t[v++],g=t[v++],y=t[v++],x=t[v++],w=t[v++];p=RO(i,o,S,b,g,y,x,w,10),i=x,o=w;break}case Yt.Q:{var S=t[v++],b=t[v++],g=t[v++],y=t[v++];p=OO(i,o,S,b,g,y,10),i=g,o=y;break}case Yt.A:var T=t[v++],C=t[v++],M=t[v++],D=t[v++],I=t[v++],L=t[v++],k=L+I;v+=1,d&&(s=ci(I)*M+T,l=vi(I)*D+C),p=ad(M,D)*rd(bn,Math.abs(L)),i=ci(k)*M+T,o=vi(k)*D+C;break;case Yt.R:{s=i=t[v++],l=o=t[v++];var R=t[v++],P=t[v++];p=R*2+P*2;break}case Yt.Z:{var m=s-i,_=l-o;p=Math.sqrt(m*m+_*_),i=s,o=l;break}}p>=0&&(u[c++]=p,f+=p)}return this._pathLen=f,f},r.prototype.rebuildPath=function(t,e){var a=this.data,n=this._ux,i=this._uy,o=this._len,s,l,u,f,c,v,h=e<1,d,p,g=0,y=0,m,_=0,S,b;if(!(h&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,m=e*p,!m)))t:for(var x=0;x0&&(t.lineTo(S,b),_=0),w){case Yt.M:s=u=a[x++],l=f=a[x++],t.moveTo(u,f);break;case Yt.L:{c=a[x++],v=a[x++];var C=Ba(c-u),M=Ba(v-f);if(C>n||M>i){if(h){var D=d[y++];if(g+D>m){var I=(m-g)/D;t.lineTo(u*(1-I)+c*I,f*(1-I)+v*I);break t}g+=D}t.lineTo(c,v),u=c,f=v,_=0}else{var L=C*C+M*M;L>_&&(S=c,b=v,_=L)}break}case Yt.C:{var k=a[x++],R=a[x++],P=a[x++],O=a[x++],E=a[x++],B=a[x++];if(h){var D=d[y++];if(g+D>m){var I=(m-g)/D;Hn(u,k,P,E,I,ui),Hn(f,R,O,B,I,fi),t.bezierCurveTo(ui[1],fi[1],ui[2],fi[2],ui[3],fi[3]);break t}g+=D}t.bezierCurveTo(k,R,P,O,E,B),u=E,f=B;break}case Yt.Q:{var k=a[x++],R=a[x++],P=a[x++],O=a[x++];if(h){var D=d[y++];if(g+D>m){var I=(m-g)/D;tu(u,k,P,I,ui),tu(f,R,O,I,fi),t.quadraticCurveTo(ui[1],fi[1],ui[2],fi[2]);break t}g+=D}t.quadraticCurveTo(k,R,P,O),u=P,f=O;break}case Yt.A:var V=a[x++],H=a[x++],W=a[x++],X=a[x++],j=a[x++],q=a[x++],it=a[x++],St=!a[x++],at=W>X?W:X,N=Ba(W-X)>.001,F=j+q,Z=!1;if(h){var D=d[y++];g+D>m&&(F=j+q*(m-g)/D,Z=!0),g+=D}if(N&&t.ellipse?t.ellipse(V,H,W,X,it,j,F,St):t.arc(V,H,at,j,F,St),Z)break t;T&&(s=ci(j)*W+V,l=vi(j)*X+H),u=ci(F)*W+V,f=vi(F)*X+H;break;case Yt.R:s=u=a[x],l=f=a[x+1],c=a[x++],v=a[x++];var K=a[x++],mt=a[x++];if(h){var D=d[y++];if(g+D>m){var gt=m-g;t.moveTo(c,v),t.lineTo(c+rd(gt,K),v),gt-=K,gt>0&&t.lineTo(c+K,v+rd(gt,mt)),gt-=mt,gt>0&&t.lineTo(c+ad(K-gt,0),v+mt),gt-=K,gt>0&&t.lineTo(c,v+ad(mt-gt,0));break t}g+=D}t.rect(c,v,K,mt);break;case Yt.Z:if(h){var D=d[y++];if(g+D>m){var I=(m-g)/D;t.lineTo(u*(1-I)+s*I,f*(1-I)+l*I);break t}g+=D}t.closePath(),u=s,f=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.prototype.canSave=function(){return!!this._saveData},r.CMD=Yt,r.initDefaultProps=function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),r}();const Ra=AB;function Tn(r,t,e,a,n,i,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>t+s&&o>a+s||or+s&&i>e+s||it+c&&f>a+c&&f>i+c&&f>s+c||fr+c&&u>e+c&&u>n+c&&u>o+c||ut+u&&l>a+u&&l>i+u||lr+u&&s>e+u&&s>n+u||se||f+un&&(n+=js);var v=Math.atan2(l,s);return v<0&&(v+=js),v>=a&&v<=n||v+js>=a&&v+js<=n}function Wa(r,t,e,a,n,i){if(i>t&&i>a||in?s:0}var hn=Ra.CMD,hi=Math.PI*2,LB=1e-4;function IB(r,t){return Math.abs(r-t)t&&u>a&&u>i&&u>s||u1&&PB(),h=De(t,a,i,s,Ir[0]),v>1&&(d=De(t,a,i,s,Ir[1]))),v===2?gt&&s>a&&s>i||s=0&&u<=1){for(var f=0,c=Ee(t,a,i,u),v=0;ve||s<-e)return 0;var l=Math.sqrt(e*e-s*s);Je[0]=-l,Je[1]=l;var u=Math.abs(a-n);if(u<1e-4)return 0;if(u>=hi-1e-4){a=0,n=hi;var f=i?1:-1;return o>=Je[0]+r&&o<=Je[1]+r?f:0}if(a>n){var c=a;a=n,n=c}a<0&&(a+=hi,n+=hi);for(var v=0,h=0;h<2;h++){var d=Je[h];if(d+r>o){var p=Math.atan2(s,d),f=i?1:-1;p<0&&(p=hi+p),(p>=a&&p<=n||p+hi>=a&&p+hi<=n)&&(p>Math.PI/2&&p1&&(e||(s+=Wa(l,u,f,c,a,n))),g&&(l=i[d],u=i[d+1],f=l,c=u),p){case hn.M:f=i[d++],c=i[d++],l=f,u=c;break;case hn.L:if(e){if(Tn(l,u,i[d],i[d+1],t,a,n))return!0}else s+=Wa(l,u,i[d],i[d+1],a,n)||0;l=i[d++],u=i[d++];break;case hn.C:if(e){if(MB(l,u,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],t,a,n))return!0}else s+=kB(l,u,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],a,n)||0;l=i[d++],u=i[d++];break;case hn.Q:if(e){if(tD(l,u,i[d++],i[d++],i[d],i[d+1],t,a,n))return!0}else s+=RB(l,u,i[d++],i[d++],i[d],i[d+1],a,n)||0;l=i[d++],u=i[d++];break;case hn.A:var y=i[d++],m=i[d++],_=i[d++],S=i[d++],b=i[d++],x=i[d++];d+=1;var w=!!(1-i[d++]);v=Math.cos(b)*_+y,h=Math.sin(b)*S+m,g?(f=v,c=h):s+=Wa(l,u,v,h,a,n);var T=(a-y)*S/_+y;if(e){if(DB(y,m,S,b,b+x,w,t,T,n))return!0}else s+=EB(y,m,S,b,b+x,w,T,n);l=Math.cos(b+x)*_+y,u=Math.sin(b+x)*S+m;break;case hn.R:f=l=i[d++],c=u=i[d++];var C=i[d++],M=i[d++];if(v=f+C,h=c+M,e){if(Tn(f,c,v,c,t,a,n)||Tn(v,c,v,h,t,a,n)||Tn(v,h,f,h,t,a,n)||Tn(f,h,f,c,t,a,n))return!0}else s+=Wa(v,c,v,h,a,n),s+=Wa(f,h,f,c,a,n);break;case hn.Z:if(e){if(Tn(l,u,f,c,t,a,n))return!0}else s+=Wa(l,u,f,c,a,n);l=f,u=c;break}}return!e&&!IB(u,c)&&(s+=Wa(l,u,f,c,a,n)||0),s!==0}function OB(r,t,e){return eD(r,0,!1,t,e)}function NB(r,t,e,a){return eD(r,t,!0,e,a)}var Hc=vt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Xi),BB={style:vt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Xv.style)},od=ka.concat(["invisible","culling","z","z2","zlevel","parent"]),zB=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var a=this.style;if(a.decal){var n=this._decalEl=this._decalEl||new t;n.buildPath===t.prototype.buildPath&&(n.buildPath=function(l){e.buildPath(l,e.shape)}),n.silent=!0;var i=n.style;for(var o in a)i[o]!==a[o]&&(i[o]=a[o]);i.fill=a.fill?a.decal:null,i.decal=null,i.shadowColor=null,a.strokeFirst&&(i.stroke=null);for(var s=0;s.5?Mg:a>.2?vN:Dg}else if(e)return Dg}return Mg},t.prototype.getInsideTextStroke=function(e){var a=this.style.fill;if(Q(a)){var n=this.__zr,i=!!(n&&n.isDarkMode()),o=Nc(e,0)0))},t.prototype.hasFill=function(){var e=this.style,a=e.fill;return a!=null&&a!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,a=this.style,n=!e;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Qo)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){s.copy(e);var l=a.strokeNoScale?this.getLineScale():1,u=a.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect(),o=this.style;if(e=n[0],a=n[1],i.contain(e,a)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),NB(s,l/u,e,a)))return!0}if(this.hasFill())return OB(s,e,a)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Qo,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,a){e==="shape"?this.setShape(a):r.prototype.attrKV.call(this,e,a)},t.prototype.setShape=function(e,a){var n=this.shape;return n||(n=this.shape={}),typeof e=="string"?n[e]=a:$(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Qo)},t.prototype.createStyle=function(e){return Fv(Hc,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var a=this._normalState;e.shape&&!a.shape&&(a.shape=$({},this.shape))},t.prototype._applyStateObj=function(e,a,n,i,o,s){r.prototype._applyStateObj.call(this,e,a,n,i,o,s);var l=!(a&&i),u;if(a&&a.shape?o?i?u=a.shape:(u=$({},n.shape),$(u,a.shape)):(u=$({},i?this.shape:n.shape),$(u,a.shape)):l&&(u=n.shape),u)if(o){this.shape=$({},this.shape);for(var f={},c=It(u),v=0;vn&&(c=s+l,s*=n/c,l*=n/c),u+f>n&&(c=u+f,u*=n/c,f*=n/c),l+u>i&&(c=l+u,l*=i/c,u*=i/c),s+f>i&&(c=s+f,s*=i/c,f*=i/c),r.moveTo(e+s,a),r.lineTo(e+n-l,a),l!==0&&r.arc(e+n-l,a+l,l,-Math.PI/2,0),r.lineTo(e+n,a+i-u),u!==0&&r.arc(e+n-u,a+i-u,u,0,Math.PI/2),r.lineTo(e+f,a+i),f!==0&&r.arc(e+f,a+i-f,f,Math.PI/2,Math.PI),r.lineTo(e,a+s),s!==0&&r.arc(e+s,a+s,s,Math.PI,Math.PI*1.5)}var is=Math.round;function jv(r,t,e){if(t){var a=t.x1,n=t.x2,i=t.y1,o=t.y2;r.x1=a,r.x2=n,r.y1=i,r.y2=o;var s=e&&e.lineWidth;return s&&(is(a*2)===is(n*2)&&(r.x1=r.x2=mr(a,s,!0)),is(i*2)===is(o*2)&&(r.y1=r.y2=mr(i,s,!0))),r}}function nD(r,t,e){if(t){var a=t.x,n=t.y,i=t.width,o=t.height;r.x=a,r.y=n,r.width=i,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=mr(a,s,!0),r.y=mr(n,s,!0),r.width=Math.max(mr(a+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(mr(n+o,s,!1)-r.y,o===0?0:1)),r}}function mr(r,t,e){if(!t)return r;var a=is(r*2);return(a+is(t))%2===0?a/2:(a+(e?1:-1))/2}var $B=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),UB={},iD=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new $B},t.prototype.buildPath=function(e,a){var n,i,o,s;if(this.subPixelOptimize){var l=nD(UB,a,this.style);n=l.x,i=l.y,o=l.width,s=l.height,l.r=a.r,a=l}else n=a.x,i=a.y,o=a.width,s=a.height;a.r?WB(e,a):e.rect(n,i,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Lt);iD.prototype.type="rect";const Mt=iD;var G1={fill:"#000"},F1=2,ua={},YB={style:vt({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},Xv.style)},oD=function(r){z(t,r);function t(e){var a=r.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=G1,a.attr(e),a}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,I=0;I=0&&(k=x[L],k.align==="right");)this._placeToken(k,e,T,y,I,"right",_),C-=k.width,I-=k.width,L--;for(D+=(f-(D-g)-(m-I)-C)/2;M<=L;)k=x[M],this._placeToken(k,e,T,y,D+k.width/2,"center",_),D+=k.width,M++;y+=T}},t.prototype._placeToken=function(e,a,n,i,o,s,l){var u=a.rich[e.styleName]||{};u.text=e.text;var f=e.verticalAlign,c=i+n/2;f==="top"?c=i+e.height/2:f==="bottom"&&(c=i+n-e.height/2);var v=!e.isLineHolder&&sd(u);v&&this._renderBackground(u,a,s==="right"?o-e.width:s==="center"?o-e.width/2:o,c-e.height/2,e.width,e.height);var h=!!u.backgroundColor,d=e.textPadding;d&&(o=Z1(o,s,d),c-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(iu),g=p.createStyle();p.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=!1,b=Y1("fill"in u?u.fill:"fill"in a?a.fill:(m=!0,y.fill)),x=U1("stroke"in u?u.stroke:"stroke"in a?a.stroke:!h&&!l&&(!y.autoStroke||m)?(_=F1,S=!0,y.stroke):null),w=u.textShadowBlur>0||a.textShadowBlur>0;g.text=e.text,g.x=o,g.y=c,w&&(g.shadowBlur=u.textShadowBlur||a.textShadowBlur||0,g.shadowColor=u.textShadowColor||a.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||a.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||a.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||Qa,g.opacity=_r(u.opacity,a.opacity,1),W1(g,u),x&&(g.lineWidth=_r(u.lineWidth,a.lineWidth,_),g.lineDash=nt(u.lineDash,a.lineDash),g.lineDashOffset=a.lineDashOffset||0,g.stroke=x),b&&(g.fill=b),p.setBoundingRect(kg(g,e.contentWidth,e.contentHeight,S?0:null))},t.prototype._renderBackground=function(e,a,n,i,o,s){var l=e.backgroundColor,u=e.borderWidth,f=e.borderColor,c=l&&l.image,v=l&&!c,h=e.borderRadius,d=this,p,g;if(v||e.lineHeight||u&&f){p=this._getOrCreateChild(Mt),p.useStyle(p.createStyle()),p.style.fill=null;var y=p.shape;y.x=n,y.y=i,y.width=o,y.height=s,y.r=h,p.dirtyShape()}if(v){var m=p.style;m.fill=l||null,m.fillOpacity=nt(e.fillOpacity,1)}else if(c){g=this._getOrCreateChild(Fe),g.onload=function(){d.dirtyStyle()};var _=g.style;_.image=l.image,_.x=n,_.y=i,_.width=o,_.height=s}if(u&&f){var m=p.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=nt(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(p||g).style;S.shadowBlur=e.shadowBlur||0,S.shadowColor=e.shadowColor||"transparent",S.shadowOffsetX=e.shadowOffsetX||0,S.shadowOffsetY=e.shadowOffsetY||0,S.opacity=_r(e.opacity,a.opacity,1)},t.makeFont=function(e){var a="";return lD(e)&&(a=[e.fontStyle,e.fontWeight,sD(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),a&&Nr(a)||e.textFont||e.font},t}(Vr),ZB={left:!0,right:1,center:1},XB={top:1,bottom:1,middle:1},H1=["fontStyle","fontWeight","fontSize","fontFamily"];function sD(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?dm+"px":r+"px"}function W1(r,t){for(var e=0;e=0,i=!1;if(r instanceof Lt){var o=uD(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(Po(s)||Po(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(i=!0,a=$({},a),u=$({},u),u.fill=s):!Po(u.fill)&&Po(s)?(i=!0,a=$({},a),u=$({},u),u.fill=_g(s)):!Po(u.stroke)&&Po(l)&&(i||(a=$({},a),u=$({},u)),u.stroke=_g(l)),a.style=u}}if(a&&a.z2==null){i||(a=$({},a));var f=r.z2EmphasisLift;a.z2=r.z2+(f??Es)}return a}function ez(r,t,e){if(e&&e.z2==null){e=$({},e);var a=r.z2SelectLift;e.z2=r.z2+(a??KB)}return e}function rz(r,t,e){var a=bt(r.currentStates,t)>=0,n=r.style.opacity,i=a?null:QB(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=$({},e),o=$({opacity:a?n:i.opacity*.1},o),e.style=o),e}function ld(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return tz(this,r,t,e);if(r==="blur")return rz(this,r,e);if(r==="select")return ez(this,r,e)}return e}function io(r){r.stateProxy=ld;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=ld),e&&(e.stateProxy=ld)}function J1(r,t){!gD(r,t)&&!r.__highByOuter&&un(r,fD)}function Q1(r,t){!gD(r,t)&&!r.__highByOuter&&un(r,cD)}function rn(r,t){r.__highByOuter|=1<<(t||0),un(r,fD)}function an(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&un(r,cD)}function hD(r){un(r,Bm)}function zm(r){un(r,vD)}function dD(r){un(r,jB)}function pD(r){un(r,JB)}function gD(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function yD(r){var t=r.getModel(),e=[],a=[];t.eachComponent(function(n,i){var o=Em(i),s=n==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){vD(u)}),s&&e.push(i)),o.isBlured=!1}),A(a,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(e,!1,t)})}function Bg(r,t,e,a){var n=a.getModel();e=e||"coordinateSystem";function i(u,f){for(var c=0;c0){var s={dataIndex:o,seriesIndex:e.seriesIndex};i!=null&&(s.dataType=i),t.push(s)}})}),t}function Ki(r,t,e){Vi(r,!0),un(r,io),Vg(r,t,e)}function lz(r){Vi(r,!1)}function Jt(r,t,e,a){a?lz(r):Ki(r,t,e)}function Vg(r,t,e){var a=pt(r);t!=null?(a.focus=t,a.blurScope=e):a.focus&&(a.focus=null)}var eS=["emphasis","blur","select"],uz={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function we(r,t,e,a){e=e||"itemStyle";for(var n=0;n1&&(o*=ud(d),s*=ud(d));var p=(n===i?-1:1)*ud((o*o*(s*s)-o*o*(h*h)-s*s*(v*v))/(o*o*(h*h)+s*s*(v*v)))||0,g=p*o*h/s,y=p*-s*v/o,m=(r+e)/2+sf(c)*g-of(c)*y,_=(t+a)/2+of(c)*g+sf(c)*y,S=iS([1,0],[(v-g)/o,(h-y)/s]),b=[(v-g)/o,(h-y)/s],x=[(-1*v-g)/o,(-1*h-y)/s],w=iS(b,x);if(Fg(b,x)<=-1&&(w=Js),Fg(b,x)>=1&&(w=0),w<0){var T=Math.round(w/Js*1e6)/1e6;w=Js*2+T%2*Js}f.addData(u,m,_,o,s,S,w,c,i)}var pz=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,gz=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function yz(r){var t=new Ra;if(!r)return t;var e=0,a=0,n=e,i=a,o,s=Ra.CMD,l=r.match(pz);if(!l)return t;for(var u=0;uk*k+R*R&&(T=M,C=D),{cx:T,cy:C,x0:-f,y0:-c,x1:T*(n/b-1),y1:C*(n/b-1)}}function Tz(r){var t;if(U(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function Cz(r,t){var e,a=Dl(t.r,0),n=Dl(t.r0||0,0),i=a>0,o=n>0;if(!(!i&&!o)){if(i||(a=n,n=0),n>a){var s=a;a=n,n=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,c=t.cy,v=!!t.clockwise,h=sS(u-l),d=h>fd&&h%fd;if(d>$r&&(h=d),!(a>$r))r.moveTo(f,c);else if(h>fd-$r)r.moveTo(f+a*Ro(l),c+a*di(l)),r.arc(f,c,a,l,u,!v),n>$r&&(r.moveTo(f+n*Ro(u),c+n*di(u)),r.arc(f,c,n,u,l,v));else{var p=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0,w=void 0,T=void 0,C=void 0,M=void 0,D=void 0,I=void 0,L=void 0,k=void 0,R=a*Ro(l),P=a*di(l),O=n*Ro(u),E=n*di(u),B=h>$r;if(B){var V=t.cornerRadius;V&&(e=Tz(V),p=e[0],g=e[1],y=e[2],m=e[3]);var H=sS(a-n)/2;if(_=fa(H,y),S=fa(H,m),b=fa(H,p),x=fa(H,g),C=w=Dl(_,S),M=T=Dl(b,x),(w>$r||T>$r)&&(D=a*Ro(u),I=a*di(u),L=n*Ro(l),k=n*di(l),h$r){var N=fa(y,C),F=fa(m,C),Z=lf(L,k,R,P,a,N,v),K=lf(D,I,O,E,a,F,v);r.moveTo(f+Z.cx+Z.x0,c+Z.cy+Z.y0),C0&&r.arc(f+Z.cx,c+Z.cy,N,He(Z.y0,Z.x0),He(Z.y1,Z.x1),!v),r.arc(f,c,a,He(Z.cy+Z.y1,Z.cx+Z.x1),He(K.cy+K.y1,K.cx+K.x1),!v),F>0&&r.arc(f+K.cx,c+K.cy,F,He(K.y1,K.x1),He(K.y0,K.x0),!v))}else r.moveTo(f+R,c+P),r.arc(f,c,a,l,u,!v);if(!(n>$r)||!B)r.lineTo(f+O,c+E);else if(M>$r){var N=fa(p,M),F=fa(g,M),Z=lf(O,E,D,I,n,-F,v),K=lf(R,P,L,k,n,-N,v);r.lineTo(f+Z.cx+Z.x0,c+Z.cy+Z.y0),M0&&r.arc(f+Z.cx,c+Z.cy,F,He(Z.y0,Z.x0),He(Z.y1,Z.x1),!v),r.arc(f,c,n,He(Z.cy+Z.y1,Z.cx+Z.x1),He(K.cy+K.y1,K.cx+K.x1),v),N>0&&r.arc(f+K.cx,c+K.cy,N,He(K.y1,K.x1),He(K.y0,K.x0),!v))}else r.lineTo(f+O,c+E),r.arc(f,c,n,u,l,v)}r.closePath()}}}var Az=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r}(),AD=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new Az},t.prototype.buildPath=function(e,a){Cz(e,a)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Lt);AD.prototype.type="sector";const rr=AD;var Mz=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),MD=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new Mz},t.prototype.buildPath=function(e,a){var n=a.cx,i=a.cy,o=Math.PI*2;e.moveTo(n+a.r,i),e.arc(n,i,a.r,0,o,!1),e.moveTo(n+a.r0,i),e.arc(n,i,a.r0,0,o,!0)},t}(Lt);MD.prototype.type="ring";const th=MD;function Dz(r,t,e,a){var n=[],i=[],o=[],s=[],l,u,f,c;if(a){f=[1/0,1/0],c=[-1/0,-1/0];for(var v=0,h=r.length;v=2){if(a){var i=Dz(n,a,e,t.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(e?o:o-1);s++){var l=i[s*2],u=i[s*2+1],f=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;sgi[1]){if(i=!1,ke.negativeSize||a)return i;var l=uf(gi[0]-pi[1]),u=uf(pi[0]-gi[1]);cd(l,u)>cf.len()&&(l=u||!ke.bidirectional)&&(ct.scale(ff,s,-u*n),ke.useDir&&ke.calcDirMTV()))}}return i},r.prototype._getProjMinMaxOnAxis=function(t,e,a){for(var n=this._axes[t],i=this._origin,o=e[0].dot(n)+i[t],s=o,l=o,u=1;u0){var c=f.duration,v=f.delay,h=f.easing,d={duration:c,delay:v||0,easing:h,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),i&&i()}function Et(r,t,e,a,n,i){Wm("update",r,t,e,a,n,i)}function jt(r,t,e,a,n,i){Wm("enter",r,t,e,a,n,i)}function hs(r){if(!r.__zr)return!0;for(var t=0;tSa(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function fS(r){return!r.isGroup}function qz(r){return r.shape!=null}function ku(r,t,e){if(!r||!t)return;function a(o){var s={};return o.traverse(function(l){fS(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return qz(o)&&(s.shape=st(o.shape)),s}var i=a(r);t.traverse(function(o){if(fS(o)&&o.anid){var s=i[o.anid];if(s){var l=n(o);o.attr(n(s)),Et(o,l,e,pt(o).dataIndex)}}})}function FD(r,t){return Y(r,function(e){var a=e[0];a=ue(a,t.x),a=Sr(a,t.x+t.width);var n=e[1];return n=ue(n,t.y),n=Sr(n,t.y+t.height),[a,n]})}function Kz(r,t){var e=ue(r.x,t.x),a=Sr(r.x+r.width,t.x+t.width),n=ue(r.y,t.y),i=Sr(r.y+r.height,t.y+t.height);if(a>=e&&i>=n)return{x:e,y:n,width:a-e,height:i-n}}function Ru(r,t,e){var a=$({rectHover:!0},t),n=a.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),vt(n,e),new Fe(a)):lu(r.replace("path://",""),a,e,"center")}function Ll(r,t,e,a,n){for(var i=0,o=n[n.length-1];i1)return!1;var g=vd(h,d,f,c)/v;return!(g<0||g>1)}function vd(r,t,e,a){return r*a-e*t}function jz(r){return r<=1e-6&&r>=-1e-6}function oo(r,t,e,a,n){return t==null||(Pt(t)?ee[0]=ee[1]=ee[2]=ee[3]=t:(ee[0]=t[0],ee[1]=t[1],ee[2]=t[2],ee[3]=t[3]),a&&(ee[0]=ue(0,ee[0]),ee[1]=ue(0,ee[1]),ee[2]=ue(0,ee[2]),ee[3]=ue(0,ee[3])),e&&(ee[0]=-ee[0],ee[1]=-ee[1],ee[2]=-ee[2],ee[3]=-ee[3]),cS(r,ee,"x","width",3,1,n&&n[0]||0),cS(r,ee,"y","height",0,2,n&&n[1]||0)),r}var ee=[0,0,0,0];function cS(r,t,e,a,n,i,o){var s=t[i]+t[n],l=r[a];r[a]+=s,o=ue(0,Sr(o,l)),r[a]=0?-t[n]:t[i]>=0?l+t[i]:Sa(s)>1e-8?(l-o)*t[n]/s:0):r[e]-=t[n]}function fn(r){var t=r.itemTooltipOption,e=r.componentModel,a=r.itemName,n=Q(t)?{formatter:t}:t,i=e.mainType,o=e.componentIndex,s={componentType:i,name:a,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&A(It(l),function(f){et(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=pt(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:a,option:vt({content:a,encodeHTMLContent:!0,formatterParams:s},n)}}function Wg(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function Qn(r,t){if(r)if(U(r))for(var e=0;et&&(t=o),ot&&(e=t=0),{min:e,max:t}}function nh(r,t,e){$D(r,t,e,-1/0)}function $D(r,t,e,a){if(r.ignoreModelZ)return a;var n=r.getTextContent(),i=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l=0&&s.push(l)}),s}}function ti(r,t){return wt(wt({},r,!0),t,!0)}const fV={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:". "}}}},cV={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Xc="ZH",Zm="EN",ds=Zm,mc={},Xm={},KD=Nt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||ds).toUpperCase();return r.indexOf(Xc)>-1?Xc:ds}():ds;function jD(r,t){r=r.toUpperCase(),Xm[r]=new Ot(t),mc[r]=t}function vV(r){if(Q(r)){var t=mc[r.toUpperCase()]||{};return r===Xc||r===Zm?st(t):wt(st(t),st(mc[ds]),!1)}else return wt(st(r),st(mc[ds]),!1)}function Ug(r){return Xm[r]}function hV(){return Xm[ds]}jD(Zm,fV);jD(Xc,cV);var Yg=null;function dV(r){Yg||(Yg=r)}function pe(){return Yg}var qm=1e3,Km=qm*60,$l=Km*60,Or=$l*24,gS=Or*365,pV={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})/},_c={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},gV="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",hf="{yyyy}-{MM}-{dd}",yS={year:"{yyyy}",month:"{yyyy}-{MM}",day:hf,hour:hf+" "+_c.hour,minute:hf+" "+_c.minute,second:hf+" "+_c.second,millisecond:gV},hr=["year","month","day","hour","minute","second","millisecond"],yV=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function mV(r){return!Q(r)&&!ot(r)?_V(r):r}function _V(r){r=r||{};var t={},e=!0;return A(hr,function(a){e&&(e=r[a]==null)}),A(hr,function(a,n){var i=r[a];t[a]={};for(var o=null,s=n;s>=0;s--){var l=hr[s],u=ht(i)&&!U(i)?i[l]:i,f=void 0;U(u)?(f=u.slice(),o=f[0]||""):Q(u)?(o=u,f=[o]):(o==null?o=_c[a]:pV[l].test(o)||(o=t[l][l][0]+" "+o),f=[o],e&&(f[1]="{primary|"+o+"}")),t[a][l]=f}}),t}function dn(r,t){return r+="","0000".substr(0,t-r.length)+r}function Ul(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function SV(r){return r===Ul(r)}function xV(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function oh(r,t,e,a){var n=ho(r),i=n[JD(e)](),o=n[jm(e)]()+1,s=Math.floor((o-1)/3)+1,l=n[Jm(e)](),u=n["get"+(e?"UTC":"")+"Day"](),f=n[Qm(e)](),c=(f-1)%12+1,v=n[t0(e)](),h=n[e0(e)](),d=n[r0(e)](),p=f>=12?"pm":"am",g=p.toUpperCase(),y=a instanceof Ot?a:Ug(a||KD)||hV(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),b=m.get("dayOfWeek"),x=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,dn(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,dn(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,dn(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,dn(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,dn(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,dn(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,dn(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,dn(d,3)).replace(/{S}/g,d+"")}function bV(r,t,e,a,n){var i=null;if(Q(e))i=e;else if(ot(e)){var o={time:r.time,level:r.time.level},s=pe();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),i=e(r.value,t,o)}else{var l=r.time;if(l){var u=e[l.lowerTimeUnit][l.upperTimeUnit];i=u[Math.min(l.level,u.length-1)]||""}else{var f=ss(r.value,n);i=e[f][f][0]}}return oh(new Date(r.value),i,n,a)}function ss(r,t){var e=ho(r),a=e[jm(t)]()+1,n=e[Jm(t)](),i=e[Qm(t)](),o=e[t0(t)](),s=e[e0(t)](),l=e[r0(t)](),u=l===0,f=u&&s===0,c=f&&o===0,v=c&&i===0,h=v&&n===1,d=h&&a===1;return d?"year":h?"month":v?"day":c?"hour":f?"minute":u?"second":"millisecond"}function Zg(r,t,e){switch(t){case"year":r[QD(e)](0);case"month":r[tL(e)](1);case"day":r[eL(e)](0);case"hour":r[rL(e)](0);case"minute":r[aL(e)](0);case"second":r[nL(e)](0)}return r}function JD(r){return r?"getUTCFullYear":"getFullYear"}function jm(r){return r?"getUTCMonth":"getMonth"}function Jm(r){return r?"getUTCDate":"getDate"}function Qm(r){return r?"getUTCHours":"getHours"}function t0(r){return r?"getUTCMinutes":"getMinutes"}function e0(r){return r?"getUTCSeconds":"getSeconds"}function r0(r){return r?"getUTCMilliseconds":"getMilliseconds"}function wV(r){return r?"setUTCFullYear":"setFullYear"}function QD(r){return r?"setUTCMonth":"setMonth"}function tL(r){return r?"setUTCDate":"setDate"}function eL(r){return r?"setUTCHours":"setHours"}function rL(r){return r?"setUTCMinutes":"setMinutes"}function aL(r){return r?"setUTCSeconds":"setSeconds"}function nL(r){return r?"setUTCMilliseconds":"setMilliseconds"}function iL(r){if(!zM(r))return Q(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function oL(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,a){return a.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Eu=Gv;function Xg(r,t,e){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(f){return f&&Nr(f)?f:"-"}function i(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?ho(r):r;if(isNaN(+l)){if(s)return"-"}else return oh(l,a,e)}if(t==="ordinal")return ng(r)?n(r):Pt(r)&&i(r)?r+"":"-";var u=en(r);return i(u)?iL(u):ng(r)?n(r):typeof r=="boolean"?r+"":"-"}var mS=["a","b","c","d","e","f","g"],pd=function(r,t){return"{"+r+(t??"")+"}"};function sL(r,t,e){U(t)||(t=[t]);var a=t.length;if(!a)return"";for(var n=t[0].$vars||[],i=0;i':'';var o=e.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function lo(r,t){return t=t||"transparent",Q(r)?r:ht(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function qc(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var Sc={},gd={},AV=function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(t,e){this._nonSeriesBoxMasterList=a(Sc),this._normalMasterList=a(gd);function a(n,i){var o=[];return A(n,function(s,l){var u=s.create(t,e);o=o.concat(u||[])}),o}},r.prototype.update=function(t,e){A(this._normalMasterList,function(a){a.update&&a.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(t,e){if(t==="matrix"||t==="calendar"){Sc[t]=e;return}gd[t]=e},r.get=function(t){return gd[t]||Sc[t]},r}();function MV(r){return!!Sc[r]}var qg={coord:1,coord2:2};function DV(r){lL.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var lL=rt();function LV(r){var t=r.getShallow("coord",!0),e=qg.coord;if(t==null){var a=lL.get(r.type);a&&a.getCoord2&&(e=qg.coord2,t=a.getCoord2(r))}return{coord:t,from:e}}var ma={none:0,dataCoordSys:1,boxCoordSys:2};function uL(r,t){var e=r.getShallow("coordinateSystem"),a=r.getShallow("coordinateSystemUsage",!0),n=ma.none;if(e){var i=r.mainType==="series";a==null&&(a=i?"data":"box"),a==="data"?(n=ma.dataCoordSys,i||(n=ma.none)):a==="box"&&(n=ma.boxCoordSys,!i&&!MV(e)&&(n=ma.none))}return{coordSysType:e,kind:n}}function Ou(r){var t=r.targetModel,e=r.coordSysType,a=r.coordSysProvider,n=r.isDefaultDataCoordSys;r.allowNotFound;var i=uL(t),o=i.kind,s=i.coordSysType;if(n&&o!==ma.dataCoordSys&&(o=ma.dataCoordSys,s=e),o===ma.none||s!==e)return!1;var l=a(e,t);return l?(o===ma.dataCoordSys?t.coordinateSystem=l:t.boxCoordinateSystem=l,!0):!1}var fL=function(r,t){var e=t.getReferringComponents(r,ae).models[0];return e&&e.coordinateSystem};const Nu=AV;var xc=A,cL=["left","right","top","bottom","width","height"],Gi=[["width","left","right"],["height","top","bottom"]];function a0(r,t,e,a,n){var i=0,o=0;a==null&&(a=1/0),n==null&&(n=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),c=t.childAt(u+1),v=c&&c.getBoundingRect(),h,d;if(r==="horizontal"){var p=f.width+(v?-v.x+f.x:0);h=i+p,h>a||l.newline?(i=0,h=p,o+=s+e,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(v?-v.y+f.y:0);d=o+g,d>n||l.newline?(i+=s+e,o=0,d=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=h+e:o=d+e)})}var Ji=a0;xt(a0,"vertical");xt(a0,"horizontal");function vL(r,t){return{left:r.getShallow("left",t),top:r.getShallow("top",t),right:r.getShallow("right",t),bottom:r.getShallow("bottom",t),width:r.getShallow("width",t),height:r.getShallow("height",t)}}function IV(r,t){var e=Ce(r,t,{enableLayoutOnlyByCenter:!0}),a=r.getBoxLayoutParams(),n,i;if(e.type===Il.point)i=e.refPoint,n=Qt(a,{width:t.getWidth(),height:t.getHeight()});else{var o=r.get("center"),s=U(o)?o:[o,o];n=Qt(a,e.refContainer),i=e.boxCoordFrom===qg.coord2?e.refPoint:[J(s[0],n.width)+n.x,J(s[1],n.height)+n.y]}return{viewRect:n,center:i}}function hL(r,t){var e=IV(r,t),a=e.viewRect,n=e.center,i=r.get("radius");U(i)||(i=[0,i]);var o=J(a.width,t.getWidth()),s=J(a.height,t.getHeight()),l=Math.min(o,s),u=J(i[0],l/2),f=J(i[1],l/2);return{cx:n[0],cy:n[1],r0:u,r:f,viewRect:a}}function Qt(r,t,e){e=Eu(e||0);var a=t.width,n=t.height,i=J(r.left,a),o=J(r.top,n),s=J(r.right,a),l=J(r.bottom,n),u=J(r.width,a),f=J(r.height,n),c=e[2]+e[0],v=e[1]+e[3],h=r.aspect;switch(isNaN(u)&&(u=a-s-v-i),isNaN(f)&&(f=n-l-c-o),h!=null&&(isNaN(u)&&isNaN(f)&&(h>a/n?u=a*.8:f=n*.8),isNaN(u)&&(u=h*f),isNaN(f)&&(f=u/h)),isNaN(i)&&(i=a-s-u-v),isNaN(o)&&(o=n-l-f-c),r.left||r.right){case"center":i=a/2-u/2-e[3];break;case"right":i=a-u-v;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-f/2-e[0];break;case"bottom":o=n-f-c;break}i=i||0,o=o||0,isNaN(u)&&(u=a-v-i-(s||0)),isNaN(f)&&(f=n-c-o-(l||0));var d=new dt((t.x||0)+i+e[3],(t.y||0)+o+e[0],u,f);return d.margin=e,d}function dL(r,t,e){var a=r.getShallow("preserveAspect",!0);if(!a)return t;var n=t.width/t.height;if(Math.abs(Math.atan(e)-Math.atan(n))<1e-9)return t;var i=r.getShallow("preserveAspectAlign",!0),o=r.getShallow("preserveAspectVerticalAlign",!0),s={width:t.width,height:t.height},l=a==="cover";return n>e&&!l||n=p)return c;for(var g=0;g=0;l--)s=wt(s,n[l],!0);a.defaultOption=s}return a.defaultOption},t.prototype.getReferringComponents=function(e,a){var n=e+"Index",i=e+"Id";return Rs(this.ecModel,e,{index:this.get(n,!0),id:this.get(i,!0)},a)},t.prototype.getBoxLayoutParams=function(){return vL(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}(Ot);qM(Vs,Ot);Yv(Vs);lV(Vs);uV(Vs,RV);function RV(r){var t=[];return A(Vs.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=Y(t,function(e){return ba(e).main}),r!=="dataset"&&bt(t,"dataset")<=0&&t.unshift("dataset"),t}const kt=Vs;var Fi={color:{},darkColor:{},size:{}},oe=Fi.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)"};$(oe,{primary:oe.neutral80,secondary:oe.neutral70,tertiary:oe.neutral60,quaternary:oe.neutral50,disabled:oe.neutral20,border:oe.neutral30,borderTint:oe.neutral20,borderShade:oe.neutral40,background:oe.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:oe.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:oe.neutral70,axisLineTint:oe.neutral40,axisTick:oe.neutral70,axisTickMinor:oe.neutral60,axisLabel:oe.neutral70,axisSplitLine:oe.neutral15,axisMinorSplitLine:oe.neutral05});for(var yi in oe)if(oe.hasOwnProperty(yi)){var _S=oe[yi];yi==="theme"?Fi.darkColor.theme=oe.theme.slice():yi==="highlight"?Fi.darkColor.highlight="rgba(255,231,130,0.4)":yi.indexOf("accent")===0?Fi.darkColor[yi]=Bn(_S,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):Fi.darkColor[yi]=Bn(_S,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}Fi.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};const G=Fi;var gL="";typeof navigator<"u"&&(gL=navigator.platform||"");var Eo="rgba(0, 0, 0, 0.2)",yL=G.color.theme[0],EV=Bn(yL,null,null,.9);const OV={darkMode:"auto",colorBy:"series",color:G.color.theme,gradientColor:[EV,yL],aria:{decal:{decals:[{color:Eo,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Eo,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Eo,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Eo,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Eo,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Eo,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:gL.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var mL=rt(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),xr="original",Ne="arrayRows",br="objectRows",aa="keyedColumns",Vn="typedArray",_L="unknown",jr="column",mo="row",Be={Must:1,Might:2,Not:3},SL=Dt();function NV(r){SL(r).datasetMap=rt()}function xL(r,t,e){var a={},n=i0(t);if(!n||!r)return a;var i=[],o=[],s=t.ecModel,l=SL(s).datasetMap,u=n.uid+"_"+e.seriesLayoutBy,f,c;r=r.slice(),A(r,function(p,g){var y=ht(p)?p:r[g]={name:p};y.type==="ordinal"&&f==null&&(f=g,c=d(y)),a[y.name]=[]});var v=l.get(u)||l.set(u,{categoryWayDim:c,valueWayDim:0});A(r,function(p,g){var y=p.name,m=d(p);if(f==null){var _=v.valueWayDim;h(a[y],_,m),h(o,_,m),v.valueWayDim+=m}else if(f===g)h(a[y],0,m),h(i,0,m);else{var _=v.categoryWayDim;h(a[y],_,m),h(o,_,m),v.categoryWayDim+=m}});function h(p,g,y){for(var m=0;mt)return r[a];return r[e-1]}function TL(r,t,e,a,n,i,o){i=i||r;var s=t(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var f=o==null||!a?e:FV(a,o);if(f=f||e,!(!f||!f.length)){var c=f[l];return n&&(u[n]=c),s.paletteIdx=(l+1)%f.length,c}}function HV(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var df,Qs,xS,bS="\0_ec_inner",WV=1,CL=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,a,n,i,o,s){i=i||{},this.option=null,this._theme=new Ot(i),this._locale=new Ot(o),this._optionManager=s},t.prototype.setOption=function(e,a,n){var i=CS(a);this._optionManager.setOption(e,n,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,a){return this._resetOption(e,CS(a))},t.prototype._resetOption=function(e,a){var n=!1,i=this._optionManager;if(!e||e==="recreate"){var o=i.mountOption(e==="recreate");!this.option||e==="recreate"?xS(this,o):(this.restoreData(),this._mergeOption(o,a)),n=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=i.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,a))}if(!e||e==="recreate"||e==="media"){var l=i.getMediaOption(this);l.length&&A(l,function(u){n=!0,this._mergeOption(u,a)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,a){var n=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=rt(),u=a&&a.replaceMergeMainTypeMap;NV(this),A(e,function(c,v){c!=null&&(kt.hasClass(v)?v&&(s.push(v),l.set(v,!0)):n[v]=n[v]==null?st(c):wt(n[v],c,!0))}),u&&u.each(function(c,v){kt.hasClass(v)&&!l.get(v)&&(s.push(v),l.set(v,!0))}),kt.topologicalTravel(s,kt.getAllClassMainTypes(),f,this);function f(c){var v=VV(this,c,Ut(e[c])),h=i.get(c),d=h?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll",p=$M(h,v,d);UN(p,c,kt),n[c]=null,i.set(c,null),o.set(c,0);var g=[],y=[],m=0,_;A(p,function(S,b){var x=S.existing,w=S.newOption;if(!w)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=c==="series",C=kt.getClass(c,S.keyInfo.subType,!T);if(!C)return;if(c==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===C)x.name=S.keyInfo.name,x.mergeOption(w,this),x.optionUpdated(w,!1);else{var M=$({componentIndex:b},S.keyInfo);x=new C(w,this,this,M),$(x,M),S.brandNew&&(x.__requireNewView=!0),x.init(w,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),y.push(x),m++):(g.push(void 0),y.push(void 0))},this),n[c]=g,i.set(c,y),o.set(c,m),c==="series"&&df(this)}this._seriesIndices||df(this)},t.prototype.getOption=function(){var e=st(this.option);return A(e,function(a,n){if(kt.hasClass(n)){for(var i=Ut(a),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!nu(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,e[n]=i}}),delete e[bS],e},t.prototype.setTheme=function(e){this._theme=new Ot(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,a){var n=this._componentsMap.get(e);if(n){var i=n[a||0];if(i)return i;if(a==null){for(var o=0;o=t:e==="max"?r<=t:r===t}function QV(r,t){return r.join(",")===t.join(",")}const t5=qV;var Wr=A,cu=ht,AS=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function yd(r){var t=r&&r.itemStyle;if(t)for(var e=0,a=AS.length;e0?e[o-1].seriesModel:null)}),u5(e)}})}function u5(r){A(r,function(t,e){var a=[],n=[NaN,NaN],i=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,f,c){var v=o.get(t.stackedDimension,c);if(isNaN(v))return n;var h,d;s?d=o.getRawIndex(c):h=o.get(t.stackedByDimension,c);for(var p=NaN,g=e-1;g>=0;g--){var y=r[g];if(s||(d=y.data.rawIndexOf(y.stackedByDimension,h)),d>=0){var m=y.data.getByRawIndex(y.stackResultDimension,d);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&v>=0&&m>0||l==="samesign"&&v<=0&&m<0){v=PN(v,m),p=m;break}}}return a[0]=v,a[1]=p,a})})}var lh=function(){function r(t){this.data=t.data||(t.sourceFormat===aa?{}:[]),this.sourceFormat=t.sourceFormat||_L,this.seriesLayoutBy=t.seriesLayoutBy||jr,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var a=0;ap&&(p=_)}h[0]=d,h[1]=p}},n=function(){return this._data?this._data.length/this._dimSize:0};RS=(t={},t[Ne+"_"+jr]={pure:!0,appendData:i},t[Ne+"_"+mo]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[br]={pure:!0,appendData:i},t[aa]={pure:!0,appendData:function(o){var s=this._data;A(o,function(l,u){for(var f=s[u]||(s[u]=[]),c=0;c<(l||[]).length;c++)f.push(l[c])})}},t[xr]={appendData:i},t[Vn]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function i(o){for(var s=0;s=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(t,e){return Ss(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,a){},r}();function BS(r){var t,e;return ht(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function Yl(r){return new y5(r)}var y5=function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,a=t&&t.skip;if(this._dirty&&e){var n=this.context;n.data=n.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!a&&(i=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(i="reset");function f(m){return!(m>=1)&&(m=1),m}var c;(this._dirty||i==="reset")&&(this._dirty=!1,c=this._doReset(a)),this._modBy=l,this._modDataCount=u;var v=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,d=Math.min(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!a&&(c||h1&&a>0?s:o}};return i;function o(){return t=r?null:lt},gte:function(r,t){return r>=t}},_5=function(){function r(t,e){if(!Pt(e)){var a="";Vt(a)}this._opFn=BL[t],this._rvalFloat=en(e)}return r.prototype.evaluate=function(t){return Pt(t)?this._opFn(t,this._rvalFloat):this._opFn(en(t),this._rvalFloat)},r}(),zL=function(){function r(t,e){var a=t==="desc";this._resultLT=a?1:-1,e==null&&(e=a?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var a=Pt(t)?t:en(t),n=Pt(e)?e:en(e),i=isNaN(a),o=isNaN(n);if(i&&(a=this._incomparable),o&&(n=this._incomparable),i&&o){var s=Q(t),l=Q(e);s&&(a=l?t:0),l&&(n=s?e:0)}return an?-this._resultLT:0},r}(),S5=function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=en(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var a=typeof t;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(e=en(t)===this._rvalFloat)}return this._isEQ?e:!e},r}();function x5(r,t){return r==="eq"||r==="ne"?new S5(r==="eq",t):et(BL,r)?new _5(r,t):null}var b5=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return Gn(t,e)},r}();function w5(r,t){var e=new b5,a=r.data,n=e.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==jr&&Vt(o);var s=[],l={},u=r.dimensionsDefine;if(u)A(u,function(p,g){var y=p.name,m={index:g,name:y,displayName:p.displayName};if(s.push(m),y!=null){var _="";et(l,y)&&Vt(_),l[y]=m}});else for(var f=0;f65535?P5:k5}function No(){return[1/0,-1/0]}function R5(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function GS(r,t,e,a,n){var i=FL[e||"float"];if(n){var o=r[t],s=o&&o.length;if(s!==a){for(var l=new i(a),u=0;ug[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,a){for(var n=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=Y(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,a=e[t];if(a!=null&&at)i=o-1;else return o}return-1},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var a=e.constructor,n=this._count;if(a===Array){t=new a(n);for(var i=0;i=c&&m<=v||isNaN(m))&&(l[u++]=p),p++}d=!0}else if(i===2){for(var g=h[n[0]],_=h[n[1]],S=t[n[1]][0],b=t[n[1]][1],y=0;y=c&&m<=v||isNaN(m))&&(x>=S&&x<=b||isNaN(x))&&(l[u++]=p),p++}d=!0}}if(!d)if(i===1)for(var y=0;y=c&&m<=v||isNaN(m))&&(l[u++]=w)}else for(var y=0;yt[M][1])&&(T=!1)}T&&(l[u++]=e.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var a=this.clone([t],!0),n=a._chunks,i=n[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,c,v,h=new(Oo(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var d=1;df&&(f=c,v=S)}D>0&&Ds&&(p=s-f);for(var g=0;gd&&(d=m,h=f+g)}var _=this.getRawIndex(c),S=this.getRawIndex(h);cf-d&&(l=f-d,s.length=l);for(var p=0;pc[1]&&(c[1]=y),v[h++]=m}return i._count=h,i._indices=v,i._updateGetRawIdx(),i},r.prototype.each=function(t,e){if(this._count)for(var a=t.length,n=this._chunks,i=0,o=this.count();il&&(l=c)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var a=[],n=this._chunks,i=0;i=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function t(e,a,n,i){return Gn(e[i],this._dimensions[i])}Sd={arrayRows:t,objectRows:function(e,a,n,i){return Gn(e[a],this._dimensions[i])},keyedColumns:t,original:function(e,a,n,i){var o=e&&(e.value==null?e:e.value);return Gn(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(e,a,n,i){return e[i]}}}(),r}(),HL=function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),a=!!e.length,n,i;if(gf(t)){var o=t,s=void 0,l=void 0,u=void 0;if(a){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,i=[f._getVersionSign()]}else s=o.get("data",!0),l=ur(s)?Vn:xr,i=[];var c=this._getSourceMetaRawOption()||{},v=u&&u.metaRawOption||{},h=nt(c.seriesLayoutBy,v.seriesLayoutBy)||null,d=nt(c.sourceHeader,v.sourceHeader),p=nt(c.dimensions,v.dimensions),g=h!==v.seriesLayoutBy||!!d!=!!v.sourceHeader||p;n=g?[Jg(s,{seriesLayoutBy:h,sourceHeader:d,dimensions:p},l)]:[]}else{var y=t;if(a){var m=this._applyTransform(e);n=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);n=[Jg(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(n,i)},r.prototype._applyTransform=function(t){var e=this._sourceHost,a=e.get("transform",!0),n=e.get("fromTransformResult",!0);if(n!=null){var i="";t.length!==1&&HS(i)}var o,s=[],l=[];return A(t,function(u){u.prepareSource();var f=u.getSource(n||0),c="";n!=null&&!f&&HS(c),s.push(f),l.push(u._getVersionSign())}),a?o=L5(a,s,{datasetIndex:e.componentIndex}):n!=null&&(o=[f5(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e1||e>0&&!r.noHeader;return A(r.blocks,function(n){var i=YL(n);i>=t&&(t=i+ +(a&&(!i||ty(n)&&!n.noHeader)))}),t}return 0}function B5(r,t,e,a){var n=t.noHeader,i=V5(YL(t)),o=[],s=t.blocks||[];Ze(!s||U(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(et(u,l)){var f=new zL(u[l],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}A(s,function(p,g){var y=t.valueFormatter,m=UL(p)(y?$($({},r),{valueFormatter:y}):r,p,g>0?i.html:0,a);m!=null&&o.push(m)});var c=r.renderMode==="richText"?o.join(i.richText):ey(a,o.join(""),n?e:i.html);if(n)return c;var v=Xg(t.header,"ordinal",r.useUTC),h=$L(a,r.renderMode).nameStyle,d=WL(a);return r.renderMode==="richText"?ZL(r,v,h)+i.richText+c:ey(a,'
'+$e(v)+"
"+c,e)}function z5(r,t,e,a){var n=r.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=U(S)?S:[S],Y(S,function(b,x){return Xg(b,U(h)?h[x]:h,u)})};if(!(i&&o)){var c=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||G.color.secondary,n),v=i?"":Xg(l,"ordinal",u),h=t.valueType,d=o?[]:f(t.value,t.dataIndex),p=!s||!i,g=!s&&i,y=$L(a,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":c)+(i?"":ZL(r,v,m))+(o?"":H5(r,d,p,g,_)):ey(a,(s?"":c)+(i?"":G5(v,!s,m))+(o?"":F5(d,p,g,_)),e)}}function WS(r,t,e,a,n,i){if(r){var o=UL(r),s={useUTC:n,renderMode:e,orderMode:a,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function V5(r){return{html:O5[r],richText:N5[r]}}function ey(r,t,e){var a='
',n="margin: "+e+"px 0 0",i=WL(r);return'
'+t+a+"
"}function G5(r,t,e){var a=t?"margin-left:2px":"";return''+$e(r)+""}function F5(r,t,e,a){var n=e?"10px":"20px",i=t?"float:right;margin-left:"+n:"";return r=U(r)?r:[r],''+Y(r,function(o){return $e(o)}).join("  ")+""}function ZL(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function H5(r,t,e,a,n){var i=[n],o=a?10:20;return e&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(U(t)?t.join(" "):t,i)}function XL(r,t){var e=r.getData().getItemVisual(t,"style"),a=e[r.visualDrawType];return lo(a)}function qL(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var xd=function(){function r(){this.richTextStyles={},this._nextStyleNameId=VM()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,a){var n=a==="richText"?this._generateStyleName():null,i=CV({color:e,type:t,renderMode:a,markerId:n});return Q(i)?i:(this.richTextStyles[n]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(t,e){var a={};U(e)?A(e,function(i){return $(a,i)}):$(a,e);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+t+"}"},r}();function KL(r){var t=r.series,e=r.dataIndex,a=r.multipleSeries,n=t.getData(),i=n.mapDimensionsAll("defaultedTooltip"),o=i.length,s=t.getRawValue(e),l=U(s),u=XL(t,e),f,c,v,h;if(o>1||l&&!o){var d=W5(s,t,e,i,u);f=d.inlineValues,c=d.inlineValueTypes,v=d.blocks,h=d.inlineValues[0]}else if(o){var p=n.getDimensionInfo(i[0]);h=f=Ss(n,e,i[0]),c=p.type}else h=f=l?s[0]:s;var g=Lm(t),y=g&&t.name||"",m=n.getName(e),_=a?y:m;return ye("section",{header:y,noHeader:a||!g,sortParam:h,blocks:[ye("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Nr(_),value:f,valueType:c,dataIndex:e})].concat(v||[])})}function W5(r,t,e,a,n){var i=t.getData(),o=Ia(r,function(c,v,h){var d=i.getDimensionInfo(h);return c=c||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];a.length?A(a,function(c){f(Ss(i,e,c),c)}):A(r,f);function f(c,v){var h=i.getDimensionInfo(v);!h||h.otherDims.tooltip===!1||(o?u.push(ye("nameValue",{markerType:"subItem",markerColor:n,name:h.displayName,value:c,valueType:h.type})):(s.push(c),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var pn=Dt();function yf(r,t){return r.getName(t)||r.getId(t)}var bc="__universalTransitionEnabled",ch=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,a,n){this.seriesIndex=this.componentIndex,this.dataTask=Yl({count:U5,reset:Y5}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var i=pn(this).sourceManager=new HL(this);i.prepareSource();var o=this.getInitialData(e,n);US(o,this),this.dataTask.context.data=o,pn(this).dataBeforeProcessed=o,$S(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,a){var n=fu(this),i=n?yo(e):{},o=this.subType;kt.hasClass(o)&&(o+="Series"),wt(e,a.getTheme().get(this.subType)),wt(e,this.getDefaultOption()),ro(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Ea(e,i,n)},t.prototype.mergeOption=function(e,a){e=wt(this.option,e,!0),this.fillDataTextStyle(e.data);var n=fu(this);n&&Ea(this.option,e,n);var i=pn(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(e,a);US(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,pn(this).dataBeforeProcessed=o,$S(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!ur(e))for(var a=["show"],n=0;n=0&&v<0)&&(c=m,v=y,h=0),y===v&&(f[h++]=p))}),f.length=h,f},t.prototype.formatTooltip=function(e,a,n){return KL({series:this,dataIndex:e,multipleSeries:a})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Nt.node&&!(e&&e.ssr))return!1;var a=this.getShallow("animation");return a&&this.getData().count()>this.getShallow("animationThreshold")&&(a=!1),!!a},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,a,n){var i=this.ecModel,o=o0.prototype.getColorFromPalette.call(this,e,a,n);return o||(o=i.getColorFromPalette(e,a,n)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,a){this._innerSelect(this.getData(a),e)},t.prototype.unselect=function(e,a){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(a);if(i==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&n.push(o)}return n},t.prototype.isSelected=function(e,a){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(a);return(n==="all"||n[yf(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[bc])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,a){var n,i,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){ht(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(e,a)}},t.registerClass=function(e){return kt.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}(kt);_e(ch,uh);_e(ch,o0);qM(ch,kt);function $S(r){var t=r.name;Lm(r)||(r.name=$5(r)||t)}function $5(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),a=[];return A(e,function(n){var i=t.getDimensionInfo(n);i.displayName&&a.push(i.displayName)}),a.join(" ")}function U5(r){return r.model.getRawData().count()}function Y5(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),Z5}function Z5(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function US(r,t){A(Ql(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,xt(X5,t))})}function X5(r,t){var e=ry(r);return e&&e.setOutputEnd((t||this).count()),t}function ry(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var a=e.currentTask;if(a){var n=a.agentStubMap;n&&(a=n.get(r.uid))}return a}}const te=ch;var c0=function(){function r(){this.group=new lt,this.uid=zs("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,a,n){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,a,n){},r.prototype.updateLayout=function(t,e,a,n){},r.prototype.updateVisual=function(t,e,a,n){},r.prototype.toggleBlurSeries=function(t,e,a){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();Pm(c0);Yv(c0);const re=c0;function Gs(){var r=Dt();return function(t){var e=r(t),a=t.pipelineContext,n=!!e.large,i=!!e.progressiveRender,o=e.large=!!(a&&a.large),s=e.progressiveRender=!!(a&&a.progressiveRender);return(n!==o||i!==s)&&"reset"}}var jL=Dt(),q5=Gs(),v0=function(){function r(){this.group=new lt,this.uid=zs("viewChart"),this.renderTask=Yl({plan:K5,reset:j5}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,a,n){},r.prototype.highlight=function(t,e,a,n){var i=t.getData(n&&n.dataType);i&&ZS(i,n,"emphasis")},r.prototype.downplay=function(t,e,a,n){var i=t.getData(n&&n.dataType);i&&ZS(i,n,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,a,n){this.render(t,e,a,n)},r.prototype.updateLayout=function(t,e,a,n){this.render(t,e,a,n)},r.prototype.updateVisual=function(t,e,a,n){this.render(t,e,a,n)},r.prototype.eachRendered=function(t){Qn(this.group,t)},r.markUpdateMethod=function(t,e){jL(t).updateMethod=e},r.protoInitialize=function(){var t=r.prototype;t.type="chart"}(),r}();function YS(r,t,e){r&&su(r)&&(t==="emphasis"?rn:an)(r,e)}function ZS(r,t,e){var a=ao(r,t),n=t&&t.highlightKey!=null?cz(t.highlightKey):null;a!=null?A(Ut(a),function(i){YS(r.getItemGraphicEl(i),e,n)}):r.eachItemGraphicEl(function(i){YS(i,e,n)})}Pm(v0);Yv(v0);function K5(r){return q5(r.model)}function j5(r){var t=r.model,e=r.ecModel,a=r.api,n=r.payload,i=t.pipelineContext.progressiveRender,o=r.view,s=n&&jL(n).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,a,n),J5[l]}var J5={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};const Xt=v0;var Kc="\0__throttleOriginMethod",XS="\0__throttleRate",qS="\0__throttleType";function h0(r,t,e){var a,n=0,i=0,o=null,s,l,u,f;t=t||0;function c(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var v=function(){for(var h=[],d=0;d=0?c():o=setTimeout(c,-s),n=a};return v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(h){f=h},v}function Fs(r,t,e,a){var n=r[t];if(n){var i=n[Kc]||n,o=n[qS],s=n[XS];if(s!==e||o!==a){if(e==null||!a)return r[t]=i;n=r[t]=h0(i,e,a==="debounce"),n[Kc]=i,n[qS]=a,n[XS]=e}return n}}function vu(r,t){var e=r[t];e&&e[Kc]&&(e.clear&&e.clear(),r[t]=e[Kc])}var KS=Dt(),jS={itemStyle:no(qD,!0),lineStyle:no(XD,!0)},Q5={lineStyle:"stroke",itemStyle:"fill"};function JL(r,t){var e=r.visualStyleMapper||jS[t];return e||(console.warn("Unknown style type '"+t+"'."),jS.itemStyle)}function QL(r,t){var e=r.visualDrawType||Q5[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var tG={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=r.getModel(a),i=JL(r,a),o=i(n),s=n.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=QL(r,a),u=o[l],f=ot(u)?u:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||c){var v=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=v,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||ot(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||ot(o.stroke)?v:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(h,d){var p=r.getDataParams(d),g=$({},o);g[l]=f(p),h.setItemVisual(d,"style",g)}}}},el=new Ot,eG={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=JL(r,a),i=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){el.option=l[a];var u=n(el),f=o.ensureUniqueItemVisual(s,"style");$(f,u),el.option.decal&&(o.setItemVisual(s,"decal",el.option.decal),el.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},rG={performRawSeries:!0,overallReset:function(r){var t=rt();r.eachSeries(function(e){var a=e.getColorBy();if(!e.isColorBySeries()){var n=e.type+"-"+a,i=t.get(n);i||(i={},t.set(n,i)),KS(e).scope=i}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var a=e.getRawData(),n={},i=e.getData(),o=KS(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=QL(e,s);i.each(function(u){var f=i.getRawIndex(u);n[f]=u}),a.each(function(u){var f=n[u],c=i.getItemVisual(f,"colorFromPalette");if(c){var v=i.ensureUniqueItemVisual(f,"style"),h=a.getName(u)||u+"",d=a.count();v[l]=e.getColorFromPalette(h,o,d)}})}})}},mf=Math.PI;function aG(r,t){t=t||{},vt(t,{text:"loading",textColor:G.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:G.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var e=new lt,a=new Mt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(a);var n=new Rt({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),i=new Mt({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(i);var o;return t.showSpinner&&(o=new Hm({shape:{startAngle:-mf/2,endAngle:-mf/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:mf*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:mf*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=n.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),i.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var nG=function(){function r(t,e,a,n){this._stageTaskMap=rt(),this.ecInstance=t,this.api=e,a=this._dataProcessorHandlers=a.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=a.concat(n)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(a){var n=a.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var a=this._pipelineMap.get(t.__pipeline.id),n=a.context,i=!e&&a.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>a.blockIndex,o=i?a.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var a=this._pipelineMap.get(t.uid),n=t.getData(),i=n.count(),o=a.progressiveEnabled&&e.incrementalPrepareRender&&i>=a.threshold,s=t.get("large")&&i>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,a=e._pipelineMap=rt();t.eachSeries(function(n){var i=n.getProgressive(),o=n.uid;a.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:i&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),a=this.api;A(this._allHandlers,function(n){var i=t.get(n.uid)||t.set(n.uid,{}),o="";Ze(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,i,e,a),n.overallReset&&this._createOverallStageTask(n,i,e,a)},this)},r.prototype.prepareView=function(t,e,a,n){var i=t.renderTask,o=i.context;o.model=e,o.ecModel=a,o.api=n,i.__block=!t.incrementalPrepareRender,this._pipe(e,i)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,a){this._performStageTasks(this._visualHandlers,t,e,a)},r.prototype._performStageTasks=function(t,e,a,n){n=n||{};var i=!1,o=this;A(t,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),c=f.seriesTaskMap,v=f.overallTask;if(v){var h,d=v.agentStubMap;d.each(function(g){s(n,g)&&(g.dirty(),h=!0)}),h&&v.dirty(),o.updatePayload(v,a);var p=o.getPerformArgs(v,n.block);d.each(function(g){g.perform(p)}),v.perform(p)&&(i=!0)}else c&&c.each(function(g,y){s(n,g)&&g.dirty();var m=o.getPerformArgs(g,n.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,a),g.perform(m)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(a){e=a.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,a,n){var i=this,o=e.seriesTaskMap,s=e.seriesTaskMap=rt(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?a.eachRawSeries(f):l?a.eachRawSeriesByType(l,f):u&&u(a,n).each(f);function f(c){var v=c.uid,h=s.set(v,o&&o.get(v)||Yl({plan:uG,reset:fG,count:vG}));h.context={model:c,ecModel:a,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(c,h)}},r.prototype._createOverallStageTask=function(t,e,a,n){var i=this,o=e.overallTask=e.overallTask||Yl({reset:iG});o.context={ecModel:a,api:n,overallReset:t.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=rt(),u=t.seriesType,f=t.getTargetSeries,c=!0,v=!1,h="";Ze(!t.createOnAllSeries,h),u?a.eachRawSeriesByType(u,d):f?f(a,n).each(d):(c=!1,A(a.getSeries(),d));function d(p){var g=p.uid,y=l.set(g,s&&s.get(g)||(v=!0,Yl({reset:oG,onDirty:lG})));y.context={model:p,overallProgress:c},y.agent=o,y.__block=c,i._pipe(p,y)}v&&o.dirty()},r.prototype._pipe=function(t,e){var a=t.uid,n=this._pipelineMap.get(a);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},r.wrapStageHandler=function(t,e){return ot(t)&&(t={overallReset:t,seriesType:hG(t)}),t.uid=zs("stageHandler"),e&&(t.visualType=e),t},r}();function iG(r){r.overallReset(r.ecModel,r.api,r.payload)}function oG(r){return r.overallProgress&&sG}function sG(){this.agent.dirty(),this.getDownstream().dirty()}function lG(){this.agent&&this.agent.dirty()}function uG(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function fG(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Ut(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?Y(t,function(e,a){return t2(a)}):cG}var cG=t2(0);function t2(r){return function(t,e){var a=e.data,n=e.resetDefines[r];if(n&&n.dataEach)for(var i=t.start;i0&&h===u.length-v.length){var d=u.slice(0,h);d!=="data"&&(e.mainType=d,e[v.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(a[u]=l,f=!0),f||(n[u]=l)})}return{cptQuery:e,dataQuery:a,otherQuery:n}},r.prototype.filter=function(t,e){var a=this.eventInfo;if(!a)return!0;var n=a.targetEl,i=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,i,"name")&&f(u,i,"dataIndex")&&f(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,i));function f(c,v,h,d){return c[h]==null||v[d||h]===c[h]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),ay=["symbol","symbolSize","symbolRotate","symbolOffset"],QS=ay.concat(["symbolKeepAspect"]),yG={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var a={},n={},i=!1,o=0;o=0&&Wi(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function ny(r,t,e){for(var a=t.type==="radial"?RG(r,t,e):kG(r,t,e),n=t.colorStops,i=0;i0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:Pt(r)?[r]:U(r)?r:null}function p0(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&OG(t.lineDash,t.lineWidth),a=t.lineDashOffset;if(e){var n=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(e=Y(e,function(i){return i/n}),a/=n)}return[e,a]}var NG=new Ra(!0);function Qc(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function tx(r){return typeof r=="string"&&r!=="none"}function tv(r){var t=r.fill;return t!=null&&t!=="none"}function ex(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function rx(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function iy(r,t,e){var a=km(t.image,t.__image,e);if(Zv(a)){var n=r.createPattern(a,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*sc),i.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(i)}return n}}function BG(r,t,e,a){var n,i=Qc(e),o=tv(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||NG,c=t.__dirty;if(!a){var v=e.fill,h=e.stroke,d=o&&!!v.colorStops,p=i&&!!h.colorStops,g=o&&!!v.image,y=i&&!!h.image,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0;(d||p)&&(x=t.getBoundingRect()),d&&(m=c?ny(r,v,x):t.__canvasFillGradient,t.__canvasFillGradient=m),p&&(_=c?ny(r,h,x):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(S=c||!t.__canvasFillPattern?iy(r,v,t):t.__canvasFillPattern,t.__canvasFillPattern=S),y&&(b=c||!t.__canvasStrokePattern?iy(r,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=b),d?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),p?r.strokeStyle=_:y&&(b?r.strokeStyle=b:i=!1)}var w=t.getGlobalScale();f.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,C;r.setLineDash&&e.lineDash&&(n=p0(t),T=n[0],C=n[1]);var M=!0;(u||c&Qo)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),M=!1),f.reset(),t.buildPath(f,t.shape,a),f.toStatic(),t.pathUpdated()),M&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),a||(e.strokeFirst?(i&&rx(r,e),o&&ex(r,e)):(o&&ex(r,e),i&&rx(r,e))),T&&r.setLineDash([])}function zG(r,t,e){var a=t.__image=km(e.image,t.__image,t,t.onload);if(!(!a||!Zv(a))){var n=e.x||0,i=e.y||0,o=t.getWidth(),s=t.getHeight(),l=a.width/a.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=a.width,s=a.height),e.sWidth&&e.sHeight){var u=e.sx||0,f=e.sy||0;r.drawImage(a,u,f,e.sWidth,e.sHeight,n,i,o,s)}else if(e.sx&&e.sy){var u=e.sx,f=e.sy,c=o-u,v=s-f;r.drawImage(a,u,f,c,v,n,i,o,s)}else r.drawImage(a,n,i,o,s)}}function VG(r,t,e){var a,n=e.text;if(n!=null&&(n+=""),n){r.font=e.font||Qa,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var i=void 0,o=void 0;r.setLineDash&&e.lineDash&&(a=p0(t),i=a[0],o=a[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),e.strokeFirst?(Qc(e)&&r.strokeText(n,e.x,e.y),tv(e)&&r.fillText(n,e.x,e.y)):(tv(e)&&r.fillText(n,e.x,e.y),Qc(e)&&r.strokeText(n,e.x,e.y)),i&&r.setLineDash([])}}var ax=["shadowBlur","shadowOffsetX","shadowOffsetY"],nx=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function s2(r,t,e,a,n){var i=!1;if(!a&&(e=e||{},t===e))return!1;if(a||t.opacity!==e.opacity){sr(r,n),i=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?Xi.opacity:o}(a||t.blend!==e.blend)&&(i||(sr(r,n),i=!0),r.globalCompositeOperation=t.blend||Xi.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,a,n){if(!this[Se]){if(this._disposed){this.id;return}var i,o,s;if(ht(a)&&(n=a.lazyUpdate,i=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[Se]=!0,Go(this),!this._model||a){var l=new t5(this._api),u=this._theme,f=this._model=new AL;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},uy);var c={seriesTransition:s,optionChanged:!0};if(n)this[Pe]={silent:i,updateParams:c},this[Se]=!1,this.getZr().wakeUp();else{try{bi(this),Va.update.call(this,null,c)}catch(v){throw this[Pe]=null,this[Se]=!1,v}this._ssr||this._zr.flush(),this[Pe]=null,this[Se]=!1,zo.call(this,i),Vo.call(this,i)}}},t.prototype.setTheme=function(e,a){if(!this[Se]){if(this._disposed){this.id;return}var n=this._model;if(n){var i=a&&a.silent,o=null;this[Pe]&&(i==null&&(i=this[Pe].silent),o=this[Pe].updateParams,this[Pe]=null),this[Se]=!0,Go(this);try{this._updateTheme(e),n.setTheme(this._theme),bi(this),Va.update.call(this,{type:"setTheme"},o)}catch(s){throw this[Se]=!1,s}this[Se]=!1,zo.call(this,i),Vo.call(this,i)}}},t.prototype._updateTheme=function(e){Q(e)&&(e=C2[e]),e&&(e=st(e),e&&LL(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||Nt.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var a=this._zr.painter;return a.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr,a=e.storage.getDisplayList();return A(a,function(n){n.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var a=e.excludeComponents,n=this._model,i=[],o=this;A(a,function(l){n.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(i.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return A(i,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var a=e.type==="svg",n=this.group,i=Math.min,o=Math.max,s=1/0;if(_x[n]){var l=s,u=s,f=-s,c=-s,v=[],h=e&&e.pixelRatio||this.getDevicePixelRatio();A(Zl,function(_,S){if(_.group===n){var b=a?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(st(e)),x=_.getDom().getBoundingClientRect();l=i(x.left,l),u=i(x.top,u),f=o(x.right,f),c=o(x.bottom,c),v.push({dom:b,left:x.left,top:x.top})}}),l*=h,u*=h,f*=h,c*=h;var d=f-l,p=c-u,g=Jr.createCanvas(),y=b1(g,{renderer:a?"svg":"canvas"});if(y.resize({width:d,height:p}),a){var m="";return A(v,function(_){var S=_.left-l,b=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return e.connectedBackgroundColor&&y.add(new Mt({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),A(v,function(_){var S=new Fe({style:{x:_.left*h-l,y:_.top*h-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,a,n){return bf(this,"convertToPixel",e,a,n)},t.prototype.convertToLayout=function(e,a,n){return bf(this,"convertToLayout",e,a,n)},t.prototype.convertFromPixel=function(e,a,n){return bf(this,"convertFromPixel",e,a,n)},t.prototype.containPixel=function(e,a){if(this._disposed){this.id;return}var n=this._model,i,o=vs(n,e);return A(o,function(s,l){l.indexOf("Models")>=0&&A(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(a);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(i=i||c.containPoint(a,u))}},this)},this),!!i},t.prototype.getVisual=function(e,a){var n=this._model,i=vs(n,e,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?d0(s,l,a):Bu(s,a)},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;A(hF,function(n){var i=function(o){var s=e.getModel(),l=o.target,u,f=n==="globalout";if(f?u={}:l&&Hi(l,function(p){var g=pt(p);if(g&&g.dataIndex!=null){var y=g.dataModel||s.getSeriesByIndex(g.seriesIndex);return u=y&&y.getDataParams(g.dataIndex,g.dataType,l)||{},!0}else if(g.eventData)return u=$({},g.eventData),!0},!0),u){var c=u.componentType,v=u.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",v=u.seriesIndex);var h=c&&v!=null&&s.getComponent(c,v),d=h&&e[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];u.event=o,u.type=n,e._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:h,view:d},e.trigger(n,u)}};i.zrEventfulCallAtLast=!0,e._zr.on(n,i,e)});var a=this._messageCenter;A(sy,function(n,i){a.on(i,function(o){e.trigger(i,o)})}),_G(a,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&YM(this.getDom(),m0,"");var a=this,n=a._api,i=a._model;A(a._componentsViews,function(o){o.dispose(i,n)}),A(a._chartsViews,function(o){o.dispose(i,n)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete Zl[a.id]},t.prototype.resize=function(e){if(!this[Se]){if(this._disposed){this.id;return}this._zr.resize(e);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var n=a.resetOption("media"),i=e&&e.silent;this[Pe]&&(i==null&&(i=this[Pe].silent),n=!0,this[Pe]=null),this[Se]=!0,Go(this);try{n&&bi(this),Va.update.call(this,{type:"resize",animation:$({duration:0},e&&e.animation)})}catch(o){throw this[Se]=!1,o}this[Se]=!1,zo.call(this,i),Vo.call(this,i)}}},t.prototype.showLoading=function(e,a){if(this._disposed){this.id;return}if(ht(e)&&(a=e,e=""),e=e||"default",this.hideLoading(),!!fy[e]){var n=fy[e](this._api,a),i=this._zr;this._loadingFX=n,i.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 a=$({},e);return a.type=oy[e.type],a},t.prototype.dispatchAction=function(e,a){if(this._disposed){this.id;return}if(ht(a)||(a={silent:!!a}),!!ev[e.type]&&this._model){if(this[Se]){this._pendingActions.push(e);return}var n=a.silent;Md.call(this,e,n);var i=a.flush;i?this._zr.flush():i!==!1&&Nt.browser.weChat&&this._throttledZrFlush(),zo.call(this,n),Vo.call(this,n)}},t.prototype.updateLabelLayout=function(){Yr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var a=e.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(a);i.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){bi=function(c){var v=c._scheduler;v.restorePipelines(c._model),v.prepareStageTasks(),Cd(c,!0),Cd(c,!1),v.plan()},Cd=function(c,v){for(var h=c._model,d=c._scheduler,p=v?c._componentsViews:c._chartsViews,g=v?c._componentsMap:c._chartsMap,y=c._zr,m=c._api,_=0;_v.get("hoverLayerThreshold")&&!Nt.node&&!Nt.worker&&v.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=c._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function s(c,v){var h=c.get("blendMode")||null;v.eachRendered(function(d){d.isGroup||(d.style.blend=h)})}function l(c,v){if(!c.preventAutoZ){var h=so(c);v.eachRendered(function(d){return nh(d,h.z,h.zlevel),!0})}}function u(c,v){v.eachRendered(function(h){if(!hs(h)){var d=h.getTextContent(),p=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function f(c,v){var h=c.getModel("stateAnimation"),d=c.isAnimationEnabled(),p=h.get("duration"),g=p>0?{duration:p,delay:h.get("delay"),easing:h.get("easing")}:null;v.eachRendered(function(y){if(y.states&&y.states.emphasis){if(hs(y))return;if(y instanceof Lt&&vz(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&i(y)}})}yx=function(c){return new(function(v){z(h,v);function h(){return v!==null&&v.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return c._model.getComponent(p.mainType,p.index);d=d.parent}},h.prototype.enterEmphasis=function(d,p){rn(d,p),Tr(c)},h.prototype.leaveEmphasis=function(d,p){an(d,p),Tr(c)},h.prototype.enterBlur=function(d){hD(d),Tr(c)},h.prototype.leaveBlur=function(d){zm(d),Tr(c)},h.prototype.enterSelect=function(d){dD(d),Tr(c)},h.prototype.leaveSelect=function(d){pD(d),Tr(c)},h.prototype.getModel=function(){return c.getModel()},h.prototype.getViewOfComponentModel=function(d){return c.getViewOfComponentModel(d)},h.prototype.getViewOfSeriesModel=function(d){return c.getViewOfSeriesModel(d)},h.prototype.getMainProcessVersion=function(){return c[Sf]},h}(ML))(c)},w2=function(c){function v(h,d){for(var p=0;p=0)){Sx.push(e);var i=a2.wrapStageHandler(e,n);i.__prio=t,i.__raw=e,r.push(i)}}function L2(r,t){fy[r]=t}function xF(r,t,e){var a=KG("registerMap");a&&a(r,t,e)}var bF=D5;So(g0,tG);So(vh,eG);So(vh,rG);So(g0,yG);So(vh,mG);So(y2,ZG);M2(LL);D2(eF,l5);L2("default",aG);Na({type:qi,event:qi,update:qi},fe);Na({type:gc,event:gc,update:gc},fe);Na({type:Wc,event:Nm,update:Wc,action:fe,refineEvent:x0,publishNonRefinedEvent:!0});Na({type:Ng,event:Nm,update:Ng,action:fe,refineEvent:x0,publishNonRefinedEvent:!0});Na({type:$c,event:Nm,update:$c,action:fe,refineEvent:x0,publishNonRefinedEvent:!0});function x0(r,t,e,a){return{eventContent:{selected:sz(e),isFromClick:t.isFromClick||!1}}}A2("default",{});A2("dark",pG);var xx=[],wF={registerPreprocessor:M2,registerProcessor:D2,registerPostInit:yF,registerPostUpdate:mF,registerUpdateLifecycle:_0,registerAction:Na,registerCoordinateSystem:_F,registerLayout:SF,registerVisual:So,registerTransform:bF,registerLoading:L2,registerMap:xF,registerImpl:qG,PRIORITY:fF,ComponentModel:kt,ComponentView:re,SeriesModel:te,ChartView:Xt,registerComponentModel:function(r){kt.registerClass(r)},registerComponentView:function(r){re.registerClass(r)},registerSeriesModel:function(r){te.registerClass(r)},registerChartView:function(r){Xt.registerClass(r)},registerCustomSeries:function(r,t){jG(r,t)},registerSubTypeDefaulter:function(r,t){kt.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){TN(r,t)}};function Tt(r){if(U(r)){A(r,function(t){Tt(t)});return}bt(xx,r)>=0||(xx.push(r),ot(r)&&(r={install:r}),r.install(wF))}function al(r){return r==null?0:r.length||1}function bx(r){return r}var TF=function(){function r(t,e,a,n,i,o){this._old=t,this._new=e,this._oldKeyGetter=a||bx,this._newKeyGetter=n||bx,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,a={},n=new Array(t.length),i=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,a,i,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(f,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,a)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,a={},n={},i=[],o=[];this._initIndexMap(t,a,i,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var s=0;s1&&v===1)this._updateManyToOne&&this._updateManyToOne(f,u),n[l]=null;else if(c===1&&v>1)this._updateOneToMany&&this._updateOneToMany(f,u),n[l]=null;else if(c===1&&v===1)this._update&&this._update(f,u),n[l]=null;else if(c>1&&v>1)this._updateManyToMany&&this._updateManyToMany(f,u),n[l]=null;else if(c>1)for(var h=0;h1)for(var s=0;s30}var nl=ht,gn=Y,PF=typeof Int32Array>"u"?Array:Int32Array,kF="e\0\0",Tx=-1,RF=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],EF=["_approximateExtent"],Cx,Tf,il,ol,Id,sl,Pd,OF=function(){function r(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var a,n=!1;P2(t)?(a=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,a=t),a=a||["x","y"];for(var i={},o=[],s={},l=!1,u={},f=0;f=e)){var a=this._store,n=a.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===xr;if(l&&!n.pure)for(var u=[],f=t;f0},r.prototype.ensureUniqueItemVisual=function(t,e){var a=this._itemVisuals,n=a[t];n||(n=a[t]={});var i=n[e];return i==null&&(i=this.getVisual(e),U(i)?i=i.slice():nl(i)&&(i=$({},i)),n[e]=i),i},r.prototype.setItemVisual=function(t,e,a){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,nl(e)?$(n,e):n[e]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){nl(t)?$(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,a){this._itemLayouts[t]=a?$(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var a=this.hostModel&&this.hostModel.seriesIndex;Og(a,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){A(this._graphicEls,function(a,n){a&&t&&t.call(e,a,n)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:gn(this.dimensions,this._getDimInfo,this),this.hostModel)),Id(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var a=this[t];ot(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=a.apply(this,arguments);return e.apply(this,[n].concat(_m(arguments)))})},r.internalField=function(){Cx=function(t){var e=t._invertedIndicesMap;A(e,function(a,n){var i=t._dimInfos[n],o=i.ordinalMeta,s=t._store;if(o){a=e[n]=new PF(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),n[e]=l}}}(),r}();const tr=OF;function zu(r,t){s0(r)||(r=l0(r)),t=t||{};var e=t.coordDimensions||[],a=t.dimensionsDefine||r.dimensionsDefine||[],n=rt(),i=[],o=BF(r,e,a,t.dimensionsCount),s=t.canOmitUnusedDimensions&&E2(o),l=a===r.dimensionsDefine,u=l?R2(r):k2(a),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var c=rt(f),v=new GL(o),h=0;h0&&(a.name=n+(i-1)),i++,t.set(n,i)}}function BF(r,t,e,a){var n=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,a||0);return A(t,function(i){var o;ht(i)&&(o=i.dimsDef)&&(n=Math.max(n,o.length))}),n}function zF(r,t,e){if(e||t.hasKey(r)){for(var a=0;t.hasKey(r+a);)a++;r+=a}return t.set(r,!0),r}var VF=function(){function r(t){this.coordSysDims=[],this.axisMap=rt(),this.categoryAxisMap=rt(),this.coordSysName=t}return r}();function GF(r){var t=r.get("coordinateSystem"),e=new VF(t),a=FF[t];if(a)return a(r,e,e.axisMap,e.categoryAxisMap),e}var FF={cartesian2d:function(r,t,e,a){var n=r.getReferringComponents("xAxis",ae).models[0],i=r.getReferringComponents("yAxis",ae).models[0];t.coordSysDims=["x","y"],e.set("x",n),e.set("y",i),Fo(n)&&(a.set("x",n),t.firstCategoryDimIndex=0),Fo(i)&&(a.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,a){var n=r.getReferringComponents("singleAxis",ae).models[0];t.coordSysDims=["single"],e.set("single",n),Fo(n)&&(a.set("single",n),t.firstCategoryDimIndex=0)},polar:function(r,t,e,a){var n=r.getReferringComponents("polar",ae).models[0],i=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",i),e.set("angle",o),Fo(i)&&(a.set("radius",i),t.firstCategoryDimIndex=0),Fo(o)&&(a.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,a){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,a){var n=r.ecModel,i=n.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();A(i.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),f=o[l];e.set(f,u),Fo(u)&&(a.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(r,t,e,a){var n=r.getReferringComponents("matrix",ae).models[0];t.coordSysDims=["x","y"];var i=n.getDimensionModel("x"),o=n.getDimensionModel("y");e.set("x",i),e.set("y",o),a.set("x",i),a.set("y",o)}};function Fo(r){return r.get("type")==="category"}function HF(r,t,e){e=e||{};var a=e.byIndex,n=e.stackedCoordDimension,i,o,s;WF(t)?i=t:(o=t.schema,i=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,c,v;if(A(i,function(m,_){Q(m)&&(i[_]=m={name:m}),l&&!m.isExtraCoord&&(!a&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(f=m))}),f&&!a&&!u&&(a=!0),f){c="__\0ecstackresult_"+r.id,v="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var h=f.coordDim,d=f.type,p=0;A(i,function(m){m.coordDim===h&&p++});var g={name:c,coordDim:h,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:v,coordDim:v,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(v,d),y.storeDimIndex=s.ensureCalculationDimension(c,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:v,stackResultDimension:c}}function WF(r){return!P2(r.schema)}function $n(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function O2(r,t){return $n(r,t)?r.getCalculationInfo("stackResultDimension"):t}function $F(r,t){var e=r.get("coordinateSystem"),a=Nu.get(e),n;return t&&t.coordSysDims&&(n=Y(t.coordSysDims,function(i){var o={name:i},s=t.axisMap.get(i);if(s){var l=s.get("type");o.type=av(l)}return o})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function UF(r,t,e){var a,n;return e&&A(r,function(i,o){var s=i.coordDim,l=e.categoryAxisMap.get(s);l&&(a==null&&(a=o),i.ordinalMeta=l.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&a!=null&&(r[a].otherDims.itemName=0),a}function cn(r,t,e){e=e||{};var a=t.getSourceManager(),n,i=!1;r?(i=!0,n=l0(r)):(n=a.getSource(),i=n.sourceFormat===xr);var o=GF(t),s=$F(t,o),l=e.useEncodeDefaulter,u=ot(l)?l:l?xt(xL,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},c=zu(n,f),v=UF(c.dimensions,e.createInvertedIndices,o),h=i?null:a.getSharedDataStore(c),d=HF(t,{schema:c,store:h}),p=new tr(c,t);p.setCalculationInfo(d);var g=v!=null&&YF(n)?function(y,m,_,S){return S===v?_:this.defaultDimValueGetter(y,m,_,S)}:null;return p.hasItemOption=!1,p.initData(i?n:h,null,g),p}function YF(r){if(r.sourceFormat===xr){var t=ZF(r.data||[]);return!U(ks(t))}}function ZF(r){for(var t=0;tn&&(o=i.interval=n);var s=i.intervalPrecision=pu(o),l=i.niceTickExtent=[de(Math.ceil(r[0]/o)*o,s),de(Math.floor(r[1]/o)*o,s)];return qF(l,r),i}function kd(r){var t=Math.pow(10,Dm(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,de(e*t)}function pu(r){return xa(r)+2}function Ax(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function qF(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),Ax(r,0,t),Ax(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function b0(r,t){return r>=t[0]&&r<=t[1]}var KF=function(){function r(){this.normalize=Mx,this.scale=Dx}return r.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=tt(t.normalize,t),this.scale=tt(t.scale,t)):(this.normalize=Mx,this.scale=Dx)},r}();function Mx(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function Dx(r,t){return r*(t[1]-t[0])+t[0]}function vy(r,t,e){var a=Math.log(r);return[Math.log(e?t[0]:Math.max(0,t[0]))/a,Math.log(e?t[1]:Math.max(0,t[1]))/a]}var N2=function(){function r(t){this._calculator=new KF,this._setting=t||{},this._extent=[1/0,-1/0];var e=pe();e&&(this._brkCtx=e.createScaleBreakContext(),this._brkCtx.update(this._extent))}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype._innerUnionExtent=function(t){var e=this._extent;this._innerSetExtent(t[0]e[1]?t[1]:e[1])},r.prototype.unionExtentFromData=function(t,e){this._innerUnionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){this._innerSetExtent(t,e)},r.prototype._innerSetExtent=function(t,e){var a=this._extent;isNaN(t)||(a[0]=t),isNaN(e)||(a[1]=e),this._brkCtx&&this._brkCtx.update(a)},r.prototype.setBreaksFromOption=function(t){var e=pe();e&&this._innerSetBreak(e.parseAxisBreakOption(t,tt(this.parse,this)))},r.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r}();Yv(N2);const xo=N2;var jF=0,JF=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++jF,this._onCollect=t.onCollect}return r.createByAxisModel=function(t){var e=t.option,a=e.data,n=a&&Y(a,QF);return new r({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,a=this._needCollect;if(!Q(t)&&!a)return t;if(a&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,this._onCollect&&this._onCollect(t,e),e;var n=this._getOrCreateMap();return e=n.get(t),e==null&&(a?(e=this.categories.length,this.categories[e]=t,n.set(t,e),this._onCollect&&this._onCollect(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=rt(this.categories))},r}();function QF(r){return ht(r)&&r.value!=null?r.value:r+""}const gu=JF;var B2=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;a.type="ordinal";var n=a.getSetting("ordinalMeta");return n||(n=new gu({})),U(n)&&(n=new gu({categories:Y(n,function(i){return ht(i)?i.value:i})})),a._ordinalMeta=n,a._extent=a.getSetting("extent")||[0,n.categories.length-1],a}return t.prototype.parse=function(e){return e==null?NaN:Q(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return b0(e,this._extent)&&e>=0&&e=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(xo);xo.registerClass(B2);const yu=B2;var yn=de,z2=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e==null||e===""?NaN:Number(e)},t.prototype.contain=function(e){return b0(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=pu(e)},t.prototype.getTicks=function(e){e=e||{};var a=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=pe(),l=[];if(!a)return l;if(e.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;n[0]=0&&(c=yn(c+v*a,o))}if(l.length>0&&c===l[l.length-1].value)break;if(l.length>u)return[]}var h=l.length?l[l.length-1].value:i[1];return n[1]>h&&(e.expandToNicedExtent?l.push({value:yn(h+a,o)}):l.push({value:n[1]})),s&&s.pruneTicksByBreak(e.pruneByBreak,l,this._brkCtx.breaks,function(d){return d.value},this._interval,this._extent),e.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},t.prototype.getMinorTicks=function(e){for(var a=this.getTicks({expandToNicedExtent:!0}),n=[],i=this.getExtent(),o=1;oi[0]&&d0&&(i=i===null?s:Math.min(i,s))}e[a]=i}}return e}function F2(r){var t=r3(r),e=[];return A(r,function(a){var n=a.coordinateSystem,i=n.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=t[l],f=Math.abs(o[1]-o[0]),c=i.scale.getExtent(),v=Math.abs(c[1]-c[0]);s=u?f/v*u:f}else{var h=a.getData();s=Math.abs(o[1]-o[0])/h.count()}var d=J(a.get("barWidth"),s),p=J(a.get("barMaxWidth"),s),g=J(a.get("barMinWidth")||(Y2(a)?.5:1),s),y=a.get("barGap"),m=a.get("barCategoryGap"),_=a.get("defaultBarGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:m,defaultBarGap:_,axisKey:T0(i),stackId:w0(a)})}),H2(e)}function H2(r){var t={};A(r,function(a,n){var i=a.axisKey,o=a.bandWidth,s=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:a.defaultBarGap||0,stacks:{}},l=s.stacks;t[i]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=a.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var c=a.barMaxWidth;c&&(l[u].maxWidth=c);var v=a.barMinWidth;v&&(l[u].minWidth=v);var h=a.barGap;h!=null&&(s.gap=h);var d=a.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return A(t,function(a,n){e[n]={};var i=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=It(i).length;s=Math.max(35-l*4,15)+"%"}var u=J(s,o),f=J(a.gap,1),c=a.remainedWidth,v=a.autoWidthCount,h=(c-u)/(v+(v-1)*f);h=Math.max(h,0),A(i,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var S=y.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),y.width=S,c-=S+f*S,v--}else{var S=h;m&&mS&&(S=_),S!==h&&(y.width=S,c-=S+f*S,v--)}}),h=(c-u)/(v+(v-1)*f),h=Math.max(h,0);var d=0,p;A(i,function(y,m){y.width||(y.width=h),p=y,d+=y.width*(1+f)}),p&&(d-=p.width*f);var g=-d/2;A(i,function(y,m){e[n][m]=e[n][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),e}function a3(r,t,e){if(r&&t){var a=r[T0(t)];return a!=null&&e!=null?a[w0(e)]:a}}function W2(r,t){var e=G2(r,t),a=F2(e);A(e,function(n){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=w0(n),u=a[T0(s)][l],f=u.offset,c=u.width;i.setLayout({bandWidth:u.bandWidth,offset:f,size:c})})}function $2(r){return{seriesType:r,plan:Gs(),reset:function(t){if(U2(t)){var e=t.getData(),a=t.coordinateSystem,n=a.getBaseAxis(),i=a.getOtherAxis(n),o=e.getDimensionIndex(e.mapDimension(i.dim)),s=e.getDimensionIndex(e.mapDimension(n.dim)),l=t.get("showBackground",!0),u=e.mapDimension(i.dim),f=e.getCalculationInfo("stackResultDimension"),c=$n(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),v=i.isHorizontal(),h=n3(n,i),d=Y2(t),p=t.get("barMinHeight")||0,g=f&&e.getDimensionIndex(f),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,S){for(var b=_.count,x=d&&wa(b*3),w=d&&l&&wa(b*3),T=d&&wa(b),C=a.master.getRect(),M=v?C.width:C.height,D,I=S.getStore(),L=0;(D=_.next())!=null;){var k=I.get(c?g:o,D),R=I.get(s,D),P=h,O=void 0;c&&(O=+k-I.get(o,D));var E=void 0,B=void 0,V=void 0,H=void 0;if(v){var W=a.dataToPoint([k,R]);if(c){var X=a.dataToPoint([O,R]);P=X[0]}E=P,B=W[1]+m,V=W[0]-P,H=y,Math.abs(V)0?e:1:e))}var i3=function(r,t,e,a){for(;e>>1;r[n][1]n&&(this._approxInterval=n);var o=Cf.length,s=Math.min(i3(Cf,this._approxInterval,0,o),o-1);this._interval=Cf[s][1],this._intervalPrecision=pu(this._interval),this._minLevelUnit=Cf[Math.max(s-1,0)][0]},t.prototype.parse=function(e){return Pt(e)?e:+ho(e)},t.prototype.contain=function(e){return b0(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.type="time",t}(Un),Cf=[["second",qm],["minute",Km],["hour",$l],["quarter-day",$l*6],["half-day",$l*12],["day",Or*1.2],["half-week",Or*3.5],["week",Or*7],["month",Or*31],["quarter",Or*95],["half-year",gS/2],["year",gS]];function X2(r,t,e,a){return Zg(new Date(t),r,a).getTime()===Zg(new Date(e),r,a).getTime()}function o3(r,t){return r/=Or,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function s3(r){var t=30*Or;return r/=t,r>6?6:r>3?3:r>2?2:1}function l3(r){return r/=$l,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function Lx(r,t){return r/=t?Km:qm,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function u3(r){return BM(r,!0)}function f3(r,t,e){var a=Math.max(0,bt(hr,t)-1);return Zg(new Date(r),hr[a],e).getTime()}function c3(r,t){var e=new Date(0);e[r](1);var a=e.getTime();e[r](1+t);var n=e.getTime()-a;return function(i,o){return Math.max(0,Math.round((o-i)/n))}}function v3(r,t,e,a,n,i){var o=1e4,s=yV,l=0;function u(L,k,R,P,O,E,B){for(var V=c3(O,L),H=k,W=new Date(H);Ho));)if(W[O](W[P]()+L),H=W.getTime(),i){var X=i.calcNiceTickMultiple(H,V);X>0&&(W[O](W[P]()+X*L),H=W.getTime())}B.push({value:H,notAdd:!0})}function f(L,k,R){var P=[],O=!k.length;if(!X2(Ul(L),a[0],a[1],e)){O&&(k=[{value:f3(a[0],L,e)},{value:a[1]}]);for(var E=0;E=a[0]&&B<=a[1]&&u(H,B,V,W,X,j,P),L==="year"&&R.length>1&&E===0&&R.unshift({value:R[0].value-H})}}for(var E=0;E=a[0]&&S<=a[1]&&h++)}var b=n/t;if(h>b*1.5&&d>b/1.5||(c.push(m),h>b||r===s[p]))break}v=[]}}}for(var x=Ft(Y(c,function(L){return Ft(L,function(k){return k.value>=a[0]&&k.value<=a[1]&&!k.notAdd})}),function(L){return L.length>0}),w=[],T=x.length-1,p=0;p0;)i*=10;var s=[dy(d3(a[0]/i)*i),dy(h3(a[1]/i)*i)];this._interval=i,this._intervalPrecision=pu(i),this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){r.prototype.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.contain=function(e){return e=Mf(e)/Mf(this.base),r.prototype.contain.call(this,e)},t.prototype.normalize=function(e){return e=Mf(e)/Mf(this.base),r.prototype.normalize.call(this,e)},t.prototype.scale=function(e){return e=r.prototype.scale.call(this,e),Af(this.base,e)},t.prototype.setBreaksFromOption=function(e){var a=pe();if(a){var n=a.logarithmicParseBreaksFromOption(e,this.base,tt(this.parse,this)),i=n.parsedOriginal,o=n.parsedLogged;this._originalScale._innerSetBreak(i),this._innerSetBreak(o)}},t.type="log",t}(Un);function Df(r,t){return dy(r,xa(t))}xo.registerClass(K2);const p3=K2;var g3=function(){function r(t,e,a){this._prepareParams(t,e,a)}return r.prototype._prepareParams=function(t,e,a){a[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var v=this._determinedMin,h=this._determinedMax;return v!=null&&(s=v,u=!0),h!=null&&(l=h,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:c}},r.prototype.modifyDataMinMax=function(t,e){this[m3[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var a=y3[t];this[a]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),y3={min:"_determinedMin",max:"_determinedMax"},m3={min:"_dataMin",max:"_dataMax"};function j2(r,t,e){var a=r.rawExtentInfo;return a||(a=new g3(r,t,e),r.rawExtentInfo=a,a)}function Lf(r,t){return t==null?null:Ue(t)?NaN:r.parse(t)}function J2(r,t){var e=r.type,a=j2(r,t,r.getExtent()).calculate();r.setBlank(a.isBlank);var n=a.min,i=a.max,o=t.ecModel;if(o&&e==="time"){var s=G2("bar",o),l=!1;if(A(s,function(c){l=l||c.getBaseAxis()===t.axis}),l){var u=F2(s),f=_3(n,i,t,u);n=f.min,i=f.max}}return{extent:[n,i],fixMin:a.minFixed,fixMax:a.maxFixed}}function _3(r,t,e,a){var n=e.axis.getExtent(),i=Math.abs(n[1]-n[0]),o=a3(a,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;A(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;A(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-r,c=1-(s+l)/i,v=f/c-f;return t+=v*(l/u),r-=v*(s/u),{min:r,max:t}}function bs(r,t){var e=t,a=J2(r,e),n=a.extent,i=e.get("splitNumber");r instanceof p3&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(tI(e)),r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:i,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function hh(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new yu({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new q2({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(xo.getClass(t)||Un)}}function S3(r){var t=r.scale.getExtent(),e=t[0],a=t[1];return!(e>0&&a>0||e<0&&a<0)}function Ws(r){var t=r.getLabelModel().get("formatter");if(r.type==="time"){var e=mV(t);return function(n,i){return r.scale.getFormattedLabel(n,i,e)}}else{if(Q(t))return function(n){var i=r.scale.getLabel(n),o=t.replace("{value}",i??"");return o};if(ot(t)){if(r.type==="category")return function(n,i){return t(nv(r,n),n.value-r.scale.getExtent()[0],null)};var a=pe();return function(n,i){var o=null;return a&&(o=a.makeAxisLabelFormatterParamBreak(o,n.break)),t(nv(r,n),i,o)}}else return function(n){return r.scale.getLabel(n)}}}function nv(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function C0(r){var t=r.get("interval");return t??"auto"}function Q2(r){return r.type==="category"&&C0(r.getLabelModel())===0}function iv(r,t){var e={};return A(r.mapDimensionsAll(t),function(a){e[O2(r,a)]=!0}),It(e)}function x3(r,t,e){t&&A(iv(t,e),function(a){var n=t.getApproximateExtent(a);n[0]r[1]&&(r[1]=n[1])})}function ws(r){return r==="middle"||r==="center"}function mu(r){return r.getShallow("show")}function tI(r){var t=r.get("breaks",!0);if(t!=null)return!pe()||!b3(r.axis)?void 0:t}function b3(r){return(r.dim==="x"||r.dim==="y"||r.dim==="z"||r.dim==="single")&&r.type!=="category"}var Vu=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}(),w3=1e-8;function Ix(r,t){return Math.abs(r-t)n&&(a=o,n=l)}if(a)return C3(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var a=this._rect;if(a&&!e)return a;var n=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return A(o,function(s){s.type==="polygon"?Px(s.exterior,n,i,e):A(s.points,function(l){Px(l,n,i,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),a=new dt(n[0],n[1],i[0]-n[0],i[1]-n[1]),e||(this._rect=a),a},t.prototype.contain=function(e){var a=this.getBoundingRect(),n=this.geometries;if(!a.contain(e[0],e[1]))return!1;t:for(var i=0,o=n.length;i>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=i,n=s,i=l,a.push([s/e,l/e])}return a}function D3(r,t){return r=M3(r),Y(Ft(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var a=e.properties,n=e.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new kx(o[0],o.slice(1)));break;case"MultiPolygon":A(n.coordinates,function(l){l[0]&&i.push(new kx(l[0],l.slice(1)))});break;case"LineString":i.push(new Rx([n.coordinates]));break;case"MultiLineString":i.push(new Rx(n.coordinates))}var s=new rI(a[t||"name"],i,a.cp);return s.properties=a,s})}var L3=Dt(),Xl=Dt(),ea={estimate:1,determine:2};function ov(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function nI(r,t){var e=Y(t,function(a){return r.scale.parse(a)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function I3(r,t){var e=r.getLabelModel().get("customValues");if(e){var a=Ws(r),n=r.scale.getExtent(),i=nI(r,e),o=Ft(i,function(s){return s>=n[0]&&s<=n[1]});return{labels:Y(o,function(s){var l={value:s};return{formattedLabel:a(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?k3(r,t):E3(r)}function P3(r,t,e){var a=r.getTickModel().get("customValues");if(a){var n=r.scale.getExtent(),i=nI(r,a);return{ticks:Ft(i,function(o){return o>=n[0]&&o<=n[1]})}}return r.type==="category"?R3(r,t):{ticks:Y(r.scale.getTicks(e),function(o){return o.value})}}function k3(r,t){var e=r.getLabelModel(),a=iI(r,e,t);return!e.get("show")||r.scale.isBlank()?{labels:[]}:a}function iI(r,t,e){var a=N3(r),n=C0(t),i=e.kind===ea.estimate;if(!i){var o=sI(a,n);if(o)return o}var s,l;ot(n)?s=fI(r,n):(l=n==="auto"?B3(r,e):n,s=uI(r,l));var u={labels:s,labelCategoryInterval:l};return i?e.out.noPxChangeTryDetermine.push(function(){return py(a,n,u),!0}):py(a,n,u),u}function R3(r,t){var e=O3(r),a=C0(t),n=sI(e,a);if(n)return n;var i,o;if((!t.get("show")||r.scale.isBlank())&&(i=[]),ot(a))i=fI(r,a,!0);else if(a==="auto"){var s=iI(r,r.getLabelModel(),ov(ea.determine));o=s.labelCategoryInterval,i=Y(s.labels,function(l){return l.tickValue})}else o=a,i=uI(r,o,!0);return py(e,a,{ticks:i,tickCategoryInterval:o})}function E3(r){var t=r.scale.getTicks(),e=Ws(r);return{labels:Y(t,function(a,n){return{formattedLabel:e(a,n),rawLabel:r.scale.getLabel(a),tickValue:a.value,time:a.time,break:a.break}})}}var O3=oI("axisTick"),N3=oI("axisLabel");function oI(r){return function(e){return Xl(e)[r]||(Xl(e)[r]={list:[]})}}function sI(r,t){for(var e=0;ef&&(u=Math.max(1,Math.floor(l/f)));for(var c=s[0],v=r.dataToCoord(c+1)-r.dataToCoord(c),h=Math.abs(v*Math.cos(i)),d=Math.abs(v*Math.sin(i)),p=0,g=0;c<=s[1];c+=u){var y=0,m=0,_=Uv(n({value:c}),a.font,"center","top");y=_.width*1.3,m=_.height*1.3,p=Math.max(p,y,7),g=Math.max(g,m,7)}var S=p/h,b=g/d;isNaN(S)&&(S=1/0),isNaN(b)&&(b=1/0);var x=Math.max(0,Math.floor(Math.min(S,b)));if(e===ea.estimate)return t.out.noPxChangeTryDetermine.push(tt(V3,null,r,x,l)),x;var w=lI(r,x,l);return w??x}function V3(r,t,e){return lI(r,t,e)==null}function lI(r,t,e){var a=L3(r.model),n=r.getExtent(),i=a.lastAutoInterval,o=a.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-t)<=1&&Math.abs(o-e)<=1&&i>t&&a.axisExtent0===n[0]&&a.axisExtent1===n[1])return i;a.lastTickCount=e,a.lastAutoInterval=t,a.axisExtent0=n[0],a.axisExtent1=n[1]}function G3(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function uI(r,t,e){var a=Ws(r),n=r.scale,i=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=i[0],f=n.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=Q2(r),v=o.get("showMinLabel")||c,h=o.get("showMaxLabel")||c;v&&u!==i[0]&&p(i[0]);for(var d=u;d<=i[1];d+=l)p(d);h&&d-l!==i[1]&&p(i[1]);function p(g){var y={value:g};s.push(e?g:{formattedLabel:a(y),rawLabel:n.getLabel(y),tickValue:g,time:void 0,break:void 0})}return s}function fI(r,t,e){var a=r.scale,n=Ws(r),i=[];return A(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;t(o.value,s)&&i.push(e?l:{formattedLabel:n(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),i}var Ex=[0,1],F3=function(){function r(t,e,a){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=a||[0,0]}return r.prototype.contain=function(t){var e=this._extent,a=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=a&&t<=n},r.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return OM(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var a=this._extent;a[0]=t,a[1]=e},r.prototype.dataToCoord=function(t,e){var a=this._extent,n=this.scale;return t=n.normalize(n.parse(t)),this.onBand&&n.type==="ordinal"&&(a=a.slice(),Ox(a,n.count())),Gt(t,Ex,a,e)},r.prototype.coordToData=function(t,e){var a=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(a=a.slice(),Ox(a,n.count()));var i=Gt(t,a,Ex,e);return this.scale.scale(i)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),a=P3(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),n=a.ticks,i=Y(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return H3(this,i,o,t.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var a=this.scale.getMinorTicks(e),n=Y(a,function(i){return Y(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(t){return t=t||ov(ea.determine),I3(this,t).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),a=e[1]-e[0]+(this.onBand?1:0);a===0&&(a=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/a},r.prototype.calculateCategoryInterval=function(t){return t=t||ov(ea.determine),z3(this,t)},r}();function Ox(r,t){var e=r[1]-r[0],a=t,n=e/a/2;r[0]+=n,r[1]-=n}function H3(r,t,e,a){var n=t.length;if(!r.onBand||e||!n)return;var i=r.getExtent(),o,s;if(n===1)t[0].coord=i[0],t[0].onBand=!0,o=t[1]={coord:i[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[n-1].tickValue-t[0].tickValue,u=(t[n-1].coord-t[0].coord)/l;A(t,function(h){h.coord-=u/2,h.onBand=!0});var f=r.scale.getExtent();s=1+f[1]-t[n-1].tickValue,o={coord:t[n-1].coord+u*s,tickValue:f[1]+1,onBand:!0},t.push(o)}var c=i[0]>i[1];v(t[0].coord,i[0])&&(a?t[0].coord=i[0]:t.shift()),a&&v(i[0],t[0].coord)&&t.unshift({coord:i[0],onBand:!0}),v(i[1],o.coord)&&(a?o.coord=i[1]:t.pop()),a&&v(o.coord,i[1])&&t.push({coord:i[1],onBand:!0});function v(h,d){return h=de(h),d=de(d),c?h>d:hn&&(n+=ll);var h=Math.atan2(s,o);if(h<0&&(h+=ll),h>=a&&h<=n||h+ll>=a&&h+ll<=n)return l[0]=f,l[1]=c,u-e;var d=e*Math.cos(a)+r,p=e*Math.sin(a)+t,g=e*Math.cos(n)+r,y=e*Math.sin(n)+t,m=(d-o)*(d-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=d,l[1]=p,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function sv(r,t,e,a,n,i,o,s){var l=n-r,u=i-t,f=e-r,c=a-t,v=Math.sqrt(f*f+c*c);f/=v,c/=v;var h=l*f+u*c,d=h/v;s&&(d=Math.min(Math.max(d,0),1)),d*=v;var p=o[0]=r+d*f,g=o[1]=t+d*c;return Math.sqrt((p-n)*(p-n)+(g-i)*(g-i))}function cI(r,t,e,a,n,i,o){e<0&&(r=r+e,e=-e),a<0&&(t=t+a,a=-a);var s=r+e,l=t+a,u=o[0]=Math.min(Math.max(n,r),s),f=o[1]=Math.min(Math.max(i,t),l);return Math.sqrt((u-n)*(u-n)+(f-i)*(f-i))}var Zr=[];function Y3(r,t,e){var a=cI(t.x,t.y,t.width,t.height,r.x,r.y,Zr);return e.set(Zr[0],Zr[1]),a}function Z3(r,t,e){for(var a=0,n=0,i=0,o=0,s,l,u=1/0,f=t.data,c=r.x,v=r.y,h=0;h0){t=t/180*Math.PI,Xr.fromArray(r[0]),qt.fromArray(r[1]),le.fromArray(r[2]),ct.sub(Ta,Xr,qt),ct.sub(_a,le,qt);var e=Ta.len(),a=_a.len();if(!(e<.001||a<.001)){Ta.scale(1/e),_a.scale(1/a);var n=Ta.dot(_a),i=Math.cos(t);if(i1&&ct.copy(Qe,le),Qe.toArray(r[1])}}}}function X3(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,Xr.fromArray(r[0]),qt.fromArray(r[1]),le.fromArray(r[2]),ct.sub(Ta,qt,Xr),ct.sub(_a,le,qt);var a=Ta.len(),n=_a.len();if(!(a<.001||n<.001)){Ta.scale(1/a),_a.scale(1/n);var i=Ta.dot(t),o=Math.cos(e);if(i=l)ct.copy(Qe,le);else{Qe.scaleAndAdd(_a,s/Math.tan(Math.PI/2-f));var c=le.x!==qt.x?(Qe.x-qt.x)/(le.x-qt.x):(Qe.y-qt.y)/(le.y-qt.y);if(isNaN(c))return;c<0?ct.copy(Qe,qt):c>1&&ct.copy(Qe,le)}Qe.toArray(r[1])}}}}function Od(r,t,e,a){var n=e==="normal",i=n?r:r.ensureState(e);i.ignore=t;var o=a.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();n?r.useStyle(s):i.style=s}function q3(r,t){var e=t.smooth,a=t.points;if(a)if(r.moveTo(a[0][0],a[0][1]),e>0&&a.length>=3){var n=An(a[0],a[1]),i=An(a[1],a[2]);if(!n||!i){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(n,i)*e,s=uc([],a[1],a[0],o/n),l=uc([],a[1],a[2],o/i),u=uc([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],a[2][0],a[2][1])}else for(var f=1;f0&&n&&x(-c/i,0,i);var g=r[0],y=r[i-1],m,_;S(),m<0&&w(-m,.8),_<0&&w(_,.8),S(),b(m,_,1),b(_,m,-1),S(),m<0&&T(-m),_<0&&T(_);function S(){m=g.rect[o]-e,_=a-y.rect[o]-y.rect[s]}function b(C,M,D){if(C<0){var I=Math.min(M,-C);if(I>0){x(I*D,0,i);var L=I+C;L<0&&w(-L*D,1)}else w(-C*D,1)}}function x(C,M,D){C!==0&&(f=!0);for(var I=M;I0)for(var L=0;L0;L--){var O=D[L-1]*P;x(-O,L,i)}}}function T(C){var M=C<0?-1:1;C=Math.abs(C);for(var D=Math.ceil(C/(i-1)),I=0;I0?x(D,0,I+1):x(-D,i-I-1,i),C-=D,C<=0)return}return f}function J3(r){for(var t=0;t=0&&a.attr(i.oldLayoutSelect),bt(v,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),Et(a,u,e,l)}else if(a.attr(u),!Bs(a).valueAnimation){var c=nt(a.style.opacity,1);a.style.opacity=0,jt(a,{style:{opacity:c}},e,l)}if(i.oldLayout=u,a.states.select){var h=i.oldLayoutSelect={};If(h,u,Pf),If(h,a.states.select,Pf)}if(a.states.emphasis){var d=i.oldLayoutEmphasis={};If(d,u,Pf),If(d,a.states.emphasis,Pf)}ZD(a,l,f,e,e)}if(n&&!n.ignore&&!n.invisible){var i=eH(n),o=i.oldLayout,p={points:n.shape.points};o?(n.attr({shape:o}),Et(n,{shape:p},e)):(n.setShape(p),n.style.strokePercent=0,jt(n,{style:{strokePercent:1}},e)),i.oldLayout=p}},r}();const aH=rH;var zd=Dt();function nH(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){var n=zd(e).labelManager;n||(n=zd(e).labelManager=new aH),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,a){var n=zd(e).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(e.getViewOfSeriesModel(i))}),n.updateLayoutConfig(e),n.layout(e),n.processLabelsOverall()})}var Vd=Math.sin,Gd=Math.cos,yI=Math.PI,Ti=Math.PI*2,iH=180/yI,oH=function(){function r(){}return r.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},r.prototype.moveTo=function(t,e){this._add("M",t,e)},r.prototype.lineTo=function(t,e){this._add("L",t,e)},r.prototype.bezierCurveTo=function(t,e,a,n,i,o){this._add("C",t,e,a,n,i,o)},r.prototype.quadraticCurveTo=function(t,e,a,n){this._add("Q",t,e,a,n)},r.prototype.arc=function(t,e,a,n,i,o){this.ellipse(t,e,a,a,0,n,i,o)},r.prototype.ellipse=function(t,e,a,n,i,o,s,l){var u=s-o,f=!l,c=Math.abs(u),v=Pn(c-Ti)||(f?u>=Ti:-u>=Ti),h=u>0?u%Ti:u%Ti+Ti,d=!1;v?d=!0:Pn(c)?d=!1:d=h>=yI==!!f;var p=t+a*Gd(o),g=e+n*Vd(o);this._start&&this._add("M",p,g);var y=Math.round(i*iH);if(v){var m=1/this._p,_=(f?1:-1)*(Ti-m);this._add("A",a,n,y,1,+f,t+a*Gd(o+_),e+n*Vd(o+_)),m>.01&&this._add("A",a,n,y,0,+f,p,g)}else{var S=t+a*Gd(s),b=e+n*Vd(s);this._add("A",a,n,y,+d,+f,S,b)}},r.prototype.rect=function(t,e,a,n){this._add("M",t,e),this._add("l",a,0),this._add("l",0,n),this._add("l",-a,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(t,e,a,n,i,o,s,l,u){for(var f=[],c=this._p,v=1;v"}function pH(r){return""}function D0(r,t){t=t||{};var e=t.newline?` `:"";function a(n){var i=n.children,o=n.tag,s=n.attrs,l=n.text;return dH(o,s)+(o!=="style"?$e(l):l||"")+(i?""+e+Y(i,function(u){return a(u)}).join(e)+e:"")+pH(o)}return a(r)}function gH(r,t,e){e=e||{};var a=e.newline?` `:"",n=" {"+a,i=a+"}",o=Y(It(r),function(l){return l+n+Y(It(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+i}).join(a),s=Y(It(t),function(l){return"@keyframes "+l+n+Y(It(t[l]),function(u){return u+n+Y(It(t[l][u]),function(f){var c=t[l][u][f];return f==="d"&&(c='path("'+c+'")'),f+":"+c+";"}).join(a)+i}).join(a)+i}).join(a);return!o&&!s?"":[""].join(a)}function Sy(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Fx(r,t,e,a){return Le("svg","root",{width:r,height:t,xmlns:_I,"xmlns:xlink":SI,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+t:!1},e)}var yH=0;function bI(){return yH++}var Hx={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"},Mi="transform-origin";function mH(r,t,e){var a=$({},r.shape);$(a,t),r.buildPath(e,a);var n=new mI;return n.reset(TM(r)),e.rebuildPath(n,1),n.generateStr(),n.getStr()}function _H(r,t){var e=t.originX,a=t.originY;(e||a)&&(r[Mi]=e+"px "+a+"px")}var SH={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function wI(r,t){var e=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[e]=r,e}function xH(r,t,e){var a=r.shape.paths,n={},i,o;if(A(a,function(l){var u=Sy(e.zrId);u.animation=!0,ph(l,{},u,!0);var f=u.cssAnims,c=u.cssNodes,v=It(f),h=v.length;if(h){o=v[h-1];var d=f[o];for(var p in d){var g=d[p];n[p]=n[p]||{d:""},n[p].d+=g.d||""}for(var y in c){var m=c[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){t.d=!1;var s=wI(n,e);return i.replace(o,s)}}function Wx(r){return Q(r)?Hx[r]?"cubic-bezier("+Hx[r]+")":Tm(r)?r:"":""}function ph(r,t,e,a){var n=r.animators,i=n.length,o=[];if(r instanceof rh){var s=xH(r,t,e);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u0}).length){var St=wI(w,e);return St+" "+m[0]+" both"}}for(var g in l){var s=p(l[g]);s&&o.push(s)}if(o.length){var y=e.zrId+"-cls-"+bI();e.cssNodes["."+y]={animation:o.join(",")},t.class=y}}function bH(r,t,e){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};$x(a,t,e,!0)}else{var n=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},i=n.fill;if(!i){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(i=_g(l))}var u=n.lineWidth;if(u){var f=!n.strokeNoScale&&r.transform?r.transform[0]:1;u=u/f}var a={cursor:"pointer"};i&&(a.fill=i),n.stroke&&(a.stroke=n.stroke),u&&(a["stroke-width"]=u),$x(a,t,e,!0)}}function $x(r,t,e,a){var n=JSON.stringify(r),i=e.cssStyleCache[n];i||(i=e.zrId+"-cls-"+bI(),e.cssStyleCache[n]=i,e.cssNodes["."+i+(a?":hover":"")]=r),t.class=t.class?t.class+" "+i:i}var _u=Math.round;function TI(r){return r&&Q(r.src)}function CI(r){return r&&ot(r.toDataURL)}function L0(r,t,e,a){cH(function(n,i){var o=n==="fill"||n==="stroke";o&&wM(i)?MI(t,r,n,a):o&&Cm(i)?DI(e,r,n,a):r[n]=i,o&&a.ssr&&i==="none"&&(r["pointer-events"]="visible")},t,e,!1),LH(e,r,a)}function I0(r,t){var e=CN(t);e&&(e.each(function(a,n){a!=null&&(r[(Gx+n).toLowerCase()]=a+"")}),t.isSilent()&&(r[Gx+"silent"]="true"))}function Ux(r){return Pn(r[0]-1)&&Pn(r[1])&&Pn(r[2])&&Pn(r[3]-1)}function wH(r){return Pn(r[4])&&Pn(r[5])}function P0(r,t,e){if(t&&!(wH(t)&&Ux(t))){var a=e?10:1e4;r.transform=Ux(t)?"translate("+_u(t[4]*a)/a+" "+_u(t[5]*a)/a+")":$O(t)}}function Yx(r,t,e){for(var a=r.points,n=[],i=0;i"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Ze(v,g),Ze(h,g)}else if(v==null||h==null){var y=function(M,D){if(M){var I=M.elm,L=v||D.width,k=h||D.height;M.tag==="pattern"&&(u?(k=1,L/=i.width):f&&(L=1,k/=i.height)),M.attrs.width=L,M.attrs.height=k,I&&(I.setAttribute("width",L),I.setAttribute("height",k))}},m=km(d,null,r,function(M){l||y(x,M),y(c,M)});m&&m.width&&m.height&&(v=v||m.width,h=h||m.height)}c=Le("image","img",{href:d,width:v,height:h}),o.width=v,o.height=h}else n.svgElement&&(c=st(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(c){var _,S;l?_=S=1:u?(S=1,_=o.width/i.width):f?(_=1,S=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),S!=null&&!isNaN(S)&&(o.height=S);var b=CM(n);b&&(o.patternTransform=b);var x=Le("pattern","",o,[c]),w=D0(x),T=a.patternCache,C=T[w];C||(C=a.zrId+"-p"+a.patternIdx++,T[w]=C,o.id=C,x=a.defs[C]=Le("pattern",C,o,[c])),t[e]=$v(C)}}function IH(r,t,e){var a=e.clipPathCache,n=e.defs,i=a[r.id];if(!i){i=e.zrId+"-c"+e.clipPathIdx++;var o={id:i};a[r.id]=i,n[i]=Le("clipPath",i,o,[AI(r,e)])}t["clip-path"]=$v(i)}function qx(r){return document.createTextNode(r)}function Ei(r,t,e){r.insertBefore(t,e)}function Kx(r,t){r.removeChild(t)}function jx(r,t){r.appendChild(t)}function LI(r){return r.parentNode}function II(r){return r.nextSibling}function Fd(r,t){r.textContent=t}var Jx=58,PH=120,kH=Le("","");function xy(r){return r===void 0}function ga(r){return r!==void 0}function RH(r,t,e){for(var a={},n=t;n<=e;++n){var i=r[n].key;i!==void 0&&(a[i]=n)}return a}function kl(r,t){var e=r.key===t.key,a=r.tag===t.tag;return a&&e}function Su(r){var t,e=r.children,a=r.tag;if(ga(a)){var n=r.elm=xI(a);if(k0(kH,r),U(e))for(t=0;ti?(d=e[l+1]==null?null:e[l+1].elm,PI(r,d,e,n,l)):cv(r,t,a,i))}function ts(r,t){var e=t.elm=r.elm,a=r.children,n=t.children;r!==t&&(k0(r,t),xy(t.text)?ga(a)&&ga(n)?a!==n&&EH(e,a,n):ga(n)?(ga(r.text)&&Fd(e,""),PI(e,null,n,0,n.length-1)):ga(a)?cv(e,a,0,a.length-1):ga(r.text)&&Fd(e,""):r.text!==t.text&&(ga(a)&&cv(e,a,0,a.length-1),Fd(e,t.text)))}function OH(r,t){if(kl(r,t))ts(r,t);else{var e=r.elm,a=LI(e);Su(t),a!==null&&(Ei(a,t.elm,II(e)),cv(a,[r],0,0))}return t}var NH=0,BH=function(){function r(t,e,a){if(this.type="svg",this.refreshHover=Qx(),this.configLayer=Qx(),this.storage=e,this._opts=a=$({},a),this.root=t,this._id="zr"+NH++,this._oldVNode=Fx(a.width,a.height),t&&!a.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=xI("svg");k0(null,this._oldVNode),n.appendChild(i),t.appendChild(n)}this.resize(a.width,a.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",OH(this._oldVNode,t),this._oldVNode=t}},r.prototype.renderOneToVNode=function(t){return Xx(t,Sy(this._id))},r.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),a=this._width,n=this._height,i=Sy(this._id);i.animation=t.animation,i.willUpdate=t.willUpdate,i.compress=t.compress,i.emphasis=t.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=zH(a,n,this._backgroundColor,i);s&&o.push(s);var l=t.compress?null:this._mainVNode=Le("g","main",{},[]);this._paintList(e,i,l?l.children:o),l&&o.push(l);var u=Y(It(i.defs),function(v){return i.defs[v]});if(u.length&&o.push(Le("defs","defs",{},u)),t.animation){var f=gH(i.cssNodes,i.cssAnims,{newline:!0});if(f){var c=Le("style","stl",{},[],f);o.push(c)}}return Fx(a,n,o,t.useViewBox)},r.prototype.renderToString=function(t){return t=t||{},D0(this.renderToVNode({animation:nt(t.cssAnimation,!0),emphasis:nt(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:nt(t.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(t,e,a){for(var n=t.length,i=[],o=0,s,l,u=0,f=0;f=0&&!(v&&l&&v[p]===l[p]);p--);for(var g=d-1;g>p;g--)o--,s=i[o-1];for(var y=p+1;y=s)}}for(var c=this.__startIndex;c15)break}}k.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var M=h.dpr,D=0;D0&&t>n[0]){for(l=0;lt);l++);s=a[n[l]]}if(n.splice(l+1,0,t),a[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(e.dom,u.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},r.prototype.eachLayer=function(t,e){for(var a=this._zlevelList,n=0;n0?kf:0),this._needsManuallyCompositing),f.__builtin__||ym("ZLevel "+u+" has been used by unkown layer "+f.id),f!==i&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,e(l),i=f),n.__dirty&gr&&!n.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(c,v){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,A(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var a=this._layerConfig;a[t]?wt(a[t],e,!0):a[t]=e;for(var n=0;n-1&&(u.style.stroke=u.style.fill,u.style.fill=G.color.neutral00,u.style.lineWidth=2),a},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},t}(te);const qH=XH;function Ts(r,t){var e=r.mapDimensionsAll("defaultedLabel"),a=e.length;if(a===1){var n=Ss(r,t,e[0]);return n!=null?n+"":null}else if(a){for(var i=[],o=0;o=0&&a.push(t[i])}return a.join(" ")}var KH=function(r){z(t,r);function t(e,a,n,i){var o=r.call(this)||this;return o.updateData(e,a,n,i),o}return t.prototype._createSymbol=function(e,a,n,i,o,s){this.removeAll();var l=me(e,-1,-1,2,2,null,s);l.attr({z2:nt(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=jH,this._symbolType=e,this.add(l)},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(){rn(this.childAt(0))},t.prototype.downplay=function(){an(this.childAt(0))},t.prototype.setZ=function(e,a){var n=this.childAt(0);n.zlevel=e,n.z=a},t.prototype.setDraggable=function(e,a){var n=this.childAt(0);n.draggable=e,n.cursor=!a&&e?"move":n.cursor},t.prototype.updateData=function(e,a,n,i){this.silent=!1;var o=e.getItemVisual(a,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,a),u=t.getSymbolZ2(e,a),f=o!==this._symbolType,c=i&&i.disableAnimation;if(f){var v=e.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,e,a,l,u,v)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};c?h.attr(d):Et(h,d,s,a),Gr(h)}if(this._updateCommon(e,a,l,n,i),f){var h=this.childAt(0);if(!c){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,jt(h,d,s,a)}}c&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,a,n,i,o){var s=this.childAt(0),l=e.hostModel,u,f,c,v,h,d,p,g,y;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,c=i.selectItemStyle,v=i.focus,h=i.blurScope,p=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,d=i.emphasisDisabled),!i||e.hasItemOption){var m=i&&i.itemModel?i.itemModel:e.getItemModel(a),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),c=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),v=_.get("focus"),h=_.get("blurScope"),d=_.get("disabled"),p=Te(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=e.getItemVisual(a,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var b=_o(e.getItemVisual(a,"symbolOffset"),n);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var x=e.getItemVisual(a,"style"),w=x.fill;if(s instanceof Fe){var T=s.style;s.useStyle($({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle($({},x)):s.useStyle(x),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=e.getItemVisual(a,"liftZ"),M=this._z2;C!=null?M==null&&(this._z2=s.z2,s.z2+=C):M!=null&&(s.z2=M,this._z2=null);var D=o&&o.useNameLabel;Ie(s,p,{labelFetcher:l,labelDataIndex:a,defaultText:I,inheritColor:w,defaultOpacity:x.opacity});function I(R){return D?e.getName(R):Ts(e,R)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=f;var k=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;L.scaleX=this._sizeX*k,L.scaleY=this._sizeY*k,this.setSymbolScale(1),Jt(this,v,h,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,a,n){var i=this.childAt(0),o=pt(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&Wn(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Wn(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,a){return Hs(e.getItemVisual(a,"symbolSize"))},t.getSymbolZ2=function(e,a){return e.getItemVisual(a,"z2")},t}(lt);function jH(r,t){this.parent.drift(r,t)}const Gu=KH;function Wd(r,t,e,a){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(a.isIgnore&&a.isIgnore(e))&&!(a.clipShape&&!a.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function rb(r){return r!=null&&!ht(r)&&(r={isIgnore:r}),r||{}}function ab(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:Te(t),cursorStyle:t.get("cursor")}}var JH=function(){function r(t){this.group=new lt,this._SymbolCtor=t||Gu}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=rb(e);var a=this.group,n=t.hostModel,i=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=ab(t),u={disableAnimation:s},f=e.getSymbolPoint||function(c){return t.getItemLayout(c)};i||a.removeAll(),t.diff(i).add(function(c){var v=f(c);if(Wd(t,v,c,e)){var h=new o(t,c,l,u);h.setPosition(v),t.setItemGraphicEl(c,h),a.add(h)}}).update(function(c,v){var h=i.getItemGraphicEl(v),d=f(c);if(!Wd(t,d,c,e)){a.remove(h);return}var p=t.getItemVisual(c,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==p)a.remove(h),h=new o(t,c,l,u),h.setPosition(d);else{h.updateData(t,c,l,u);var y={x:d[0],y:d[1]};s?h.attr(y):Et(h,y,n)}a.add(h),t.setItemGraphicEl(c,h)}).remove(function(c){var v=i.getItemGraphicEl(c);v&&v.fadeOut(function(){a.remove(v)},n)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(a,n){var i=t._getSymbolPoint(n);a.setPosition(i),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=ab(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,a){this._progressiveEls=[],a=rb(a);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i0?e=a[0]:a[1]<0&&(e=a[1]),e}function EI(r,t,e,a){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=e.get(r.baseDim,a),o[1-i]=n,t.dataToPoint(o)}function t4(r,t){var e=[];return t.diff(r).add(function(a){e.push({cmd:"+",idx:a})}).update(function(a,n){e.push({cmd:"=",idx:n,idx1:a})}).remove(function(a){e.push({cmd:"-",idx:a})}).execute(),e}function e4(r,t,e,a,n,i,o,s){for(var l=t4(r,t),u=[],f=[],c=[],v=[],h=[],d=[],p=[],g=RI(n,t,o),y=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_=n||p<0)break;if(Qi(y,m)){if(l){p+=i;continue}break}if(p===e)r[i>0?"moveTo":"lineTo"](y,m),c=y,v=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){p+=i;continue}if(o>0){for(var b=p+i,x=t[b*2],w=t[b*2+1];x===y&&w===m&&g=a||Qi(x,w))h=y,d=m;else{M=x-u,D=w-f;var k=y-u,R=x-y,P=m-f,O=w-m,E=void 0,B=void 0;if(s==="x"){E=Math.abs(k),B=Math.abs(R);var V=M>0?1:-1;h=y-V*E*o,d=m,I=y+V*B*o,L=m}else if(s==="y"){E=Math.abs(P),B=Math.abs(O);var H=D>0?1:-1;h=y,d=m-H*E*o,I=y,L=m+H*B*o}else E=Math.sqrt(k*k+P*P),B=Math.sqrt(R*R+O*O),C=B/(B+E),h=y-M*o*(1-C),d=m-D*o*(1-C),I=y+M*o*C,L=m+D*o*C,I=mn(I,_n(x,y)),L=mn(L,_n(w,m)),I=_n(I,mn(x,y)),L=_n(L,mn(w,m)),M=I-y,D=L-m,h=y-M*E/B,d=m-D*E/B,h=mn(h,_n(u,y)),d=mn(d,_n(f,m)),h=_n(h,mn(u,y)),d=_n(d,mn(f,m)),M=y-h,D=m-d,I=y+M*B/E,L=m+D*B/E}r.bezierCurveTo(c,v,h,d,y,m),c=I,v=L}else r.lineTo(y,m)}u=y,f=m,p+=i}return g}var OI=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),r4=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polyline",a}return t.prototype.getDefaultStyle=function(){return{stroke:G.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new OI},t.prototype.buildPath=function(e,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&Qi(n[o*2-2],n[o*2-1]);o--);for(;i=0){var S=u?(d-l)*_+l:(h-s)*_+s;return u?[e,S]:[S,e]}s=h,l=d;break;case o.C:h=i[c++],d=i[c++],p=i[c++],g=i[c++],y=i[c++],m=i[c++];var b=u?Ec(s,h,p,y,e,f):Ec(l,d,g,m,e,f);if(b>0)for(var x=0;x=0){var S=u?De(l,d,g,m,w):De(s,h,p,y,w);return u?[e,S]:[S,e]}}s=y,l=m;break}}},t}(Lt),a4=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(OI),NI=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polygon",a}return t.prototype.getDefaultShape=function(){return new a4},t.prototype.buildPath=function(e,a){var n=a.points,i=a.stackedOnPoints,o=0,s=n.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&Qi(n[s*2-2],n[s*2-1]);s--);for(;ot){i?e.push(o(i,l,t)):n&&e.push(o(n,l,0),o(n,l,t));break}else n&&(e.push(o(n,l,0)),n=null),e.push(l),i=l}return e}function o4(r,t,e){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&t.type==="cartesian2d"){for(var n,i,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){i=a[o];break}}if(i){var l=t.getAxis(n),u=Y(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,c=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),c.reverse());var v=i4(u,n==="x"?e.getWidth():e.getHeight()),h=v.length;if(!h&&f)return u[0].coord<0?c[1]?c[1]:u[f-1].color:c[0]?c[0]:u[0].color;var d=10,p=v[0].coord-d,g=v[h-1].coord+d,y=g-p;if(y<.001)return"transparent";A(v,function(_){_.offset=(_.coord-p)/y}),v.push({offset:h?v[h-1].offset:.5,color:c[1]||"transparent"}),v.unshift({offset:h?v[0].offset:.5,color:c[0]||"transparent"});var m=new Os(0,0,0,0,v,!0);return m[n]=p,m[n+"2"]=g,m}}}function s4(r,t,e){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=e.getAxesByScale("ordinal")[0];if(i&&!(n&&l4(i,t))){var o=t.mapDimension(i.dim),s={};return A(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function l4(r,t){var e=r.getExtent(),a=Math.abs(e[1]-e[0])/r.scale.count();isNaN(a)&&(a=0);for(var n=t.count(),i=Math.max(1,Math.round(n/5)),o=0;oa)return!1;return!0}function u4(r,t){return isNaN(r)||isNaN(t)}function f4(r){for(var t=r.length/2;t>0&&u4(r[t*2-2],r[t*2-1]);t--);return t-1}function lb(r,t){return[r[t*2],r[t*2+1]]}function c4(r,t,e){for(var a=r.length/2,n=e==="x"?0:1,i,o,s=0,l=-1,u=0;u=t||i>=t&&o<=t){l=u;break}s=u,i=o}return{range:[s,l],t:(t-i)/(o-i)}}function VI(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var B=d.getState("emphasis").style;B.lineWidth=+d.style.lineWidth+1}pt(d).seriesIndex=e.seriesIndex,Jt(d,P,O,E);var V=sb(e.get("smooth")),H=e.get("smoothMonotone");if(d.setShape({smooth:V,smoothMonotone:H,connectNulls:w}),p){var W=s.getCalculationInfo("stackedOnSeries"),X=0;p.useStyle(vt(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),W&&(X=sb(W.get("smooth"))),p.setShape({smooth:V,stackedOnSmooth:X,smoothMonotone:H,connectNulls:w}),we(p,e,"areaStyle"),pt(p).seriesIndex=e.seriesIndex,Jt(p,P,O,E)}var j=this._changePolyState;s.eachItemGraphicEl(function(q){q&&(q.onHoverStateChange=j)}),this._polyline.onHoverStateChange=j,this._data=s,this._coordSys=i,this._stackedOnPoints=b,this._points=f,this._step=M,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,d),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,a){pt(a).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,a,n,i){var o=e.getData(),s=ao(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],c=l[s*2+1];if(isNaN(f)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,c))return;var v=e.get("zlevel")||0,h=e.get("z")||0;u=new Gu(o,s),u.x=f,u.y=c,u.setZ(v,h);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=v,d.z=h,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Xt.prototype.highlight.call(this,e,a,n,i)},t.prototype.downplay=function(e,a,n,i){var o=e.getData(),s=ao(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Xt.prototype.downplay.call(this,e,a,n,i)},t.prototype._changePolyState=function(e){var a=this._polygon;Uc(this._polyline,e),a&&Uc(a,e)},t.prototype._newPolyline=function(e){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new r4({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},t.prototype._newPolygon=function(e,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new NI({shape:{points:e,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,a,n){var i,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):a.type==="polar"&&(i=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");ot(f)&&(f=f(null));var c=u.get("animationDelay")||0,v=ot(c)?c(null):c;e.eachItemGraphicEl(function(h,d){var p=h;if(p){var g=[h.x,h.y],y=void 0,m=void 0,_=void 0;if(n)if(o){var S=n,b=a.pointToCoord(g);i?(y=S.startAngle,m=S.endAngle,_=-b[1]/180*Math.PI):(y=S.r0,m=S.r,_=b[0])}else{var x=n;i?(y=x.x,m=x.x+x.width,_=h.x):(y=x.y+x.height,m=x.y,_=h.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=ot(c)?c(d):f*w+v,C=p.getSymbolPath(),M=C.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,a,n){var i=e.getModel("endLabel");if(VI(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Rt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=f4(l);f>=0&&(Ie(s,Te(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:f,defaultText:function(c,v,h){return h!=null?kI(o,h):Ts(o,c)},enableTextSetter:!0},v4(i,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,a,n,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var c=n.getLayout("points"),v=n.hostModel,h=v.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=a.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,b=(y?p:0)*(m?-1:1),x=(y?0:-p)*(m?-1:1),w=y?"x":"y",T=c4(c,S,w),C=T.range,M=C[1]-C[0],D=void 0;if(M>=1){if(M>1&&!h){var I=lb(c,C[0]);u.attr({x:I[0]+b,y:I[1]+x}),o&&(D=v.getRawValue(C[0]))}else{var I=f.getPointOn(S,w);I&&u.attr({x:I[0]+b,y:I[1]+x});var L=v.getRawValue(C[0]),k=v.getRawValue(C[1]);o&&(D=ZM(n,d,L,k,T.t))}i.lastFrameIndex=C[0]}else{var R=e===1||i.lastFrameIndex>0?C[0]:0,I=lb(c,R);o&&(D=v.getRawValue(R)),u.attr({x:I[0]+b,y:I[1]+x})}if(o){var P=Bs(u);typeof P.setLabelText=="function"&&P.setLabelText(D)}}},t.prototype._doUpdateAnimation=function(e,a,n,i,o,s,l){var u=this._polyline,f=this._polygon,c=e.hostModel,v=e4(this._data,e,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),h=v.current,d=v.stackedOnCurrent,p=v.next,g=v.stackedOnNext;if(o&&(d=Sn(v.stackedOnCurrent,v.current,n,o,l),h=Sn(v.current,null,n,o,l),g=Sn(v.stackedOnNext,v.next,n,o,l),p=Sn(v.next,null,n,o,l)),ob(h,p)>3e3||f&&ob(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),f&&(f.stopAnimation(),f.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=v.current,u.shape.points=h;var y={shape:{points:p}};v.current!==h&&(y.shape.__points=v.next),u.stopAnimation(),Et(u,y,c),f&&(f.setShape({points:h,stackedOnPoints:d}),f.stopAnimation(),Et(f,{shape:{stackedOnPoints:g}},c),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=v.status,S=0;S<_.length;S++){var b=_[S].cmd;if(b==="="){var x=e.getItemGraphicEl(_[S].idx1);x&&m.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var w=u.shape.__points,T=0;Tt&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),c=a.getDevicePixelRatio(),v=Math.abs(f[1]-f[0])*(c||1),h=Math.round(s/v);if(isFinite(h)&&h>1){i==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/h)):i==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/h));var d=void 0;Q(i)?d=p4[i]:ot(i)&&(d=i),d&&t.setData(n.downSample(n.mapDimension(u.dim),1/h,d,g4))}}}}}function y4(r){r.registerChartView(d4),r.registerSeriesModel(qH),r.registerLayout(Wu("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),a=t.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,GI("line"))}var FI=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return cn(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,a,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(e),s=i.dataToPoint(o);if(n)A(i.getAxes(),function(v,h){if(v.type==="category"&&a!=null){var d=v.getTicksCoords(),p=v.getTickModel().get("alignWithLabel"),g=o[h],y=a[h]==="x1"||a[h]==="y1";if(y&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[h]=v.toGlobalCoord(v.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,S=1,b=0;bg){_=(x+m)/2;break}b===1&&(S=w-d[0].tickValue)}_==null&&(m?m&&(_=d[d.length-1].coord):_=d[0].coord),s[h]=v.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),c=i.getBaseAxis().isHorizontal()?0:1;s[c]+=u+f/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t}(te);te.registerClass(FI);const vv=FI;var m4=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return cn(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>e&&(e=a),e},t.prototype.brushSelector=function(e,a,n){return n.rect(a.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=ti(vv.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:G.color.primary,borderWidth:2}},realtimeSort:!1}),t}(vv);const _4=m4;var S4=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),x4=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="sausage",a}return t.prototype.getDefaultShape=function(){return new S4},t.prototype.buildPath=function(e,a){var n=a.cx,i=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,f=a.startAngle,c=a.endAngle,v=a.clockwise,h=Math.PI*2,d=v?c-fMath.PI/2&&fs)return!0;s=c}return!1},t.prototype._isOrderDifferentInView=function(e,a){for(var n=a.scale,i=n.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,a,n,i){if(this._isOrderChangedWithinSameData(e,a,n)){var o=this._dataSort(e,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,a,n){var i=a.baseAxis,o=this._dataSort(e,i,function(s){return e.get(e.mapDimension(a.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,a){this._clear(this._model),this._removeOnRenderedListener(a)},t.prototype.dispose=function(e,a){this._removeOnRenderedListener(a)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var a=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){qa(i,e,pt(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Xt),ub={cartesian2d:function(r,t){var e=t.width<0?-1:1,a=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height);var n=r.x+r.width,i=r.y+r.height,o=Ud(t.x,r.x),s=Yd(t.x+t.width,n),l=Ud(t.y,r.y),u=Yd(t.y+t.height,i),f=sn?s:o,t.y=c&&l>i?u:l,t.width=f?0:s-o,t.height=c?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height),f||c},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}var n=Yd(t.r,r.r),i=Ud(t.r0,r.r0);t.r=n,t.r0=i;var o=n-i<0;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}return o}},fb={cartesian2d:function(r,t,e,a,n,i,o,s,l){var u=new Mt({shape:$({},a),z2:1});if(u.__dataIndex=e,u.name="item",i){var f=u.shape,c=n?"height":"width";f[c]=0}return u},polar:function(r,t,e,a,n,i,o,s,l){var u=!n&&l?hv:rr,f=new u({shape:a,z2:1});f.name="item";var c=HI(n);if(f.calculateTextPosition=b4(c,{isRoundCap:u===hv}),i){var v=f.shape,h=n?"r":"endAngle",d={};v[h]=n?a.r0:a.startAngle,d[h]=a[h],(s?Et:jt)(f,{shape:d},i)}return f}};function A4(r,t){var e=r.get("realtimeSort",!0),a=t.getBaseAxis();if(e&&a.type==="category"&&t.type==="cartesian2d")return{baseAxis:a,otherAxis:t.getOtherAxis(a)}}function cb(r,t,e,a,n,i,o,s){var l,u;i?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?Et:jt)(e,{shape:l},t,n,null);var f=t?r.baseAxis.model:null;(o?Et:jt)(e,{shape:u},f,n)}function vb(r,t){for(var e=0;e0?1:-1,o=a.height>0?1:-1;return{x:a.x+i*n/2,y:a.y+o*n/2,width:a.width-i*n,height:a.height-o*n}},polar:function(r,t,e){var a=r.getItemLayout(t);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function L4(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function HI(r){return function(t){var e=t?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+e;default:return a}}}(r)}function db(r,t,e,a,n,i,o,s){var l=t.getItemVisual(e,"style");if(s){if(!i.get("roundCap")){var f=r.shape,c=Ca(a.getModel("itemStyle"),f,!0);$(f,c),r.setShape(f)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var v=a.getShallow("cursor");v&&r.attr("cursor",v);var h=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",d=Te(a);Ie(r,d,{labelFetcher:i,labelDataIndex:e,defaultText:Ts(i.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var p=r.getTextContent();if(s&&p){var g=a.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,w4(r,g==="outside"?h:g,HI(o),a.get(["label","rotate"]))}YD(p,d,i.getRawValue(e),function(m){return kI(t,m)});var y=a.getModel(["emphasis"]);Jt(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),we(r,a),L4(n)&&(r.style.fill="none",r.style.stroke="none",A(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function I4(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(a,n,i)}var P4=function(){function r(){}return r}(),pb=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="largeBar",a}return t.prototype.getDefaultShape=function(){return new P4},t.prototype.buildPath=function(e,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?e:null},30,!1);function k4(r,t,e){for(var a=r.baseDimIdx,n=1-a,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,c=i.length/3;f=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function WI(r,t,e){if(Yn(e,"cartesian2d")){var a=t,n=e.getArea();return{x:r?a.x:n.x,y:r?n.y:a.y,width:r?a.width:n.width,height:r?n.height:a.height}}else{var n=e.getArea(),i=t;return{cx:n.cx,cy:n.cy,r0:r?n.r0:i.r0,r:r?n.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function R4(r,t,e){var a=r.type==="polar"?rr:Mt;return new a({shape:WI(t,e,r),silent:!0,z2:0})}const E4=C4;function O4(r){r.registerChartView(E4),r.registerSeriesModel(_4),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,xt(W2,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,$2("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,GI("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var a=t.componentType||"series";e.eachComponent({mainType:a,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})})}var mb=Math.PI*2,Nf=Math.PI/180;function N4(r,t,e){t.eachSeriesByType(r,function(a){var n=a.getData(),i=n.mapDimension("value"),o=hL(a,e),s=o.cx,l=o.cy,u=o.r,f=o.r0,c=o.viewRect,v=-a.get("startAngle")*Nf,h=a.get("endAngle"),d=a.get("padAngle")*Nf;h=h==="auto"?v-mb:-h*Nf;var p=a.get("minAngle")*Nf,g=p+d,y=0;n.each(i,function(O){!isNaN(O)&&y++});var m=n.getSum(i),_=Math.PI/(m||y)*2,S=a.get("clockwise"),b=a.get("roseType"),x=a.get("stillShowZeroSum"),w=n.getDataExtent(i);w[0]=0;var T=S?1:-1,C=[v,h],M=T*d/2;Kv(C,!S),v=C[0],h=C[1];var D=$I(a);D.startAngle=v,D.endAngle=h,D.clockwise=S,D.cx=s,D.cy=l,D.r=u,D.r0=f;var I=Math.abs(h-v),L=I,k=0,R=v;if(n.setLayout({viewRect:c,r:u}),n.each(i,function(O,E){var B;if(isNaN(O)){n.setItemLayout(E,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:s,cy:l,r0:f,r:b?NaN:u});return}b!=="area"?B=m===0&&x?_:O*_:B=I/y,BB?(H=R+T*B/2,W=H):(H=R+M,W=V-M),n.setItemLayout(E,{angle:B,startAngle:H,endAngle:W,clockwise:S,cx:s,cy:l,r0:f,r:b?Gt(O,w,[f,u]):u}),R=V}),Le?y:g,b=Math.abs(_.label.y-e);if(b>=S.maxY){var x=_.label.x-t-_.len2*n,w=a+_.len,T=Math.abs(x)r.unconstrainedWidth?null:v:null;a.setStyle("width",h)}YI(i,a)}}}function YI(r,t){Sb.rect=r,pI(Sb,t,V4)}var V4={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},Sb={};function Zd(r){return r.position==="center"}function G4(r){var t=r.getData(),e=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*B4,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,f=s.x,c=s.y,v=s.height;function h(x){x.ignore=!0}function d(x){if(!x.ignore)return!0;for(var w in x.states)if(x.states[w].ignore===!1)return!0;return!1}t.each(function(x){var w=t.getItemGraphicEl(x),T=w.shape,C=w.getTextContent(),M=w.getTextGuideLine(),D=t.getItemModel(x),I=D.getModel("label"),L=I.get("position")||D.get(["emphasis","label","position"]),k=I.get("distanceToLabelLine"),R=I.get("alignTo"),P=J(I.get("edgeDistance"),u),O=I.get("bleedMargin");O==null&&(O=Math.min(u,v)>200?10:2);var E=D.getModel("labelLine"),B=E.get("length");B=J(B,u);var V=E.get("length2");if(V=J(V,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":W>0?"left":"right"}var ut=Math.PI,At=0,Ht=I.get("rotate");if(Pt(Ht))At=Ht*(ut/180);else if(L==="center")At=0;else if(Ht==="radial"||Ht===!0){var ne=W<0?-H+ut:-H;At=ne}else if(Ht==="tangential"&&L!=="outside"&&L!=="outer"){var ie=Math.atan2(W,X);ie<0&&(ie=ut*2+ie);var fr=X>0;fr&&(ie=ut+ie),At=ie-ut}if(i=!!At,C.x=j,C.y=q,C.rotation=At,C.setStyle({verticalAlign:"middle"}),at){C.setStyle({align:St});var ia=C.states.select;ia&&(ia.x+=C.x,ia.y+=C.y)}else{var wr=new dt(0,0,0,0);YI(wr,C),e.push({label:C,labelLine:M,position:L,len:B,len2:V,minTurnAngle:E.get("minTurnAngle"),maxSurfaceAngle:E.get("maxSurfaceAngle"),surfaceNormal:new ct(W,X),linePoints:it,textAlign:St,labelDistance:k,labelAlignTo:R,edgeDistance:P,bleedMargin:O,rect:wr,unconstrainedWidth:wr.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:at})}}),!i&&r.get("avoidLabelOverlap")&&z4(e,a,n,l,u,v,f,c);for(var p=0;p0){for(var f=o.getItemLayout(0),c=1;isNaN(f&&f.startAngle)&&c=i.r0}},t.type="pie",t}(Xt);const W4=H4;function Us(r,t,e){t=U(t)&&{coordDimensions:t}||$({encodeDefine:r.getEncode()},t);var a=r.getSource(),n=zu(a,t).dimensions,i=new tr(n,r);return i.initData(a,e),i}var $4=function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var a=this._getDataWithEncodedVisual();return a.getItemVisual(t,e)},r}();const Ys=$4;var U4=Dt(),ZI=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ys(tt(this.getData,this),tt(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Us(this,{coordDimensions:["value"],encodeDefaulter:xt(n0,this)})},t.prototype.getDataParams=function(e){var a=this.getData(),n=U4(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),i=n.seats=IN(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=i[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){ro(e,"labelLine",["show"]);var a=e.labelLine,n=e.emphasis.labelLine;a.show=a.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}(te);DV({fullType:ZI.type,getCoord2:function(r){return r.getShallow("center")}});const Y4=ZI;function Z4(r){return{seriesType:r,reset:function(t,e){var a=t.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!(Pt(o)&&!isNaN(o)&&o<0)})}}}function X4(r){r.registerChartView(W4),r.registerSeriesModel(Y4),o2("pie",r.registerAction),r.registerLayout(xt(N4,"pie")),r.registerProcessor($s("pie")),r.registerProcessor(Z4("pie"))}var q4=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,a){return cn(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,a,n){return n.point(a.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:G.color.primary}},universalTransition:{divideShape:"clone"}},t}(te);const K4=q4;var XI=4,j4=function(){function r(){}return r}(),J4=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.getDefaultShape=function(){return new j4},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,a){var n=a.points,i=a.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&i[0]=0;u--){var f=u*2,c=i[f]-s/2,v=i[f+1]-l/2;if(e>=c&&a>=v&&e<=c+s&&a<=v+l)return u}return-1},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();if(e=n[0],a=n[1],i.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,n=a.points,i=a.size,o=i[0],s=i[1],l=1/0,u=1/0,f=-1/0,c=-1/0,v=0;v=0&&(u.dataIndex=c+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const tW=Q4;var eW=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(e,a,n){this._symbolDraw.incrementalUpdate(e,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=e.end===a.getData().count()},t.prototype.updateTransform=function(e,a,n){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Wu("").reset(e,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var a=e.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new tW:new Fu,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(Xt);const rW=eW;var qI={left:0,right:0,top:0,bottom:0},dv=["25%","25%"],aW=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(e,a){var n=yo(e.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),n&&e.outerBounds&&Ea(e.outerBounds,n)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&Ea(this.option.outerBounds,e.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:qI,outerBoundsContain:"all",outerBoundsClampWidth:dv[0],outerBoundsClampHeight:dv[1],backgroundColor:G.color.transparent,borderWidth:1,borderColor:G.color.neutral30},t}(kt);const nW=aW;var wy=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",ae).models[0]},t.type="cartesian2dAxis",t}(kt);_e(wy,Vu);var KI={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:G.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:G.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:G.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[G.color.backgroundTint,G.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:G.color.neutral00,borderColor:G.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},iW=wt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},KI),R0=wt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:G.color.axisMinorSplitLine,width:1}}},KI),oW=wt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},R0),sW=vt({logBase:10},R0);const jI={category:iW,value:R0,time:oW,log:sW};var lW={value:1,category:1,time:1,log:1},Ty=null;function uW(r){Ty||(Ty=r)}function $u(){return Ty}function Cs(r,t,e,a){A(lW,function(n,i){var o=wt(wt({},jI[i],!0),a,!0),s=function(l){z(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,c){var v=fu(this),h=v?yo(f):{},d=c.getTheme();wt(f,d.get(i+"Axis")),wt(f,this.getDefaultOption()),f.type=xb(f),v&&Ea(f,h,v)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=gu.createByAxisModel(this))},u.prototype.getCategories=function(f){var c=this.option;if(c.type==="category")return f?c.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(f){var c=$u();return c?c.updateModelAxisBreak(this,f):{breaks:[]}},u.type=t+"Axis."+i,u.defaultOption=o,u}(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",xb)}function xb(r){return r.type||(r.data?"category":"value")}var fW=function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return Y(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Ft(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r}();const cW=fW;var Cy=["x","y"];function bb(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var vW=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=Cy,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!bb(e)||!bb(a))){var n=e.getExtent(),i=a.getExtent(),o=this.dataToPoint([n[0],i[0]]),s=this.dataToPoint([n[1],i[1]]),l=n[1]-n[0],u=i[1]-i[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,c=(s[1]-o[1])/u,v=o[0]-n[0]*f,h=o[1]-i[0]*c,d=this._transform=[f,0,0,c,v,h];this._invTransform=Qr([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var a=this.getAxis("x"),n=this.getAxis("y");return a.contain(a.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,a){var n=this.dataToPoint(e),i=this.dataToPoint(a),o=this.getArea(),s=new dt(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,a,n){n=n||[];var i=e[0],o=e[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return ce(n,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(i,a)),n[1]=l.toGlobalCoord(l.dataToCoord(o,a)),n},t.prototype.clampData=function(e,a){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),s=i.getExtent(),l=n.parse(e[0]),u=i.parse(e[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},t.prototype.pointToData=function(e,a,n){if(n=n||[],this._invTransform)return ce(n,e,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(e[0]),a),n[1]=o.coordToData(o.toLocalCoord(e[1]),a),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var a=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(a[0],a[1])-e,o=Math.min(n[0],n[1])-e,s=Math.max(a[0],a[1])-i+e,l=Math.max(n[0],n[1])-o+e;return new dt(i,o,s,l)},t}(cW),hW=function(r){z(t,r);function t(e,a,n,i,o){var s=r.call(this,e,a,n)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),e&&a[0]>a[1]&&a.reverse(),a},t.prototype.pointToData=function(e,a){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),a)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(na);const JI=hW;var gh="expandAxisBreak",QI="collapseAxisBreak",tP="toggleAxisBreak",E0="axisbreakchanged",dW={type:gh,event:E0,update:"update",refineEvent:O0},pW={type:QI,event:E0,update:"update",refineEvent:O0},gW={type:tP,event:E0,update:"update",refineEvent:O0};function O0(r,t,e,a){var n=[];return A(r,function(i){n=n.concat(i.eventBreaks)}),{eventContent:{breaks:n}}}function yW(r){r.registerAction(dW,t),r.registerAction(pW,t),r.registerAction(gW,t);function t(e,a){var n=[],i=vs(a,e);function o(s,l){A(i[s],function(u){var f=u.updateAxisBreaks(e);A(f.breaks,function(c){var v;n.push(vt((v={},v[l]=u.componentIndex,v),c))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:n}}}var kn=Math.PI,mW=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],_W=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],As=Dt(),eP=Dt(),rP=function(){function r(t){this.recordMap={},this.resolveAxisNameOverlap=t}return r.prototype.ensureRecord=function(t){var e=t.axis.dim,a=t.componentIndex,n=this.recordMap,i=n[e]||(n[e]=[]);return i[a]||(i[a]={ready:{}})},r}();function SW(r,t,e,a){var n=e.axis,i=t.ensureRecord(e),o=[],s,l=N0(r.axisName)&&ws(r.nameLocation);A(a,function(d){var p=Oa(d);if(!(!p||p.label.ignore)){o.push(p);var g=i.transGroup;l&&(g.transform?Qr(ul,g.transform):Hv(ul),p.transform&&Aa(ul,ul,p.transform),dt.copy(Bf,p.localRect),Bf.applyTransform(ul),s?s.union(Bf):dt.copy(s=new dt(0,0,0,0),Bf))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",f=i.transGroup[u];if(o.sort(function(d,p){return Math.abs(d.label[u]-f)-Math.abs(p.label[u]-f)}),l&&s){var c=n.getExtent(),v=Math.min(c[0],c[1]),h=Math.max(c[0],c[1])-v;s.union(new dt(v,0,h,1))}i.stOccupiedRect=s,i.labelInfoList=o}var ul=Oe(),Bf=new dt(0,0,0,0),aP=function(r,t,e,a,n,i){if(ws(r.nameLocation)){var o=i.stOccupiedRect;o&&nP(j3({},o,i.transGroup.transform),a,n)}else iP(i.labelInfoList,i.dirVec,a,n)};function nP(r,t,e){var a=new ct;dh(r,t,a,{direction:Math.atan2(e.y,e.x),bidirectional:!1,touchThreshold:.05})&&gy(t,a)}function iP(r,t,e,a){for(var n=ct.dot(a,t)>=0,i=0,o=r.length;i0?"top":"bottom",i="center"):au(n-kn)?(o=a>0?"bottom":"top",i="center"):(o="middle",n>0&&n0?"right":"left":i=a>0?"left":"right"),{rotation:n,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r}(),xW=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],bW={axisLine:function(r,t,e,a,n,i,o){var s=a.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=a.axis.getExtent(),u=i.transform,f=[l[0],0],c=[l[1],0],v=f[0]>c[0];u&&(ce(f,f,u),ce(c,c,u));var h=$({lineCap:"round"},a.getModel(["axisLine","lineStyle"]).getLineStyle()),d={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:h};if(a.get(["axisLine","breakLine"])&&a.axis.scale.hasBreaks())$u().buildAxisBreakLine(a,n,i,d);else{var p=new be($({shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]}},d));_s(p.shape,p.style.lineWidth),p.anid="line",n.add(p)}var g=a.get(["axisLine","symbol"]);if(g!=null){var y=a.get(["axisLine","symbolSize"]);Q(g)&&(g=[g,g]),(Q(y)||Pt(y))&&(y=[y,y]);var m=_o(a.get(["axisLine","symbolOffset"])||0,y),_=y[0],S=y[1];A([{rotate:r.rotation+Math.PI/2,offset:m[0],r:0},{rotate:r.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((f[0]-c[0])*(f[0]-c[0])+(f[1]-c[1])*(f[1]-c[1]))}],function(b,x){if(g[x]!=="none"&&g[x]!=null){var w=me(g[x],-_/2,-S/2,_,S,h.stroke,!0),T=b.r+b.offset,C=v?c:f;w.attr({rotation:b.rotate,x:C[0]+T*Math.cos(r.rotation),y:C[1]-T*Math.sin(r.rotation),silent:!0,z2:11}),n.add(w)}})}}},axisTickLabelEstimate:function(r,t,e,a,n,i,o,s){var l=Tb(t,n,s);l&&wb(r,t,e,a,n,i,o,ea.estimate)},axisTickLabelDetermine:function(r,t,e,a,n,i,o,s){var l=Tb(t,n,s);l&&wb(r,t,e,a,n,i,o,ea.determine);var u=AW(r,n,i,a);CW(r,t.labelLayoutList,u),MW(r,n,i,a,r.tickDirection)},axisName:function(r,t,e,a,n,i,o,s){var l=e.ensureRecord(a);t.nameEl&&(n.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(N0(u)){var f=r.nameLocation,c=r.nameDirection,v=a.getModel("nameTextStyle"),h=a.get("nameGap")||0,d=a.axis.getExtent(),p=a.axis.inverse?-1:1,g=new ct(0,0),y=new ct(0,0);f==="start"?(g.x=d[0]-p*h,y.x=-p):f==="end"?(g.x=d[1]+p*h,y.x=p):(g.x=(d[0]+d[1])/2,g.y=r.labelOffset+c*h,y.y=c);var m=Oe();y.transform(jn(m,m,r.rotation));var _=a.get("nameRotate");_!=null&&(_=_*kn/180);var S,b;ws(f)?S=to.innerTextLayout(r.rotation,_??r.rotation,c):(S=wW(r.rotation,f,_||0,d),b=r.raw.axisNameAvailableWidth,b!=null&&(b=Math.abs(b/Math.sin(S.rotation)),!isFinite(b)&&(b=null)));var x=v.getFont(),w=a.get("nameTruncate",!0)||{},T=w.ellipsis,C=Ve(r.raw.nameTruncateMaxWidth,w.maxWidth,b),M=s.nameMarginLevel||0,D=new Rt({x:g.x,y:g.y,rotation:S.rotation,silent:to.isLabelSilent(a),style:Zt(v,{text:u,font:x,overflow:"truncate",width:C,ellipsis:T,fill:v.getTextColor()||a.get(["axisLine","lineStyle","color"]),align:v.get("align")||S.textAlign,verticalAlign:v.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(fn({el:D,componentModel:a,itemName:u}),D.__fullText=u,D.anid="name",a.get("triggerEvent")){var I=to.makeAxisEventDataBase(a);I.targetType="axisName",I.name=u,pt(D).eventData=I}i.add(D),D.updateTransform(),t.nameEl=D;var L=l.nameLayout=Oa({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:ws(f)?mW[M]:_W[M]});if(l.nameLocation=f,n.add(D),D.decomposeTransform(),r.shouldNameMoveOverlap&&L){var k=e.ensureRecord(a);e.resolveAxisNameOverlap(r,e,a,L,y,k)}}}};function wb(r,t,e,a,n,i,o,s){sP(t)||DW(r,t,n,s,a,o);var l=t.labelLayoutList;LW(r,a,l,i),kW(a,r.rotation,l);var u=r.optionHideOverlap;TW(a,l,u),u&&gI(Ft(l,function(f){return f&&!f.label.ignore})),SW(r,e,a,l)}function wW(r,t,e,a){var n=NM(e-r),i,o,s=a[0]>a[1],l=t==="start"&&!s||t!=="start"&&s;return au(n-kn/2)?(o=l?"bottom":"top",i="center"):au(n-kn*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",nkn/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:o}}function TW(r,t,e){if(Q2(r.axis))return;function a(s,l,u){var f=Oa(t[l]),c=Oa(t[u]);if(!(!f||!c)){if(s===!1||f.suggestIgnore){Rl(f.label);return}if(c.suggestIgnore){Rl(c.label);return}var v=.1;if(!e){var h=[0,0,0,0];f=yy({marginForce:h},f),c=yy({marginForce:h},c)}dh(f,c,null,{touchThreshold:v})&&Rl(s?c.label:f.label)}}var n=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]),o=t.length;a(n,0,1),a(i,o-1,o-2)}function CW(r,t,e){r.showMinorTicks||A(t,function(a){if(a&&a.label.ignore)for(var n=0;nu[0]&&isFinite(d)&&isFinite(u[0]);)h=kd(h),d=u[1]-h*o;else{var g=r.getTicks().length-1;g>o&&(h=kd(h));var y=h*o;p=Math.ceil(u[1]/h)*h,d=de(p-y),d<0&&u[0]>=0?(d=0,p=de(y)):p>0&&u[1]<=0&&(p=0,d=-de(y))}var m=(n[0].value-i[0].value)/s,_=(n[o].value-i[o].value)/s;a.setExtent.call(r,d+h*m,p+h*_),a.setInterval.call(r,h),(m||_)&&a.setNiceExtent.call(r,d+h,p-h)}var Ab=[[3,1],[0,2]],NW=function(){function r(t,e,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Cy,this._initCartesian(t,e,a),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var a=this._axesMap;this._updateScale(t,this.model);function n(o){var s,l=It(o),u=l.length;if(u){for(var f=[],c=u-1;c>=0;c--){var v=+l[c],h=o[v],d=h.model,p=h.scale;cy(p)&&d.get("alignTicks")&&d.get("interval")==null?f.push(h):(bs(p,d),cy(p)&&(s=h))}f.length&&(s||(s=f.pop(),bs(s.scale,s.model)),A(f,function(g){lP(g.scale,g.model,s.scale)}))}}n(a.x),n(a.y);var i={};A(a.x,function(o){Mb(a,"y",o,i)}),A(a.y,function(o){Mb(a,"x",o,i)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,a){var n=Ce(t,e),i=this._rect=Qt(t.getBoxLayoutParams(),n.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(My(o,i),!a){var u=VW(i,s,o,l,e),f=void 0;if(l)Dy?(Dy(this._axesList,i),My(o,i)):f=Ib(i.clone(),"axisLabel",null,i,o,u,n);else{var c=GW(t,i,n),v=c.outerBoundsRect,h=c.parsedOuterBoundsContain,d=c.outerBoundsClamp;v&&(f=Ib(v,h,d,i,o,u,n))}uP(i,o,ea.determine,null,f,n)}A(this._coordsList,function(p){p.calcAffineTransform()})},r.prototype.getAxis=function(t,e){var a=this._axesMap[t];if(a!=null)return a[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var a="x"+t+"y"+e;return this._coordsMap[a]}ht(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,i=this._coordsList;n0})==null;return oo(a,s,!0,!0,e),My(n,a),l;function u(v){A(n[yt[v]],function(h){if(mu(h.model)){var d=i.ensureRecord(h.model),p=d.labelInfoList;if(p)for(var g=0;g0&&!Ue(h)&&h>1e-4&&(v/=h),v}}function VW(r,t,e,a,n){var i=new rP(FW);return A(e,function(o){return A(o,function(s){if(mu(s.model)){var l=!a;s.axisBuilder=EW(r,t,s.model,n,i,l)}})}),i}function uP(r,t,e,a,n,i){var o=e===ea.determine;A(t,function(u){return A(u,function(f){mu(f.model)&&(OW(f.axisBuilder,r,f.model),f.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:n}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[yt[1-u]]=r[ge[u]]<=i.refContainer[ge[u]]*.5?0:1-u===1?2:1}A(t,function(u,f){return A(u,function(c){mu(c.model)&&((a==="all"||o)&&c.axisBuilder.build({axisName:!0},{nameMarginLevel:s[f]}),o&&c.axisBuilder.build({axisLine:!0}))})})}function GW(r,t,e){var a,n=r.get("outerBoundsMode",!0);n==="same"?a=t.clone():(n==null||n==="auto")&&(a=Qt(r.get("outerBounds",!0)||qI,e.refContainer));var i=r.get("outerBoundsContain",!0),o;i==null||i==="auto"||bt(["all","axisLabel"],i)<0?o="all":o=i;var s=[Fc(nt(r.get("outerBoundsClampWidth",!0),dv[0]),t.width),Fc(nt(r.get("outerBoundsClampHeight",!0),dv[1]),t.height)];return{outerBoundsRect:a,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var FW=function(r,t,e,a,n,i){var o=e.axis.dim==="x"?"y":"x";aP(r,t,e,a,n,i),ws(r.nameLocation)||A(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&iP(s.labelInfoList,s.dirVec,a,n)})};const HW=NW;function WW(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return $W(e,r,t),e.seriesInvolved&&YW(e,r),e}function $W(r,t,e){var a=t.getComponent("tooltip"),n=t.getComponent("axisPointer"),i=n.get("link",!0)||[],o=[];A(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=xu(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,c=f.getModel("tooltip",a);if(A(s.getAxes(),xt(p,!1,null)),s.getTooltipAxes&&a&&c.get("show")){var v=c.get("trigger")==="axis",h=c.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(c.get(["axisPointer","axis"]));(v||h)&&A(d.baseAxes,xt(p,h?"cross":!0,v)),h&&A(d.otherAxes,xt(p,"cross",!1))}function p(g,y,m){var _=m.model.getModel("axisPointer",n),S=_.get("show");if(!(!S||S==="auto"&&!g&&!Ly(_))){y==null&&(y=_.get("triggerTooltip")),_=g?UW(m,c,n,t,g,y):_;var b=_.get("snap"),x=_.get("triggerEmphasis"),w=xu(m.model),T=y||b||m.type==="category",C=r.axesInfo[w]={key:w,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,triggerEmphasis:x,involveSeries:T,snap:b,useHandle:Ly(_),seriesModels:[],linkGroup:null};u[w]=C,r.seriesInvolved=r.seriesInvolved||T;var M=ZW(i,m);if(M!=null){var D=o[M]||(o[M]={axesInfo:{}});D.axesInfo[w]=C,D.mapper=i[M].mapper,C.linkGroup=D}}}})}function UW(r,t,e,a,n,i){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};A(s,function(v){l[v]=st(o.get(v))}),l.snap=r.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var f=o.get(["label","show"]);if(u.show=f??!0,!i){var c=l.lineStyle=o.get("crossStyle");c&&vt(u,c.textStyle)}}return r.model.getModel("axisPointer",new Ot(l,e,a))}function YW(r,t){t.eachSeries(function(e){var a=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),i=e.get(["tooltip","show"],!0);!a||!a.model||n==="none"||n===!1||n==="item"||i===!1||e.get(["axisPointer","show"],!0)===!1||A(r.coordSysAxesInfo[xu(a.model)],function(o){var s=o.axis;a.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function ZW(r,t){for(var e=t.model,a=t.dim,n=0;n=0||r===t}function XW(r){var t=B0(r);if(t){var e=t.axisPointerModel,a=t.axis.scale,n=e.option,i=e.get("status"),o=e.get("value");o!=null&&(o=a.parse(o));var s=Ly(e);i==null&&(n.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var r$=Dt();function Rb(r,t,e,a){if(r instanceof JI){var n=r.scale.type;if(n!=="category"&&n!=="ordinal")return e}var i=r.model,o=i.get("jitter"),s=i.get("jitterOverlap"),l=i.get("jitterMargin")||0,u=r.scale.type==="ordinal"?r.getBandWidth():null;return o>0?s?pP(e,o,u,a):a$(r,t,e,a,o,l):e}function pP(r,t,e,a){if(e===null)return r+(Math.random()-.5)*t;var n=e-a*2,i=Math.min(Math.max(0,t),n);return r+(Math.random()-.5)*i}function a$(r,t,e,a,n,i){var o=r$(r);o.items||(o.items=[]);var s=o.items,l=Eb(s,t,e,a,n,i,1),u=Eb(s,t,e,a,n,i,-1),f=Math.abs(l-e)n/2||c&&v>c/2-a?pP(e,n,c,a):(s.push({fixedCoord:t,floatCoord:f,r:a}),f)}function Eb(r,t,e,a,n,i,o){for(var s=e,l=0;ln/2)return Number.MAX_VALUE;if(o===1&&d>s||o===-1&&d0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var p=l;d.color!=null&&(p=vt({color:d.color},l));var g=wt(st(d),{boundaryGap:e,splitNumber:a,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:c,nameTextStyle:p,triggerEvent:v},!1);if(Q(f)){var y=g.name;g.name=f.replace("{value}",y??"")}else ot(f)&&(g.name=f(g.name,g));var m=new Ot(g,null,this.ecModel);return _e(m,Vu.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=h},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:G.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:wt({lineStyle:{color:G.color.neutral20}},fl.axisLine),axisLabel:zf(fl.axisLabel,!1),axisTick:zf(fl.axisTick,!1),splitLine:zf(fl.splitLine,!0),splitArea:zf(fl.splitArea,!0),indicator:[]},t}(kt);const d$=h$;var p$=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=this.group;i.removeAll(),this._buildAxes(e,n),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e,a){var n=e.coordinateSystem,i=n.getIndicatorAxes(),o=Y(i,function(s){var l=s.model.get("showName")?s.name:"",u=new on(s.model,a,{axisName:l,position:[n.cx,n.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});A(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(e){var a=e.coordinateSystem,n=a.getIndicatorAxes();if(!n.length)return;var i=e.get("shape"),o=e.getModel("splitLine"),s=e.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),c=s.get("show"),v=l.get("color"),h=u.get("color"),d=U(v)?v:[v],p=U(h)?h:[h],g=[],y=[];function m(R,P,O){var E=O%P.length;return R[E]=R[E]||[],E}if(i==="circle")for(var _=n[0].getTicksCoords(),S=a.cx,b=a.cy,x=0;x<_.length;x++){if(f){var w=m(g,d,x);g[w].push(new Jn({shape:{cx:S,cy:b,r:_[x].coord}}))}if(c&&x<_.length-1){var w=m(y,p,x);y[w].push(new th({shape:{cx:S,cy:b,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,C=Y(n,function(R,P){var O=R.getTicksCoords();return T=T==null?O.length-1:Math.min(O.length-1,T),Y(O,function(E){return a.coordToPoint(E.coord,P)})}),M=[],x=0;x<=T;x++){for(var D=[],I=0;I3?1.4:o>1?1.2:1.1,f=i>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(n){var c=Math.abs(i),v=(i>0?1:-1)*(c>3?.4:c>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:v,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(Bb(this._zr,"globalPan")||cl(e))){var a=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:a,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,a,n,i,o){e._checkPointer(i,o.originX,o.originY)&&(tn(i.event),i.__ecRoamConsumed=!0,zb(e,a,n,i,o))},t}(Fr);function cl(r){return r.__ecRoamConsumed}var M$=Dt();function yh(r){var t=M$(r);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function vl(r,t,e,a){for(var n=yh(r),i=n.roam,o=i[t]=i[t]||[],s=0;s=4&&(f={x:parseFloat(v[0]||0),y:parseFloat(v[1]||0),width:parseFloat(v[2]),height:parseFloat(v[3])})}if(f&&s!=null&&l!=null&&(c=xP(f,{x:0,y:0,width:s,height:l}),!e.ignoreViewBox)){var h=n;n=new lt,n.add(h),h.scaleX=h.scaleY=c.scale,h.x=c.x,h.y=c.y}return!e.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new Mt({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:f,viewBoxTransform:c,named:i}},r.prototype._parseNode=function(t,e,a,n,i,o){var s=t.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=e;else{if(!i){var f=Kd[s];if(f&&et(Kd,s)){l=f.call(this,t,e);var c=t.getAttribute("name");if(c){var v={name:c,namedFrom:null,svgNodeTagLower:s,el:l};a.push(v),s==="g"&&(u=v)}else n&&a.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});e.add(l)}}var h=Hb[s];if(h&&et(Hb,s)){var d=h.call(this,t),p=t.getAttribute("id");p&&(this._defs[p]=d)}}if(l&&l.isGroup)for(var g=t.firstChild;g;)g.nodeType===1?this._parseNode(g,l,a,u,i,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(t,e){var a=new iu({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Cr(e,a),cr(t,a,this._defsUsePending,!1,!1),P$(a,e);var n=a.style,i=n.fontSize;i&&i<9&&(n.fontSize=9,a.scaleX*=i/9,a.scaleY*=i/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=a.getBoundingRect();return this._textX+=s.width,e.add(a),a},r.internalField=function(){Kd={g:function(t,e){var a=new lt;return Cr(e,a),cr(t,a,this._defsUsePending,!1,!1),a},rect:function(t,e){var a=new Mt;return Cr(e,a),cr(t,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(t,e){var a=new Jn;return Cr(e,a),cr(t,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),a.silent=!0,a},line:function(t,e){var a=new be;return Cr(e,a),cr(t,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(t,e){var a=new Fm;return Cr(e,a),cr(t,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(t,e){var a=t.getAttribute("points"),n;a&&(n=Ub(a));var i=new ar({shape:{points:n||[]},silent:!0});return Cr(e,i),cr(t,i,this._defsUsePending,!1,!1),i},polyline:function(t,e){var a=t.getAttribute("points"),n;a&&(n=Ub(a));var i=new Xe({shape:{points:n||[]},silent:!0});return Cr(e,i),cr(t,i,this._defsUsePending,!1,!1),i},image:function(t,e){var a=new Fe;return Cr(e,a),cr(t,a,this._defsUsePending,!1,!1),a.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),a.silent=!0,a},text:function(t,e){var a=t.getAttribute("x")||"0",n=t.getAttribute("y")||"0",i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(i),this._textY=parseFloat(n)+parseFloat(o);var s=new lt;return Cr(e,s),cr(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,e){var a=t.getAttribute("x"),n=t.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),n!=null&&(this._textY=parseFloat(n));var i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new lt;return Cr(e,s),cr(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(t,e){var a=t.getAttribute("d")||"",n=bD(a);return Cr(e,n),cr(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),r}(),Hb={lineargradient:function(r){var t=parseInt(r.getAttribute("x1")||"0",10),e=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),i=new Os(t,e,a,n);return Wb(r,i),$b(r,i),i},radialgradient:function(r){var t=parseInt(r.getAttribute("cx")||"0",10),e=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),n=new OD(t,e,a);return Wb(r,n),$b(r,n),n}};function Wb(r,t){var e=r.getAttribute("gradientUnits");e==="userSpaceOnUse"&&(t.global=!0)}function $b(r,t){for(var e=r.firstChild;e;){if(e.nodeType===1&&e.nodeName.toLocaleLowerCase()==="stop"){var a=e.getAttribute("offset"),n=void 0;a&&a.indexOf("%")>0?n=parseInt(a,10)/100:a?n=parseFloat(a):n=0;var i={};SP(e,i,i);var o=i.stopColor||e.getAttribute("stop-color")||"#000000",s=i.stopOpacity||e.getAttribute("stop-opacity");if(s){var l=lr(o),u=l&&l[3];u&&(l[3]*=Nn(s),o=Ma(l,"rgba"))}t.colorStops.push({offset:n,color:o})}e=e.nextSibling}}function Cr(r,t){r&&r.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),vt(t.__inheritedStyle,r.__inheritedStyle))}function Ub(r){for(var t=_h(r),e=[],a=0;a0;i-=2){var o=a[i],s=a[i-1],l=_h(o);switch(n=n||Oe(),s){case"translate":Pa(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":bm(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":jn(n,n,-parseFloat(l[0])*jd,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*jd);Aa(n,[1,0,u,1,0,0],n);break;case"skewY":var f=Math.tan(parseFloat(l[0])*jd);Aa(n,[1,f,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}t.setLocalTransform(n)}}var Zb=/([^\s:;]+)\s*:\s*([^:;]+)/g;function SP(r,t,e){var a=r.getAttribute("style");if(a){Zb.lastIndex=0;for(var n;(n=Zb.exec(a))!=null;){var i=n[1],o=et(gv,i)?gv[i]:null;o&&(t[o]=n[2]);var s=et(yv,i)?yv[i]:null;s&&(e[s]=n[2])}}}function B$(r,t,e){for(var a=0;a0,m={api:a,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:v};l.resourceType==="geoJSON"?this._buildGeoJSON(m):l.resourceType==="geoSVG"&&this._buildSVG(m),this._updateController(t,g,e,a),this._updateMapSelectHandler(t,u,a,n)},r.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=rt(),a=rt(),n=this._regionsGroup,i=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function f(h,d){return d&&(h=d(h)),h&&[h[0]*i.scaleX+i.x,h[1]*i.scaleY+i.y]}function c(h){for(var d=[],p=!u&&l&&l.project,g=0;g=0)&&(v=n);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Ie(t,Te(a),{labelFetcher:v,labelDataIndex:c,defaultText:e},h);var d=t.getTextContent();if(d&&(bP(d).ignore=d.ignore,t.textConfig&&o)){var p=t.getBoundingRect().clone();t.textConfig.layoutRect=p,t.textConfig.position=[(o[0]-p.x)/p.width*100+"%",(o[1]-p.y)/p.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function Jb(r,t,e,a,n,i){r.data?r.data.setItemGraphicEl(i,t):pt(t).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:e,region:a&&a.option||{}}}function Qb(r,t,e,a,n){r.data||fn({el:t,componentModel:n,itemName:e,itemTooltipOption:a.get("tooltip")})}function tw(r,t,e,a,n){t.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return Jt(t,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&fz(t,n,e),o}function ew(r,t,e){var a=[],n;function i(){n=[]}function o(){n.length&&(a.push(n),n=[])}var s=t({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!e&&s.polygonStart(),A(r,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill=G.color.neutral00,n.style.lineWidth=2),n},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:G.color.tertiary},itemStyle:{borderWidth:.5,borderColor:G.color.border,areaColor:G.color.background},emphasis:{label:{show:!0,color:G.color.primary},itemStyle:{areaColor:G.color.highlight}},select:{label:{show:!0,color:G.color.primary},itemStyle:{color:G.color.highlight}},nameProperty:"name"},t}(te);const iU=nU;function oU(r,t){var e={};return A(r,function(a){a.each(a.mapDimension("value"),function(n,i){var o="ec-"+a.getName(i);e[o]=e[o]||[],isNaN(n)||e[o].push(n)})}),r[0].map(r[0].mapDimension("value"),function(a,n){for(var i="ec-"+r[0].getName(n),o=0,s=1/0,l=-1/0,u=e[i].length,f=0;f1?(_.width=m,_.height=m/p):(_.height=m,_.width=m*p),_.y=y[1]-_.height/2,_.x=y[0]-_.width/2;else{var S=r.getBoxLayoutParams();S.aspect=p,_=Qt(S,d),_=dL(r,_,p)}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center")),this.setZoom(r.get("zoom"))}function cU(r,t){A(t.get("geoCoord"),function(e,a){r.addGeoCoord(a,e)})}var vU=function(){function r(){this.dimensions=TP}return r.prototype.create=function(t,e){var a=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new iw(l+s,l,$({nameMap:o.get("nameMap"),api:e,ecModel:t},n(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=ow,u.resize(o,e)}),t.eachSeries(function(o){Ou({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",ae).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var i={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),A(i,function(o,s){var l=Y(o,function(f){return f.get("nameMap")}),u=new iw(s,s,$({nameMap:mm(l),api:e,ecModel:t},n(o[0])));u.zoomLimit=Ve.apply(null,Y(o,function(f){return f.get("scaleLimit")})),a.push(u),u.resize=ow,u.resize(o[0],e),A(o,function(f){f.coordinateSystem=u,cU(u,f)})}),a},r.prototype.getFilledRegions=function(t,e,a,n){for(var i=(t||[]).slice(),o=rt(),s=0;s=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},e.push(s)}}function xU(r,t){var e=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(e.length){wU(r);var i=(e[0].hierNode.prelim+e[e.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+t(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+t(r,n));r.parentNode.hierNode.defaultAncestor=TU(r,n,r.parentNode.hierNode.defaultAncestor||a[0],t)}function bU(r){var t=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:t},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function sw(r){return arguments.length?r:MU}function El(r,t){return r-=Math.PI/2,{x:t*Math.cos(r),y:t*Math.sin(r)}}function wU(r){for(var t=r.children,e=t.length,a=0,n=0;--e>=0;){var i=t[e];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function TU(r,t,e,a){if(t){for(var n=r,i=r,o=i.parentNode.children[0],s=t,l=n.hierNode.modifier,u=i.hierNode.modifier,f=o.hierNode.modifier,c=s.hierNode.modifier;s=Jd(s),i=Qd(i),s&&i;){n=Jd(n),o=Qd(o),n.hierNode.ancestor=r;var v=s.hierNode.prelim+c-i.hierNode.prelim-u+a(s,i);v>0&&(AU(CU(s,r,e),r,v),u+=v,l+=v),c+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,f+=o.hierNode.modifier}s&&!Jd(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=c-l),i&&!Qd(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-f,e=r)}return e}function Jd(r){var t=r.children;return t.length&&r.isExpand?t[t.length-1]:r.hierNode.thread}function Qd(r){var t=r.children;return t.length&&r.isExpand?t[0]:r.hierNode.thread}function CU(r,t,e){return r.hierNode.ancestor.parentNode===t.parentNode?r.hierNode.ancestor:e}function AU(r,t,e){var a=e/(t.hierNode.i-r.hierNode.i);t.hierNode.change-=a,t.hierNode.shift+=e,t.hierNode.modifier+=e,t.hierNode.prelim+=e,r.hierNode.change+=a}function MU(r,t){return r.parentNode===t.parentNode?1:2}var DU=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),LU=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:G.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new DU},t.prototype.buildPath=function(e,a){var n=a.childPoints,i=n.length,o=a.parentPoint,s=n[0],l=n[i-1];if(i===1){e.moveTo(o[0],o[1]),e.lineTo(s[0],s[1]);return}var u=a.orient,f=u==="TB"||u==="BT"?0:1,c=1-f,v=J(a.forkPosition,1),h=[];h[f]=o[f],h[c]=o[c]+(l[c]-o[c])*v,e.moveTo(o[0],o[1]),e.lineTo(h[0],h[1]),e.moveTo(s[0],s[1]),h[f]=s[f],e.lineTo(h[0],h[1]),h[f]=l[f],e.lineTo(h[0],h[1]),e.lineTo(l[0],l[1]);for(var d=1;dm.x,b||(S=S-Math.PI));var w=b?"left":"right",T=s.getModel("label"),C=T.get("rotate"),M=C*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:T.get("position")||w,rotation:C==null?-S:M,origin:"center"}),D.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),L=I==="relative"?Ql(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;L&&(pt(e).focus=L),PU(n,o,f,e,d,h,p,a),e.__edge&&(e.onHoverStateChange=function(k){if(k!=="blur"){var R=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);R&&R.hoverState===Pu||Uc(e.__edge,k)}})}function PU(r,t,e,a,n,i,o,s){var l=t.getModel(),u=r.get("edgeShape"),f=r.get("layout"),c=r.getOrient(),v=r.get(["lineStyle","curveness"]),h=r.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),p=a.__edge;if(u==="curve")t.parentNode&&t.parentNode!==e&&(p||(p=a.__edge=new eh({shape:ky(f,c,v,n,n)})),Et(p,{shape:ky(f,c,v,i,o)},r));else if(u==="polyline"&&f==="orthogonal"&&t!==e&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,y=[],m=0;me&&(e=n.height)}this.height=e+1},r.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,a=this.children,n=a.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},r.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var a=e.getData().tree.root,n=r.targetNode;if(Q(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function PP(r){for(var t=[];r;)r=r.parentNode,r&&t.push(r);return t.reverse()}function U0(r,t){var e=PP(r);return bt(e,t)>=0}function Sh(r,t){for(var e=[];r;){var a=r.dataIndex;e.push({name:r.name,dataIndex:a,value:t.getRawValue(a)}),r=r.parentNode}return e.reverse(),e}var HU=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e){var a={name:e.name,children:e.data},n=e.leaves||{},i=new Ot(n,this,this.ecModel),o=$0.createTree(a,this,s);function s(c){c.wrapMethod("getItemModel",function(v,h){var d=o.getNodeByDataIndex(h);return d&&d.children.length&&d.isExpand||(v.parentModel=i),v})}var l=0;o.eachNode("preorder",function(c){c.depth>l&&(l=c.depth)});var u=e.expandAndCollapse,f=u&&e.initialTreeDepth>=0?e.initialTreeDepth:l;return o.root.eachNode("preorder",function(c){var v=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=v&&v.collapsed!=null?!v.collapsed:c.depth<=f}),o.data},t.prototype.getOrient=function(){var e=this.get("orient");return e==="horizontal"?e="LR":e==="vertical"&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,a,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(e),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return ye("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=Sh(n,this),a.collapsed=!n.isExpand,a},t.type="series.tree",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:G.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(te);const WU=HU;function $U(r,t,e){for(var a=[r],n=[],i;i=a.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;i--)e.push(n[i])}}function UU(r,t){r.eachSeriesByType("tree",function(e){YU(e,t)})}function YU(r,t){var e=Ce(r,t).refContainer,a=Qt(r.getBoxLayoutParams(),e);r.layoutInfo=a;var n=r.get("layout"),i=0,o=0,s=null;n==="radial"?(i=2*Math.PI,o=Math.min(a.height,a.width)/2,s=sw(function(S,b){return(S.parentNode===b.parentNode?1:2)/S.depth})):(i=a.width,o=a.height,s=sw());var l=r.getData().tree.root,u=l.children[0];if(u){SU(l),$U(u,xU,s),l.hierNode.modifier=-u.hierNode.prelim,pl(u,bU);var f=u,c=u,v=u;pl(u,function(S){var b=S.getLayout().x;bc.getLayout().x&&(c=S),S.depth>v.depth&&(v=S)});var h=f===c?1:s(f,c)/2,d=h-f.getLayout().x,p=0,g=0,y=0,m=0;if(n==="radial")p=i/(c.getLayout().x+h+d),g=o/(v.depth-1||1),pl(u,function(S){y=(S.getLayout().x+d)*p,m=(S.depth-1)*g;var b=El(y,m);S.setLayout({x:b.x,y:b.y,rawX:y,rawY:m},!0)});else{var _=r.getOrient();_==="RL"||_==="LR"?(g=o/(c.getLayout().x+h+d),p=i/(v.depth-1||1),pl(u,function(S){m=(S.getLayout().x+d)*g,y=_==="LR"?(S.depth-1)*p:i-(S.depth-1)*p,S.setLayout({x:y,y:m},!0)})):(_==="TB"||_==="BT")&&(p=i/(c.getLayout().x+h+d),g=o/(v.depth-1||1),pl(u,function(S){y=(S.getLayout().x+d)*p,m=_==="TB"?(S.depth-1)*g:o-(S.depth-1)*g,S.setLayout({x:y,y:m},!0)}))}}}function ZU(r){r.eachSeriesByType("tree",function(t){var e=t.getData(),a=e.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=e.ensureUniqueItemVisual(n.dataIndex,"style");$(s,o)})})}function XU(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(a){var n=t.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var i=n.coordinateSystem,o=mh(i,t,n.get("scaleLimit"));n.setCenter(o.center),n.setZoom(o.zoom)})})}function qU(r){r.registerChartView(kU),r.registerSeriesModel(WU),r.registerLayout(UU),r.registerVisual(ZU),XU(r)}var vw=["treemapZoomToNode","treemapRender","treemapMove"];function KU(r){for(var t=0;t1;)i=i.parentNode;var o=jg(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var jU=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,a){var n={name:e.name,children:e.data};RP(n);var i=e.levels||[],o=this.designatedVisualItemStyle={},s=new Ot({itemStyle:o},this,a);i=e.levels=JU(i,a);var l=Y(i||[],function(c){return new Ot(c,s,a)},this),u=$0.createTree(n,this,f);function f(c){c.wrapMethod("getItemModel",function(v,h){var d=u.getNodeByDataIndex(h),p=d?l[d.depth]:null;return v.parentModel=p||s,v})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,a,n){var i=this.getData(),o=this.getRawValue(e),s=i.getName(e);return ye("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=Sh(n,this),a.treePathInfo=a.treeAncestors,a},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},$(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var a=this._idIndexMap;a||(a=this._idIndexMap=rt(),this._idIndexMapCount=0);var n=a.get(e);return n==null&&a.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 a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){kP(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:G.size.l,top:G.size.xxxl,right:G.size.l,bottom:G.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:G.size.m,emptyItemWidth:25,itemStyle:{color:G.color.backgroundShade,textStyle:{color:G.color.secondary}},emphasis:{itemStyle:{color:G.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:G.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:G.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}(te);function RP(r){var t=0;A(r.children,function(a){RP(a);var n=a.value;U(n)&&(n=n[0]),t+=n});var e=r.value;U(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),U(r.value)?r.value[0]=e:r.value=e}function JU(r,t){var e=Ut(t.get("color")),a=Ut(t.get(["aria","decal","decals"]));if(e){r=r||[];var n,i;A(r,function(s){var l=new Ot(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=e.slice()),!i&&a&&(o.decal=a.slice()),r}}const QU=jU;var t8=8,hw=8,tp=5,e8=function(){function r(t){this.group=new lt,t.add(this.group)}return r.prototype.render=function(t,e,a,n){var i=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),c=Ce(t,e).refContainer,v={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},h={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},d=Qt(v,c);this._prepare(a,h,u),this._renderContent(t,h,d,s,l,u,f,n),sh(o,v,c)}},r.prototype._prepare=function(t,e,a){for(var n=t;n;n=n.parentNode){var i=xe(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+t8*2,e.emptyItemWidth);e.totalWidth+=s+hw,e.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(t,e,a,n,i,o,s,l){for(var u=0,f=e.emptyItemWidth,c=t.get(["breadcrumb","height"]),v=e.totalWidth,h=e.renderList,d=i.getModel("itemStyle").getItemStyle(),p=h.length-1;p>=0;p--){var g=h[p],y=g.node,m=g.width,_=g.text;v>a.width&&(v-=m-f,m=f,_=null);var S=new ar({shape:{points:r8(u,0,m,c,p===h.length-1,p===0)},style:vt(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Rt({style:Zt(o,{text:_})}),textConfig:{position:"inside"},z2:Es*1e4,onclick:xt(l,y)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=Zt(s,{text:_}),S.ensureState("emphasis").style=d,Jt(S,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(S),a8(S,t,y),u+=m+hw}},r.prototype.remove=function(){this.group.removeAll()},r}();function r8(r,t,e,a,n,i){var o=[[n?r:r-tp,t],[r+e,t],[r+e,t+a],[n?r:r-tp,t+a]];return!i&&o.splice(2,0,[r+e+tp,t+a/2]),!n&&o.push([r,t+a/2]),o}function a8(r,t,e){pt(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:e&&e.dataIndex,name:e&&e.name},treePathInfo:e&&Sh(e,t)}}const n8=e8;var i8=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(t,e,a,n,i){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(t){return this._finishedCallback=t,this},r.prototype.start=function(){for(var t=this,e=this._storage.length,a=function(){e--,e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},n=0,i=this._storage.length;npw||Math.abs(e.dy)>pw)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.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 a=e.originX,n=e.originY,i=e.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new dt(s.x,s.y,s.width,s.height),u=null,f=this._controllerHost;u=f.zoomLimit;var c=f.zoom=f.zoom||1;if(c*=i,u){var v=u.min||0,h=u.max||1/0;c=Math.max(Math.min(h,c),v)}var d=c/f.zoom;f.zoom=c;var p=this.seriesModel.layoutInfo;a-=p.x,n-=p.y;var g=Oe();Pa(g,g,[-a,-n]),bm(g,g,[d,d]),Pa(g,g,[a,n]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},t.prototype._initEvents=function(e){var a=this;e.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(i){var o=a.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&qc(u,f)}}}}},this)},t.prototype._renderBreadcrumb=function(e,a,n){var i=this;n||(n=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new n8(this.group))).render(e,a,n.node,function(o){i._state!=="animating"&&(U0(e.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=gl(),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,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(e,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},t.type="treemap",t}(Xt);function gl(){return{nodeGroup:[],background:[],content:[]}}function c8(r,t,e,a,n,i,o,s,l,u){if(!o)return;var f=o.getLayout(),c=r.getData(),v=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var h=f.width,d=f.height,p=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=f.upperHeight,b=_&&_.length,x=v.getModel("itemStyle"),w=v.getModel(["emphasis","itemStyle"]),T=v.getModel(["blur","itemStyle"]),C=v.getModel(["select","itemStyle"]),M=x.get("borderRadius")||0,D=q("nodeGroup",Ry);if(!D)return;if(l.add(D),D.x=f.x||0,D.y=f.y||0,D.markRedraw(),mv(D).nodeWidth=h,mv(D).nodeHeight=d,f.isAboveViewRoot)return D;var I=q("background",dw,u,l8);I&&V(D,I,b&&f.upperLabelHeight);var L=v.getModel("emphasis"),k=L.get("focus"),R=L.get("blurScope"),P=L.get("disabled"),O=k==="ancestor"?o.getAncestorsIndices():k==="descendant"?o.getDescendantIndices():k;if(b)su(D)&&Vi(D,!1),I&&(Vi(I,!P),c.setItemGraphicEl(o.dataIndex,I),Vg(I,O,R));else{var E=q("content",dw,u,u8);E&&H(D,E),I.disableMorphing=!0,I&&su(I)&&Vi(I,!1),Vi(D,!P),c.setItemGraphicEl(o.dataIndex,D);var B=v.getShallow("cursor");B&&E.attr("cursor",B),Vg(D,O,R)}return D;function V(at,N,F){var Z=pt(N);if(Z.dataIndex=o.dataIndex,Z.seriesIndex=r.seriesIndex,N.setShape({x:0,y:0,width:h,height:d,r:M}),g)W(N);else{N.invisible=!1;var K=o.getVisual("style"),mt=K.stroke,gt=mw(x);gt.fill=mt;var ut=Li(w);ut.fill=w.get("borderColor");var At=Li(T);At.fill=T.get("borderColor");var Ht=Li(C);if(Ht.fill=C.get("borderColor"),F){var ne=h-2*p;X(N,mt,K.opacity,{x:p,y:0,width:ne,height:S})}else N.removeTextContent();N.setStyle(gt),N.ensureState("emphasis").style=ut,N.ensureState("blur").style=At,N.ensureState("select").style=Ht,io(N)}at.add(N)}function H(at,N){var F=pt(N);F.dataIndex=o.dataIndex,F.seriesIndex=r.seriesIndex;var Z=Math.max(h-2*p,0),K=Math.max(d-2*p,0);if(N.culling=!0,N.setShape({x:p,y:p,width:Z,height:K,r:M}),g)W(N);else{N.invisible=!1;var mt=o.getVisual("style"),gt=mt.fill,ut=mw(x);ut.fill=gt,ut.decal=mt.decal;var At=Li(w),Ht=Li(T),ne=Li(C);X(N,gt,mt.opacity,null),N.setStyle(ut),N.ensureState("emphasis").style=At,N.ensureState("blur").style=Ht,N.ensureState("select").style=ne,io(N)}at.add(N)}function W(at){!at.invisible&&i.push(at)}function X(at,N,F,Z){var K=v.getModel(Z?yw:gw),mt=xe(v.get("name"),null),gt=K.getShallow("show");Ie(at,Te(v,Z?yw:gw),{defaultText:gt?mt:null,inheritColor:N,defaultOpacity:F,labelFetcher:r,labelDataIndex:o.dataIndex});var ut=at.getTextContent();if(ut){var At=ut.style,Ht=Gv(At.padding||0);Z&&(at.setTextConfig({layoutRect:Z}),ut.disableLabelLayout=!0),ut.beforeUpdate=function(){var ie=Math.max((Z?Z.width:at.shape.width)-Ht[1]-Ht[3],0),fr=Math.max((Z?Z.height:at.shape.height)-Ht[0]-Ht[2],0);(At.width!==ie||At.height!==fr)&&ut.setStyle({width:ie,height:fr})},At.truncateMinChar=2,At.lineOverflow="truncate",j(At,Z,f);var ne=ut.getState("emphasis");j(ne?ne.style:null,Z,f)}}function j(at,N,F){var Z=at?at.text:null;if(!N&&F.isLeafRoot&&Z!=null){var K=r.get("drillDownIcon",!0);at.text=K?K+" "+Z:Z}}function q(at,N,F,Z){var K=m!=null&&e[at][m],mt=n[at];return K?(e[at][m]=null,it(mt,K)):g||(K=new N,K instanceof Vr&&(K.z2=v8(F,Z)),St(mt,K)),t[at][y]=K}function it(at,N){var F=at[y]={};N instanceof Ry?(F.oldX=N.x,F.oldY=N.y):F.oldShape=$({},N.shape)}function St(at,N){var F=at[y]={},Z=o.parentNode,K=N instanceof lt;if(Z&&(!a||a.direction==="drillDown")){var mt=0,gt=0,ut=n.background[Z.getRawIndex()];!a&&ut&&ut.oldShape&&(mt=ut.oldShape.width,gt=ut.oldShape.height),K?(F.oldX=0,F.oldY=gt):F.oldShape={x:mt,y:gt,width:0,height:0}}F.fadein=!K}}function v8(r,t){return r*s8+t}const h8=f8;var wu=A,d8=ht,_v=-1,Y0=function(){function r(t){var e=t.mappingMethod,a=t.type,n=this.option=st(t);this.type=a,this.mappingMethod=e,this._normalizeData=y8[e];var i=r.visualHandlers[a];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[e],e==="piecewise"?(ep(n),p8(n)):e==="category"?n.categories?g8(n):ep(n,!0):(Ze(e!=="linear"||n.dataExtent),ep(n))}return r.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},r.prototype.getNormalizer=function(){return tt(this._normalizeData,this)},r.listVisualTypes=function(){return It(r.visualHandlers)},r.isValidType=function(t){return r.visualHandlers.hasOwnProperty(t)},r.eachVisual=function(t,e,a){ht(t)?A(t,e,a):e.call(a,t)},r.mapVisual=function(t,e,a){var n,i=U(t)?[]:ht(t)?{}:(n=!0,null);return r.eachVisual(t,function(o,s){var l=e.call(a,o,s);n?i=l:i[s]=l}),i},r.retrieveVisuals=function(t){var e={},a;return t&&wu(r.visualHandlers,function(n,i){t.hasOwnProperty(i)&&(e[i]=t[i],a=!0)}),a?e:null},r.prepareVisualTypes=function(t){if(U(t))t=t.slice();else if(d8(t)){var e=[];wu(t,function(a,n){e.push(n)}),t=e}else return[];return t.sort(function(a,n){return n==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),t},r.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},r.findPieceIndex=function(t,e,a){for(var n,i=1/0,o=0,s=e.length;o=0;i--)a[i]==null&&(delete e[t[i]],t.pop())}function ep(r,t){var e=r.visual,a=[];ht(e)?wu(e,function(i){a.push(i)}):e!=null&&a.push(e);var n={color:1,symbol:1};!t&&a.length===1&&!n.hasOwnProperty(r.type)&&(a[1]=a[0]),EP(r,a)}function Gf(r){return{applyVisual:function(t,e,a){var n=this.mapValueToVisual(t);a("color",r(e("color"),n))},_normalizedToVisual:Ey([0,1])}}function _w(r){var t=this.option.visual;return t[Math.round(Gt(r,[0,1],[0,t.length-1],!0))]||{}}function yl(r){return function(t,e,a){a(r,this.mapValueToVisual(t))}}function Ol(r){var t=this.option.visual;return t[this.option.loop&&r!==_v?r%t.length:r]}function Ii(){return this.option.visual[0]}function Ey(r){return{linear:function(t){return Gt(t,r,this.option.visual,!0)},category:Ol,piecewise:function(t,e){var a=Oy.call(this,e);return a==null&&(a=Gt(t,r,this.option.visual,!0)),a},fixed:Ii}}function Oy(r){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var a=Y0.findPieceIndex(r,e),n=e[a];if(n&&n.visual)return n.visual[this.type]}}function EP(r,t){return r.visual=t,r.type==="color"&&(r.parsedVisual=Y(t,function(e){var a=lr(e);return a||[0,0,0,1]})),t}var y8={linear:function(r){return Gt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var t=this.option.pieceList,e=Y0.findPieceIndex(r,t,!0);if(e!=null)return Gt(e,[0,t.length-1],[0,1],!0)},category:function(r){var t=this.option.categories?this.option.categoryMap[r]:r;return t??_v},fixed:fe};function Ff(r,t,e){return r?t<=e:t=e.length||p===e[p.depth]){var y=w8(n,l,p,g,d,a);NP(p,y,e,a)}})}}}function S8(r,t,e){var a=$({},t),n=e.designatedVisualItemStyle;return A(["color","colorAlpha","colorSaturation"],function(i){n[i]=t[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function Sw(r){var t=rp(r,"color");if(t){var e=rp(r,"colorAlpha"),a=rp(r,"colorSaturation");return a&&(t=Bn(t,null,null,a)),e&&(t=Oc(t,e)),t}}function x8(r,t){return t!=null?Bn(t,null,null,r):null}function rp(r,t){var e=r[t];if(e!=null&&e!=="none")return e}function b8(r,t,e,a,n,i){if(!(!i||!i.length)){var o=ap(t,"color")||n.color!=null&&n.color!=="none"&&(ap(t,"colorAlpha")||ap(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=e.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=t.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(f==="index"||f==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var v=new Ge(c);return OP(v).drColorMappingBy=f,v}}}function ap(r,t){var e=r.get(t);return U(e)&&e.length?{name:t,range:e}:null}function w8(r,t,e,a,n,i){var o=$({},t);if(n){var s=n.type,l=s==="color"&&OP(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(e.getId()):e.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var Tu=Math.max,Sv=Math.min,xw=Ve,Z0=A,BP=["itemStyle","borderWidth"],T8=["itemStyle","gapWidth"],C8=["upperLabel","show"],A8=["upperLabel","height"];const M8={seriesType:"treemap",reset:function(r,t,e,a){var n=r.option,i=Ce(r,e).refContainer,o=Qt(r.getBoxLayoutParams(),i),s=n.size||[],l=J(xw(o.width,s[0]),i.width),u=J(xw(o.height,s[1]),i.height),f=a&&a.type,c=["treemapZoomToNode","treemapRootToNode"],v=bu(a,c,r),h=f==="treemapRender"||f==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),p=PP(d);if(f!=="treemapMove"){var g=f==="treemapZoomToNode"?R8(r,v,d,l,u):h?[h.width,h.height]:[l,u],y=n.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var m={squareRatio:n.squareRatio,sort:y,leafDepth:n.leafDepth};d.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};d.setLayout(_),zP(d,m,!1,0),_=d.getLayout(),Z0(p,function(b,x){var w=(p[x+1]||d).getValue();b.setLayout($({dataExtent:[w,w],borderWidth:0,upperHeight:0},_))})}var S=r.getData().tree.root;S.setLayout(E8(o,h,v),!0),r.setLayoutInfo(o),VP(S,new dt(-o.x,-o.y,e.getWidth(),e.getHeight()),p,d,0)}};function zP(r,t,e,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var s=r.getModel(),l=s.get(BP),u=s.get(T8)/2,f=GP(s),c=Math.max(l,f),v=l-u,h=c-u;r.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:f},!0),n=Tu(n-2*v,0),i=Tu(i-v-h,0);var d=n*i,p=D8(r,s,d,t,e,a);if(p.length){var g={x:v,y:h,width:n,height:i},y=Sv(n,i),m=1/0,_=[];_.area=0;for(var S=0,b=p.length;S=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/e*ts[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function k8(r,t,e){for(var a=0,n=1/0,i=0,o=void 0,s=r.length;ia&&(a=o));var l=r.area*r.area,u=t*t*e;return l?Tu(u*a/l,l/(u*n)):1/0}function bw(r,t,e,a,n){var i=t===e.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=e[s[i]],f=t?r.area/t:0;(n||f>e[l[o]])&&(f=e[l[o]]);for(var c=0,v=r.length;cT1&&(u=T1),i=s}ua&&(a=t);var i=a%2?a+2:a+3;n=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var w=S[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(S[1],S[0]);c[0].8?"left":v[0]<-.8?"right":"center",p=v[1]>.8?"top":v[1]<-.8?"bottom":"middle";break;case"start":i.x=-v[0]*y+f[0],i.y=-v[1]*m+f[1],d=v[0]>.8?"right":v[0]<-.8?"left":"center",p=v[1]>.8?"bottom":v[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*w+f[0],i.y=f[1]+C,d=S[0]<0?"right":"left",i.originX=-y*w,i.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+C,d="center",i.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*w+c[0],i.y=c[1]+C,d=S[0]>=0?"right":"left",i.originX=y*w,i.originY=-C;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}},t}(lt);const j0=J8;var Q8=function(){function r(t){this.group=new lt,this._LineCtor=t||j0}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=t,i||n.removeAll();var o=Dw(t);t.diff(i).add(function(s){e._doAdd(t,s,o)}).update(function(s,l){e._doUpdate(i,t,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,a){e.updateLayout(t,a)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Dw(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function a(s){!s.isGroup&&!t6(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=t.start;n0}function Dw(r){var t=r.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:Te(t)}}function Lw(r){return isNaN(r[0])||isNaN(r[1])}function lp(r){return r&&!Lw(r[0])&&!Lw(r[1])}const J0=Q8;var up=[],fp=[],cp=[],$o=Ee,vp=Yi,Iw=Math.abs;function Pw(r,t,e){for(var a=r[0],n=r[1],i=r[2],o=1/0,s,l=e*e,u=.1,f=.1;f<=.9;f+=.1){up[0]=$o(a[0],n[0],i[0],f),up[1]=$o(a[1],n[1],i[1],f);var c=Iw(vp(up,t)-l);c=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function hp(r,t){var e=[],a=tu,n=[[],[],[]],i=[[],[]],o=[];t/=2,r.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),c=s.getVisual("toSymbol");u.__original||(u.__original=[Xa(u[0]),Xa(u[1])],u[2]&&u.__original.push(Xa(u[2])));var v=u.__original;if(u[2]!=null){if(je(n[0],v[0]),je(n[1],v[2]),je(n[2],v[1]),f&&f!=="none"){var h=Bl(s.node1),d=Pw(n,v[0],h*t);a(n[0][0],n[1][0],n[2][0],d,e),n[0][0]=e[3],n[1][0]=e[4],a(n[0][1],n[1][1],n[2][1],d,e),n[0][1]=e[3],n[1][1]=e[4]}if(c&&c!=="none"){var h=Bl(s.node2),d=Pw(n,v[1],h*t);a(n[0][0],n[1][0],n[2][0],d,e),n[1][0]=e[1],n[2][0]=e[2],a(n[0][1],n[1][1],n[2][1],d,e),n[1][1]=e[1],n[2][1]=e[2]}je(u[0],n[0]),je(u[1],n[2]),je(u[2],n[1])}else{if(je(i[0],v[0]),je(i[1],v[1]),Bi(o,i[1],i[0]),Ps(o,o),f&&f!=="none"){var h=Bl(s.node1);ig(i[0],i[0],o,h*t)}if(c&&c!=="none"){var h=Bl(s.node2);ig(i[1],i[1],o,-h*t)}je(u[0],i[0]),je(u[1],i[1])}})}var ZP=Dt();function e6(r){if(r)return ZP(r).bridge}function kw(r,t){r&&(ZP(r).bridge=t)}function Rw(r){return r.type==="view"}var r6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){var n=new Fu,i=new J0,o=this.group,s=new lt;this._controller=new wo(a.getZr()),this._controllerHost={target:s},s.add(n.group),s.add(i.group),o.add(s),this._symbolDraw=n,this._lineDraw=i,this._mainGroup=s,this._firstRender=!0},t.prototype.render=function(e,a,n){var i=this,o=e.coordinateSystem,s=!1;this._model=e,this._api=n,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(n);var u=this._symbolDraw,f=this._lineDraw;if(Rw(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(c):Et(this._mainGroup,c,e)}hp(e.getGraph(),Nl(e));var v=e.getData();u.updateData(v);var h=e.getEdgeData();f.updateData(h),this._updateNodeAndLinkScale(),this._updateController(null,e,n),clearTimeout(this._layoutTimeout);var d=e.forceLayout,p=e.get(["force","layoutAnimation"]);d&&(s=!0,this._startForceLayoutIteration(d,n,p));var g=e.get("layout");v.graph.eachNode(function(S){var b=S.dataIndex,x=S.getGraphicEl(),w=S.getModel();if(x){x.off("drag").off("dragend");var T=w.get("draggable");T&&x.on("drag",function(M){switch(g){case"force":d.warmUp(),!i._layouting&&i._startForceLayoutIteration(d,n,p),d.setFixed(b),v.setItemLayout(b,[x.x,x.y]);break;case"circular":v.setItemLayout(b,[x.x,x.y]),S.setLayout({fixed:!0},!0),K0(e,"symbolSize",S,[M.offsetX,M.offsetY]),i.updateLayout(e);break;case"none":default:v.setItemLayout(b,[x.x,x.y]),q0(e.getGraph(),e),i.updateLayout(e);break}}).on("dragend",function(){d&&d.setUnfixed(b)}),x.setDraggable(T,!!w.get("cursor"));var C=w.get(["emphasis","focus"]);C==="adjacency"&&(pt(x).focus=S.getAdjacentDataIndices())}}),v.graph.eachEdge(function(S){var b=S.getGraphicEl(),x=S.getModel().get(["emphasis","focus"]);b&&x==="adjacency"&&(pt(b).focus={edge:[S.dataIndex],node:[S.node1.dataIndex,S.node2.dataIndex]})});var y=e.get("layout")==="circular"&&e.get(["circular","rotateLabel"]),m=v.getLayout("cx"),_=v.getLayout("cy");v.graph.eachNode(function(S){$P(S,y,m,_)}),this._firstRender=!1,s||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,a,n){var i=this,o=!1;(function s(){e.step(function(l){i.updateLayout(i._model),(l||!o)&&(o=!0,i._renderThumbnail(i._model,a,i._symbolDraw,i._lineDraw)),(i._layouting=!l)&&(n?i._layoutTimeout=setTimeout(s,16):s())})})()},t.prototype._updateController=function(e,a,n){var i=this._controller,o=this._controllerHost,s=a.coordinateSystem;if(!Rw(s)){i.disable();return}i.enable(a.get("roam"),{api:n,zInfo:{component:a},triggerInfo:{roamTrigger:a.get("roamTrigger"),isInSelf:function(l,u,f){return s.containPoint([u,f])},isInClip:function(l,u,f){return!e||e.contain(u,f)}}}),o.zoomLimit=a.get("scaleLimit"),o.zoom=s.getZoom(),i.off("pan").off("zoom").on("pan",function(l){n.dispatchAction({seriesId:a.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){n.dispatchAction({seriesId:a.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},t.prototype.updateViewOnPan=function(e,a,n){this._active&&(V0(this._controllerHost,n.dx,n.dy),this._updateThumbnailWindow())},t.prototype.updateViewOnZoom=function(e,a,n){this._active&&(G0(this._controllerHost,n.zoom,n.originX,n.originY),this._updateNodeAndLinkScale(),hp(e.getGraph(),Nl(e)),this._lineDraw.updateLayout(),a.updateLabelLayout(),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,a=e.getData(),n=Nl(e);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(hp(e.getGraph(),Nl(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,a=e.coordinateSystem;if(a.type==="view"){var n=e6(e);if(n)return{bridge:n,coordSys:a}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(e.coordSys.transform,this._api)},t.prototype._renderThumbnail=function(e,a,n,i){var o=this._getThumbnailInfo();if(o){var s=new lt,l=n.group.children(),u=i.group.children(),f=new lt,c=new lt;s.add(c),s.add(f);for(var v=0;v=0&&t.call(e,a[i],i)},r.prototype.eachEdge=function(t,e){for(var a=this.edges,n=a.length,i=0;i=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&t.call(e,a[i],i)},r.prototype.breadthFirstTraverse=function(t,e,a,n){if(e instanceof Pi||(e=this._nodesMap[Uo(e)]),!!e){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i=0&&!t.hasKey(d)&&(t.set(d,!0),o.push(h.node1))}for(l=0;l=0&&!t.hasKey(_)&&(t.set(_,!0),s.push(m.node2))}}}return{edge:t.keys(),node:e.keys()}},r}(),XP=function(){function r(t,e,a){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=a??-1}return r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,a=e.edgeData.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var t=rt(),e=rt();t.set(this.dataIndex,!0);for(var a=[this.node1],n=[this.node2],i=0;i=0&&!t.hasKey(c)&&(t.set(c,!0),a.push(f.node1))}for(i=0;i=0&&!t.hasKey(p)&&(t.set(p,!0),n.push(d.node2))}return{edge:t.keys(),node:e.keys()}},r}();function qP(r,t){return{getValue:function(e){var a=this[r][t];return a.getStore().get(a.getDimensionIndex(e||"value"),this.dataIndex)},setVisual:function(e,a){this.dataIndex>=0&&this[r][t].setItemVisual(this.dataIndex,e,a)},getVisual:function(e){return this[r][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,a){this.dataIndex>=0&&this[r][t].setItemLayout(this.dataIndex,e,a)},getLayout:function(){return this[r][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][t].getRawIndex(this.dataIndex)}}}_e(Pi,qP("hostGraph","data"));_e(XP,qP("hostGraph","edgeData"));const i6=n6;function Q0(r,t,e,a,n){for(var i=new i6(a),o=0;o "+v)),u++)}var h=e.get("coordinateSystem"),d;if(h==="cartesian2d"||h==="polar"||h==="matrix")d=cn(r,e);else{var p=Nu.get(h),g=p?p.dimensions||[]:[];bt(g,"value")<0&&g.concat(["value"]);var y=zu(r,{coordDimensions:g,encodeDefine:e.getEncode()}).dimensions;d=new tr(y,e),d.initData(r)}var m=new tr(["value"],e);return m.initData(l,s),n&&n(d,m),LP({mainData:d,struct:i,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var o6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments);var a=this;function n(){return a._categoriesData}this.legendVisualProvider=new Ys(n,n),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(e){r.prototype.mergeDefaultAndTheme.apply(this,arguments),ro(e,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,a){var n=e.edges||e.links||[],i=e.data||e.nodes||[],o=this;if(i&&n){F8(this);var s=Q0(i,n,this,!0,l);return A(s.edges,function(u){H8(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,f){u.wrapMethod("getItemModel",function(d){var p=o._categoriesModels,g=d.getShallow("category"),y=p[g];return y&&(y.parentModel=d.parentModel,d.parentModel=y),d});var c=Ot.prototype.getModel;function v(d,p){var g=c.call(this,d,p);return g.resolveParentPath=h,g}f.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=v,d});function h(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,a,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(e,n),s=i.graph.getEdgeByIndex(e),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),ye("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var c=KL({series:this,dataIndex:e,multipleSeries:a});return c},t.prototype._updateCategoriesData=function(){var e=Y(this.option.categories||[],function(n){return n.value!=null?n:$({value:0},n)}),a=new tr(["value"],this);a.initData(e),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",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:G.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:G.color.primary}}},t}(te);const s6=o6;function l6(r){r.registerChartView(a6),r.registerSeriesModel(s6),r.registerProcessor(N8),r.registerVisual(B8),r.registerVisual(z8),r.registerLayout(W8),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,U8),r.registerLayout(Z8),r.registerCoordinateSystem("graphView",{dimensions:To.dimensions,create:q8}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},fe),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},fe),r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",query:t},function(n){var i=a.getViewOfSeriesModel(n);i&&(t.dx!=null&&t.dy!=null&&i.updateViewOnPan(n,a,t),t.zoom!=null&&t.originX!=null&&t.originY!=null&&i.updateViewOnZoom(n,a,t));var o=n.coordinateSystem,s=mh(o,t,n.get("scaleLimit"));n.setCenter&&n.setCenter(s.center),n.setZoom&&n.setZoom(s.zoom)})})}var u6=function(r){z(t,r);function t(e,a,n){var i=r.call(this)||this;pt(i).dataType="node",i.z2=2;var o=new Rt;return i.setTextContent(o),i.updateData(e,a,n,!0),i}return t.prototype.updateData=function(e,a,n,i){var o=this,s=e.graph.getNodeByIndex(a),l=e.hostModel,u=s.getModel(),f=u.getModel("emphasis"),c=e.getItemLayout(a),v=$(Ca(u.getModel("itemStyle"),c,!0),c),h=this;if(isNaN(v.startAngle)){h.setShape(v);return}i?h.setShape(v):Et(h,{shape:v},l,a);var d=$(Ca(u.getModel("itemStyle"),c,!0),c);o.setShape(d),o.useStyle(e.getItemVisual(a,"style")),we(o,u),this._updateLabel(l,u,s),e.setItemGraphicEl(a,h),we(h,u,"itemStyle");var p=f.get("focus");Jt(this,p==="adjacency"?s.getAdjacentDataIndices():p,f.get("blurScope"),f.get("disabled"))},t.prototype._updateLabel=function(e,a,n){var i=this.getTextContent(),o=n.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),f=a.getModel("label");i.ignore=!f.get("show");var c=Te(a),v=n.getVisual("style");Ie(i,c,{labelFetcher:{getFormattedLabel:function(m,_,S,b,x,w){return e.getFormattedLabel(m,_,"node",b,_r(x,c.normal&&c.normal.get("formatter"),a.get("name")),w)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+"",inheritColor:v.fill,defaultOpacity:v.opacity,defaultOutsidePosition:"startArc"});var h=f.get("position")||"outside",d=f.get("distance")||0,p;h==="outside"?p=o.r+d:p=(o.r+o.r0)/2,this.textConfig={inside:h!=="outside"};var g=h!=="outside"?f.get("align")||"center":l>0?"left":"right",y=h!=="outside"?f.get("verticalAlign")||"middle":u>0?"top":"bottom";i.attr({x:l*p+o.cx,y:u*p+o.cy,rotation:0,style:{align:g,verticalAlign:y}})},t}(rr);const Ew=u6;var f6=function(r){z(t,r);function t(e,a,n,i){var o=r.call(this)||this;return pt(o).dataType="edge",o.updateData(e,a,n,i,!0),o}return t.prototype.buildPath=function(e,a){e.moveTo(a.s1[0],a.s1[1]);var n=.7,i=a.clockwise;e.arc(a.cx,a.cy,a.r,a.sStartAngle,a.sEndAngle,!i),e.bezierCurveTo((a.cx-a.s2[0])*n+a.s2[0],(a.cy-a.s2[1])*n+a.s2[1],(a.cx-a.t1[0])*n+a.t1[0],(a.cy-a.t1[1])*n+a.t1[1],a.t1[0],a.t1[1]),e.arc(a.cx,a.cy,a.r,a.tStartAngle,a.tEndAngle,!i),e.bezierCurveTo((a.cx-a.t2[0])*n+a.t2[0],(a.cy-a.t2[1])*n+a.t2[1],(a.cx-a.s1[0])*n+a.s1[0],(a.cy-a.s1[1])*n+a.s1[1],a.s1[0],a.s1[1]),e.closePath()},t.prototype.updateData=function(e,a,n,i,o){var s=e.hostModel,l=a.graph.getEdgeByIndex(n),u=l.getLayout(),f=l.node1.getModel(),c=a.getItemModel(l.dataIndex),v=c.getModel("lineStyle"),h=c.getModel("emphasis"),d=h.get("focus"),p=$(Ca(f.getModel("itemStyle"),u,!0),u),g=this;if(isNaN(p.sStartAngle)||isNaN(p.tStartAngle)){g.setShape(p);return}o?(g.setShape(p),Ow(g,l,e,v)):(Gr(g),Ow(g,l,e,v),Et(g,{shape:p},s,n)),Jt(this,d==="adjacency"?l.getAdjacentDataIndices():d,h.get("blurScope"),h.get("disabled")),we(g,c,"lineStyle"),a.setItemGraphicEl(l.dataIndex,g)},t}(Lt);function Ow(r,t,e,a){var n=t.node1,i=t.node2,o=r.style;r.setStyle(a.getLineStyle());var s=a.get("color");switch(s){case"source":o.fill=e.getItemVisual(n.dataIndex,"style").fill,o.decal=n.getVisual("style").decal;break;case"target":o.fill=e.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"gradient":var l=e.getItemVisual(n.dataIndex,"style").fill,u=e.getItemVisual(i.dataIndex,"style").fill;if(Q(l)&&Q(u)){var f=r.shape,c=(f.s1[0]+f.s2[0])/2,v=(f.s1[1]+f.s2[1])/2,h=(f.t1[0]+f.t2[0])/2,d=(f.t1[1]+f.t2[1])/2;o.fill=new Os(c,v,h,d,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var c6=Math.PI/180,v6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){},t.prototype.render=function(e,a,n){var i=e.getData(),o=this._data,s=this.group,l=-e.get("startAngle")*c6;if(i.diff(o).add(function(f){var c=i.getItemLayout(f);if(c){var v=new Ew(i,f,l);pt(v).dataIndex=f,s.add(v)}}).update(function(f,c){var v=o.getItemGraphicEl(c),h=i.getItemLayout(f);if(!h){v&&qa(v,e,c);return}v?v.updateData(i,f,l):v=new Ew(i,f,l),s.add(v)}).remove(function(f){var c=o.getItemGraphicEl(f);c&&qa(c,e,f)}).execute(),!o){var u=e.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=J(u[0],n.getWidth()),this.group.originY=J(u[1],n.getHeight()),jt(this.group,{scaleX:1,scaleY:1},e)}this._data=i,this.renderEdges(e,l)},t.prototype.renderEdges=function(e,a){var n=e.getData(),i=e.getEdgeData(),o=this._edgeData,s=this.group;i.diff(o).add(function(l){var u=new f6(n,i,l,a);pt(u).dataIndex=l,s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(n,i,l,a),s.add(f)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&qa(u,e,l)}).execute(),this._edgeData=i},t.prototype.dispose=function(){},t.type="chord",t}(Xt);const h6=v6;var d6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this.legendVisualProvider=new Ys(tt(this.getData,this),tt(this.getRawData,this))},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links)},t.prototype.getInitialData=function(e,a){var n=e.edges||e.links||[],i=e.data||e.nodes||[];if(i&&n){var o=Q0(i,n,this,!0,s);return o.data}function s(l,u){var f=Ot.prototype.getModel;function c(h,d){var p=f.call(this,h,d);return p.resolveParentPath=v,p}u.wrapMethod("getItemModel",function(h){return h.resolveParentPath=v,h.getModel=c,h});function v(h){if(h&&(h[0]==="label"||h[1]==="label")){var d=h.slice();return h[0]==="label"?d[0]="edgeLabel":h[1]==="label"&&(d[1]="edgeLabel"),d}return h}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,a,n){var i=this.getDataParams(e,n);if(n==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(e),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),ye("nameValue",{name:f.join(" > "),value:i.value,noValue:i.value==null})}return ye("nameValue",{name:i.name,value:i.value,noValue:i.value==null})},t.prototype.getDataParams=function(e,a){var n=r.prototype.getDataParams.call(this,e,a);if(a==="node"){var i=this.getData(),o=this.getGraph().getNodeByIndex(e);if(n.name==null&&(n.name=i.getName(e)),n.value==null){var s=o.getLayout().value;n.value=s}}return n},t.type="series.chord",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}(te);const p6=d6;var dp=Math.PI/180;function g6(r,t){r.eachSeriesByType("chord",function(e){y6(e,t)})}function y6(r,t){var e=r.getData(),a=e.graph,n=r.getEdgeData(),i=n.count();if(i){var o=hL(r,t),s=o.cx,l=o.cy,u=o.r,f=o.r0,c=Math.max((r.get("padAngle")||0)*dp,0),v=Math.max((r.get("minAngle")||0)*dp,0),h=-r.get("startAngle")*dp,d=h+Math.PI*2,p=r.get("clockwise"),g=p?1:-1,y=[h,d];Kv(y,!p);var m=y[0],_=y[1],S=_-m,b=e.getSum("value")===0&&n.getSum("value")===0,x=[],w=0;a.eachEdge(function(E){var B=b?1:E.getValue("value");b&&(B>0||v)&&(w+=2);var V=E.node1.dataIndex,H=E.node2.dataIndex;x[V]=(x[V]||0)+B,x[H]=(x[H]||0)+B});var T=0;if(a.eachNode(function(E){var B=E.getValue("value");isNaN(B)||(x[E.dataIndex]=Math.max(B,x[E.dataIndex]||0)),!b&&(x[E.dataIndex]>0||v)&&w++,T+=x[E.dataIndex]||0}),!(w===0||T===0)){c*w>=Math.abs(S)&&(c=Math.max(0,(Math.abs(S)-v*w)/w)),(c+v)*w>=Math.abs(S)&&(v=(Math.abs(S)-c*w)/w);var C=(S-c*w*g)/T,M=0,D=0,I=0;a.eachNode(function(E){var B=x[E.dataIndex]||0,V=C*(T?B:1)*g;Math.abs(V)D){var k=M/D;a.eachNode(function(E){var B=E.getLayout().angle;Math.abs(B)>=v?E.setLayout({angle:B*k,ratio:k},!0):E.setLayout({angle:v,ratio:v===0?1:B/v},!0)})}else a.eachNode(function(E){if(!L){var B=E.getLayout().angle,V=Math.min(B/I,1),H=V*M;B-Hv&&v>0){var V=L?1:Math.min(B/I,1),H=B-v,W=Math.min(H,Math.min(R,M*V));R-=W,E.setLayout({angle:B-W,ratio:(B-W)/B},!0)}else v>0&&E.setLayout({angle:v,ratio:B===0?1:v/B},!0)}});var P=m,O=[];a.eachNode(function(E){var B=Math.max(E.getLayout().angle,v);E.setLayout({cx:s,cy:l,r0:f,r:u,startAngle:P,endAngle:P+B*g,clockwise:p},!0),O[E.dataIndex]=P,P+=(B+c)*g}),a.eachEdge(function(E){var B=b?1:E.getValue("value"),V=C*(T?B:1)*g,H=E.node1.dataIndex,W=O[H]||0,X=Math.abs((E.node1.getLayout().ratio||1)*V),j=W+X*g,q=[s+f*Math.cos(W),l+f*Math.sin(W)],it=[s+f*Math.cos(j),l+f*Math.sin(j)],St=E.node2.dataIndex,at=O[St]||0,N=Math.abs((E.node2.getLayout().ratio||1)*V),F=at+N*g,Z=[s+f*Math.cos(at),l+f*Math.sin(at)],K=[s+f*Math.cos(F),l+f*Math.sin(F)];E.setLayout({s1:q,s2:it,sStartAngle:W,sEndAngle:j,t1:Z,t2:K,tStartAngle:at,tEndAngle:F,cx:s,cy:l,r:f,value:B,clockwise:p}),O[H]=j,O[St]=F})}}}function m6(r){r.registerChartView(h6),r.registerSeriesModel(p6),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,g6),r.registerProcessor($s("chord"))}var _6=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),S6=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="pointer",a}return t.prototype.getDefaultShape=function(){return new _6},t.prototype.buildPath=function(e,a){var n=Math.cos,i=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-n(l)*s*(s>=o/3?1:2),f=a.y-i(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,e.moveTo(u,f),e.lineTo(a.x+n(l)*s,a.y+i(l)*s),e.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),e.lineTo(a.x-n(l)*s,a.y-i(l)*s),e.lineTo(u,f)},t}(Lt);const x6=S6;function b6(r,t){var e=r.get("center"),a=t.getWidth(),n=t.getHeight(),i=Math.min(a,n),o=J(e[0],t.getWidth()),s=J(e[1],t.getHeight()),l=J(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function Wf(r,t){var e=r==null?"":r+"";return t&&(Q(t)?e=t.replace("{value}",e):ot(t)&&(e=t(r))),e}var w6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){this.group.removeAll();var i=e.get(["axisLine","lineStyle","color"]),o=b6(e,n);this._renderMain(e,a,n,i,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,a,n,i,o){var s=this.group,l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,f=-e.get("endAngle")/180*Math.PI,c=e.getModel("axisLine"),v=c.get("roundCap"),h=v?hv:rr,d=c.get("show"),p=c.getModel("lineStyle"),g=p.get("width"),y=[u,f];Kv(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=[],b=0;d&&b=C&&(M===0?0:i[M-1][0])Math.PI/2&&(j+=Math.PI)):X==="tangential"?j=-T-Math.PI/2:Pt(X)&&(j=X*Math.PI/180),j===0?c.add(new Rt({style:Zt(_,{text:B,x:H,y:W,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:k<-.4?"left":k>.4?"right":"center"},{inheritColor:V}),silent:!0})):c.add(new Rt({style:Zt(_,{text:B,x:H,y:W,verticalAlign:"middle",align:"center"},{inheritColor:V}),silent:!0,originX:H,originY:W,rotation:j}))}if(m.get("show")&&P!==S){var O=m.get("distance");O=O?O+f:f;for(var q=0;q<=b;q++){k=Math.cos(T),R=Math.sin(T);var it=new be({shape:{x1:k*(d-O)+v,y1:R*(d-O)+h,x2:k*(d-w-O)+v,y2:R*(d-w-O)+h},silent:!0,style:I});I.stroke==="auto"&&it.setStyle({stroke:i((P+q/b)/S)}),c.add(it),T+=M}T-=M}else T+=C}},t.prototype._renderPointer=function(e,a,n,i,o,s,l,u,f){var c=this.group,v=this._data,h=this._progressEls,d=[],p=e.get(["pointer","show"]),g=e.getModel("progress"),y=g.get("show"),m=e.getData(),_=m.mapDimension("value"),S=+e.get("min"),b=+e.get("max"),x=[S,b],w=[s,l];function T(M,D){var I=m.getItemModel(M),L=I.getModel("pointer"),k=J(L.get("width"),o.r),R=J(L.get("length"),o.r),P=e.get(["pointer","icon"]),O=L.get("offsetCenter"),E=J(O[0],o.r),B=J(O[1],o.r),V=L.get("keepAspect"),H;return P?H=me(P,E-k/2,B-R,k,R,null,V):H=new x6({shape:{angle:-Math.PI/2,width:k,r:R,x:E,y:B}}),H.rotation=-(D+Math.PI/2),H.x=o.cx,H.y=o.cy,H}function C(M,D){var I=g.get("roundCap"),L=I?hv:rr,k=g.get("overlap"),R=k?g.get("width"):f/m.count(),P=k?o.r-R:o.r-(M+1)*R,O=k?o.r:o.r-M*R,E=new L({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:P,r:O}});return k&&(E.z2=Gt(m.get(_,M),[S,b],[100,0],!0)),E}(y||p)&&(m.diff(v).add(function(M){var D=m.get(_,M);if(p){var I=T(M,s);jt(I,{rotation:-((isNaN(+D)?w[0]:Gt(D,x,w,!0))+Math.PI/2)},e),c.add(I),m.setItemGraphicEl(M,I)}if(y){var L=C(M,s),k=g.get("clip");jt(L,{shape:{endAngle:Gt(D,x,w,k)}},e),c.add(L),Og(e.seriesIndex,m.dataType,M,L),d[M]=L}}).update(function(M,D){var I=m.get(_,M);if(p){var L=v.getItemGraphicEl(D),k=L?L.rotation:s,R=T(M,k);R.rotation=k,Et(R,{rotation:-((isNaN(+I)?w[0]:Gt(I,x,w,!0))+Math.PI/2)},e),c.add(R),m.setItemGraphicEl(M,R)}if(y){var P=h[D],O=P?P.shape.endAngle:s,E=C(M,O),B=g.get("clip");Et(E,{shape:{endAngle:Gt(I,x,w,B)}},e),c.add(E),Og(e.seriesIndex,m.dataType,M,E),d[M]=E}}).execute(),m.each(function(M){var D=m.getItemModel(M),I=D.getModel("emphasis"),L=I.get("focus"),k=I.get("blurScope"),R=I.get("disabled");if(p){var P=m.getItemGraphicEl(M),O=m.getItemVisual(M,"style"),E=O.fill;if(P instanceof Fe){var B=P.style;P.useStyle($({image:B.image,x:B.x,y:B.y,width:B.width,height:B.height},O))}else P.useStyle(O),P.type!=="pointer"&&P.setColor(E);P.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),P.style.fill==="auto"&&P.setStyle("fill",i(Gt(m.get(_,M),x,[0,1],!0))),P.z2EmphasisLift=0,we(P,D),Jt(P,L,k,R)}if(y){var V=d[M];V.useStyle(m.getItemVisual(M,"style")),V.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),V.z2EmphasisLift=0,we(V,D),Jt(V,L,k,R)}}),this._progressEls=d)},t.prototype._renderAnchor=function(e,a){var n=e.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),f=me(s,a.cx-o/2+J(l[0],a.r),a.cy-o/2+J(l[1],a.r),o,o,null,u);f.z2=n.get("showAbove")?1:0,f.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(f)}},t.prototype._renderTitleAndDetail=function(e,a,n,i,o){var s=this,l=e.getData(),u=l.mapDimension("value"),f=+e.get("min"),c=+e.get("max"),v=new lt,h=[],d=[],p=e.isAnimationEnabled(),g=e.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){h[y]=new Rt({silent:!0}),d[y]=new Rt({silent:!0})}).update(function(y,m){h[y]=s._titleEls[m],d[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),S=new lt,b=i(Gt(_,[f,c],[0,1],!0)),x=m.getModel("title");if(x.get("show")){var w=x.get("offsetCenter"),T=o.cx+J(w[0],o.r),C=o.cy+J(w[1],o.r),M=h[y];M.attr({z2:g?0:2,style:Zt(x,{x:T,y:C,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:b})}),S.add(M)}var D=m.getModel("detail");if(D.get("show")){var I=D.get("offsetCenter"),L=o.cx+J(I[0],o.r),k=o.cy+J(I[1],o.r),R=J(D.get("width"),o.r),P=J(D.get("height"),o.r),O=e.get(["progress","show"])?l.getItemVisual(y,"style").fill:b,M=d[y],E=D.get("formatter");M.attr({z2:g?0:2,style:Zt(D,{x:L,y:k,text:Wf(_,E),width:isNaN(R)?null:R,height:isNaN(P)?null:P,align:"center",verticalAlign:"middle"},{inheritColor:O})}),YD(M,{normal:D},_,function(V){return Wf(V,E)}),p&&ZD(M,y,l,e,{getFormattedLabel:function(V,H,W,X,j,q){return Wf(q?q.interpolatedValue:_,E)}}),S.add(M)}v.add(S)}),this.group.add(v),this._titleEls=h,this._detailEls=d},t.type="gauge",t}(Xt);const T6=w6;var C6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="itemStyle",e}return t.prototype.getInitialData=function(e,a){return Us(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,G.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:G.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:G.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:G.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:G.color.neutral00,borderWidth:0,borderColor:G.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:G.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:G.color.transparent,borderWidth:0,borderColor:G.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:G.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(te);const A6=C6;function M6(r){r.registerChartView(T6),r.registerSeriesModel(A6)}var D6=["itemStyle","opacity"],L6=function(r){z(t,r);function t(e,a){var n=r.call(this)||this,i=n,o=new Xe,s=new Rt;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(e,a,!0),n}return t.prototype.updateData=function(e,a,n){var i=this,o=e.hostModel,s=e.getItemModel(a),l=e.getItemLayout(a),u=s.getModel("emphasis"),f=s.get(D6);f=f??1,n||Gr(i),i.useStyle(e.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,jt(i,{style:{opacity:f}},o,a)):Et(i,{style:{opacity:f},shape:{points:l.points}},o,a),we(i,s),this._updateLabel(e,a),Jt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=e.hostModel,l=e.getItemModel(a),u=e.getItemLayout(a),f=u.label,c=e.getItemVisual(a,"style"),v=c.fill;Ie(o,Te(l),{labelFetcher:e.hostModel,labelDataIndex:a,defaultOpacity:c.opacity,defaultText:e.getName(a)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}});var h=l.getModel("label"),d=h.get("color"),p=d==="inherit"?v:null;n.setTextConfig({local:!0,inside:!!f.inside,insideStroke:p,outsideFill:p});var g=f.linePoints;i.setShape({points:g}),n.textGuideLineConfig={anchor:g?new ct(g[0][0],g[0][1]):null},Et(o,{style:{x:f.x,y:f.y}},s,a),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),A0(n,M0(l),{stroke:v})},t}(ar),I6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new L6(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(i,l),s.add(f),i.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);qa(u,e,l)}).execute(),this._data=i},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(Xt);const P6=I6;var k6=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ys(tt(this.getData,this),tt(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,a){return Us(this,{coordDimensions:["value"],encodeDefaulter:xt(n0,this)})},t.prototype._defaultLabelLine=function(e){ro(e,"labelLine",["show"]);var a=e.labelLine,n=e.emphasis.labelLine;a.show=a.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var a=this.getData(),n=r.prototype.getDataParams.call(this,e),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,e)/o*100).toFixed(2):0,n.$vars.push("percent"),n},t.type="series.funnel",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:G.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:G.color.primary}}},t}(te);const R6=k6;function E6(r,t){for(var e=r.mapDimension("value"),a=r.mapArray(e,function(l){return l}),n=[],i=t==="ascending",o=0,s=r.count();oQ6)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!gp(this,"mousemove"))){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=e.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function gp(r,t){var e=r._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}const rY=tY;var aY=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var a=this.option;e&&wt(a,e,!0),this._initDimensions()},t.prototype.contains=function(e,a){var n=e.get("parallelIndex");return n!=null&&a.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){A(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){e.hasOwnProperty(a)&&(this.option[a]=e[a])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],a=this.parallelAxisIndex=[],n=Ft(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);A(n,function(i){e.push("dim"+i.get("dim")),a.push(i.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(kt);const nY=aY;var iY=function(r){z(t,r);function t(e,a,n,i,o){var s=r.call(this,e,a,n)||this;return s.type=i||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(na);const oY=iY;function Zn(r,t,e,a,n,i){r=r||0;var o=e[1]-e[0];if(n!=null&&(n=Yo(n,[0,o])),i!=null&&(i=Math.max(i,n??0)),a==="all"){var s=Math.abs(t[1]-t[0]);s=Yo(s,[0,o]),n=i=Yo(s,[n,i]),a=0}t[0]=Yo(t[0],e),t[1]=Yo(t[1],e);var l=yp(t,a);t[a]+=r;var u=n||0,f=e.slice();l.sign<0?f[0]+=u:f[1]-=u,t[a]=Yo(t[a],f);var c;return c=yp(t,a),n!=null&&(c.sign!==l.sign||c.spani&&(t[1-a]=t[a]+c.sign*i),t}function yp(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function Yo(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var mp=A,jP=Math.min,JP=Math.max,zw=Math.floor,sY=Math.ceil,Vw=de,lY=Math.PI,uY=function(){function r(t,e,a){this.type="parallel",this._axesMap=rt(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,a)}return r.prototype._init=function(t,e,a){var n=t.dimensions,i=t.parallelAxisIndex;mp(n,function(o,s){var l=i[s],u=e.getComponent("parallelAxis",l),f=this._axesMap.set(o,new oY(o,hh(u),[0,0],u.get("type"),l)),c=f.type==="category";f.onBand=c&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},r.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),a=e.axisBase,n=e.layoutBase,i=e.pixelDimIndex,o=t[1-i],s=t[i];return o>=a&&o<=a+e.axisLength&&s>=n&&s<=n+e.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(a){if(t.contains(a,e)){var n=a.getData();mp(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),bs(o.scale,o.model)},this)}},this)},r.prototype.resize=function(t,e){var a=Ce(t,e).refContainer;this._rect=Qt(t.getBoxLayoutParams(),a),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,a=["x","y"],n=["width","height"],i=t.get("layout"),o=i==="horizontal"?0:1,s=e[n[o]],l=[0,s],u=this.dimensions.length,f=$f(t.get("axisExpandWidth"),l),c=$f(t.get("axisExpandCount")||0,[0,u]),v=t.get("axisExpandable")&&u>3&&u>c&&c>1&&f>0&&s>0,h=t.get("axisExpandWindow"),d;if(h)d=$f(h[1]-h[0],l),h[1]=h[0]+d;else{d=$f(f*(c-1),l);var p=t.get("axisExpandCenter")||zw(u/2);h=[f*p-d/2],h[1]=h[0]+d}var g=(s-d)/(u-c);g<3&&(g=0);var y=[zw(Vw(h[0]/f,1))+1,sY(Vw(h[1]/f,1))-1],m=g/f*h[0];return{layout:i,pixelDimIndex:o,layoutBase:e[a[o]],layoutLength:s,axisBase:e[a[1-o]],axisLength:e[n[1-o]],axisExpandable:v,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:h,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,a=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;e.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),mp(a,function(o,s){var l=(n.axisExpandable?cY:fY)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},f={horizontal:lY/2,vertical:0},c=[u[i].x+t.x,u[i].y+t.y],v=f[i],h=Oe();jn(h,h,v),Pa(h,h,c),this._axesLayout[o]={position:c,rotation:v,transform:h,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(t){return this._axesMap.get(t)},r.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},r.prototype.eachActiveState=function(t,e,a,n){a==null&&(a=0),n==null&&(n=t.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];A(o,function(g){s.push(t.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),f=a;fi*(1-c[0])?(u="jump",l=s-i*(1-c[2])):(l=s-i*c[1])>=0&&(l=s-i*(1-c[1]))<=0&&(l=0),l*=e.axisExpandWidth/f,l?Zn(l,n,o,"all"):u="none";else{var h=n[1]-n[0],d=o[1]*s/h;n=[JP(0,d-h/2)],n[1]=jP(o[1],n[0]+h),n[0]=n[1]-h}return{axisExpandWindow:n,behavior:u}},r}();function $f(r,t){return jP(JP(r,t[0]),t[1])}function fY(r,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*r,axisNameAvailableWidth:e,axisLabelShow:!0}}function cY(r,t){var e=t.layoutLength,a=t.axisExpandWidth,n=t.axisCount,i=t.axisCollapseWidth,o=t.winInnerIndices,s,l=i,u=!1,f;return r=0;n--)Br(a[n])},t.prototype.getActiveState=function(e){var a=this.activeIntervals;if(!a.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(a.length===1){var n=a[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var i=0,o=a.length;imY}function ik(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function ok(r,t,e,a){var n=new lt;return n.add(new Mt({name:"main",style:a_(e),silent:!0,draggable:!0,cursor:"move",drift:xt(Ww,r,t,n,["n","s","w","e"]),ondragend:xt(fo,t,{isEnd:!0})})),A(a,function(i){n.add(new Mt({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:xt(Ww,r,t,n,i),ondragend:xt(fo,t,{isEnd:!0})}))}),n}function sk(r,t,e,a){var n=a.brushStyle.lineWidth||0,i=Ms(n,_Y),o=e[0][0],s=e[1][0],l=o-n/2,u=s-n/2,f=e[0][1],c=e[1][1],v=f-i+n/2,h=c-i+n/2,d=f-o,p=c-s,g=d+n,y=p+n;Fa(r,t,"main",o,s,d,p),a.transformable&&(Fa(r,t,"w",l,u,i,y),Fa(r,t,"e",v,u,i,y),Fa(r,t,"n",l,u,g,i),Fa(r,t,"s",l,h,g,i),Fa(r,t,"nw",l,u,i,i),Fa(r,t,"ne",v,u,i,i),Fa(r,t,"sw",l,h,i,i),Fa(r,t,"se",v,h,i,i))}function Gy(r,t){var e=t.__brushOption,a=e.transformable,n=t.childAt(0);n.useStyle(a_(e)),n.attr({silent:!a,cursor:a?"move":"default"}),A([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=t.childOfName(i.join("")),s=i.length===1?Fy(r,i[0]):AY(r,i);o&&o.attr({silent:!a,invisible:!a,cursor:a?xY[s]+"-resize":null})})}function Fa(r,t,e,a,n,i,o){var s=t.childOfName(e);s&&s.setShape(DY(n_(r,t,[[a,n],[a+i,n+o]])))}function a_(r){return vt({strokeNoScale:!0},r.brushStyle)}function lk(r,t,e,a){var n=[Au(r,e),Au(t,a)],i=[Ms(r,e),Ms(t,a)];return[[n[0],i[0]],[n[1],i[1]]]}function CY(r){return ji(r.group)}function Fy(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=ah(e[t],CY(r));return a[n]}function AY(r,t){var e=[Fy(r,t[0]),Fy(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function Ww(r,t,e,a,n,i){var o=e.__brushOption,s=r.toRectRange(o.range),l=uk(t,n,i);A(a,function(u){var f=SY[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(lk(s[0][0],s[1][0],s[0][1],s[1][1])),t_(t,e),fo(t,{isEnd:!1})}function MY(r,t,e,a){var n=t.__brushOption.range,i=uk(r,e,a);A(n,function(o){o[0]+=i[0],o[1]+=i[1]}),t_(r,t),fo(r,{isEnd:!1})}function uk(r,t,e){var a=r.group,n=a.transformCoordToLocal(t,e),i=a.transformCoordToLocal(0,0);return[n[0]-i[0],n[1]-i[1]]}function n_(r,t,e){var a=nk(r,t);return a&&a!==uo?a.clipPath(e,r._transform):st(e)}function DY(r){var t=Au(r[0][0],r[1][0]),e=Au(r[0][1],r[1][1]),a=Ms(r[0][0],r[1][0]),n=Ms(r[0][1],r[1][1]);return{x:t,y:e,width:a-t,height:n-e}}function LY(r,t,e){if(!(!r._brushType||PY(r,t.offsetX,t.offsetY))){var a=r._zr,n=r._covers,i=r_(r,t,e);if(!r._dragging)for(var o=0;oa.getWidth()||e<0||e>a.getHeight()}var bh={lineX:Yw(0),lineY:Yw(1),rect:{createCover:function(r,t){function e(a){return a}return ok({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=ik(r);return lk(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,a){sk(r,t,e,a)},updateCommon:Gy,contain:Wy},polygon:{createCover:function(r,t){var e=new lt;return e.add(new Xe({name:"main",style:a_(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new ar({name:"main",draggable:!0,drift:xt(MY,r,t),ondragend:xt(fo,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,a){t.childAt(0).setShape({points:n_(r,t,e)})},updateCommon:Gy,contain:Wy}};function Yw(r){return{createCover:function(t,e){return ok({toRectRange:function(a){var n=[a,[0,100]];return r&&n.reverse(),n},fromRectRange:function(a){return a[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=ik(t),a=Au(e[0][r],e[1][r]),n=Ms(e[0][r],e[1][r]);return[a,n]},updateCoverShape:function(t,e,a,n){var i,o=nk(t,e);if(o!==uo&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=t._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,i];r&&l.reverse(),sk(t,e,l,n)},updateCommon:Gy,contain:Wy}}const i_=wY;function ck(r){return r=o_(r),function(t){return FD(t,r)}}function vk(r,t){return r=o_(r),function(e){var a=t??e,n=a?r.width:r.height,i=a?r.x:r.y;return[i,i+(n||0)]}}function hk(r,t,e){var a=o_(r);return function(n,i){return a.contain(i[0],i[1])&&!gP(n,t,e)}}function o_(r){return dt.create(r)}var kY=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){r.prototype.init.apply(this,arguments),(this._brushController=new i_(a.getZr())).on("brush",tt(this._onBrush,this))},t.prototype.render=function(e,a,n,i){if(!RY(e,a,i)){this.axisModel=e,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new lt,this.group.add(this._axisGroup),!!e.get("show")){var s=OY(e,a),l=s.coordinateSystem,u=e.getAreaSelectStyle(),f=u.width,c=e.axis.dim,v=l.getAxisLayout(c),h=$({strokeContainThreshold:f},v),d=new on(e,n,h);d.build(),this._axisGroup.add(d.group),this._refreshBrushController(h,u,e,s,f,n),ku(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,a,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),c=dt.create({x:l[0],y:-o/2,width:u,height:o});c.x-=f,c.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:ck(c),isTargetByCursor:hk(c,s,i),getLinearBrushOtherExtent:vk(c,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(EY(n))},t.prototype._onBrush=function(e){var a=e.areas,n=this.axisModel,i=n.axis,o=Y(a,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(re);function RY(r,t,e){return e&&e.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:e})[0]===r}function EY(r){var t=r.axis;return Y(r.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function OY(r,t){return t.getComponent("parallel",r.get("parallelIndex"))}const NY=kY;var BY={type:"axisAreaSelect",event:"axisAreaSelected"};function zY(r){r.registerAction(BY,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(a){a.axis.model.setActiveIntervals(t.intervals)})}),r.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(a){a.setAxisExpand(t)})})}var VY={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function dk(r){r.registerComponentView(rY),r.registerComponentModel(nY),r.registerCoordinateSystem("parallel",pY),r.registerPreprocessor(K6),r.registerComponentModel(Gw),r.registerComponentView(NY),Cs(r,"parallel",Gw,VY),zY(r)}function GY(r){Tt(dk),r.registerChartView(H6),r.registerSeriesModel(Y6),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,q6)}var FY=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),HY=function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new FY},t.prototype.buildPath=function(e,a){var n=a.extent;e.moveTo(a.x1,a.y1),e.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(e.lineTo(a.x2+n,a.y2),e.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(e.lineTo(a.x2,a.y2+n),e.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),e.closePath()},t.prototype.highlight=function(){rn(this)},t.prototype.downplay=function(){an(this)},t}(Lt),WY=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._mainGroup=new lt,e._focusAdjacencyDisabled=!1,e}return t.prototype.init=function(e,a){this._controller=new wo(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,a,n){var i=this,o=e.getGraph(),s=this._mainGroup,l=e.layoutInfo,u=l.width,f=l.height,c=e.getData(),v=e.getData("edge"),h=e.get("orient");this._model=e,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(e,n),yP(e,n,s,this._controller,this._controllerHost,null),o.eachEdge(function(d){var p=new HY,g=pt(p);g.dataIndex=d.dataIndex,g.seriesIndex=e.seriesIndex,g.dataType="edge";var y=d.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),S=d.node1.getLayout(),b=d.node1.getModel(),x=b.get("localX"),w=b.get("localY"),T=d.node2.getLayout(),C=d.node2.getModel(),M=C.get("localX"),D=C.get("localY"),I=d.getLayout(),L,k,R,P,O,E,B,V;p.shape.extent=Math.max(1,I.dy),p.shape.orient=h,h==="vertical"?(L=(x!=null?x*u:S.x)+I.sy,k=(w!=null?w*f:S.y)+S.dy,R=(M!=null?M*u:T.x)+I.ty,P=D!=null?D*f:T.y,O=L,E=k*(1-_)+P*_,B=R,V=k*_+P*(1-_)):(L=(x!=null?x*u:S.x)+S.dx,k=(w!=null?w*f:S.y)+I.sy,R=M!=null?M*u:T.x,P=(D!=null?D*f:T.y)+I.ty,O=L*(1-_)+R*_,E=k,B=L*_+R*(1-_),V=P),p.setShape({x1:L,y1:k,x2:R,y2:P,cpx1:O,cpy1:E,cpx2:B,cpy2:V}),p.useStyle(m.getItemStyle()),Zw(p.style,h,d);var H=""+y.get("value"),W=Te(y,"edgeLabel");Ie(p,W,{labelFetcher:{getFormattedLabel:function(q,it,St,at,N,F){return e.getFormattedLabel(q,it,"edge",at,_r(N,W.normal&&W.normal.get("formatter"),H),F)}},labelDataIndex:d.dataIndex,defaultText:H}),p.setTextConfig({position:"inside"});var X=y.getModel("emphasis");we(p,y,"lineStyle",function(q){var it=q.getItemStyle();return Zw(it,h,d),it}),s.add(p),v.setItemGraphicEl(d.dataIndex,p);var j=X.get("focus");Jt(p,j==="adjacency"?d.getAdjacentDataIndices():j==="trajectory"?d.getTrajectoryDataIndices():j,X.get("blurScope"),X.get("disabled"))}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),S=g.get(["itemStyle","borderRadius"])||0,b=new Mt({shape:{x:y!=null?y*u:p.x,y:m!=null?m*f:p.y,width:p.dx,height:p.dy,r:S},style:g.getModel("itemStyle").getItemStyle(),z2:10});Ie(b,Te(g),{labelFetcher:{getFormattedLabel:function(w,T){return e.getFormattedLabel(w,T,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),b.disableLabelAnimation=!0,b.setStyle("fill",d.getVisual("color")),b.setStyle("decal",d.getVisual("style").decal),we(b,g),s.add(b),c.setItemGraphicEl(d.dataIndex,b),pt(b).dataType="node";var x=_.get("focus");Jt(b,x==="adjacency"?d.getAdjacentDataIndices():x==="trajectory"?d.getTrajectoryDataIndices():x,_.get("blurScope"),_.get("disabled"))}),c.eachItemGraphicEl(function(d,p){var g=c.getItemModel(p);g.get("draggable")&&(d.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:c.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/f})},d.ondragend=function(){i._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&e.isAnimationEnabled()&&s.setClipPath($Y(s.getBoundingRect(),e,function(){s.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._updateViewCoordSys=function(e,a){var n=e.layoutInfo,i=n.width,o=n.height,s=e.coordinateSystem=new To(null,{api:a,ecModel:e.ecModel});s.zoomLimit=e.get("scaleLimit"),s.setBoundingRect(0,0,i,o),s.setCenter(e.get("center")),s.setZoom(e.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},t.type="sankey",t}(Xt);function Zw(r,t,e){switch(r.fill){case"source":r.fill=e.node1.getVisual("color"),r.decal=e.node1.getVisual("style").decal;break;case"target":r.fill=e.node2.getVisual("color"),r.decal=e.node2.getVisual("style").decal;break;case"gradient":var a=e.node1.getVisual("color"),n=e.node2.getVisual("color");Q(a)&&Q(n)&&(r.fill=new Os(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function $Y(r,t,e){var a=new Mt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return jt(a,{shape:{width:r.width+20}},t,e),a}const UY=WY;var YY=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){var n=e.edges||e.links||[],i=e.data||e.nodes||[],o=e.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Ot(o[l],this,a));var u=Q0(i,n,this,!0,f);return u.data;function f(c,v){c.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getData().getItemLayout(d);if(g){var y=g.depth,m=p.levelModels[y];m&&(h.parentModel=m)}return h}),v.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getGraph().getEdgeByIndex(d),y=g.node1.getLayout();if(y){var m=y.depth,_=p.levelModels[m];_&&(h.parentModel=_)}return h})}},t.prototype.setNodePosition=function(e,a){var n=this.option.data||this.option.nodes,i=n[e];i.localX=a[0],i.localY=a[1]},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,a,n){function i(h){return isNaN(h)||h==null}if(n==="edge"){var o=this.getDataParams(e,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return ye("nameValue",{name:u,value:l,noValue:i(l)})}else{var f=this.getGraph().getNodeByIndex(e),c=f.getLayout().value,v=this.getDataParams(e,n).data.name;return ye("nameValue",{name:v!=null?v+"":null,value:c,noValue:i(c)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,a){var n=r.prototype.getDataParams.call(this,e,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(e),o=i.getLayout().value;n.value=o}return n},t.type="series.sankey",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:G.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:G.color.primary}},animationEasing:"linear",animationDuration:1e3},t}(te);const ZY=YY;function XY(r,t){r.eachSeriesByType("sankey",function(e){var a=e.get("nodeWidth"),n=e.get("nodeGap"),i=Ce(e,t).refContainer,o=Qt(e.getBoxLayoutParams(),i);e.layoutInfo=o;var s=o.width,l=o.height,u=e.getGraph(),f=u.nodes,c=u.edges;KY(f);var v=Ft(f,function(g){return g.getLayout().value===0}),h=v.length!==0?0:e.get("layoutIterations"),d=e.get("orient"),p=e.get("nodeAlign");qY(f,c,a,n,s,l,h,d,p)})}function qY(r,t,e,a,n,i,o,s,l){jY(r,t,e,n,i,s,l),e7(r,t,i,n,a,o,s),f7(r,s)}function KY(r){A(r,function(t){var e=Fn(t.outEdges,xv),a=Fn(t.inEdges,xv),n=t.getValue()||0,i=Math.max(e,a,n);t.setLayout({value:i},!0)})}function jY(r,t,e,a,n,i,o){for(var s=[],l=[],u=[],f=[],c=0,v=0;v=0;y&&g.depth>h&&(h=g.depth),p.setLayout({depth:y?g.depth:c},!0),i==="vertical"?p.setLayout({dy:e},!0):p.setLayout({dx:e},!0);for(var m=0;mc-1?h:c-1;o&&o!=="left"&&JY(r,o,i,w);var T=i==="vertical"?(n-e)/w:(a-e)/w;t7(r,T,i)}function pk(r){var t=r.hostGraph.data.getRawDataItem(r.dataIndex);return t.depth!=null&&t.depth>=0}function JY(r,t,e,a){if(t==="right"){for(var n=[],i=r,o=0;i.length;){for(var s=0;s0;i--)l*=.99,n7(s,l,o),_p(s,n,e,a,o),u7(s,l,o),_p(s,n,e,a,o)}function r7(r,t){var e=[],a=t==="vertical"?"y":"x",n=Ig(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),A(n.keys,function(i){e.push(n.buckets.get(i))}),e}function a7(r,t,e,a,n,i){var o=1/0;A(r,function(s){var l=s.length,u=0;A(s,function(c){u+=c.getLayout().value});var f=i==="vertical"?(a-(l-1)*n)/u:(e-(l-1)*n)/u;f0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]+l.getLayout()[v]+t;var d=n==="vertical"?a:e;if(u=f-t-d,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var h=c-2;h>=0;--h)l=o[h],u=l.getLayout()[i]+l.getLayout()[v]+t-f,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]}})}function n7(r,t,e){A(r.slice().reverse(),function(a){A(a,function(n){if(n.outEdges.length){var i=Fn(n.outEdges,i7,e)/Fn(n.outEdges,xv);if(isNaN(i)){var o=n.outEdges.length;i=o?Fn(n.outEdges,o7,e)/o:0}if(e==="vertical"){var s=n.getLayout().x+(i-Xn(n,e))*t;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Xn(n,e))*t;n.setLayout({y:l},!0)}}})})}function i7(r,t){return Xn(r.node2,t)*r.getValue()}function o7(r,t){return Xn(r.node2,t)}function s7(r,t){return Xn(r.node1,t)*r.getValue()}function l7(r,t){return Xn(r.node1,t)}function Xn(r,t){return t==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function xv(r){return r.getValue()}function Fn(r,t,e){for(var a=0,n=r.length,i=-1;++io&&(o=l)}),A(a,function(s){var l=new Ge({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),f=s.getModel().get(["itemStyle","color"]);f!=null?(s.setVisual("color",f),s.setVisual("style",{fill:f})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&A(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function v7(r){r.registerChartView(UY),r.registerSeriesModel(ZY),r.registerLayout(XY),r.registerVisual(c7),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(a){a.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){var i=n.coordinateSystem,o=mh(i,t,n.get("scaleLimit"));n.setCenter(o.center),n.setZoom(o.zoom)})})}var gk=function(){function r(){}return r.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&e.get(t)!=null},r.prototype.getInitialData=function(t,e){var a,n=e.getComponent("xAxis",this.get("xAxisIndex")),i=e.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l;o==="category"?(t.layout="horizontal",a=n.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],f=t.layout==="horizontal"?0:1,c=this._baseAxisDim=u[f],v=u[1-f],h=[n,i],d=h[f].get("type"),p=h[1-f].get("type"),g=t.data;if(g&&l){var y=[];A(g,function(S,b){var x;U(S)?(x=S.slice(),S.unshift(b)):U(S.value)?(x=$({},S),x.value=x.value.slice(),S.value.unshift(b)):x=S,y.push(x)}),t.data=y}var m=this.defaultValueDimensions,_=[{name:c,type:av(d),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:v,type:av(p),dimsDef:m.slice()}];return Us(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:xt(xL,_,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r}(),yk=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],e.visualDrawType="stroke",e}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:G.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:G.color.shadow}},animationDuration:800},t}(te);_e(yk,gk,!0);const h7=yk;var d7=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=e.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var f=i.getItemLayout(u),c=Xw(f,i,u,l,!0);i.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,f){var c=s.getItemGraphicEl(f);if(!i.hasValue(u)){o.remove(c);return}var v=i.getItemLayout(u);c?(Gr(c),mk(v,c,i,u)):c=Xw(v,i,u,l),o.add(c),i.setItemGraphicEl(u,c)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=i},t.prototype.remove=function(e){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},t.type="boxplot",t}(Xt),p7=function(){function r(){}return r}(),g7=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="boxplotBoxPath",a}return t.prototype.getDefaultShape=function(){return new p7},t.prototype.buildPath=function(e,a){var n=a.points,i=0;for(e.moveTo(n[i][0],n[i][1]),i++;i<4;i++)e.lineTo(n[i][0],n[i][1]);for(e.closePath();ip){var S=[y,_];a.push(S)}}}return{boxData:e,outliers:a}}var T7={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==Ne){var a="";Vt(a)}var n=w7(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function C7(r){r.registerSeriesModel(h7),r.registerChartView(m7),r.registerLayout(_7),r.registerTransform(T7)}var A7=["itemStyle","borderColor"],M7=["itemStyle","borderColor0"],D7=["itemStyle","borderColorDoji"],L7=["itemStyle","color"],I7=["itemStyle","color0"];function s_(r,t){return t.get(r>0?L7:I7)}function l_(r,t){return t.get(r===0?D7:r>0?A7:M7)}var P7={seriesType:"candlestick",plan:Gs(),performRawSeries:!0,reset:function(r,t){if(!t.isSeriesFiltered(r)){var e=r.pipelineContext.large;return!e&&{progress:function(a,n){for(var i;(i=a.next())!=null;){var o=n.getItemModel(i),s=n.getItemLayout(i).sign,l=o.getItemStyle();l.fill=s_(s,o),l.stroke=l_(s,o)||l.fill;var u=n.ensureUniqueItemVisual(i,"style");$(u,l)}}}}}};const k7=P7;var R7=["color","borderColor"],E7=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,a,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,a):this._incrementalRenderNormal(e,a)},t.prototype.eachRendered=function(e){Qn(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var a=e.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},t.prototype._renderNormal=function(e){var a=e.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),a.diff(n).add(function(f){if(a.hasValue(f)){var c=a.getItemLayout(f);if(s&&qw(u,c))return;var v=Sp(c,f,!0);jt(v,{shape:{points:c.ends}},e,f),xp(v,a,f,o),i.add(v),a.setItemGraphicEl(f,v)}}).update(function(f,c){var v=n.getItemGraphicEl(c);if(!a.hasValue(f)){i.remove(v);return}var h=a.getItemLayout(f);if(s&&qw(u,h)){i.remove(v);return}v?(Et(v,{shape:{points:h.ends}},e,f),Gr(v)):v=Sp(h),xp(v,a,f,o),i.add(v),a.setItemGraphicEl(f,v)}).remove(function(f){var c=n.getItemGraphicEl(f);c&&i.remove(c)}).execute(),this._data=a},t.prototype._renderLarge=function(e){this._clear(),Kw(e,this.group);var a=e.get("clip",!0)?Hu(e.coordinateSystem,!1,e):null;a?this.group.setClipPath(a):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o;(o=e.next())!=null;){var s=n.getItemLayout(o),l=Sp(s);xp(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,a){Kw(a,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(Xt),O7=function(){function r(){}return r}(),N7=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="normalCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new O7},t.prototype.buildPath=function(e,a){var n=a.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}(Lt);function Sp(r,t,e){var a=r.ends;return new N7({shape:{points:e?B7(a,r):a},z2:100})}function qw(r,t){for(var e=!0,a=0;ab?D[i]:M[i],ends:k,brushRect:B(x,w,_)})}function O(H,W){var X=[];return X[n]=W,X[i]=H,isNaN(W)||isNaN(H)?[NaN,NaN]:t.dataToPoint(X)}function E(H,W,X){var j=W.slice(),q=W.slice();j[n]=yc(j[n]+a/2,1,!1),q[n]=yc(q[n]-a/2,1,!0),X?H.push(j,q):H.push(q,j)}function B(H,W,X){var j=O(H,X),q=O(W,X);return j[n]-=a/2,q[n]-=a/2,{x:j[0],y:j[1],width:a,height:q[1]-j[1]}}function V(H){return H[n]=yc(H[n],1),H}}function d(p,g){for(var y=wa(p.count*4),m=0,_,S=[],b=[],x,w=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(x=p.next())!=null;){var C=w.get(s,x),M=w.get(u,x),D=w.get(f,x),I=w.get(c,x),L=w.get(v,x);if(isNaN(C)||isNaN(I)||isNaN(L)){y[m++]=NaN,m+=3;continue}y[m++]=jw(w,x,M,D,f,T),S[n]=C,S[i]=I,_=t.dataToPoint(S,null,b),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,S[i]=L,_=t.dataToPoint(S,null,b),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function jw(r,t,e,a,n,i){var o;return e>a?o=-1:e0?r.get(n,t-1)<=a?1:-1:1,o}function W7(r,t){var e=r.getBaseAxis(),a,n=e.type==="category"?e.getBandWidth():(a=e.getExtent(),Math.abs(a[1]-a[0])/t.count()),i=J(nt(r.get("barMaxWidth"),n),n),o=J(nt(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?J(s,n):Math.max(Math.min(n/2,i),o)}const $7=H7;function U7(r){r.registerChartView(V7),r.registerSeriesModel(G7),r.registerPreprocessor(F7),r.registerVisual(k7),r.registerLayout($7)}function Jw(r,t){var e=t.rippleEffectColor||t.color;r.eachChild(function(a){a.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?e:null,fill:t.brushType==="fill"?e:null}})})}var Y7=function(r){z(t,r);function t(e,a){var n=r.call(this)||this,i=new Gu(e,a),o=new lt;return n.add(i),n.add(o),n.updateData(e,a),n}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var a=e.symbolType,n=e.color,i=e.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(i)/f*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var v=void 0;ot(c)?v=c(n):v=c,i.__t>0&&(v=-s*i.__t),this._animateSymbol(i,s,v,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(e,a,n,i,o){if(a>0){e.__t=0;var s=this,l=e.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(e)});i||l.done(function(){s.remove(e)}),l.start()}},t.prototype._getLineLength=function(e){return An(e.__p1,e.__cp1)+An(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,a){e.__p1=a[0],e.__p2=a[1],e.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},t.prototype.updateData=function(e,a,n){this.childAt(0).updateData(e,a,n),this._updateEffectSymbol(e,a)},t.prototype._updateSymbolPosition=function(e){var a=e.__p1,n=e.__p2,i=e.__cp1,o=e.__t<1?e.__t:2-e.__t,s=[e.x,e.y],l=s.slice(),u=Ee,f=pg;s[0]=u(a[0],i[0],n[0],o),s[1]=u(a[1],i[1],n[1],o);var c=e.__t<1?f(a[0],i[0],n[0],o):f(n[0],i[0],a[0],1-o),v=e.__t<1?f(a[1],i[1],n[1],o):f(n[1],i[1],a[1],1-o);e.rotation=-Math.atan2(v,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(e.__lastT!==void 0&&e.__lastT=0&&!(i[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;la);l++);l=Math.min(l-1,o-2)}var f=(a-i[l])/(i[l+1]-i[l]),c=n[l],v=n[l+1];e.x=c[0]*(1-f)+f*v[0],e.y=c[1]*(1-f)+f*v[1];var h=e.__t<1?v[0]-c[0]:c[0]-v[0],d=e.__t<1?v[1]-c[1]:c[1]-v[1];e.rotation=-Math.atan2(d,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,e.ignore=!1}},t}(Sk);const r9=e9;var a9=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),n9=function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:G.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new a9},t.prototype.buildPath=function(e,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o0){e.moveTo(n[o++],n[o++]);for(var l=1;l0){var h=(u+c)/2-(f-v)*i,d=(f+v)/2-(c-u)*i;e.quadraticCurveTo(h,d,c,v)}else e.lineTo(c,v)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(e,a){var n=this.shape,i=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u0)for(var c=i[u++],v=i[u++],h=1;h0){var g=(c+d)/2-(v-p)*o,y=(v+p)/2-(d-c)*o;if(tD(c,v,g,y,d,p,s,e,a))return l}else if(Tn(c,v,d,p,s,e,a))return l;l++}return-1},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();if(e=n[0],a=n[1],i.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,n=a.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+t.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const o9=i9;var s9={seriesType:"lines",plan:Gs(),reset:function(r){var t=r.coordinateSystem;if(t){var e=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var s=void 0,l=n.end-n.start;if(e){for(var u=0,f=n.start;f0&&(f||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var c=e.get("clip",!0)&&Hu(e.coordinateSystem,!1,e);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,n){var i=e.getData(),o=this._updateLineDraw(i,e);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,a,n){this._lineDraw.incrementalUpdate(e,a.getData()),this._finished=e.end===a.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,a,n){var i=e.getData(),o=e.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=bk.reset(e,a,n);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,a){var n=this._lineDraw,i=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new o9:new J0(o?i?r9:xk:i?Sk:j0),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var a=e.getZr(),n=a.painter.getType()==="svg";!n&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},t.prototype.dispose=function(e,a){this.remove(e,a)},t.type="lines",t}(Xt);const u9=l9;var f9=typeof Uint32Array>"u"?Array:Uint32Array,c9=typeof Float64Array>"u"?Array:Float64Array;function Qw(r){var t=r.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(r.data=Y(t,function(e){var a=[e[0].coord,e[1].coord],n={coords:a};return e[0].name&&(n.fromName=e[0].name),e[1].name&&(n.toName=e[1].name),mm([n,e[0],e[1]])}))}var v9=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.init=function(e){e.data=e.data||[],Qw(e);var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(e){if(Qw(e),e.data){var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var a=this._processFlatCoordsArray(e.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=Ql(this._flatCoords,a.flatCoords),this._flatCoordsOffset=Ql(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),e.data=new Float32Array(a.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var a=this.getData().getItemModel(e),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[e*2],i=this._flatCoordsOffset[e*2+1],o=0;o ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),a=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&a>0?a+"":""},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}(te);const h9=v9;function Uf(r){return r instanceof Array||(r=[r,r]),r}var d9={seriesType:"lines",reset:function(r){var t=Uf(r.get("symbol")),e=Uf(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",t&&t[0]),a.setVisual("toSymbol",t&&t[1]),a.setVisual("fromSymbolSize",e&&e[0]),a.setVisual("toSymbolSize",e&&e[1]);function n(i,o){var s=i.getItemModel(o),l=Uf(s.getShallow("symbol",!0)),u=Uf(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}};const p9=d9;function g9(r){r.registerChartView(u9),r.registerSeriesModel(h9),r.registerLayout(bk),r.registerVisual(p9)}var y9=256,m9=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=Jr.createCanvas();this.canvas=t}return r.prototype.update=function(t,e,a,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),f=this.pointSize+this.blurSize,c=this.canvas,v=c.getContext("2d"),h=t.length;c.width=e,c.height=a;for(var d=0;d0){var I=o(_)?l:u;_>0&&(_=_*M+T),b[x++]=I[D],b[x++]=I[D+1],b[x++]=I[D+2],b[x++]=I[D+3]*_*256}else x+=4}return v.putImageData(S,0,0),c},r.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=Jr.createCanvas()),e=this.pointSize+this.blurSize,a=e*2;t.width=a,t.height=a;var n=t.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor=G.color.neutral99,n.beginPath(),n.arc(-e,e,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),t},r.prototype._getGradient=function(t,e){for(var a=this._gradientPixels,n=a[e]||(a[e]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)t[e](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r}();const _9=m9;function S9(r,t,e){var a=r[1]-r[0];t=Y(t,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=t.length,i=0;return function(o){var s;for(s=i;s=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=t[0]&&a<=t[1]}}function tT(r){var t=r.dimensions;return t[0]==="lng"&&t[1]==="lat"}var b9=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===e&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(e,n,0,e.getData().count()):tT(o)&&this._renderOnGeo(o,e,i,n)},t.prototype.incrementalPrepareRender=function(e,a,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,a,n,i){var o=a.coordinateSystem;o&&(tT(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnGridLike(a,i,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Qn(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,a,n,i,o){var s=e.coordinateSystem,l=Yn(s,"cartesian2d"),u=Yn(s,"matrix"),f,c,v,h;if(l){var d=s.getAxis("x"),p=s.getAxis("y");f=d.getBandWidth()+.5,c=p.getBandWidth()+.5,v=d.scale.getExtent(),h=p.scale.getExtent()}for(var g=this.group,y=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),_=e.getModel(["blur","itemStyle"]).getItemStyle(),S=e.getModel(["select","itemStyle"]).getItemStyle(),b=e.get(["itemStyle","borderRadius"]),x=Te(e),w=e.getModel("emphasis"),T=w.get("focus"),C=w.get("blurScope"),M=w.get("disabled"),D=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],I=n;Iv[1]||Ph[1])continue;var O=s.dataToPoint([R,P]);L=new Mt({shape:{x:O[0]-f/2,y:O[1]-c/2,width:f,height:c},style:k})}else if(u){var E=s.dataToLayout([y.get(D[0],I),y.get(D[1],I)]).rect;if(Ue(E.x))continue;L=new Mt({z2:1,shape:E,style:k})}else{if(isNaN(y.get(D[1],I)))continue;var B=s.dataToLayout([y.get(D[0],I)]),E=B.contentRect||B.rect;if(Ue(E.x)||Ue(E.y))continue;L=new Mt({z2:1,shape:E,style:k})}if(y.hasItemOption){var V=y.getItemModel(I),H=V.getModel("emphasis");m=H.getModel("itemStyle").getItemStyle(),_=V.getModel(["blur","itemStyle"]).getItemStyle(),S=V.getModel(["select","itemStyle"]).getItemStyle(),b=V.get(["itemStyle","borderRadius"]),T=H.get("focus"),C=H.get("blurScope"),M=H.get("disabled"),x=Te(V)}L.shape.r=b;var W=e.getRawValue(I),X="-";W&&W[2]!=null&&(X=W[2]+""),Ie(L,x,{labelFetcher:e,labelDataIndex:I,defaultOpacity:k.opacity,defaultText:X}),L.ensureState("emphasis").style=m,L.ensureState("blur").style=_,L.ensureState("select").style=S,Jt(L,T,C,M),L.incremental=o,o&&(L.states.emphasis.hoverLayer=!0),g.add(L),y.setItemGraphicEl(I,L),this._progressiveEls&&this._progressiveEls.push(L)}},t.prototype._renderOnGeo=function(e,a,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new _9;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var f=e.getViewRect().clone(),c=e.getRoamTransform();f.applyTransform(c);var v=Math.max(f.x,0),h=Math.max(f.y,0),d=Math.min(f.width+f.x,i.getWidth()),p=Math.min(f.height+f.y,i.getHeight()),g=d-v,y=p-h,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(w,T,C){var M=e.dataToPoint([w,T]);return M[0]-=v,M[1]-=h,M.push(C),M}),S=n.getExtent(),b=n.type==="visualMap.continuous"?x9(S,n.option.range):S9(S,n.getPieceList(),n.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var x=new Fe({style:{width:g,height:y,x:v,y:h,image:u.canvas},silent:!0});this.group.add(x)},t.type="heatmap",t}(Xt);const w9=b9;var T9=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return cn(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=Nu.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:G.color.primary}}},t}(te);const C9=T9;function A9(r){r.registerChartView(w9),r.registerSeriesModel(C9)}var M9=["itemStyle","borderWidth"],eT=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Tp=new Jn,D9=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),c=l.master.getRect(),v={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:l,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:f,valueDim:eT[+f],categoryDim:eT[1-+f]};o.diff(s).add(function(d){if(o.hasValue(d)){var p=aT(o,d),g=rT(o,d,p,v),y=nT(o,v,g);o.setItemGraphicEl(d,y),i.add(y),oT(y,v,g)}}).update(function(d,p){var g=s.getItemGraphicEl(p);if(!o.hasValue(d)){i.remove(g);return}var y=aT(o,d),m=rT(o,d,y,v),_=Dk(o,m);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(d,null),g=null),g?O9(g,v,m):g=nT(o,v,m,!0),o.setItemGraphicEl(d,g),g.__pictorialSymbolMeta=m,i.add(g),oT(g,v,m)}).remove(function(d){var p=s.getItemGraphicEl(d);p&&iT(s,d,p.__pictorialSymbolMeta.animationModel,p)}).execute();var h=e.get("clip",!0)?Hu(e.coordinateSystem,!1,e):null;return h?i.setClipPath(h):i.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,a){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(o){iT(i,pt(o).dataIndex,e,o)}):n.removeAll()},t.type="pictorialBar",t}(Xt);function rT(r,t,e,a){var n=r.getItemLayout(t),i=e.get("symbolRepeat"),o=e.get("symbolClip"),s=e.get("symbolPosition")||"start",l=e.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=e.get("symbolPatternSize")||2,c=e.isAnimationEnabled(),v={dataIndex:t,layout:n,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:c?e:null,hoverScale:c&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};L9(e,i,n,a,v),I9(r,t,n,i,o,v.boundingLength,v.pxSign,f,a,v),P9(e,v.symbolScale,u,a,v);var h=v.symbolSize,d=_o(e.get("symbolOffset"),h);return k9(e,h,n,i,o,d,s,v.valueLineWidth,v.boundingLength,v.repeatCutLength,a,v),v}function L9(r,t,e,a,n){var i=a.valueDim,o=r.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(e[i.wh]<=0),f;if(U(o)){var c=[Cp(s,o[0])-l,Cp(s,o[1])-l];c[1]=0?1:-1:f>0?1:-1}function Cp(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function I9(r,t,e,a,n,i,o,s,l,u){var f=l.valueDim,c=l.categoryDim,v=Math.abs(e[c.wh]),h=r.getItemVisual(t,"symbolSize"),d;U(h)?d=h.slice():h==null?d=["100%","100%"]:d=[h,h],d[c.index]=J(d[c.index],v),d[f.index]=J(d[f.index],a?v:Math.abs(i)),u.symbolSize=d;var p=u.symbolScale=[d[0]/s,d[1]/s];p[f.index]*=(l.isHorizontal?-1:1)*o}function P9(r,t,e,a,n){var i=r.get(M9)||0;i&&(Tp.attr({scaleX:t[0],scaleY:t[1],rotation:e}),Tp.updateTransform(),i/=Tp.getLineScale(),i*=t[a.valueDim.index]),n.valueLineWidth=i||0}function k9(r,t,e,a,n,i,o,s,l,u,f,c){var v=f.categoryDim,h=f.valueDim,d=c.pxSign,p=Math.max(t[h.index]+s,0),g=p;if(a){var y=Math.abs(l),m=Ve(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var S=J(m,t[h.index]),b=Math.max(p+S*2,0),x=_?0:S*2,w=zM(a),T=w?a:sT((y+x)/b),C=y-T*p;S=C/2/(_?T:Math.max(T-1,1)),b=p+S*2,x=_?0:S*2,!w&&a!=="fixed"&&(T=u?sT((Math.abs(u)+x)/b):0),g=T*b-x,c.repeatTimes=T,c.symbolMargin=S}var M=d*(g/2),D=c.pathPosition=[];D[v.index]=e[v.wh]/2,D[h.index]=o==="start"?M:o==="end"?l-M:l/2,i&&(D[0]+=i[0],D[1]+=i[1]);var I=c.bundlePosition=[];I[v.index]=e[v.xy],I[h.index]=e[h.xy];var L=c.barRectShape=$({},e);L[h.wh]=d*Math.max(Math.abs(e[h.wh]),Math.abs(D[h.index]+M)),L[v.wh]=e[v.wh];var k=c.clipShape={};k[v.xy]=-e[v.xy],k[v.wh]=f.ecSize[v.wh],k[h.xy]=0,k[h.wh]=e[h.wh]}function wk(r){var t=r.symbolPatternSize,e=me(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function Tk(r,t,e,a){var n=r.__pictorialBundle,i=e.symbolSize,o=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,f=0,c=i[t.valueDim.index]+o+e.symbolMargin*2;for(u_(r,function(p){p.__pictorialAnimationIndex=f,p.__pictorialRepeatTimes=u,f0:y<0)&&(m=u-1-p),g[l.index]=c*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function Ck(r,t,e,a){var n=r.__pictorialBundle,i=r.__pictorialMainPath;i?ps(i,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,a):(i=r.__pictorialMainPath=wk(e),n.add(i),ps(i,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,a))}function Ak(r,t,e){var a=$({},t.barRectShape),n=r.__pictorialBarRect;n?ps(n,null,{shape:a},t,e):(n=r.__pictorialBarRect=new Mt({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function Mk(r,t,e,a){if(e.symbolClip){var n=r.__pictorialClipPath,i=$({},e.clipShape),o=t.valueDim,s=e.animationModel,l=e.dataIndex;if(n)Et(n,{shape:i},s,l);else{i[o.wh]=0,n=new Mt({shape:i}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=e.clipShape[o.wh],po[a?"updateProps":"initProps"](n,{shape:u},s,l)}}}function aT(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=R9,e.isAnimationEnabled=E9,e}function R9(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function E9(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function nT(r,t,e,a){var n=new lt,i=new lt;return n.add(i),n.__pictorialBundle=i,i.x=e.bundlePosition[0],i.y=e.bundlePosition[1],e.symbolRepeat?Tk(n,t,e):Ck(n,t,e),Ak(n,e,a),Mk(n,t,e,a),n.__pictorialShapeStr=Dk(r,e),n.__pictorialSymbolMeta=e,n}function O9(r,t,e){var a=e.animationModel,n=e.dataIndex,i=r.__pictorialBundle;Et(i,{x:e.bundlePosition[0],y:e.bundlePosition[1]},a,n),e.symbolRepeat?Tk(r,t,e,!0):Ck(r,t,e,!0),Ak(r,e,!0),Mk(r,t,e,!0)}function iT(r,t,e,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];u_(a,function(o){i.push(o)}),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(e=null),A(i,function(o){Wn(o,{scaleX:0,scaleY:0},e,t,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(t,null)}function Dk(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function u_(r,t,e){A(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&t.call(e,a)})}function ps(r,t,e,a,n,i){t&&r.attr(t),a.symbolClip&&!n?e&&r.attr(e):e&&po[n?"updateProps":"initProps"](r,e,a.animationModel,a.dataIndex,i)}function oT(r,t,e){var a=e.dataIndex,n=e.itemModel,i=n.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),f=i.get("focus"),c=i.get("blurScope"),v=i.get("scale");u_(r,function(p){if(p instanceof Fe){var g=p.style;p.useStyle($({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},e.style))}else p.useStyle(e.style);var y=p.ensureState("emphasis");y.style=o,v&&(y.scaleX=p.scaleX*1.1,y.scaleY=p.scaleY*1.1),p.ensureState("blur").style=s,p.ensureState("select").style=l,u&&(p.cursor=u),p.z2=e.z2});var h=t.valueDim.posDesc[+(e.boundingLength>0)],d=r.__pictorialBarRect;d.ignoreClip=!0,Ie(d,Te(n),{labelFetcher:t.seriesModel,labelDataIndex:a,defaultText:Ts(t.seriesModel.getData(),a),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:h}),Jt(r,f,c,i.get("disabled"))}function sT(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}const N9=D9;var B9=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return t.prototype.getInitialData=function(e){return e.stack=null,r.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=ti(vv.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:G.color.primary}}}),t}(vv);const z9=B9;function V9(r){r.registerChartView(N9),r.registerSeriesModel(z9),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,xt(W2,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,$2("pictorialBar"))}var G9=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._layers=[],e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this,s=this.group,l=e.getLayerSeries(),u=i.getLayout("layoutInfo"),f=u.rect,c=u.boundaryGap;s.x=0,s.y=f.y+c[0];function v(g){return g.name}var h=new nn(this._layersSeries||[],l,v,v),d=[];h.add(tt(p,this,"add")).update(tt(p,this,"update")).remove(tt(p,this,"remove")).execute();function p(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var S=[],b=[],x,w=l[y].indices,T=0;Ti&&(i=s),a.push(s)}for(var u=0;ui&&(i=c)}return{y0:n,max:i}}function Z9(r){r.registerChartView(H9),r.registerSeriesModel($9),r.registerLayout(U9),r.registerProcessor($s("themeRiver"))}var X9=2,q9=4,K9=function(r){z(t,r);function t(e,a,n,i){var o=r.call(this)||this;o.z2=X9,o.textConfig={inside:!0},pt(o).seriesIndex=a.seriesIndex;var s=new Rt({z2:q9,silent:e.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,e,a,n,i),o}return t.prototype.updateData=function(e,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;pt(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),f=a.getLayout(),c=$({},f);c.label=null;var v=a.getVisual("style");v.lineJoin="bevel";var h=a.getVisual("decal");h&&(v.decal=xs(h,o));var d=Ca(l.getModel("itemStyle"),c,!0);$(c,d),A(er,function(m){var _=s.ensureState(m),S=l.getModel([m,"itemStyle"]);_.style=S.getItemStyle();var b=Ca(S,c);b&&(_.shape=b)}),e?(s.setShape(c),s.shape.r=f.r0,jt(s,{shape:{r:f.r}},n,a.dataIndex)):(Et(s,{shape:c},n),Gr(s)),s.useStyle(v),this._updateLabel(n);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="relative"?Ql(a.getAncestorsIndices(),a.getDescendantIndices()):g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;Jt(this,y,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),f=Math.sin(l),c=this,v=c.getTextContent(),h=this.node.dataIndex,d=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(d!=null&&Math.abs(s)k&&!au(P-k)&&P0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,e,a,n):(o.virtualPiece=new uT(m,e,a,n),f.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(_.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=e.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")e._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";qc(u,f)}}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:$y,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=e[0]-i.cx,s=e[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},t.type="sunburst",t}(Xt);const tZ=Q9;var eZ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e,a){var n={name:e.name,children:e.data};Lk(n);var i=this._levelModels=Y(e.levels||[],function(l){return new Ot(l,this,a)},this),o=$0.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var c=o.getNodeByDataIndex(f),v=i[c.depth];return v&&(u.parentModel=v),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treePathInfo=Sh(n,this),a},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){kP(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(te);function Lk(r){var t=0;A(r.children,function(a){Lk(a);var n=a.value;U(n)&&(n=n[0]),t+=n});var e=r.value;U(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),U(r.value)?r.value[0]=e:r.value=e}const rZ=eZ;var cT=Math.PI/180;function aZ(r,t,e){t.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");U(i)||(i=[0,i]),U(n)||(n=[n,n]);var o=e.getWidth(),s=e.getHeight(),l=Math.min(o,s),u=J(n[0],o),f=J(n[1],s),c=J(i[0],l/2),v=J(i[1],l/2),h=-a.get("startAngle")*cT,d=a.get("minAngle")*cT,p=a.getData().tree.root,g=a.getViewRoot(),y=g.depth,m=a.get("sort");m!=null&&Ik(g,m);var _=0;A(g.children,function(P){!isNaN(P.getValue())&&_++});var S=g.getValue(),b=Math.PI/(S||_)*2,x=g.depth>0,w=g.height-(x?-1:1),T=(v-c)/(w||1),C=a.get("clockwise"),M=a.get("stillShowZeroSum"),D=C?1:-1,I=function(P,O){if(P){var E=O;if(P!==p){var B=P.getValue(),V=S===0&&M?b:B*b;V1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",t);return a.depth>1&&Q(s)&&(s=mg(s,(a.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=e(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");$(u,l)})})}function oZ(r){r.registerChartView(tZ),r.registerSeriesModel(rZ),r.registerLayout(xt(aZ,"sunburst")),r.registerProcessor(xt($s,"sunburst")),r.registerVisual(iZ),J9(r)}var vT={color:"fill",borderColor:"stroke"},sZ={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ka=Dt(),lZ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,a){return cn(null,this)},t.prototype.getDataParams=function(e,a,n){var i=r.prototype.getDataParams.call(this,e,a);return n&&(i.info=Ka(n).info),i},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(te);const uZ=lZ;function fZ(r,t){return t=t||[0,0],Y(["x","y"],function(e,a){var n=this.getAxis(e),i=t[a],o=r[a]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function cZ(r){var t=r.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:tt(fZ,r)}}}function vZ(r,t){return t=t||[0,0],Y([0,1],function(e){var a=t[e],n=r[e]/2,i=[],o=[];return i[e]=a-n,o[e]=a+n,i[1-e]=o[1-e]=t[1-e],Math.abs(this.dataToPoint(i)[e]-this.dataToPoint(o)[e])},this)}function hZ(r){var t=r.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:r.getZoom()},api:{coord:function(e){return r.dataToPoint(e)},size:tt(vZ,r)}}}function dZ(r,t){var e=this.getAxis(),a=t instanceof Array?t[0]:t,n=(r instanceof Array?r[0]:r)/2;return e.type==="category"?e.getBandWidth():Math.abs(e.dataToCoord(a-n)-e.dataToCoord(a+n))}function pZ(r){var t=r.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:tt(dZ,r)}}}function gZ(r,t){return t=t||[0,0],Y(["Radius","Angle"],function(e,a){var n="get"+e+"Axis",i=this[n](),o=t[a],s=r[a]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return e==="Angle"&&(l=l*Math.PI/180),l},this)}function yZ(r){var t=r.getRadiusAxis(),e=r.getAngleAxis(),a=t.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=t.dataToRadius(n[0]),o=e.dataToAngle(n[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:tt(gZ,r)}}}function mZ(r){var t=r.getRect(),e=r.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)},layout:function(a,n){return r.dataToLayout(a,n)}}}}function _Z(r){var t=r.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e,a){return r.dataToPoint(e,a)},layout:function(e,a){return r.dataToLayout(e,a)}}}}function Pk(r,t,e,a){return r&&(r.legacy||r.legacy!==!1&&!e&&!a&&t!=="tspan"&&(t==="text"||et(r,"text")))}function kk(r,t,e){var a=r,n,i,o;if(t==="text")o=a;else{o={},et(a,"text")&&(o.text=a.text),et(a,"rich")&&(o.rich=a.rich),et(a,"textFill")&&(o.fill=a.textFill),et(a,"textStroke")&&(o.stroke=a.textStroke),et(a,"fontFamily")&&(o.fontFamily=a.fontFamily),et(a,"fontSize")&&(o.fontSize=a.fontSize),et(a,"fontStyle")&&(o.fontStyle=a.fontStyle),et(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},n={};var s=et(a,"textPosition");e?n.position=s?a.textPosition:"inside":s&&(n.position=a.textPosition),et(a,"textPosition")&&(n.position=a.textPosition),et(a,"textOffset")&&(n.offset=a.textOffset),et(a,"textRotation")&&(n.rotation=a.textRotation),et(a,"textDistance")&&(n.distance=a.textDistance)}return hT(o,r),A(o.rich,function(l){hT(l,l)}),{textConfig:n,textContent:i}}function hT(r,t){t&&(t.font=t.textFont||t.font,et(t,"textStrokeWidth")&&(r.lineWidth=t.textStrokeWidth),et(t,"textAlign")&&(r.align=t.textAlign),et(t,"textVerticalAlign")&&(r.verticalAlign=t.textVerticalAlign),et(t,"textLineHeight")&&(r.lineHeight=t.textLineHeight),et(t,"textWidth")&&(r.width=t.textWidth),et(t,"textHeight")&&(r.height=t.textHeight),et(t,"textBackgroundColor")&&(r.backgroundColor=t.textBackgroundColor),et(t,"textPadding")&&(r.padding=t.textPadding),et(t,"textBorderColor")&&(r.borderColor=t.textBorderColor),et(t,"textBorderWidth")&&(r.borderWidth=t.textBorderWidth),et(t,"textBorderRadius")&&(r.borderRadius=t.textBorderRadius),et(t,"textBoxShadowColor")&&(r.shadowColor=t.textBoxShadowColor),et(t,"textBoxShadowBlur")&&(r.shadowBlur=t.textBoxShadowBlur),et(t,"textBoxShadowOffsetX")&&(r.shadowOffsetX=t.textBoxShadowOffsetX),et(t,"textBoxShadowOffsetY")&&(r.shadowOffsetY=t.textBoxShadowOffsetY))}function dT(r,t,e){var a=r;a.textPosition=a.textPosition||e.position||"inside",e.offset!=null&&(a.textOffset=e.offset),e.rotation!=null&&(a.textRotation=e.rotation),e.distance!=null&&(a.textDistance=e.distance);var n=a.textPosition.indexOf("inside")>=0,i=r.fill||G.color.neutral99;pT(a,t);var o=a.textFill==null;return n?o&&(a.textFill=e.insideFill||G.color.neutral00,!a.textStroke&&e.insideStroke&&(a.textStroke=e.insideStroke),!a.textStroke&&(a.textStroke=i),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||e.outsideFill||G.color.neutral00),!a.textStroke&&e.outsideStroke&&(a.textStroke=e.outsideStroke)),a.text=t.text,a.rich=t.rich,A(t.rich,function(s){pT(s,s)}),a}function pT(r,t){t&&(et(t,"fill")&&(r.textFill=t.fill),et(t,"stroke")&&(r.textStroke=t.fill),et(t,"lineWidth")&&(r.textStrokeWidth=t.lineWidth),et(t,"font")&&(r.font=t.font),et(t,"fontStyle")&&(r.fontStyle=t.fontStyle),et(t,"fontWeight")&&(r.fontWeight=t.fontWeight),et(t,"fontSize")&&(r.fontSize=t.fontSize),et(t,"fontFamily")&&(r.fontFamily=t.fontFamily),et(t,"align")&&(r.textAlign=t.align),et(t,"verticalAlign")&&(r.textVerticalAlign=t.verticalAlign),et(t,"lineHeight")&&(r.textLineHeight=t.lineHeight),et(t,"width")&&(r.textWidth=t.width),et(t,"height")&&(r.textHeight=t.height),et(t,"backgroundColor")&&(r.textBackgroundColor=t.backgroundColor),et(t,"padding")&&(r.textPadding=t.padding),et(t,"borderColor")&&(r.textBorderColor=t.borderColor),et(t,"borderWidth")&&(r.textBorderWidth=t.borderWidth),et(t,"borderRadius")&&(r.textBorderRadius=t.borderRadius),et(t,"shadowColor")&&(r.textBoxShadowColor=t.shadowColor),et(t,"shadowBlur")&&(r.textBoxShadowBlur=t.shadowBlur),et(t,"shadowOffsetX")&&(r.textBoxShadowOffsetX=t.shadowOffsetX),et(t,"shadowOffsetY")&&(r.textBoxShadowOffsetY=t.shadowOffsetY),et(t,"textShadowColor")&&(r.textShadowColor=t.textShadowColor),et(t,"textShadowBlur")&&(r.textShadowBlur=t.textShadowBlur),et(t,"textShadowOffsetX")&&(r.textShadowOffsetX=t.textShadowOffsetX),et(t,"textShadowOffsetY")&&(r.textShadowOffsetY=t.textShadowOffsetY))}var Rk={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},gT=It(Rk);Ia(ka,function(r,t){return r[t]=1,r},{});ka.join(", ");var bv=["","style","shape","extra"],Ds=Dt();function f_(r,t,e,a,n){var i=r+"Animation",o=Ns(r,a,n)||{},s=Ds(t).userDuring;return o.duration>0&&(o.during=s?tt(TZ,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=r),$(o,e[i]),o}function Cc(r,t,e,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=e.isAnimationEnabled(),l=Ds(r),u=t.style;l.userDuring=t.during;var f={},c={};if(AZ(r,t,c),r.type==="compound")for(var v=r.shape.paths,h=t.shape.paths,d=0;d0&&r.animateFrom(g,y)}else xZ(r,t,n||0,e,f);Ek(r,t),u?r.dirty():r.markRedraw()}function Ek(r,t){for(var e=Ds(r).leaveToProps,a=0;a0&&r.animateFrom(n,i)}}function bZ(r,t){et(t,"silent")&&(r.silent=t.silent),et(t,"ignore")&&(r.ignore=t.ignore),r instanceof Vr&&et(t,"invisible")&&(r.invisible=t.invisible),r instanceof Lt&&et(t,"autoBatch")&&(r.autoBatch=t.autoBatch)}var ha={},wZ={setTransform:function(r,t){return ha.el[r]=t,this},getTransform:function(r){return ha.el[r]},setShape:function(r,t){var e=ha.el,a=e.shape||(e.shape={});return a[r]=t,e.dirtyShape&&e.dirtyShape(),this},getShape:function(r){var t=ha.el.shape;if(t)return t[r]},setStyle:function(r,t){var e=ha.el,a=e.style;return a&&(a[r]=t,e.dirtyStyle&&e.dirtyStyle()),this},getStyle:function(r){var t=ha.el.style;if(t)return t[r]},setExtra:function(r,t){var e=ha.el.extra||(ha.el.extra={});return e[r]=t,this},getExtra:function(r){var t=ha.el.extra;if(t)return t[r]}};function TZ(){var r=this,t=r.el;if(t){var e=Ds(t).userDuring,a=r.userDuring;if(e!==a){r.el=r.userDuring=null;return}ha.el=t,a(wZ)}}function yT(r,t,e,a){var n=e[r];if(n){var i=t[r],o;if(i){var s=e.transition,l=n.transition;if(l)if(!o&&(o=a[r]={}),eo(l))$(o,i);else for(var u=Ut(l),f=0;f=0){!o&&(o=a[r]={});for(var h=It(i),f=0;f=0)){var v=r.getAnimationStyleProps(),h=v?v.style:null;if(h){!i&&(i=a.style={});for(var d=It(e),u=0;u=0?t.getStore().get(E,P):void 0}var B=t.get(O.name,P),V=O&&O.ordinalMeta;return V?V.categories[B]:B}function w(R,P){P==null&&(P=f);var O=t.getItemVisual(P,"style"),E=O&&O.fill,B=O&&O.opacity,V=_(P,Rn).getItemStyle();E!=null&&(V.fill=E),B!=null&&(V.opacity=B);var H={inheritColor:Q(E)?E:G.color.neutral99},W=S(P,Rn),X=Zt(W,null,H,!1,!0);X.text=W.getShallow("show")?nt(r.getFormattedLabel(P,Rn),Ts(t,P)):null;var j=Zc(W,H,!1);return M(R,V),V=dT(V,X,j),R&&C(V,R),V.legacy=!0,V}function T(R,P){P==null&&(P=f);var O=_(P,ja).getItemStyle(),E=S(P,ja),B=Zt(E,null,null,!0,!0);B.text=E.getShallow("show")?_r(r.getFormattedLabel(P,ja),r.getFormattedLabel(P,Rn),Ts(t,P)):null;var V=Zc(E,null,!0);return M(R,O),O=dT(O,B,V),R&&C(O,R),O.legacy=!0,O}function C(R,P){for(var O in P)et(P,O)&&(R[O]=P[O])}function M(R,P){R&&(R.textFill&&(P.textFill=R.textFill),R.textPosition&&(P.textPosition=R.textPosition))}function D(R,P){if(P==null&&(P=f),et(vT,R)){var O=t.getItemVisual(P,"style");return O?O[vT[R]]:null}if(et(sZ,R))return t.getItemVisual(P,R)}function I(R){if(o.type==="cartesian2d"){var P=o.getBaseAxis();return e3(vt({axis:P},R))}}function L(){return e.getCurrentSeriesIndices()}function k(R){return Ym(R,e)}}function zZ(r){var t={};return A(r.dimensions,function(e){var a=r.getDimensionInfo(e);if(!a.isExtraCoord){var n=a.coordDim,i=t[n]=t[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(e)}}),t}function Ip(r,t,e,a,n,i,o){if(!a){i.remove(t);return}var s=p_(r,t,e,a,n,i);return s&&o.setItemGraphicEl(e,s),s&&Jt(s,a.focus,a.blurScope,a.emphasisDisabled),s}function p_(r,t,e,a,n,i){var o=-1,s=t;t&&zk(t,a,n)&&(o=bt(i.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=h_(a),s&&RZ(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),a.tooltipDisabled&&(u.tooltipDisabled=!0),Ar.normal.cfg=Ar.normal.conOpt=Ar.emphasis.cfg=Ar.emphasis.conOpt=Ar.blur.cfg=Ar.blur.conOpt=Ar.select.cfg=Ar.select.conOpt=null,Ar.isLegacy=!1,GZ(u,e,a,n,l,Ar),VZ(u,e,a,n,l),d_(r,u,e,a,Ar,n,l),et(a,"info")&&(Ka(u).info=a.info);for(var f=0;f=0?i.replaceAt(u,o):i.add(u),u}function zk(r,t,e){var a=Ka(r),n=t.type,i=t.shape,o=t.style;return e.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&UZ(i)&&Vk(i)!==a.customPathData||n==="image"&&et(o,"image")&&o.image!==a.customImagePath}function VZ(r,t,e,a,n){var i=e.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&zk(o,i,a)&&(o=null),o||(o=h_(i),r.setClipPath(o)),d_(null,o,t,i,null,a,n)}}function GZ(r,t,e,a,n,i){if(!(r.isGroup||r.type==="compoundPath")){_T(e,null,i),_T(e,ja,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var f=r.getTextContent();if(o===!1)f&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},f?f.clearStates():(f=h_(o),r.setTextContent(f)),d_(null,f,t,o,null,a,n);for(var c=o&&o.style,v=0;v=f;h--){var d=t.childAt(h);HZ(t,d,n)}}}function HZ(r,t,e){t&&wh(t,Ka(r).option,e)}function WZ(r){new nn(r.oldChildren,r.newChildren,ST,ST,r).add(xT).update(xT).remove($Z).execute()}function ST(r,t){var e=r&&r.name;return e??PZ+t}function xT(r,t){var e=this.context,a=r!=null?e.newChildren[r]:null,n=t!=null?e.oldChildren[t]:null;p_(e.api,n,e.dataIndex,a,e.seriesModel,e.group)}function $Z(r){var t=this.context,e=t.oldChildren[r];e&&wh(e,Ka(e).option,t.seriesModel)}function Vk(r){return r&&(r.pathData||r.d)}function UZ(r){return r&&(et(r,"pathData")||et(r,"d"))}function YZ(r){r.registerChartView(OZ),r.registerSeriesModel(uZ)}var Oi=Dt(),bT=st,Pp=tt,ZZ=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,a,n){var i=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=a,!(!n&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,t,e,a);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=f;var c=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new lt,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),a.getZr().add(s);else{var v=xt(wT,e,c);this.updatePointerEl(s,u,v),this.updateLabelEl(s,u,v,e)}CT(s,e,!0),this._renderHandle(i)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var a=e.get("animation"),n=t.axis,i=n.type==="category",o=e.get("snap");if(!o&&!i)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(i&&n.getBandWidth()>s)return!0;if(o){var l=B0(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(t,e,a,n,i){},r.prototype.createPointerEl=function(t,e,a,n){var i=e.pointer;if(i){var o=Oi(t).pointerEl=new po[i.type](bT(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,a,n){if(e.label){var i=Oi(t).labelEl=new Rt(bT(e.label));t.add(i),TT(i,n)}},r.prototype.updatePointerEl=function(t,e,a){var n=Oi(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),a(n,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,a,n){var i=Oi(t).labelEl;i&&(i.setStyle(e.label.style),a(i,{x:e.label.x,y:e.label.y}),TT(i,n))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,a=this._api.getZr(),n=this._handle,i=e.getModel("handle"),o=e.get("status");if(!i.get("show")||!o||o==="hide"){n&&a.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=Ru(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){tn(u.event)},onmousedown:Pp(this._onHandleDragMove,this,0,0),drift:Pp(this._onHandleDragMove,this),ondragend:Pp(this._onHandleDragEnd,this)}),a.add(n)),CT(n,e,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");U(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,Fs(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){wT(this._axisPointerModel,!e&&this._moveAnimation,this._handle,kp(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var a=this._handle;if(a){this._dragging=!0;var n=this.updateHandleTransform(kp(a),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,a.stopAnimation(),a.attr(kp(n)),Oi(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),a=this._group,n=this._handle;e&&a&&(this._lastGraphicKey=null,a&&e.remove(a),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),vu(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,a){return a=a||0,{x:t[a],y:t[1-a],width:e[a],height:e[1-a]}},r}();function wT(r,t,e,a){Gk(Oi(e).lastProp,a)||(Oi(e).lastProp=a,t?Et(e,a,r):(e.stopAnimation(),e.attr(a)))}function Gk(r,t){if(ht(r)&&ht(t)){var e=!0;return A(t,function(a,n){e=e&&Gk(r[n],a)}),!!e}else return r===t}function TT(r,t){r[t.get(["label","show"])?"show":"hide"]()}function kp(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function CT(r,t,e){var a=t.get("z"),n=t.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(a!=null&&(i.z=a),n!=null&&(i.zlevel=n),i.silent=e)})}const y_=ZZ;function m_(r){var t=r.get("type"),e=r.getModel(t+"Style"),a;return t==="line"?(a=e.getLineStyle(),a.fill=null):t==="shadow"&&(a=e.getAreaStyle(),a.stroke=null),a}function Fk(r,t,e,a,n){var i=e.get("value"),o=Hk(i,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=Eu(s.get("padding")||0),u=s.getFont(),f=Uv(o,u),c=n.position,v=f.width+l[1]+l[3],h=f.height+l[0]+l[2],d=n.align;d==="right"&&(c[0]-=v),d==="center"&&(c[0]-=v/2);var p=n.verticalAlign;p==="bottom"&&(c[1]-=h),p==="middle"&&(c[1]-=h/2),XZ(c,v,h,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:c[0],y:c[1],style:Zt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function XZ(r,t,e,a){var n=a.getWidth(),i=a.getHeight();r[0]=Math.min(r[0]+t,n)-t,r[1]=Math.min(r[1]+e,i)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function Hk(r,t,e,a,n){r=t.scale.parse(r);var i=t.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:nv(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};A(a,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,c=u&&u.getDataParams(f);c&&s.seriesData.push(c)}),Q(o)?i=o.replace("{value}",i):ot(o)&&(i=o(s))}return i}function __(r,t,e){var a=Oe();return jn(a,a,e.rotation),Pa(a,a,e.position),Kr([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],a)}function Wk(r,t,e,a,n,i){var o=on.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=n.get(["label","margin"]),Fk(t,a,n,i,{position:__(a.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function S_(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function $k(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}function AT(r,t,e,a,n,i){return{cx:r,cy:t,r0:e,r:a,startAngle:n,endAngle:i,clockwise:!0}}var qZ=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,n,i,o){var s=n.axis,l=s.grid,u=i.get("type"),f=MT(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var v=m_(i),h=KZ[u](s,c,f);h.style=v,e.graphicKey=h.type,e.pointer=h}var d=pv(l.getRect(),n);Wk(a,e,d,n,i,o)},t.prototype.getHandleTransform=function(e,a,n){var i=pv(a.axis.grid.getRect(),a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=__(a.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,a,n,i){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=MT(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,c=[e.x,e.y];c[f]+=a[f],c[f]=Math.min(l[1],c[f]),c[f]=Math.max(l[0],c[f]);var v=(u[1]+u[0])/2,h=[v,v];h[f]=c[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:h,tooltipOption:d[f]}},t}(y_);function MT(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var KZ={line:function(r,t,e){var a=S_([t,e[0]],[t,e[1]],DT(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,t,e){var a=Math.max(1,r.getBandWidth()),n=e[1]-e[0];return{type:"Rect",shape:$k([t-a/2,e[0]],[a,n],DT(r))}}};function DT(r){return r.dim==="x"?0:1}const jZ=qZ;var JZ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:G.color.border,width:1,type:"dashed"},shadowStyle:{color:G.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:G.color.neutral00,padding:[5,7,5,7],backgroundColor:G.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:G.color.accent40,throttle:40}},t}(kt);const QZ=JZ;var Za=Dt(),tX=A;function Uk(r,t,e){if(!Nt.node){var a=t.getZr();Za(a).records||(Za(a).records={}),eX(a,t);var n=Za(a).records[r]||(Za(a).records[r]={});n.handler=e}}function eX(r,t){if(Za(r).initialized)return;Za(r).initialized=!0,e("click",xt(LT,"click")),e("mousemove",xt(LT,"mousemove")),e("globalout",aX);function e(a,n){r.on(a,function(i){var o=nX(t);tX(Za(r).records,function(s){s&&n(s,i,o.dispatchAction)}),rX(o.pendings,t)})}}function rX(r,t){var e=r.showTip.length,a=r.hideTip.length,n;e?n=r.showTip[e-1]:a&&(n=r.hideTip[a-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function aX(r,t,e){r.handler("leave",null,e)}function LT(r,t,e,a){t.handler(r,e,a)}function nX(r){var t={showTip:[],hideTip:[]},e=function(a){var n=t[a.type];n?n.push(a):(a.dispatchAction=e,r.dispatchAction(a))};return{dispatchAction:e,pendings:t}}function Zy(r,t){if(!Nt.node){var e=t.getZr(),a=(Za(e).records||{})[r];a&&(Za(e).records[r]=null)}}var iX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=a.getComponent("tooltip"),o=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Uk("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,a){Zy("axisPointer",a)},t.prototype.dispose=function(e,a){Zy("axisPointer",a)},t.type="axisPointer",t}(re);const oX=iX;function Yk(r,t){var e=[],a=r.seriesIndex,n;if(a==null||!(n=t.getSeriesByIndex(a)))return{point:[]};var i=n.getData(),o=ao(i,r);if(o==null||o<0||U(o))return{point:[]};var s=i.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)e=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),c=f.dim,v=u.dim,h=c==="x"||c==="radius"?1:0,d=i.mapDimension(v),p=[];p[h]=i.get(d,o),p[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(p)||[]}else e=l.dataToPoint(i.getValues(Y(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var IT=Dt();function sX(r,t,e){var a=r.currTrigger,n=[r.x,r.y],i=r,o=r.dispatchAction||tt(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Ac(n)&&(n=Yk({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=Ac(n),u=i.axesInfo,f=s.axesInfo,c=a==="leave"||Ac(n),v={},h={},d={list:[],map:{}},p={showPointer:xt(uX,h),showTooltip:xt(fX,d)};A(s.coordSysMap,function(y,m){var _=l||y.containPoint(n);A(s.coordSysAxesInfo[m],function(S,b){var x=S.axis,w=dX(u,S);if(!c&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=x.pointToData(n)),T!=null&&PT(S,T,p,!1,v)}})});var g={};return A(f,function(y,m){var _=y.linkGroup;_&&!h[m]&&A(_.axesInfo,function(S,b){var x=h[b];if(S!==y&&x){var w=x.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,kT(S),kT(y)))),g[y.key]=w}})}),A(g,function(y,m){PT(f[m],y,p,!0,v)}),cX(h,f,v),vX(d,n,r,o),hX(f,o,e),v}}function PT(r,t,e,a,n){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=lX(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&$(n,s[0]),!a&&r.snap&&i.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function lX(r,t){var e=t.axis,a=e.dim,n=r,i=[],o=Number.MAX_VALUE,s=-1;return A(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(a),c,v;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(f,r,e);v=h.dataIndices,c=h.nestestValue}else{if(v=l.indicesOfNearest(a,f[0],r,e.type==="category"?.5:null),!v.length)return;c=l.getData().get(f[0],v[0])}if(!(c==null||!isFinite(c))){var d=r-c,p=Math.abs(d);p<=o&&((p=0&&s<0)&&(o=p,s=d,n=c,i.length=0),A(v,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:n}}function uX(r,t,e,a){r[t.key]={value:e,payloadBatch:a}}function fX(r,t,e,a){var n=e.payloadBatch,i=t.axis,o=i.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var l=t.coordSys.model,u=xu(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function cX(r,t,e){var a=e.axesInfo=[];A(t,function(n,i){var o=n.axisPointerModel.option,s=r[i];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function vX(r,t,e,a){if(Ac(t)||!r.list.length){a({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function hX(r,t,e){var a=e.getZr(),n="axisPointerLastHighlights",i=IT(a)[n]||{},o=IT(a)[n]={};A(r,function(u,f){var c=u.axisPointerModel.option;c.status==="show"&&u.triggerEmphasis&&A(c.seriesDataIndices,function(v){var h=v.seriesIndex+" | "+v.dataIndex;o[h]=v})});var s=[],l=[];A(i,function(u,f){!o[f]&&l.push(u)}),A(o,function(u,f){!i[f]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function dX(r,t){for(var e=0;e<(r||[]).length;e++){var a=r[e];if(t.axis.dim===a.axisDim&&t.axis.model.componentIndex===a.axisIndex)return a}}function kT(r){var t=r.axis.model,e={},a=e.axisDim=r.axis.dim;return e.axisIndex=e[a+"AxisIndex"]=t.componentIndex,e.axisName=e[a+"AxisName"]=t.name,e.axisId=e[a+"AxisId"]=t.id,e}function Ac(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Uu(r){bo.registerAxisPointerClass("CartesianAxisPointer",jZ),r.registerComponentModel(QZ),r.registerComponentView(oX),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!U(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=WW(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},sX)}function pX(r){Tt(dP),Tt(Uu)}var gX=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,n,i,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),f=u.getExtent(),c=s.dataToCoord(a),v=i.get("type");if(v&&v!=="none"){var h=m_(i),d=mX[v](s,l,c,f);d.style=h,e.graphicKey=d.type,e.pointer=d}var p=i.get(["label","margin"]),g=yX(a,n,i,l,p);Fk(e,n,i,o,g)},t}(y_);function yX(r,t,e,a,n){var i=t.axis,o=i.dataToCoord(r),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,f,c;if(i.dim==="radius"){var v=Oe();jn(v,v,s),Pa(v,v,[a.cx,a.cy]),u=Kr([o,-n],v);var h=t.getModel("axisLabel").get("rotate")||0,d=on.innerTextLayout(s,h*Math.PI/180,-1);f=d.textAlign,c=d.textVerticalAlign}else{var p=l[1];u=a.coordToPoint([p+n,o]);var g=a.cx,y=a.cy;f=Math.abs(u[0]-g)/p<.3?"center":u[0]>g?"left":"right",c=Math.abs(u[1]-y)/p<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:f,verticalAlign:c}}var mX={line:function(r,t,e,a){return r.dim==="angle"?{type:"Line",shape:S_(t.coordToPoint([a[0],e]),t.coordToPoint([a[1],e]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:e}}},shadow:function(r,t,e,a){var n=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:AT(t.cx,t.cy,a[0],a[1],(-e-n/2)*i,(-e+n/2)*i)}:{type:"Sector",shape:AT(t.cx,t.cy,e-n/2,e+n/2,0,Math.PI*2)}}};const _X=gX;var SX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.findAxisModel=function(e){var a,n=this.ecModel;return n.eachComponent(e,function(i){i.getCoordSysModel()===this&&(a=i)},this),a},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(kt);const xX=SX;var x_=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",ae).models[0]},t.type="polarAxis",t}(kt);_e(x_,Vu);var bX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="angleAxis",t}(x_),wX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="radiusAxis",t}(x_),b_=function(r){z(t,r);function t(e,a){return r.call(this,"radius",e,a)||this}return t.prototype.pointToData=function(e,a){return this.polar.pointToData(e,a)[this.dim==="radius"?0:1]},t}(na);b_.prototype.dataToRadius=na.prototype.dataToCoord;b_.prototype.radiusToData=na.prototype.coordToData;const TX=b_;var CX=Dt(),w_=function(r){z(t,r);function t(e,a){return r.call(this,"angle",e,a||[0,360])||this}return t.prototype.pointToData=function(e,a){return this.polar.pointToData(e,a)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,a=e.getLabelModel(),n=e.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=e.dataToCoord(s+1)-e.dataToCoord(s),u=Math.abs(l),f=Uv(s==null?"":s+"",a.getFont(),"center","top"),c=Math.max(f.height,7),v=c/u;isNaN(v)&&(v=1/0);var h=Math.max(0,Math.floor(v)),d=CX(e.model),p=d.lastAutoInterval,g=d.lastTickCount;return p!=null&&g!=null&&Math.abs(p-h)<=1&&Math.abs(g-o)<=1&&p>h?h=p:(d.lastTickCount=o,d.lastAutoInterval=h),h},t}(na);w_.prototype.dataToAngle=na.prototype.dataToCoord;w_.prototype.angleToData=na.prototype.coordToData;const AX=w_;var Zk=["radius","angle"],MX=function(){function r(t){this.dimensions=Zk,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new TX,this._angleAxis=new AX,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},r.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},r.prototype.getAxis=function(t){var e="_"+t+"Axis";return this[e]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(t){var e=[],a=this._angleAxis,n=this._radiusAxis;return a.scale.type===t&&e.push(a),n.scale.type===t&&e.push(n),e},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},r.prototype.dataToPoint=function(t,e,a){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)],a)},r.prototype.pointToData=function(t,e,a){a=a||[];var n=this.pointToCoord(t);return a[0]=this._radiusAxis.radiusToData(n[0],e),a[1]=this._angleAxis.angleToData(n[1],e),a},r.prototype.pointToCoord=function(t){var e=t[0]-this.cx,a=t[1]-this.cy,n=this.getAngleAxis(),i=n.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(e*e+a*a);e/=l,a/=l;for(var u=Math.atan2(-a,e)/Math.PI*180,f=us;)u+=f*360;return[l,u]},r.prototype.coordToPoint=function(t,e){e=e||[];var a=t[0],n=t[1]/180*Math.PI;return e[0]=Math.cos(n)*a+this.cx,e[1]=-Math.sin(n)*a+this.cy,e},r.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),a=e.getExtent().slice();a[0]>a[1]&&a.reverse();var n=t.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(s,l){var u=s-this.cx,f=l-this.cy,c=u*u+f*f,v=this.r,h=this.r0;return v!==h&&c-o<=v*v&&c+o>=h*h},x:this.cx-a[1],y:this.cy-a[1],width:a[1]*2,height:a[1]*2}},r.prototype.convertToPixel=function(t,e,a){var n=RT(e);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(t,e,a){var n=RT(e);return n===this?this.pointToData(a):null},r}();function RT(r){var t=r.seriesModel,e=r.polarModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}const DX=MX;function LX(r,t,e){var a=t.get("center"),n=Ce(t,e).refContainer;r.cx=J(a[0],n.width)+n.x,r.cy=J(a[1],n.height)+n.y;var i=r.getRadiusAxis(),o=Math.min(n.width,n.height)/2,s=t.get("radius");s==null?s=[0,"100%"]:U(s)||(s=[0,s]);var l=[J(s[0],o),J(s[1],o)];i.inverse?i.setExtent(l[1],l[0]):i.setExtent(l[0],l[1])}function IX(r,t){var e=this,a=e.getAngleAxis(),n=e.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===e){var l=s.getData();A(iv(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),A(iv(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),bs(a.scale,a.model),bs(n.scale,n.model),a.type==="category"&&!a.onBand){var i=a.getExtent(),o=360/a.scale.count();a.inverse?i[1]+=o:i[1]-=o,a.setExtent(i[0],i[1])}}function PX(r){return r.mainType==="angleAxis"}function ET(r,t){var e;if(r.type=t.get("type"),r.scale=hh(t),r.onBand=t.get("boundaryGap")&&r.type==="category",r.inverse=t.get("inverse"),PX(t)){r.inverse=r.inverse!==t.get("clockwise");var a=t.get("startAngle"),n=(e=t.get("endAngle"))!==null&&e!==void 0?e:a+(r.inverse?-360:360);r.setExtent(a,n)}t.axis=r,r.model=t}var kX={dimensions:Zk,create:function(r,t){var e=[];return r.eachComponent("polar",function(a,n){var i=new DX(n+"");i.update=IX;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");ET(o,l),ET(s,u),LX(i,a,t),e.push(i),a.coordinateSystem=i,i.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var n=a.getReferringComponents("polar",ae).models[0];a.coordinateSystem=n.coordinateSystem}}),e}};const RX=kX;var EX=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Yf(r,t,e){t[1]>t[0]&&(t=t.slice().reverse());var a=r.coordToPoint([t[0],e]),n=r.coordToPoint([t[1],e]);return{x1:a[0],y1:a[1],x2:n[0],y2:n[1]}}function Zf(r){var t=r.getRadiusAxis();return t.inverse?0:1}function OT(r){var t=r[0],e=r[r.length-1];t&&e&&Math.abs(Math.abs(t.coord-e.coord)-360)<1e-4&&r.pop()}var OX=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return t.prototype.render=function(e,a){if(this.group.removeAll(),!!e.get("show")){var n=e.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),s=n.getTicksCoords({breakTicks:"none"}),l=n.getMinorTicksCoords(),u=Y(n.getViewLabels(),function(f){f=st(f);var c=n.scale,v=c.type==="ordinal"?c.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=n.dataToCoord(v),f});OT(u),OT(s),A(EX,function(f){e.get([f,"show"])&&(!n.scale.isBlank()||f==="axisLine")&&NX[f](this.group,e,i,s,l,o,u)},this)}},t.type="angleAxis",t}(bo),NX={axisLine:function(r,t,e,a,n,i){var o=t.getModel(["axisLine","lineStyle"]),s=e.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),f=Zf(e),c=f?0:1,v,h=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[c]===0?v=new po[h]({shape:{cx:e.cx,cy:e.cy,r:i[f],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):v=new th({shape:{cx:e.cx,cy:e.cy,r:i[f],r0:i[c]},style:o.getLineStyle(),z2:1,silent:!0}),v.style.fill=null,r.add(v)},axisTick:function(r,t,e,a,n,i){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[Zf(e)],u=Y(a,function(f){return new be({shape:Yf(e,[l,l+s],f.coord)})});r.add(Er(u,{style:vt(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,t,e,a,n,i){if(n.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[Zf(e)],f=[],c=0;cy?"left":"right",S=Math.abs(g[1]-m)/p<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[d]){var b=s[d];ht(b)&&b.textStyle&&(h=new Ot(b.textStyle,l,l.ecModel))}var x=new Rt({silent:on.isLabelSilent(t),style:Zt(h,{x:g[0],y:g[1],fill:h.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:_,verticalAlign:S})});if(r.add(x),fn({el:x,componentModel:t,itemName:c.formattedLabel,formatterParamsExtra:{isTruncated:function(){return x.isTruncated},value:c.rawLabel,tickIndex:v}}),f){var w=on.makeAxisEventDataBase(t);w.targetType="axisLabel",w.value=c.rawLabel,pt(x).eventData=w}},this)},splitLine:function(r,t,e,a,n,i){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var f=[],c=0;c=0?"p":"n",R=C;b&&(a[f][L]||(a[f][L]={p:C,n:C}),R=a[f][L][k]);var P=void 0,O=void 0,E=void 0,B=void 0;if(d.dim==="radius"){var V=d.dataToCoord(I)-C,H=l.dataToCoord(L);Math.abs(V)=B})}}})}function $X(r){var t={};A(r,function(a,n){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=qk(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),c=t[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=c.stacks;t[l]=c;var h=Xk(a);v[h]||c.autoWidthCount++,v[h]=v[h]||{width:0,maxWidth:0};var d=J(a.get("barWidth"),f),p=J(a.get("barMaxWidth"),f),g=a.get("barGap"),y=a.get("barCategoryGap");d&&!v[h].width&&(d=Math.min(c.remainedWidth,d),v[h].width=d,c.remainedWidth-=d),p&&(v[h].maxWidth=p),g!=null&&(c.gap=g),y!=null&&(c.categoryGap=y)});var e={};return A(t,function(a,n){e[n]={};var i=a.stacks,o=a.bandWidth,s=J(a.categoryGap,o),l=J(a.gap,1),u=a.remainedWidth,f=a.autoWidthCount,c=(u-s)/(f+(f-1)*l);c=Math.max(c,0),A(i,function(p,g){var y=p.maxWidth;y&&y=e.y&&t[1]<=e.y+e.height:a.contain(a.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},r.prototype.pointToData=function(t,e,a){a=a||[];var n=this.getAxis();return a[0]=n.coordToData(n.toLocalCoord(t[n.orient==="horizontal"?0:1])),a},r.prototype.dataToPoint=function(t,e,a){var n=this.getAxis(),i=this.getRect();a=a||[];var o=n.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),a[o]=n.toGlobalCoord(n.dataToCoord(+t)),a[1-o]=o===0?i.y+i.height/2:i.x+i.width/2,a},r.prototype.convertToPixel=function(t,e,a){var n=NT(e);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(t,e,a){var n=NT(e);return n===this?this.pointToData(a):null},r}();function NT(r){var t=r.seriesModel,e=r.singleAxisModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function rq(r,t){var e=[];return r.eachComponent("singleAxis",function(a,n){var i=new eq(a,r,t);i.name="single_"+n,i.resize(a,t),a.coordinateSystem=i,e.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var n=a.getReferringComponents("singleAxis",ae).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),e}var aq={create:rq,dimensions:jk};const nq=aq;var BT=["x","y"],iq=["width","height"],oq=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,n,i,o){var s=n.axis,l=s.coordinateSystem,u=Ep(l,1-Cv(s)),f=l.dataToPoint(a)[0],c=i.get("type");if(c&&c!=="none"){var v=m_(i),h=sq[c](s,f,u);h.style=v,e.graphicKey=h.type,e.pointer=h}var d=Xy(n);Wk(a,e,d,n,i,o)},t.prototype.getHandleTransform=function(e,a,n){var i=Xy(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=__(a.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,a,n,i){var o=n.axis,s=o.coordinateSystem,l=Cv(o),u=Ep(s,l),f=[e.x,e.y];f[l]+=a[l],f[l]=Math.min(u[1],f[l]),f[l]=Math.max(u[0],f[l]);var c=Ep(s,1-l),v=(c[1]+c[0])/2,h=[v,v];return h[l]=f[l],{x:f[0],y:f[1],rotation:e.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},t}(y_),sq={line:function(r,t,e){var a=S_([t,e[0]],[t,e[1]],Cv(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,t,e){var a=r.getBandWidth(),n=e[1]-e[0];return{type:"Rect",shape:$k([t-a/2,e[0]],[a,n],Cv(r))}}};function Cv(r){return r.isHorizontal()?0:1}function Ep(r,t){var e=r.getRect();return[e[BT[t]],e[BT[t]]+e[iq[t]]]}const lq=oq;var uq=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="single",t}(re);function fq(r){Tt(Uu),bo.registerAxisPointerClass("SingleAxisPointer",lq),r.registerComponentView(uq),r.registerComponentView(JX),r.registerComponentModel(Rp),Cs(r,"single",Rp,Rp.defaultOption),r.registerCoordinateSystem("single",nq)}var cq=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a,n){var i=yo(e);r.prototype.init.apply(this,arguments),zT(e,i)},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),zT(this.option,e)},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:G.color.axisLine,width:1,type:"solid"}},itemStyle:{color:G.color.neutral00,borderWidth:1,borderColor:G.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:G.size.s,color:G.color.secondary},monthLabel:{show:!0,position:"start",margin:G.size.s,align:"center",formatter:null,color:G.color.secondary},yearLabel:{show:!0,position:null,margin:G.size.xl,formatter:null,color:G.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(kt);function zT(r,t){var e=r.cellSize,a;U(e)?a=e:a=r.cellSize=[e,e],a.length===1&&(a[1]=a[0]);var n=Y([0,1],function(i){return PV(t,i)&&(a[i]="auto"),a[i]!=null&&a[i]!=="auto"});Ea(r,t,{type:"box",ignoreSize:n})}const vq=cq;var hq=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=this.group;i.removeAll();var o=e.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(e,s,i),this._renderLines(e,s,l,i),this._renderYearText(e,s,l,i),this._renderMonthText(e,u,l,i),this._renderWeekText(e,u,s,l,i)},t.prototype._renderDayRect=function(e,a,n){for(var i=e.coordinateSystem,o=e.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=a.start.time;u<=a.end.time;u=i.getNextNDay(u,1).time){var f=i.dataToCalendarLayout([u],!1).tl,c=new Mt({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});n.add(c)}},t.prototype._renderLines=function(e,a,n,i){var o=this,s=e.coordinateSystem,l=e.getModel(["splitLine","lineStyle"]).getLineStyle(),u=e.get(["splitLine","show"]),f=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=a.start,v=0;c.time<=a.end.time;v++){d(c.formatedDate),v===0&&(c=s.getDateInfo(a.start.y+"-"+a.start.m));var h=c.date;h.setMonth(h.getMonth()+1),c=s.getDateInfo(h)}d(s.getNextNDay(a.end.time,1).formatedDate);function d(p){o._firstDayOfMonth.push(s.getDateInfo(p)),o._firstDayPoints.push(s.dataToCalendarLayout([p],!1).tl);var g=o._getLinePointsOfOneWeek(e,p,n);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,f,n),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,f,n),l,i)},t.prototype._getEdgesPoints=function(e,a,n){var i=[e[0].slice(),e[e.length-1].slice()],o=n==="horizontal"?0:1;return i[0][o]=i[0][o]-a/2,i[1][o]=i[1][o]+a/2,i},t.prototype._drawSplitline=function(e,a,n){var i=new Xe({z2:20,shape:{points:e},style:a});n.add(i)},t.prototype._getLinePointsOfOneWeek=function(e,a,n){for(var i=e.coordinateSystem,o=i.getDateInfo(a),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),f=i.dataToCalendarLayout([u.time],!1);s[2*u.day]=f.tl,s[2*u.day+1]=f[n==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(e,a){return Q(e)&&e?TV(e,a):ot(e)?e(a):a.nameMap},t.prototype._yearTextPositionControl=function(e,a,n,i,o){var s=a[0],l=a[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var f=0;return(i==="left"||i==="right")&&(f=Math.PI/2),{rotation:f,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(e,a,n,i){var o=e.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=n!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],f=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,v=n==="horizontal"?0:1,h={top:[f,u[v][1]],bottom:[f,u[1-v][1]],left:[u[1-v][0],c],right:[u[v][0],c]},d=a.start.y;+a.end.y>+a.start.y&&(d=d+"-"+a.end.y);var p=o.get("formatter"),g={start:a.start.y,end:a.end.y,nameMap:d},y=this._formatterLabel(p,g),m=new Rt({z2:30,style:Zt(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,h[l],n,l,s)),i.add(m)}},t.prototype._monthTextPositionControl=function(e,a,n,i,o){var s="left",l="top",u=e[0],f=e[1];return n==="horizontal"?(f=f+o,a&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),i==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(e,a,n,i){var o=e.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),f=o.get("align"),c=[this._tlpoints,this._blpoints];(!s||Q(s))&&(s&&(a=Ug(s)||a),s=a.get(["time","monthAbbr"])||[]);var v=u==="start"?0:1,h=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=f==="center",p=o.get("silent"),g=0;g=i.start.time&&n.times.end.time&&e.reverse(),e},r.prototype._getRangeInfo=function(t){var e=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],a;e[0].time>e[1].time&&(a=!0,e.reverse());var n=Math.floor(e[1].time/Op)-Math.floor(e[0].time/Op)+1,i=new Date(e[0].time),o=i.getDate(),s=e[1].date.getDate();i.setDate(o+n-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-e[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-e[1].time)*u>0;)n-=u,i.setDate(l-u);var f=Math.floor((n+e[0].day+6)/7),c=a?-f+1:f-1;return a&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:n,weeks:f,nthWeek:c,fweek:e[0].day,lweek:e[1].day}},r.prototype._getDateByWeeksAndDay=function(t,e,a){var n=this._getRangeInfo(a);if(t>n.weeks||t===0&&en.lweek)return null;var i=(t-1)*7-n.fweek+e,o=new Date(n.start.time);return o.setDate(+n.start.d+i),this.getDateInfo(o)},r.create=function(t,e){var a=[];return t.eachComponent("calendar",function(n){var i=new r(n,t,e);a.push(i),n.coordinateSystem=i}),t.eachComponent(function(n,i){Ou({targetModel:i,coordSysType:"calendar",coordSysProvider:fL})}),a},r.dimensions=["time","value"],r}();function Np(r){var t=r.calendarModel,e=r.seriesModel,a=t?t.coordinateSystem:e?e.coordinateSystem:null;return a}const gq=pq;function yq(r){r.registerComponentModel(vq),r.registerComponentView(dq),r.registerCoordinateSystem("calendar",gq)}var Ua={level:1,leaf:2,nonLeaf:3},Ja={none:0,all:1,body:2,corner:3};function qy(r,t,e){var a=t[yt[e]].getCell(r);return!a&&Pt(r)&&r<0&&(a=t[yt[1-e]].getUnitLayoutInfo(e,Math.round(r))),a}function Jk(r){var t=r||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function Qk(r,t,e,a,n){VT(r[0],t,n,e,a,0),VT(r[1],t,n,e,a,1)}function VT(r,t,e,a,n,i){r[0]=1/0,r[1]=-1/0;var o=a[i],s=U(o)?o:[o],l=s.length,u=!!e;if(l>=1?(GT(r,t,s,u,n,i,0),l>1&>(r,t,s,u,n,i,l-1)):r[0]=r[1]=NaN,u){var f=-n[yt[1-i]].getLocatorCount(i),c=n[yt[i]].getLocatorCount(i)-1;e===Ja.body?f=ue(0,f):e===Ja.corner&&(c=Sr(-1,c)),c=t[0]&&r[0]<=t[1]}function WT(r,t){r.id.set(t[0][0],t[1][0]),r.span.set(t[0][1]-r.id.x+1,t[1][1]-r.id.y+1)}function Sq(r,t){r[0][0]=t[0][0],r[0][1]=t[0][1],r[1][0]=t[1][0],r[1][1]=t[1][1]}function $T(r,t,e,a){var n=qy(t[a][0],e,a),i=qy(t[a][1],e,a);r[yt[a]]=r[ge[a]]=NaN,n&&i&&(r[yt[a]]=n.xy,r[ge[a]]=i.xy+i.wh-n.xy)}function ml(r,t,e,a){return r[yt[t]]=e,r[yt[1-t]]=a,r}function xq(r){return r&&(r.type===Ua.leaf||r.type===Ua.nonLeaf)?r:null}function Av(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var UT=function(){function r(t,e){this._cells=[],this._levels=[],this.dim=t,this.dimIdx=t==="x"?0:1,this._model=e,this._uniqueValueGen=bq(t);var a=e.get("data",!0);a!=null&&!U(a)&&(a=[]),a?this._initByDimModelData(a):this._initBySeriesData()}return r.prototype._initByDimModelData=function(t){var e=this,a=e._cells,n=e._levels,i=[],o=0;e._leavesCount=s(t,0,0),l();return;function s(u,f,c){var v=0;return u&&A(u,function(h,d){var p;Q(h)?p={value:h}:ht(h)?(p=h,h.value!=null&&!Q(h.value)&&(p={value:null})):p={value:null};var g={type:Ua.nonLeaf,ordinal:NaN,level:c,firstLeafLocator:f,id:new ct,span:ml(new ct,e.dimIdx,1,1),option:p,xy:NaN,wh:NaN,dim:e,rect:Av()};o++,(i[f]||(i[f]=[])).push(g),n[c]||(n[c]={type:Ua.level,xy:NaN,wh:NaN,option:null,id:new ct,dim:e});var y=s(p.children,f,c+1),m=Math.max(1,y);g.span[yt[e.dimIdx]]=m,v+=m,f+=m}),v}function l(){for(var u=[];a.length=1,_=e[yt[a]],S=i.getLocatorCount(a)-1,b=new zn;for(o.resetLayoutIterator(b,a);b.next();)x(b.item);for(i.resetLayoutIterator(b,a);b.next();)x(b.item);function x(w){Ue(w.wh)&&(w.wh=y),w.xy=_,w.id[yt[a]]===S&&!m&&(w.wh=e[yt[a]]+e[ge[a]]-w.xy),_+=w.wh}}function JT(r,t){for(var e=t[yt[r]].resetCellIterator();e.next();){var a=e.item;Mv(a.rect,r,a.id,a.span,t),Mv(a.rect,1-r,a.id,a.span,t),a.type===Ua.nonLeaf&&(a.xy=a.rect[yt[r]],a.wh=a.rect[ge[r]])}}function QT(r,t){r.travelExistingCells(function(e){var a=e.span;if(a){var n=e.spanRect,i=e.id;Mv(n,0,i,a,t),Mv(n,1,i,a,t)}})}function Mv(r,t,e,a,n){r[ge[t]]=0;var i=e[yt[t]],o=i<0?n[yt[1-t]]:n[yt[t]],s=o.getUnitLayoutInfo(t,e[yt[t]]);if(r[yt[t]]=s.xy,r[ge[t]]=s.wh,a[yt[t]]>1){var l=o.getUnitLayoutInfo(t,e[yt[t]]+a[yt[t]]-1);r[ge[t]]=l.xy+l.wh-s.xy}}function Bq(r,t,e){var a=Fc(r,e[ge[t]]);return jy(a,e[ge[t]])}function jy(r,t){return Math.max(Math.min(r,nt(t,1/0)),0)}function Vp(r){var t=r.matrixModel,e=r.seriesModel,a=t?t.coordinateSystem:e?e.coordinateSystem:null;return a}var ze={inBody:1,inCorner:2,outside:3},ca={x:null,y:null,point:[]};function tC(r,t,e,a,n){var i=e[yt[t]],o=e[yt[1-t]],s=i.getUnitLayoutInfo(t,i.getLocatorCount(t)-1),l=i.getUnitLayoutInfo(t,0),u=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),f=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,c=r.point[t]=a[t];if(!l&&!f){r[yt[t]]=ze.outside;return}if(n===Ja.body){l?(r[yt[t]]=ze.inBody,c=Sr(s.xy+s.wh,ue(l.xy,c)),r.point[t]=c):r[yt[t]]=ze.outside;return}else if(n===Ja.corner){f?(r[yt[t]]=ze.inCorner,c=Sr(f.xy+f.wh,ue(u.xy,c)),r.point[t]=c):r[yt[t]]=ze.outside;return}var v=l?l.xy:f?f.xy+f.wh:NaN,h=u?u.xy:v,d=s?s.xy+s.wh:v;if(cd){if(!n){r[yt[t]]=ze.outside;return}c=d}r.point[t]=c,r[yt[t]]=v<=c&&c<=d?ze.inBody:h<=c&&c<=v?ze.inCorner:ze.outside}function eC(r,t,e,a){var n=1-e;if(r[yt[e]]!==ze.outside)for(a[yt[e]].resetCellIterator(zp);zp.next();){var i=zp.item;if(aC(r.point[e],i.rect,e)&&aC(r.point[n],i.rect,n)){t[e]=i.ordinal,t[n]=i.id[yt[n]];return}}}function rC(r,t,e,a){if(r[yt[e]]!==ze.outside){var n=r[yt[e]]===ze.inCorner?a[yt[1-e]]:a[yt[e]];for(n.resetLayoutIterator(Jf,e);Jf.next();)if(zq(r.point[e],Jf.item)){t[e]=Jf.item.id[yt[e]];return}}}function zq(r,t){return t.xy<=r&&r<=t.xy+t.wh}function aC(r,t,e){return t[yt[e]]<=r&&r<=t[yt[e]]+t[ge[e]]}const Vq=Nq;function Gq(r){r.registerComponentModel(Mq),r.registerComponentView(Oq),r.registerCoordinateSystem("matrix",Vq)}function Fq(r,t){var e=r.existing;if(t.id=r.keyInfo.id,!t.type&&e&&(t.type=e.type),t.parentId==null){var a=t.parentOption;a?t.parentId=a.id:e&&(t.parentId=e.parentId)}t.parentOption=null}function nC(r,t){var e;return A(t,function(a){r[a]!=null&&r[a]!=="auto"&&(e=!0)}),e}function Hq(r,t,e){var a=$({},e),n=r[t],i=e.$action||"merge";i==="merge"?n?(wt(n,a,!0),Ea(n,a,{ignoreSize:!0}),pL(e,n),Qf(e,n),Qf(e,n,"shape"),Qf(e,n,"style"),Qf(e,n,"extra"),e.clipPath=n.clipPath):r[t]=a:i==="replace"?r[t]=a:i==="remove"&&n&&(r[t]=null)}var eR=["transition","enterFrom","leaveTo"],Wq=eR.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Qf(r,t,e){if(e&&(!r[e]&&t[e]&&(r[e]={}),r=r[e],t=t[e]),!(!r||!t))for(var a=e?eR:Wq,n=0;n=0;f--){var c=n[f],v=xe(c.id,null),h=v!=null?o.get(v):null;if(h){var d=h.parent,y=Pr(d),m=d===i?{width:s,height:l}:{width:y.width,height:y.height},_={},S=sh(h,c,m,null,{hv:c.hv,boundingMode:c.bounding},_);if(!Pr(h).isNew&&S){for(var b=c.transition,x={},w=0;w=0)?x[T]=C:h[T]=C}Et(h,x,e,0)}else h.attr(_)}}},t.prototype._clear=function(){var e=this,a=this._elMap;a.each(function(n){Mc(n,Pr(n).option,a,e._lastGraphicModel)}),this._elMap=rt()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(re);function Jy(r){var t=et(iC,r)?iC[r]:Yc(r),e=new t({});return Pr(e).type=r,e}function oC(r,t,e,a){var n=Jy(e);return t.add(n),a.set(r,n),Pr(n).id=r,Pr(n).isNew=!0,n}function Mc(r,t,e,a){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(i){Mc(i,t,e,a)}),wh(r,t,a),e.removeKey(Pr(r).id))}function sC(r,t,e,a){r.isGroup||A([["cursor",Vr.prototype.cursor],["zlevel",a||0],["z",e||0],["z2",0]],function(n){var i=n[0];et(t,i)?r[i]=nt(t[i],n[1]):r[i]==null&&(r[i]=n[1])}),A(It(t),function(n){if(n.indexOf("on")===0){var i=t[n];r[n]=ot(i)?i:null}}),et(t,"draggable")&&(r.draggable=t.draggable),t.name!=null&&(r.name=t.name),t.id!=null&&(r.id=t.id)}function Zq(r){return r=$({},r),A(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(cL),function(t){delete r[t]}),r}function Xq(r,t,e){var a=pt(r).eventData;!r.silent&&!r.ignore&&!a&&(a=pt(r).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:r.name}),a&&(a.info=e.info)}function qq(r){r.registerComponentModel(Uq),r.registerComponentView(Yq),r.registerPreprocessor(function(t){var e=t.graphic;U(e)?!e[0]||!e[0].elements?t.graphic=[{elements:e}]:t.graphic=[t.graphic[0]]:e&&!e.elements&&(t.graphic=[{elements:[e]}])})}var lC=["x","y","radius","angle","single"],Kq=["cartesian2d","polar","singleAxis"];function jq(r){var t=r.get("coordinateSystem");return bt(Kq,t)>=0}function En(r){return r+"Axis"}function Jq(r,t){var e=rt(),a=[],n=rt();r.eachComponent({mainType:"dataZoom",query:t},function(f){n.get(f.uid)||s(f)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(f){!n.get(f.uid)&&l(f)&&(s(f),i=!0)}function s(f){n.set(f.uid,!0),a.push(f),u(f)}function l(f){var c=!1;return f.eachTargetAxis(function(v,h){var d=e.get(v);d&&d[h]&&(c=!0)}),c}function u(f){f.eachTargetAxis(function(c,v){(e.get(c)||e.set(c,[]))[v]=!0})}return a}function rR(r){var t=r.ecModel,e={infoList:[],infoMap:rt()};return r.eachTargetAxis(function(a,n){var i=t.getComponent(En(a),n);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(i)}}}),e}var Gp=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r}(),Qq=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,a,n){var i=uC(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this._doInit(i)},t.prototype.mergeOption=function(e){var a=uC(e);wt(this.option,e,!0),wt(this.settledOption,a,!0),this._doInit(a)},t.prototype._doInit=function(e){var a=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(a[i[0]]=n[i[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),a=this._targetAxisInfoMap=rt(),n=this._fillSpecifiedTargetAxis(a);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var a=!1;return A(lC,function(n){var i=this.getReferringComponents(En(n),qN);if(i.specified){a=!0;var o=new Gp;A(i.models,function(s){o.add(s.componentIndex)}),e.set(n,o)}},this),a},t.prototype._fillAutoTargetAxisByOrient=function(e,a){var n=this.ecModel,i=!0;if(i){var o=a==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=n.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===a}});l(s,"single")}function l(u,f){var c=u[0];if(c){var v=new Gp;if(v.add(c.componentIndex),e.set(f,v),i=!1,f==="x"||f==="y"){var h=c.getReferringComponents("grid",ae).models[0];h&&A(u,function(d){c.componentIndex!==d.componentIndex&&h===d.getReferringComponents("grid",ae).models[0]&&v.add(d.componentIndex)})}}}i&&A(lC,function(u){if(i){var f=n.findComponents({mainType:En(u),filter:function(v){return v.get("type",!0)==="category"}});if(f[0]){var c=new Gp;c.add(f[0].componentIndex),e.set(u,c),i=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(a){!e&&(e=a)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var a=this._rangePropMode,n=this.get("rangeMode");A([["start","startValue"],["end","endValue"]],function(i,o){var s=e[i[0]]!=null,l=e[i[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":n?a[o]=n[o]:s&&(a[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(a,n){e==null&&(e=this.ecModel.getComponent(En(a),n))},this),e},t.prototype.eachTargetAxis=function(e,a){this._targetAxisInfoMap.each(function(n,i){A(n.indexList,function(o){e.call(a,i,o)})})},t.prototype.getAxisProxy=function(e,a){var n=this.getAxisModel(e,a);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,a){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[a])return this.ecModel.getComponent(En(e),a)},t.prototype.setRawRange=function(e){var a=this.option,n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(i){(e[i[0]]!=null||e[i[1]]!=null)&&(a[i[0]]=n[i[0]]=e[i[0]],a[i[1]]=n[i[1]]=e[i[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var a=this.option;A(["start","startValue","end","endValue"],function(n){a[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,a){if(e==null&&a==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(e,a).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var a,n=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!S&&!b)return!0;_&&(g=!0),S&&(d=!0),b&&(p=!0)}return g&&d&&p})}else es(f,function(h){if(i==="empty")l.setData(u=u.map(h,function(p){return s(p)?p:NaN}));else{var d={};d[h]=o,u.selectRange(d)}});es(f,function(h){u.setApproximateExtent(o,h)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,a=this._dataExtent;es(["min","max"],function(n){var i=e.get(n+"Span"),o=e.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=Gt(a[0]+o,a,[0,100],!0):i!=null&&(o=Gt(i,[0,100],a,!0)-a[0]),t[n+"Span"]=i,t[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,a=this._valueWindow;if(e){var n=OM(a,[0,500]);n=Math.min(n,20);var i=t.axis.scale.rawExtentInfo;e[0]!==0&&i.setDeterminedMinMax("min",+a[0].toFixed(n)),e[1]!==100&&i.setDeterminedMinMax("max",+a[1].toFixed(n)),i.freeze()}},r}();function oK(r,t,e){var a=[1/0,-1/0];es(e,function(o){x3(a,o.getData(),t)});var n=r.getAxisModel(),i=j2(n.axis.scale,n,a).calculate();return[i.min,i.max]}const sK=iK;var lK={getTargetSeries:function(r){function t(n){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(En(o),s);n(o,s,l,i)})})}t(function(n,i,o,s){o.__dzAxisProxy=null});var e=[];t(function(n,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new sK(n,i,s,r),e.push(o.__dzAxisProxy))});var a=rt();return A(e,function(n){A(n.getTargetSeriesModels(),function(i){a.set(i.uid,i)})}),a},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(a,n){e.getAxisProxy(a,n).reset(e)}),e.eachTargetAxis(function(a,n){e.getAxisProxy(a,n).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var a=e.findRepresentativeAxisProxy();if(a){var n=a.getDataPercentWindow(),i=a.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};const uK=lK;function fK(r){r.registerAction("dataZoom",function(t,e){var a=Jq(e,t);A(a,function(n){n.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var cC=!1;function M_(r){cC||(cC=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,uK),fK(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function cK(r){r.registerComponentModel(eK),r.registerComponentView(nK),M_(r)}var Rr=function(){function r(){}return r}(),aR={};function rs(r,t){aR[r]=t}function nR(r){return aR[r]}var vK=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;A(this.option.feature,function(a,n){var i=nR(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),wt(a,i.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:G.color.border,borderRadius:0,borderWidth:0,padding:G.size.m,itemSize:15,itemGap:G.size.s,showTitle:!0,iconStyle:{borderColor:G.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:G.color.accent50}},tooltip:{show:!1,position:"bottom"}},t}(kt);const hK=vK;function iR(r,t){var e=Eu(t.get("padding")),a=t.getItemStyle(["color","opacity"]);a.fill=t.get("backgroundColor");var n=new Mt({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:a,silent:!0,z2:-1});return n}var dK=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,n,i){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},f=this._features||(this._features={}),c=[];A(u,function(m,_){c.push(_)}),new nn(this._featureNames||[],c).add(v).update(v).remove(xt(v,null)).execute(),this._featureNames=c;function v(m,_){var S=c[m],b=c[_],x=u[S],w=new Ot(x,e,e.ecModel),T;if(i&&i.newTitle!=null&&i.featureName===S&&(x.title=i.newTitle),S&&!b){if(pK(S))T={onclick:w.option.onclick,featureName:S};else{var C=nR(S);if(!C)return;T=new C}f[S]=T}else if(T=f[b],!T)return;T.uid=zs("toolbox-feature"),T.model=w,T.ecModel=a,T.api=n;var M=T instanceof Rr;if(!S&&b){M&&T.dispose&&T.dispose(a,n);return}if(!w.get("show")||M&&T.unusable){M&&T.remove&&T.remove(a,n);return}h(w,T,S),w.setIconStatus=function(D,I){var L=this.option,k=this.iconPaths;L.iconStatus=L.iconStatus||{},L.iconStatus[D]=I,k[D]&&(I==="emphasis"?rn:an)(k[D])},T instanceof Rr&&T.render&&T.render(w,a,n,i)}function h(m,_,S){var b=m.getModel("iconStyle"),x=m.getModel(["emphasis","iconStyle"]),w=_ instanceof Rr&&_.getIcons?_.getIcons():m.get("icon"),T=m.get("title")||{},C,M;Q(w)?(C={},C[S]=w):C=w,Q(T)?(M={},M[S]=T):M=T;var D=m.iconPaths={};A(C,function(I,L){var k=Ru(I,{},{x:-s/2,y:-s/2,width:s,height:s});k.setStyle(b.getItemStyle());var R=k.ensureState("emphasis");R.style=x.getItemStyle();var P=new Rt({style:{text:M[L],align:x.get("textAlign"),borderRadius:x.get("textBorderRadius"),padding:x.get("textPadding"),fill:null,font:Ym({fontStyle:x.get("textFontStyle"),fontFamily:x.get("textFontFamily"),fontSize:x.get("textFontSize"),fontWeight:x.get("textFontWeight")},a)},ignore:!0});k.setTextContent(P),fn({el:k,componentModel:e,itemName:L,formatterParamsExtra:{title:M[L]}}),k.__title=M[L],k.on("mouseover",function(){var O=x.getItemStyle(),E=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";P.setStyle({fill:x.get("textFill")||O.fill||O.stroke||G.color.neutral99,backgroundColor:x.get("textBackgroundColor")}),k.setTextConfig({position:x.get("textPosition")||E}),P.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){m.get(["iconStatus",L])!=="emphasis"&&n.leaveEmphasis(this),P.hide()}),(m.get(["iconStatus",L])==="emphasis"?rn:an)(k),o.add(k),k.on("click",tt(_.onclick,_,a,n,L)),D[L]=k})}var d=Ce(e,n).refContainer,p=e.getBoxLayoutParams(),g=e.get("padding"),y=Qt(p,d,g);Ji(e.get("orient"),o,e.get("itemGap"),y.width,y.height),sh(o,p,d,g),o.add(iR(o.getBoundingRect(),e)),l||o.eachChild(function(m){var _=m.__title,S=m.ensureState("emphasis"),b=S.textConfig||(S.textConfig={}),x=m.getTextContent(),w=x&&x.ensureState("emphasis");if(w&&!ot(w)&&_){var T=w.style||(w.style={}),C=Uv(_,Rt.makeFont(T)),M=m.x+o.x,D=m.y+o.y+s,I=!1;D+C.height>n.getHeight()&&(b.position="top",I=!0);var L=I?-5-C.height:s+10;M+C.width/2>n.getWidth()?(b.position=["100%",L],T.align="right"):M-C.width/2<0&&(b.position=[0,L],T.align="left")}})},t.prototype.updateView=function(e,a,n,i){A(this._features,function(o){o instanceof Rr&&o.updateView&&o.updateView(o.model,a,n,i)})},t.prototype.remove=function(e,a){A(this._features,function(n){n instanceof Rr&&n.remove&&n.remove(e,a)}),this.group.removeAll()},t.prototype.dispose=function(e,a){A(this._features,function(n){n instanceof Rr&&n.dispose&&n.dispose(e,a)})},t.type="toolbox",t}(re);function pK(r){return r.indexOf("my")===0}const gK=dK;var yK=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){var n=this.model,i=n.get("name")||e.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||G.color.neutral00,connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=Nt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=i+"."+s,f.target="_blank",f.href=l;var c=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(c)}else if(window.navigator.msSaveOrOpenBlob||o){var v=l.split(","),h=v[0].indexOf("base64")>-1,d=o?decodeURIComponent(v[1]):v[1];h&&(d=window.atob(d));var p=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,y=new Uint8Array(g);g--;)y[g]=d.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,b=S.document;b.open("image/svg+xml","replace"),b.write(d),b.close(),S.focus(),b.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var x=n.get("lang"),w='',T=window.open();T.document.write(w),T.document.title=i}},t.getDefaultOption=function(e){var a={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:G.color.neutral00,name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},t}(Rr);const mK=yK;var vC="__ec_magicType_stack__",_K=[["line","bar"],["stack"]],SK=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,a=e.get("icon"),n={};return A(e.get("type"),function(i){a[i]&&(n[i]=a[i])}),n},t.getDefaultOption=function(e){var a={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},t.prototype.onclick=function(e,a,n){var i=this.model,o=i.get(["seriesIndex",n]);if(hC[n]){var s={series:[]},l=function(c){var v=c.subType,h=c.id,d=hC[n](v,h,c,i);d&&(vt(d,c.option),s.series.push(d));var p=c.coordinateSystem;if(p&&p.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=c.getReferringComponents(m,ae).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var b=0;b<=S;b++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=n==="bar"}}};A(_K,function(c){bt(c,n)>=0&&A(c,function(v){i.setIconStatus(v,"normal")})}),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=n;n==="stack"&&(u=wt({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",n])!=="emphasis"&&(f="tiled")),a.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},t}(Rr),hC={line:function(r,t,e,a){if(r==="bar")return wt({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,t,e,a){if(r==="line")return wt({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,t,e,a){var n=e.get("stack")===vC;if(r==="line"||r==="bar")return a.setIconStatus("stack",n?"normal":"emphasis"),wt({id:t,stack:n?"":vC},a.get(["option","stack"])||{},!0)}};Na({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});const xK=SK;var Th=new Array(60).join("-"),Ls=" ";function bK(r){var t={},e=[],a=[];return r.eachRawSeries(function(n){var i=n.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(n)}else e.push(n)}else e.push(n)}),{seriesGroupByCategoryAxis:t,other:e,meta:a}}function wK(r){var t=[];return A(r,function(e,a){var n=e.categoryAxis,i=e.valueAxis,o=i.dim,s=[" "].concat(Y(e.series,function(h){return h.name})),l=[n.model.getCategories()];A(e.series,function(h){var d=h.getRawData();l.push(h.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(Ls)],f=0;f=0)return!0}var Qy=new RegExp("["+Ls+"]+","g");function MK(r){for(var t=r.split(/\n+/g),e=Dv(t.shift()).split(Qy),a=[],n=Y(e,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=e[i];if(o[n])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();e[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),e.push(t)}function EK(r){var t=D_(r),e=t[t.length-1];t.length>1&&t.pop();var a={};return oR(e,function(n,i){for(var o=t.length-1;o>=0;o--)if(n=t[o][i],n){a[i]=n;break}}),a}function OK(r){sR(r).snapshots=null}function NK(r){return D_(r).length}function D_(r){var t=sR(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var BK=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){OK(e),a.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var a={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])};return a},t}(Rr);Na({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});const zK=BK;var VK=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],GK=function(){function r(t,e,a){var n=this;this._targetInfoList=[];var i=dC(e,t);A(FK,function(o,s){(!a||!a.include||bt(a.include,s)>=0)&&o(i,n._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(a,n,i){if((a.coordRanges||(a.coordRanges=[])).push(n),!a.coordRange){a.coordRange=n;var o=Fp[a.brushType](0,i,n);a.__rangeOffset={offset:mC[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,a){A(t,function(n){var i=this.findTargetInfo(n,e);i&&i!==!0&&A(i.coordSyses,function(o){var s=Fp[n.brushType](1,o,n.range,!0);a(n,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){A(t,function(a){var n=this.findTargetInfo(a,e);if(a.range=a.range||[],n&&n!==!0){a.panelId=n.panelId;var i=Fp[a.brushType](0,n.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?mC[a.brushType](i.values,o.offset,HK(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(t,e){return Y(this._targetInfoList,function(a){var n=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:e?e(a):null,clipPath:ck(n),isTargetByCursor:hk(n,t,a.coordSysModel),getLinearBrushOtherExtent:vk(n)}})},r.prototype.controlSeries=function(t,e,a){var n=this.findTargetInfo(t,a);return n===!0||n&&bt(n.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var a=this._targetInfoList,n=dC(e,t),i=0;ir[1]&&r.reverse(),r}function dC(r,t){return vs(r,t,{includeMainTypes:VK})}var FK={grid:function(r,t){var e=r.xAxisModels,a=r.yAxisModels,n=r.gridModels,i=rt(),o={},s={};!e&&!a&&!n||(A(e,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),A(a,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),A(n,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,f=[];A(u.getCartesians(),function(c,v){(bt(e,c.getAxis("x").model)>=0||bt(a,c.getAxis("y").model)>=0)&&f.push(c)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:gC.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){A(r.geoModels,function(e){var a=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:a,coordSyses:[a],getPanelRect:gC.geo})})}},pC=[function(r,t){var e=r.xAxisModel,a=r.yAxisModel,n=r.gridModel;return!n&&e&&(n=e.axis.grid.model),!n&&a&&(n=a.axis.grid.model),n&&n===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],gC={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(ji(r)),t}},Fp={lineX:xt(yC,0),lineY:xt(yC,1),rect:function(r,t,e,a){var n=r?t.pointToData([e[0][0],e[1][0]],a):t.dataToPoint([e[0][0],e[1][0]],a),i=r?t.pointToData([e[0][1],e[1][1]],a):t.dataToPoint([e[0][1],e[1][1]],a),o=[tm([n[0],i[0]]),tm([n[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,a){var n=[[1/0,-1/0],[1/0,-1/0]],i=Y(e,function(o){var s=r?t.pointToData(o,a):t.dataToPoint(o,a);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:i,xyMinMax:n}}};function yC(r,t,e,a){var n=e.getAxis(["x","y"][r]),i=tm(Y([0,1],function(s){return t?n.coordToData(n.toLocalCoord(a[s]),!0):n.toGlobalCoord(n.dataToCoord(a[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var mC={lineX:xt(_C,0),lineY:xt(_C,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return Y(r,function(a,n){return[a[0]-e[0]*t[n][0],a[1]-e[1]*t[n][1]]})}};function _C(r,t,e,a){return[t[0]-a[r]*e[0],t[1]-a[r]*e[1]]}function HK(r,t){var e=SC(r),a=SC(t),n=[e[0]/a[0],e[1]/a[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function SC(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}const L_=GK;var em=A,WK=$N("toolbox-dataZoom_"),$K=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,n,i){this._brushController||(this._brushController=new i_(n.getZr()),this._brushController.on("brush",tt(this._onBrush,this)).mount()),ZK(e,a,this,i,n),YK(e,a)},t.prototype.onclick=function(e,a,n){UK[n].call(this)},t.prototype.remove=function(e,a){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,a){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var a=e.areas;if(!e.isEnd||!a.length)return;var n={},i=this.ecModel;this._brushController.updateCovers([]);var o=new L_(I_(this.model),i,{include:["grid"]});o.matchOutputRanges(a,i,function(u,f,c){if(c.type==="cartesian2d"){var v=u.brushType;v==="rect"?(s("x",c,f[0]),s("y",c,f[1])):s({lineX:"x",lineY:"y"}[v],c,f)}}),RK(i,n),this._dispatchZoomAction(n);function s(u,f,c){var v=f.getAxis(u),h=v.model,d=l(u,h,i),p=d.findRepresentativeAxisProxy(h).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(c=Zn(0,c.slice(),v.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(n[d.id]={dataZoomId:d.id,startValue:c[0],endValue:c[1]})}function l(u,f,c){var v;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(h){var d=h.getAxisModel(u,f.componentIndex);d&&(v=h)}),v}},t.prototype._dispatchZoomAction=function(e){var a=[];em(e,function(n,i){a.push(st(n))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},t.getDefaultOption=function(e){var a={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:G.color.backgroundTint}};return a},t}(Rr),UK={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(EK(this.ecModel))}};function I_(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function YK(r,t){r.setIconStatus("back",NK(t)>1?"emphasis":"normal")}function ZK(r,t,e,a,n){var i=e._isZoomActive;a&&a.type==="takeGlobalCursor"&&(i=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),e._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new L_(I_(r),t,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}zV("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var a=t.getModel(e),n=[],i=I_(a),o=vs(r,i);em(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),em(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var c=l.componentIndex,v={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:WK+u+c};v[f]=c,n.push(v)}return n});const XK=$K;function qK(r){r.registerComponentModel(hK),r.registerComponentView(gK),rs("saveAsImage",mK),rs("magicType",xK),rs("dataView",kK),rs("dataZoom",XK),rs("restore",zK),Tt(cK)}var KK=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:G.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:G.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:G.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:G.color.tertiary,fontSize:14}},t}(kt);const jK=KK;function lR(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function uR(r){if(Nt.domSupported){for(var t=document.documentElement.style,e=0,a=r.length;e-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var f=u*Math.PI/180,c=o+n,v=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),h=Math.round(((v-Math.SQRT2*n)/2+Math.SQRT2*n-(v-c)/2)*100)/100;s+=";"+i+":-"+h+"px";var d=t+" solid "+n+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+a+";"];return'
'}function nj(r,t,e){var a="cubic-bezier(0.23,1,0.32,1)",n="",i="";return e&&(n=" "+r/2+"s "+a,i="opacity"+n+",visibility"+n),t||(n=" "+r+"s "+a,i+=(i.length?",":"")+(Nt.transformSupported?""+P_+n:",left"+n+",top"+n)),tj+":"+i}function xC(r,t,e){var a=r.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!Nt.transformSupported)return e?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=Nt.transform3dSupported,o="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return e?"top:0;left:0;"+P_+":"+o+";":[["top",0],["left",0],[fR,o]]}function ij(r){var t=[],e=r.get("fontSize"),a=r.getTextColor();a&&t.push("color:"+a),t.push("font:"+r.getFont());var n=nt(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+n+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),A(["decoration","align"],function(u){var f=r.get(u);f&&t.push("text-"+u+":"+f)}),t.join(";")}function oj(r,t,e,a){var n=[],i=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),f=r.get("shadowOffsetY"),c=r.getModel("textStyle"),v=qL(r,"html"),h=u+"px "+f+"px "+s+"px "+l;return n.push("box-shadow:"+h),t&&i>0&&n.push(nj(i,e,a)),o&&n.push("background-color:"+o),A(["width","color","radius"],function(d){var p="border-"+d,g=oL(p),y=r.get(g);y!=null&&n.push(p+":"+y+(d==="color"?"":"px"))}),n.push(ij(c)),v!=null&&n.push("padding:"+Eu(v).join("px ")+"px"),n.join(";")+";"}function bC(r,t,e,a,n){var i=t&&t.painter;if(e){var o=i&&i.getViewportRoot();o&&iO(r,o,e,a,n)}else{r[0]=a,r[1]=n;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var sj=function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Nt.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var n=this._zr=t.getZr(),i=e.appendTo,o=i&&(Q(i)?document.querySelector(i):gs(i)?i:ot(i)&&i(t.getDom()));bC(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(a),this._api=t,this._container=o;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,f=n.painter.getViewportRoot();Dr(f,l,!0),u.dispatch("mousemove",l)}},a.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),a=QK(e,"position"),n=e.style;n.position!=="absolute"&&a!=="absolute"&&(n.position="relative")}var i=t.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,n=a.style,i=this._styleCoord;a.innerHTML?n.cssText=ej+oj(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+xC(i[0],i[1],!0)+("border-color:"+lo(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,a,n,i){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(Q(i)&&a.get("trigger")==="item"&&!lR(a)&&(s=aj(a,n,i)),Q(t))o.innerHTML=t+s;else if(t){o.innerHTML="",U(t)||(t=[t]);for(var l=0;l=0?this._tryShow(i,o):n==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,a=this._ecModel,n=this._api,i=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(e,a,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,a,n,i){if(!(i.from===this.uid||Nt.node||!n.getDom())){var o=CC(i,n);this._ticket="";var s=i.dataByCoordSys,l=gj(i,a,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var f=cj;f.x=i.x,f.y=i.y,f.update(),pt(f).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:f},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(e,a,n,i))return;var c=Yk(i,a),v=c.point[0],h=c.point[1];v!=null&&h!=null&&this._tryShow({offsetX:v,offsetY:h,target:c.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},t.prototype.manuallyHideTip=function(e,a,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(CC(i,n))},t.prototype._manuallyAxisShowTip=function(e,a,n,i){var o=i.seriesIndex,s=i.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(u){var f=u.getData(),c=Sl([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},t.prototype._tryShow=function(e,a){var n=e.target,i=this._tooltipModel;if(i){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){var s=pt(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Hi(n,function(f){if(f.tooltipDisabled)return l=u=null,!0;l||u||(pt(f).dataIndex!=null?l=f:pt(f).tooltipConfig!=null&&(u=f))},!0),l?this._showSeriesItemTooltip(e,l,a):u?this._showComponentItemTooltip(e,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},t.prototype._showOrMove=function(e,a){var n=e.get("showDelay");a=tt(a,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(a,n):a()},t.prototype._showAxisTooltip=function(e,a){var n=this._ecModel,i=this._tooltipModel,o=[a.offsetX,a.offsetY],s=Sl([a.tooltipOption],i),l=this._renderMode,u=[],f=ye("section",{blocks:[],noHeader:!0}),c=[],v=new xd;A(e,function(m){A(m.dataByAxis,function(_){var S=n.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!S||b==null)){var x=Hk(b,S.axis,n,_.seriesDataIndices,_.valueLabelOpt),w=ye("section",{header:x,noHeader:!Nr(x),sortBlocks:!0,blocks:[]});f.blocks.push(w),A(_.seriesDataIndices,function(T){var C=n.getSeriesByIndex(T.seriesIndex),M=T.dataIndexInside,D=C.getDataParams(M);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=nv(S.axis,{value:b}),D.axisValueLabel=x,D.marker=v.makeTooltipMarker("item",lo(D.color),l);var I=BS(C.formatTooltip(M,!0,null)),L=I.frag;if(L){var k=Sl([C],i).get("valueFormatter");w.blocks.push(k?$({valueFormatter:k},L):L)}I.text&&c.push(I.text),u.push(D)}})}})}),f.blocks.reverse(),c.reverse();var h=a.position,d=s.get("order"),p=WS(f,v,l,d,n.get("useUTC"),s.get("textStyle"));p&&c.unshift(p);var g=l==="richText"?` `:"
",y=c.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],h,null,v)})},t.prototype._showSeriesItemTooltip=function(e,a,n){var i=this._ecModel,o=pt(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,c=o.dataType,v=u.getData(c),h=this._renderMode,d=e.positionDefault,p=Sl([v.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(f,c),m=new xd;y.marker=m.makeTooltipMarker("item",lo(y.color),h);var _=BS(u.formatTooltip(f,!1,c)),S=p.get("order"),b=p.get("valueFormatter"),x=_.frag,w=x?WS(b?$({valueFormatter:b},x):x,m,h,S,i.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,w,y,T,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:v.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,a,n){var i=this._renderMode==="html",o=pt(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(Q(l)){var f=l;l={content:f,formatter:f},u=!0}u&&i&&l.content&&(l=st(l),l.content=$e(l.content));var c=[l],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&c.push(v),c.push({formatter:l.content});var h=e.positionDefault,d=Sl(c,this._tooltipModel,h?{position:h}:null),p=d.get("content"),g=Math.random()+"",y=new xd;this._showOrMove(d,function(){var m=st(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,g,e.offsetX,e.offsetY,e.position,a,y)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,a,n,i,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var c=this._tooltipContent;c.setEnterable(e.get("enterable"));var v=e.get("formatter");l=l||e.get("position");var h=a,d=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)),p=d.color;if(v)if(Q(v)){var g=e.ecModel.get("useUTC"),y=U(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;h=v,m&&(h=oh(y.axisValue,h,g)),h=sL(h,n,!0)}else if(ot(v)){var _=tt(function(S,b){S===this._ticket&&(c.setContent(b,f,e,p,l),this._updatePosition(e,l,o,s,c,n,u))},this);this._ticket=i,h=v(n,i,_)}else h=v;c.setContent(h,f,e,p,l),c.show(e,p),this._updatePosition(e,l,o,s,c,n,u)}},t.prototype._getNearestPoint=function(e,a,n,i,o){if(n==="axis"||U(a))return{color:i||o};if(!U(a))return{color:i||a.color||a.borderColor}},t.prototype._updatePosition=function(e,a,n,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();a=a||e.get("position");var c=o.getSize(),v=e.get("align"),h=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),ot(a)&&(a=a([n,i],s,o.el,d,{viewSize:[u,f],contentSize:c.slice()})),U(a))n=J(a[0],u),i=J(a[1],f);else if(ht(a)){var p=a;p.width=c[0],p.height=c[1];var g=Qt(p,{width:u,height:f});n=g.x,i=g.y,v=null,h=null}else if(Q(a)&&l){var y=pj(a,d,c,e.get("borderWidth"));n=y[0],i=y[1]}else{var y=hj(n,i,o,u,f,v?null:20,h?null:20);n=y[0],i=y[1]}if(v&&(n-=AC(v)?c[0]/2:v==="right"?c[0]:0),h&&(i-=AC(h)?c[1]/2:h==="bottom"?c[1]:0),lR(e)){var y=dj(n,i,o,u,f);n=y[0],i=y[1]}o.moveTo(n,i)},t.prototype._updateContentNotChangedOnAxis=function(e,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===e.length;return o&&A(n,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},c=f.dataByAxis||[];o=o&&u.length===c.length,o&&A(u,function(v,h){var d=c[h]||{},p=v.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&v.value===d.value&&v.axisType===d.axisType&&v.axisId===d.axisId&&p.length===g.length,o&&A(p,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&A(v.seriesDataIndices,function(y){var m=y.seriesIndex,_=a[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=a,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,a){Nt.node||!a.getDom()||(vu(this,"_updatePosition"),this._tooltipContent.dispose(),Zy("itemTooltip",a))},t.type="tooltip",t}(re);function Sl(r,t,e){var a=t.ecModel,n;e?(n=new Ot(e,a,a),n=new Ot(t.option,n,a)):n=t;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof Ot&&(o=o.get("tooltip",!0)),Q(o)&&(o={formatter:o}),o&&(n=new Ot(o,n,a)))}return n}function CC(r,t){return r.dispatchAction||tt(t.dispatchAction,t)}function hj(r,t,e,a,n,i,o){var s=e.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>a?r-=l+i:r+=i),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function dj(r,t,e,a,n){var i=e.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,a)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function pj(r,t,e,a){var n=e[0],i=e[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+f/2-i/2;break;case"top":s=t.x+u/2-n/2,l=t.y-i-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+f+o;break;case"left":s=t.x-n-o,l=t.y+f/2-i/2;break;case"right":s=t.x+u+o,l=t.y+f/2-i/2}return[s,l]}function AC(r){return r==="center"||r==="middle"}function gj(r,t,e){var a=Im(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=Rs(t,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=pt(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}const yj=vj;function mj(r){Tt(Uu),r.registerComponentModel(jK),r.registerComponentView(yj),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},fe),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},fe)}var _j=["rect","polygon","keep","clear"];function Sj(r,t){var e=Ut(r?r.brush:[]);if(e.length){var a=[];A(e,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;U(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),xj(s),t&&!s.length&&s.push.apply(s,_j)}}function xj(r){var t={};A(r,function(e){t[e]=1}),r.length=0,A(t,function(e,a){r.push(a)})}var MC=A;function DC(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function rm(r,t,e){var a={};return MC(t,function(i){var o=a[i]=n();MC(r[i],function(s,l){if(Ge.isValidType(l)){var u={type:l,visual:s};e&&e(u,i),o[l]=new Ge(u),l==="opacity"&&(u=st(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Ge(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function vR(r,t,e){var a;A(e,function(n){t.hasOwnProperty(n)&&DC(t[n])&&(a=!0)}),a&&A(e,function(n){t.hasOwnProperty(n)&&DC(t[n])?r[n]=st(t[n]):delete r[n]})}function bj(r,t,e,a,n,i){var o={};A(r,function(c){var v=Ge.prepareVisualTypes(t[c]);o[c]=v});var s;function l(c){return d0(e,s,c)}function u(c,v){i2(e,s,c,v)}i==null?e.each(f):e.each([i],f);function f(c,v){s=i==null?c:v;var h=e.getRawDataItem(s);if(!(h&&h.visualMap===!1))for(var d=a.call(n,c),p=t[d],g=o[d],y=0,m=g.length;yt[0][1]&&(t[0][1]=i[0]),i[1]t[1][1]&&(t[1][1]=i[1])}return t&&RC(t)}};function RC(r){return new dt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var Ij=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){this.ecModel=e,this.api=a,this.model,(this._brushController=new i_(a.getZr())).on("brush",tt(this._onBrush,this)).mount()},t.prototype.render=function(e,a,n,i){this.model=e,this._updateController(e,a,n,i)},t.prototype.updateTransform=function(e,a,n,i){hR(a),this._updateController(e,a,n,i)},t.prototype.updateVisual=function(e,a,n,i){this.updateTransform(e,a,n,i)},t.prototype.updateView=function(e,a,n,i){this._updateController(e,a,n,i)},t.prototype._updateController=function(e,a,n,i){(!i||i.$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 a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:st(n),$from:a}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:st(n),$from:a})},t.type="brush",t}(re);const Pj=Ij;var kj=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.areas=[],e.brushOption={},e}return t.prototype.optionUpdated=function(e,a){var n=this.option;!a&&vR(n,e,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},i.hasOwnProperty("liftZ")||(i.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=Y(e,function(a){return EC(this.option,a)},this))},t.prototype.setBrushOption=function(e){this.brushOption=EC(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:G.color.backgroundTint,borderColor:G.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:G.color.disabled},t}(kt);function EC(r,t){return wt({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Ot(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},t,!0)}const Rj=kj;var Ej=["rect","polygon","lineX","lineY","keep","clear"],Oj=function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,n){var i,o,s;a.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,A(e.get("type",!0),function(l){e.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},t.prototype.updateView=function(e,a,n){this.render(e,a,n)},t.prototype.getIcons=function(){var e=this.model,a=e.get("icon",!0),n={};return A(e.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},t.prototype.onclick=function(e,a,n){var i=this._brushType,o=this._brushMode;n==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(e){var a={show:!0,type:Ej.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"])};return a},t}(Rr);const Nj=Oj;function Bj(r){r.registerComponentView(Pj),r.registerComponentModel(Rj),r.registerPreprocessor(Sj),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Cj),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(a){a.setAreas(t.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},fe),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},fe),rs("brush",Nj)}var zj=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:G.size.m,backgroundColor:G.color.transparent,borderColor:G.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:G.color.primary},subtextStyle:{fontSize:12,color:G.color.quaternary}},t}(kt),Vj=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){if(this.group.removeAll(),!!e.get("show")){var i=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=nt(e.get("textBaseline"),e.get("textVerticalAlign")),f=new Rt({style:Zt(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),v=e.get("subtext"),h=new Rt({style:Zt(s,{text:v,fill:s.getTextColor(),y:c.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),g=e.get("triggerEvent",!0);f.silent=!d&&!g,h.silent=!p&&!g,d&&f.on("click",function(){qc(d,"_"+e.get("target"))}),p&&h.on("click",function(){qc(p,"_"+e.get("subtarget"))}),pt(f).eventData=pt(h).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(f),v&&i.add(h);var y=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Ce(e,n),S=Qt(m,_.refContainer,e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),i.x=S.x,i.y=S.y,i.markRedraw();var b={align:l,verticalAlign:u};f.setStyle(b),h.setStyle(b),y=i.getBoundingRect();var x=S.margin,w=e.getItemStyle(["color","opacity"]);w.fill=e.get("backgroundColor");var T=new Mt({shape:{x:y.x-x[3],y:y.y-x[0],width:y.width+x[1]+x[3],height:y.height+x[0]+x[2],r:e.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});i.add(T)}},t.type="title",t}(re);function Gj(r){r.registerComponentModel(zj),r.registerComponentView(Vj)}var Fj=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode="box",e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e==null&&(e=this.option.currentIndex);var a=this._data.count();this.option.loop?e=(e%a+a)%a:(e>=a&&(e=a-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,a=e.data||[],n=e.axisType,i=this._names=[],o;n==="category"?(o=[],A(a,function(u,f){var c=xe(ks(u),""),v;ht(u)?(v=st(u),v.value=f):v=f,o.push(v),i.push(c)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new tr([{name:"value",type:s}],this);l.initData(o,i)},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:G.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:G.color.secondary},data:[]},t}(kt);const OC=Fj;var dR=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline.slider",t.defaultOption=ti(OC.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:G.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:G.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:G.color.tertiary},itemStyle:{color:G.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:G.color.accent50,borderColor:G.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:G.color.accent50,borderColor:G.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:G.color.accent60},itemStyle:{color:G.color.accent60,borderColor:G.color.accent60},controlStyle:{color:G.color.accent70,borderColor:G.color.accent70}},progress:{lineStyle:{color:G.color.accent30},itemStyle:{color:G.color.accent40}},data:[]}),t}(OC);_e(dR,uh.prototype);const Hj=dR;var Wj=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline",t}(re);const $j=Wj;var Uj=function(r){z(t,r);function t(e,a,n,i){var o=r.call(this,e,a,n)||this;return o.type=i||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(na);const Yj=Uj;var Wp=Math.PI,NC=Dt(),Zj=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){this.api=a},t.prototype.render=function(e,a,n){if(this.model=e,this.api=n,this.ecModel=a,this.group.removeAll(),e.get("show",!0)){var i=this._layout(e,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,e);e.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return ye("nameValue",{noName:!0,value:f})},A(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,e)},this),this._renderAxisLabel(i,s,l,e),this._position(i,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,a){var n=e.get(["label","position"]),i=e.get("orient"),o=qj(e,a),s;n==null||n==="auto"?s=i==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:Wp/2},c=i==="vertical"?o.height:o.width,v=e.getModel("controlStyle"),h=v.get("show",!0),d=h?v.get("itemSize"):0,p=h?v.get("itemGap"):0,g=d+p,y=e.get(["label","rotate"])||0;y=y*Wp/180;var m,_,S,b=v.get("position",!0),x=h&&v.get("showPlayBtn",!0),w=h&&v.get("showPrevBtn",!0),T=h&&v.get("showNextBtn",!0),C=0,M=c;b==="left"||b==="bottom"?(x&&(m=[0,0],C+=g),w&&(_=[C,0],C+=g),T&&(S=[M-d,0],M-=g)):(x&&(m=[M-d,0],M-=g),w&&(_=[0,0],C+=g),T&&(S=[M-d,0],M-=g));var D=[C,M];return e.get("inverse")&&D.reverse(),{viewRect:o,mainLength:c,orient:i,rotation:f[i],labelRotation:y,labelPosOpt:s,labelAlign:e.get(["label","align"])||l[i],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:_,nextBtnPosition:S,axisExtent:D,controlSize:d,controlGap:p}},t.prototype._position=function(e,a){var n=this._mainGroup,i=this._labelGroup,o=e.viewRect;if(e.orient==="vertical"){var s=Oe(),l=o.x,u=o.y+o.height;Pa(s,s,[-l,-u]),jn(s,s,-Wp/2),Pa(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=m(o),c=m(n.getBoundingRect()),v=m(i.getBoundingRect()),h=[n.x,n.y],d=[i.x,i.y];d[0]=h[0]=f[0][0];var p=e.labelPosOpt;if(p==null||Q(p)){var g=p==="+"?0:1;_(h,c,f,1,g),_(d,v,f,1,1-g)}else{var g=p>=0?0:1;_(h,c,f,1,g),d[1]=h[1]+p}n.setPosition(h),i.setPosition(d),n.rotation=i.rotation=e.rotation,y(n),y(i);function y(S){S.originX=f[0][0]-S.x,S.originY=f[1][0]-S.y}function m(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function _(S,b,x,w,T){S[w]+=x[w][T]-b[w][T]}},t.prototype._createAxis=function(e,a){var n=a.getData(),i=a.get("axisType"),o=Xj(a,i);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Yj("value",o,e.axisExtent,i);return l.model=a,l},t.prototype._createGroup=function(e){var a=this[e]=new lt;return this.group.add(a),a},t.prototype._renderAxisLine=function(e,a,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var s=new be({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:$({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new be({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:vt({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},t.prototype._renderAxisTick=function(e,a,n,i){var o=this,s=i.getData(),l=n.scale.getTicks();this._tickSymbols=[],A(l,function(u){var f=n.dataToCoord(u.value),c=s.getItemModel(u.value),v=c.getModel("itemStyle"),h=c.getModel(["emphasis","itemStyle"]),d=c.getModel(["progress","itemStyle"]),p={x:f,y:0,onclick:tt(o._changeTimeline,o,u.value)},g=BC(c,v,a,p);g.ensureState("emphasis").style=h.getItemStyle(),g.ensureState("progress").style=d.getItemStyle(),Ki(g);var y=pt(g);c.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},t.prototype._renderAxisLabel=function(e,a,n,i){var o=this,s=n.getLabelModel();if(s.get("show")){var l=i.getData(),u=n.getViewLabels();this._tickLabels=[],A(u,function(f){var c=f.tickValue,v=l.getItemModel(c),h=v.getModel("label"),d=v.getModel(["emphasis","label"]),p=v.getModel(["progress","label"]),g=n.dataToCoord(f.tickValue),y=new Rt({x:g,y:0,rotation:e.labelRotation-e.rotation,onclick:tt(o._changeTimeline,o,c),silent:!1,style:Zt(h,{text:f.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});y.ensureState("emphasis").style=Zt(d),y.ensureState("progress").style=Zt(p),a.add(y),Ki(y),NC(y).dataIndex=c,o._tickLabels.push(y)})}},t.prototype._renderControl=function(e,a,n,i){var o=e.controlSize,s=e.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),f=i.getPlayState(),c=i.get("inverse",!0);v(e.nextBtnPosition,"next",tt(this._changeTimeline,this,c?"-":"+")),v(e.prevBtnPosition,"prev",tt(this._changeTimeline,this,c?"+":"-")),v(e.playPosition,f?"stop":"play",tt(this._handlePlayClick,this,!f),!0);function v(h,d,p,g){if(h){var y=ta(nt(i.get(["controlStyle",d+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=Kj(i,d+"Icon",m,{x:h[0],y:h[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:p});_.ensureState("emphasis").style=u,a.add(_),Ki(_)}}},t.prototype._renderCurrentPointer=function(e,a,n,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(c){c.draggable=!0,c.drift=tt(u._handlePointerDrag,u),c.ondragend=tt(u._handlePointerDragend,u),zC(c,u._progressLine,s,n,i,!0)},onUpdate:function(c){zC(c,u._progressLine,s,n,i)}};this._currentPointer=BC(l,l,this._mainGroup,{},this._currentPointer,f)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,a,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,a){var n=this._toAxisCoord(e)[0],i=this._axis,o=Br(i.getExtent().slice());n>o[1]&&(n=o[1]),n=0&&(s[o]=+s[o].toFixed(d)),[s,h]}var ac={min:xt(rc,"min"),max:xt(rc,"max"),average:xt(rc,"average"),median:xt(rc,"median")};function Du(r,t){if(t){var e=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!nJ(t)&&!U(t.coord)&&U(n)){var i=gR(t,e,a,r);if(t=st(t),t.type&&ac[t.type]&&i.baseAxis&&i.valueAxis){var o=bt(n,i.baseAxis.dim),s=bt(n,i.valueAxis.dim),l=ac[t.type](e,i.valueAxis.dim,i.baseDataDim,i.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!U(n)){t.coord=[];var u=r.getBaseAxis();if(u&&t.type&&ac[t.type]){var f=a.getOtherAxis(u);f&&(t.value=Lv(e,e.mapDimension(f.dim),t.type))}}else for(var c=t.coord,v=0;v<2;v++)ac[c[v]]&&(c[v]=Lv(e,e.mapDimension(n[v]),c[v]));return t}}function gR(r,t,e,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,n.valueAxis=e.getAxis(iJ(a,n.valueDataDim)),n.baseAxis=e.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=e.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function iJ(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function Lu(r,t){return r&&r.containData&&t.coord&&!nm(t)?r.containData(t.coord):!0}function oJ(r,t,e){return r&&r.containZone&&t.coord&&e.coord&&!nm(t)&&!nm(e)?r.containZone(t.coord,e.coord):!0}function yR(r,t){return r?function(e,a,n,i){var o=i<2?e.coord&&e.coord[i]:e.value;return Gn(o,t[i])}:function(e,a,n,i){return Gn(e.value,t[i])}}function Lv(r,t,e){if(e==="average"){var a=0,n=0;return r.each(t,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var $p=Dt(),sJ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=rt()},t.prototype.render=function(e,a,n){var i=this,o=this.markerGroupMap;o.each(function(s){$p(s).keep=!1}),a.eachSeries(function(s){var l=ln.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!$p(s).keep&&i.group.remove(s.group)}),lJ(a,o,this.type)},t.prototype.markKeep=function(e){$p(e).keep=!0},t.prototype.toggleBlurSeries=function(e,a){var n=this;A(e,function(i){var o=ln.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?hD(l):zm(l))})}})},t.type="marker",t}(re);function lJ(r,t,e){r.eachSeries(function(a){var n=ln.getMarkerModelFromSeries(a,e),i=t.get(a.id);if(n&&i&&i.group){var o=so(n),s=o.z,l=o.zlevel;nh(i.group,s,l)}})}const R_=sJ;function GC(r,t,e){var a=t.coordinateSystem,n=e.getWidth(),i=e.getHeight(),o=a&&a.getArea&&a.getArea();r.each(function(s){var l=r.getItemModel(s),u=l.get("relativeTo")==="coordinate",f=u?o?o.width:0:n,c=u?o?o.height:0:i,v=u&&o?o.x:0,h=u&&o?o.y:0,d,p=J(l.get("x"),f)+v,g=J(l.get("y"),c)+h;if(!isNaN(p)&&!isNaN(g))d=[p,g];else if(t.getMarkerPosition)d=t.getMarkerPosition(r.getValues(r.dimensions,s));else if(a){var y=r.get(a.dimensions[0],s),m=r.get(a.dimensions[1],s);d=a.dataToPoint([y,m])}isNaN(p)||(d[0]=p),isNaN(g)||(d[1]=g),r.setItemLayout(s,d)})}var uJ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,n){a.eachSeries(function(i){var o=ln.getMarkerModelFromSeries(i,"markPoint");o&&(GC(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},t.prototype.renderSeries=function(e,a,n,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new Fu),c=fJ(o,e,a);a.setData(c),GC(a.getData(),e,i),c.each(function(v){var h=c.getItemModel(v),d=h.getShallow("symbol"),p=h.getShallow("symbolSize"),g=h.getShallow("symbolRotate"),y=h.getShallow("symbolOffset"),m=h.getShallow("symbolKeepAspect");if(ot(d)||ot(p)||ot(g)||ot(y)){var _=a.getRawValue(v),S=a.getDataParams(v);ot(d)&&(d=d(_,S)),ot(p)&&(p=p(_,S)),ot(g)&&(g=g(_,S)),ot(y)&&(y=y(_,S))}var b=h.getModel("itemStyle").getItemStyle(),x=h.get("z2"),w=Bu(l,"color");b.fill||(b.fill=w),c.setItemVisual(v,{z2:nt(x,0),symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:b})}),f.updateData(c),this.group.add(f.group),c.eachItemGraphicEl(function(v){v.traverse(function(h){pt(h).dataModel=a})}),this.markKeep(f),f.group.silent=a.get("silent")||e.get("silent")},t.type="markPoint",t}(R_);function fJ(r,t,e){var a;r?a=Y(r&&r.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return $($({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new tr(a,e),i=Y(e.get("data"),xt(Du,t));r&&(i=Ft(i,xt(Lu,r)));var o=yR(!!r,a);return n.initData(i,null,o),n}const cJ=uJ;function vJ(r){r.registerComponentModel(aJ),r.registerComponentView(cJ),r.registerPreprocessor(function(t){k_(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var hJ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,n){return new t(e,a,n)},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}(ln);const dJ=hJ;var nc=Dt(),pJ=function(r,t,e,a){var n=r.getData(),i;if(U(a))i=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=t.getAxis(a.yAxis!=null?"y":"x"),l=Ve(a.yAxis,a.xAxis);else{var u=gR(a,n,t,r);s=u.valueAxis;var f=O2(n,u.valueDataDim);l=Lv(n,f,o)}var c=s.dim==="x"?0:1,v=1-c,h=st(a),d={coord:[]};h.type=null,h.coord=[],h.coord[v]=-1/0,d.coord[v]=1/0;var p=e.get("precision");p>=0&&Pt(l)&&(l=+l.toFixed(Math.min(p,20))),h.coord[c]=d.coord[c]=l,i=[h,d,{type:o,valueIndex:a.valueIndex,value:l}]}else i=[]}var g=[Du(r,i[0]),Du(r,i[1]),$({},i[2])];return g[2].type=g[2].type||null,wt(g[2],g[0]),wt(g[2],g[1]),g};function Iv(r){return!isNaN(r)&&!isFinite(r)}function FC(r,t,e,a){var n=1-r,i=a.dimensions[r];return Iv(t[n])&&Iv(e[n])&&t[r]===e[r]&&a.getAxis(i).containData(t[r])}function gJ(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,a=t[1].coord;if(e&&a&&(FC(1,e,a,r)||FC(0,e,a,r)))return!0}return Lu(r,t[0])&&Lu(r,t[1])}function Up(r,t,e,a,n){var i=a.coordinateSystem,o=r.getItemModel(t),s,l=J(o.get("x"),n.getWidth()),u=J(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,t));else{var f=i.dimensions,c=r.get(f[0],t),v=r.get(f[1],t);s=i.dataToPoint([c,v])}if(Yn(i,"cartesian2d")){var h=i.getAxis("x"),d=i.getAxis("y"),f=i.dimensions;Iv(r.get(f[0],t))?s[0]=h.toGlobalCoord(h.getExtent()[e?0:1]):Iv(r.get(f[1],t))&&(s[1]=d.toGlobalCoord(d.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(t,s)}var yJ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,n){a.eachSeries(function(i){var o=ln.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=nc(o).from,u=nc(o).to;l.each(function(f){Up(l,f,!0,i,n),Up(u,f,!1,i,n)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,a,n,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new J0);this.group.add(f.group);var c=mJ(o,e,a),v=c.from,h=c.to,d=c.line;nc(a).from=v,nc(a).to=h,a.setData(d);var p=a.get("symbol"),g=a.get("symbolSize"),y=a.get("symbolRotate"),m=a.get("symbolOffset");U(p)||(p=[p,p]),U(g)||(g=[g,g]),U(y)||(y=[y,y]),U(m)||(m=[m,m]),c.from.each(function(S){_(v,S,!0),_(h,S,!1)}),d.each(function(S){var b=d.getItemModel(S),x=b.getModel("lineStyle").getLineStyle();d.setItemLayout(S,[v.getItemLayout(S),h.getItemLayout(S)]);var w=b.get("z2");x.stroke==null&&(x.stroke=v.getItemVisual(S,"style").fill),d.setItemVisual(S,{z2:nt(w,0),fromSymbolKeepAspect:v.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:v.getItemVisual(S,"symbolOffset"),fromSymbolRotate:v.getItemVisual(S,"symbolRotate"),fromSymbolSize:v.getItemVisual(S,"symbolSize"),fromSymbol:v.getItemVisual(S,"symbol"),toSymbolKeepAspect:h.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(S,"symbolOffset"),toSymbolRotate:h.getItemVisual(S,"symbolRotate"),toSymbolSize:h.getItemVisual(S,"symbolSize"),toSymbol:h.getItemVisual(S,"symbol"),style:x})}),f.updateData(d),c.line.eachItemGraphicEl(function(S){pt(S).dataModel=a,S.traverse(function(b){pt(b).dataModel=a})});function _(S,b,x){var w=S.getItemModel(b);Up(S,b,x,e,i);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=Bu(l,"color")),S.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:nt(w.get("symbolOffset",!0),m[x?0:1]),symbolRotate:nt(w.get("symbolRotate",!0),y[x?0:1]),symbolSize:nt(w.get("symbolSize"),g[x?0:1]),symbol:nt(w.get("symbol",!0),p[x?0:1]),style:T})}this.markKeep(f),f.group.silent=a.get("silent")||e.get("silent")},t.type="markLine",t}(R_);function mJ(r,t,e){var a;r?a=Y(r&&r.dimensions,function(u){var f=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return $($({},f),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new tr(a,e),i=new tr(a,e),o=new tr([],e),s=Y(e.get("data"),xt(pJ,t,r,e));r&&(s=Ft(s,xt(gJ,r)));var l=yR(!!r,a);return n.initData(Y(s,function(u){return u[0]}),null,l),i.initData(Y(s,function(u){return u[1]}),null,l),o.initData(Y(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}const _J=yJ;function SJ(r){r.registerComponentModel(dJ),r.registerComponentView(_J),r.registerPreprocessor(function(t){k_(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var xJ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,n){return new t(e,a,n)},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}(ln);const bJ=xJ;var ic=Dt(),wJ=function(r,t,e,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=Du(r,n),s=Du(r,i),l=o.coord,u=s.coord;l[0]=Ve(l[0],-1/0),l[1]=Ve(l[1],-1/0),u[0]=Ve(u[0],1/0),u[1]=Ve(u[1],1/0);var f=mm([{},o,s]);return f.coord=[o.coord,s.coord],f.x0=o.x,f.y0=o.y,f.x1=s.x,f.y1=s.y,f}};function Pv(r){return!isNaN(r)&&!isFinite(r)}function HC(r,t,e,a){var n=1-r;return Pv(t[n])&&Pv(e[n])}function TJ(r,t){var e=t.coord[0],a=t.coord[1],n={coord:e,x:t.x0,y:t.y0},i={coord:a,x:t.x1,y:t.y1};return Yn(r,"cartesian2d")?e&&a&&(HC(1,e,a)||HC(0,e,a))?!0:oJ(r,n,i):Lu(r,n)||Lu(r,i)}function WC(r,t,e,a,n){var i=a.coordinateSystem,o=r.getItemModel(t),s,l=J(o.get(e[0]),n.getWidth()),u=J(o.get(e[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var f=r.getValues(["x0","y0"],t),c=r.getValues(["x1","y1"],t),v=i.clampData(f),h=i.clampData(c),d=[];e[0]==="x0"?d[0]=v[0]>h[0]?c[0]:f[0]:d[0]=v[0]>h[0]?f[0]:c[0],e[1]==="y0"?d[1]=v[1]>h[1]?c[1]:f[1]:d[1]=v[1]>h[1]?f[1]:c[1],s=a.getMarkerPosition(d,e,!0)}else{var p=r.get(e[0],t),g=r.get(e[1],t),y=[p,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(Yn(i,"cartesian2d")){var m=i.getAxis("x"),_=i.getAxis("y"),p=r.get(e[0],t),g=r.get(e[1],t);Pv(p)?s[0]=m.toGlobalCoord(m.getExtent()[e[0]==="x0"?0:1]):Pv(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[e[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var $C=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],CJ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,n){a.eachSeries(function(i){var o=ln.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=Y($C,function(c){return WC(s,l,c,i,n)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},t.prototype.renderSeries=function(e,a,n,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new lt});this.group.add(f.group),this.markKeep(f);var c=AJ(o,e,a);a.setData(c),c.each(function(v){var h=Y($C,function(M){return WC(c,v,M,e,i)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),y=p.getExtent(),m=[d.parse(c.get("x0",v)),d.parse(c.get("x1",v))],_=[p.parse(c.get("y0",v)),p.parse(c.get("y1",v))];Br(m),Br(_);var S=!(g[0]>m[1]||g[1]_[1]||y[1]<_[0]),b=!S;c.setItemLayout(v,{points:h,allClipped:b});var x=c.getItemModel(v),w=x.getModel("itemStyle").getItemStyle(),T=x.get("z2"),C=Bu(l,"color");w.fill||(w.fill=C,Q(w.fill)&&(w.fill=Oc(w.fill,.4))),w.stroke||(w.stroke=C),c.setItemVisual(v,"style",w),c.setItemVisual(v,"z2",nt(T,0))}),c.diff(ic(f).data).add(function(v){var h=c.getItemLayout(v),d=c.getItemVisual(v,"z2");if(!h.allClipped){var p=new ar({z2:nt(d,0),shape:{points:h.points}});c.setItemGraphicEl(v,p),f.group.add(p)}}).update(function(v,h){var d=ic(f).data.getItemGraphicEl(h),p=c.getItemLayout(v),g=c.getItemVisual(v,"z2");p.allClipped?d&&f.group.remove(d):(d?Et(d,{z2:nt(g,0),shape:{points:p.points}},a,v):d=new ar({shape:{points:p.points}}),c.setItemGraphicEl(v,d),f.group.add(d))}).remove(function(v){var h=ic(f).data.getItemGraphicEl(v);f.group.remove(h)}).execute(),c.eachItemGraphicEl(function(v,h){var d=c.getItemModel(h),p=c.getItemVisual(h,"style");v.useStyle(c.getItemVisual(h,"style")),Ie(v,Te(d),{labelFetcher:a,labelDataIndex:h,defaultText:c.getName(h)||"",inheritColor:Q(p.fill)?Oc(p.fill,1):G.color.neutral99}),we(v,d),Jt(v,null,null,d.get(["emphasis","disabled"])),pt(v).dataModel=a}),ic(f).data=c,f.group.silent=a.get("silent")||e.get("silent")},t.type="markArea",t}(R_);function AJ(r,t,e){var a,n,i=["x0","y0","x1","y1"];if(r){var o=Y(r&&r.dimensions,function(u){var f=t.getData(),c=f.getDimensionInfo(f.mapDimension(u))||{};return $($({},c),{name:u,ordinalMeta:null})});n=Y(i,function(u,f){return{name:u,type:o[f%2].type}}),a=new tr(n,e)}else n=[{name:"value",type:"float"}],a=new tr(n,e);var s=Y(e.get("data"),xt(wJ,t,r,e));r&&(s=Ft(s,xt(TJ,r)));var l=r?function(u,f,c,v){var h=u.coord[Math.floor(v/2)][v%2];return Gn(h,n[v])}:function(u,f,c,v){return Gn(u.value,n[v])};return a.initData(s,null,l),a.hasItemOption=!0,a}const MJ=CJ;function DJ(r){r.registerComponentModel(bJ),r.registerComponentView(MJ),r.registerPreprocessor(function(t){k_(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var LJ=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},IJ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),this._updateSelector(e)},t.prototype._updateSelector=function(e){var a=e.selector,n=this.ecModel;a===!0&&(a=e.selector=["all","inverse"]),U(a)&&A(a,function(i,o){Q(i)&&(i={type:i}),a[o]=wt(i,LJ(n,i.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var a=!1,n=0;n=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:G.size.m,align:"auto",backgroundColor:G.color.transparent,borderColor:G.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:G.color.disabled,inactiveBorderColor:G.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:G.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:G.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:G.color.tertiary,borderWidth:1,borderColor:G.color.border},emphasis:{selectorLabel:{show:!0,color:G.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(kt);const im=IJ;var qo=xt,om=A,oc=lt,PJ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new oc),this.group.add(this._selectorGroup=new oc),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,a,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,a,n,l,s,u);var f=Ce(e,n).refContainer,c=e.getBoxLayoutParams(),v=e.get("padding"),h=Qt(c,f,v),d=this.layoutInner(e,o,h,i,l,u),p=Qt(vt({width:d.width,height:d.height},c),f,v);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=iR(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,a,n,i,o,s,l){var u=this.getContentGroup(),f=rt(),c=a.get("selectedMode"),v=a.get("triggerEvent"),h=[];n.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),om(a.getData(),function(d,p){var g=this,y=d.get("name");if(!this.newlineDisabled&&(y===""||y===` `)){var m=new oc;m.newline=!0,u.add(m);return}var _=n.getSeriesByName(y)[0];if(!f.get(y))if(_){var S=_.getData(),b=S.getVisual("legendLineStyle")||{},x=S.getVisual("legendIcon"),w=S.getVisual("style"),T=this._createItem(_,y,p,d,a,e,b,w,x,c,i);T.on("click",qo(UC,y,null,i,h)).on("mouseover",qo(sm,_.name,null,i,h)).on("mouseout",qo(lm,_.name,null,i,h)),n.ssr&&T.eachChild(function(C){var M=pt(C);M.seriesIndex=_.seriesIndex,M.dataIndex=p,M.ssrType="legend"}),v&&T.eachChild(function(C){g.packEventData(C,a,_,p,y)}),f.set(y,!0)}else n.eachRawSeries(function(C){var M=this;if(!f.get(y)&&C.legendVisualProvider){var D=C.legendVisualProvider;if(!D.containName(y))return;var I=D.indexOfName(y),L=D.getItemVisual(I,"style"),k=D.getItemVisual(I,"legendIcon"),R=lr(L.fill);R&&R[3]===0&&(R[3]=.2,L=$($({},L),{fill:Ma(R,"rgba")}));var P=this._createItem(C,y,p,d,a,e,{},L,k,c,i);P.on("click",qo(UC,null,y,i,h)).on("mouseover",qo(sm,null,y,i,h)).on("mouseout",qo(lm,null,y,i,h)),n.ssr&&P.eachChild(function(O){var E=pt(O);E.seriesIndex=C.seriesIndex,E.dataIndex=p,E.ssrType="legend"}),v&&P.eachChild(function(O){M.packEventData(O,a,C,p,y)}),f.set(y,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},t.prototype.packEventData=function(e,a,n,i,o){var s={componentType:"legend",componentIndex:a.componentIndex,dataIndex:i,value:o,seriesIndex:n.seriesIndex};pt(e).eventData=s},t.prototype._createSelector=function(e,a,n,i,o){var s=this.getSelectorGroup();om(e,function(u){var f=u.type,c=new Rt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(c);var v=a.getModel("selectorLabel"),h=a.getModel(["emphasis","selectorLabel"]);Ie(c,{normal:v,emphasis:h},{defaultText:u.title}),Ki(c)})},t.prototype._createItem=function(e,a,n,i,o,s,l,u,f,c,v){var h=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(a),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=kJ(f,i,l,u,h,g,v),b=new oc,x=i.getModel("textStyle");if(ot(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;b.add(RJ({itemWidth:d,itemHeight:p,icon:f,iconRotate:w,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,C=s,M=o.get("formatter"),D=a;Q(M)&&M?D=M.replace("{name}",a??""):ot(M)&&(D=M(a));var I=g?x.getTextColor():i.get("inactiveColor");b.add(new Rt({style:Zt(x,{text:D,x:T,y:p/2,fill:I,align:C,verticalAlign:"middle"},{inheritColor:I})}));var L=new Mt({shape:b.getBoundingRect(),style:{fill:"transparent"}}),k=i.getModel("tooltip");return k.get("show")&&fn({el:L,componentModel:o,itemName:a,itemTooltipOption:k.option}),b.add(L),b.eachChild(function(R){R.silent=!0}),L.silent=!c,this.getContentGroup().add(b),Ki(b),b.__legendDataIndex=n,b},t.prototype.layoutInner=function(e,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ji(e.get("orient"),l,e.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),c=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Ji("horizontal",u,e.get("selectorItemGap",!0));var v=u.getBoundingRect(),h=[-v.x,-v.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,g=p===0?"width":"height",y=p===0?"height":"width",m=p===0?"y":"x";s==="end"?h[p]+=f[g]+d:c[p]+=v[g]+d,h[1-p]+=f[y]/2-v[y]/2,u.x=h[0],u.y=h[1],l.x=c[0],l.y=c[1];var _={x:0,y:0};return _[g]=f[g]+d+v[g],_[y]=Math.max(f[y],v[y]),_[m]=Math.min(0,v[m]+h[1-p]),_}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(re);function kJ(r,t,e,a,n,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),om(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?a.decal:xs(c,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:e).opacity),s(u,a);var v=t.getModel("lineStyle"),h=v.getLineStyle();if(s(h,e),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),h.stroke==="auto"&&(h.stroke=a.fill),!i){var d=t.get("inactiveBorderWidth"),p=u[f];u.lineWidth=d==="auto"?a.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=v.get("inactiveColor"),h.lineWidth=v.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function RJ(r){var t=r.icon||"roundRect",e=me(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill=G.color.neutral00,e.style.lineWidth=2),e}function UC(r,t,e,a){lm(r,t,e,a),e.dispatchAction({type:"legendToggleSelect",name:r??t}),sm(r,t,e,a)}function mR(r){for(var t=r.getZr().storage.getDisplayList(),e,a=0,n=t.length;an[o],g=[-h.x,-h.y];a||(g[i]=f[u]);var y=[0,0],m=[-d.x,-d.y],_=nt(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var S=e.get("pageButtonPosition",!0);S==="end"?m[i]+=n[o]-d[o]:y[i]+=d[o]+_}m[1-i]+=h[s]/2-d[s]/2,f.setPosition(g),c.setPosition(y),v.setPosition(m);var b={x:0,y:0};if(b[o]=p?n[o]:h[o],b[s]=Math.max(h[s],d[s]),b[l]=Math.min(0,d[l]+m[1-i]),c.__rectSize=n[o],p){var x={x:0,y:0};x[o]=Math.max(n[o]-d[o]-_,0),x[s]=b[s],c.setClipPath(new Mt({shape:x})),c.__rectSize=x[o]}else v.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(e);return w.pageIndex!=null&&Et(f,{x:w.contentPosition[0],y:w.contentPosition[1]},p?e:null),this._updatePageInfoView(e,w),b},t.prototype._pageGo=function(e,a,n){var i=this._getPageInfo(a)[e];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},t.prototype._updatePageInfoView=function(e,a){var n=this._controllerGroup;A(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",v=a[c]!=null,h=n.childOfName(f);h&&(h.setStyle("fill",v?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),h.cursor=v?"pointer":"default")});var i=n.childOfName("pageText"),o=e.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",Q(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var a=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,s=Yp[o],l=Zp[o],u=this._findTargetItemIndex(a),f=n.children(),c=f[u],v=f.length,h=v?1:0,d={contentPosition:[n.x,n.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return d;var p=S(c);d.contentPosition[o]=-p.s;for(var g=u+1,y=p,m=p,_=null;g<=v;++g)_=S(f[g]),(!_&&m.e>y.s+i||_&&!b(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=y.i),++d.pageCount)),m=_;for(var g=u-1,y=p,m=p,_=null;g>=-1;--g)_=S(f[g]),(!_||!b(m,_.s))&&y.i=w&&x.s<=w+i}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===e&&(a=s)}),a??i},t.type="legend.scroll",t}(_R);const VJ=zJ;function GJ(r){r.registerAction("legendScroll","legendscroll",function(t,e){var a=t.scrollDataIndex;a!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(a)})})}function FJ(r){Tt(SR),r.registerComponentModel(BJ),r.registerComponentView(VJ),GJ(r)}function HJ(r){Tt(SR),Tt(FJ)}var WJ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=ti(Mu.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Mu);const $J=WJ;var E_=Dt();function UJ(r,t,e){E_(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(t.uid);n&&(n.getRange=e)})}function YJ(r,t){for(var e=E_(r).coordSysRecordMap,a=e.keys(),n=0;ni[n+a]&&(a=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:e,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function jJ(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var a=E_(e),n=a.coordSysRecordMap||(a.coordSysRecordMap=rt());n.each(function(i){i.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=rR(i);A(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,ZJ(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=rt());f.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){xR(n,i);return}var f=KJ(l,i,e);o.enable(f.controlType,f.opt),Fs(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var JJ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,a,n){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),UJ(n,e,{pan:tt(Xp.pan,this),zoom:tt(Xp.zoom,this),scrollMove:tt(Xp.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){YJ(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(A_),Xp={zoom:function(r,t,e,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var s=qp[t](null,[a.originX,a.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Zn(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:qC(function(r,t,e,a,n,i){var o=qp[a]([i.oldX,i.oldY],[i.newX,i.newY],t,n,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:qC(function(r,t,e,a,n,i){var o=qp[a]([0,0],[i.scrollDelta,i.scrollDelta],t,n,e);return o.signal*(r[1]-r[0])*i.scrollDelta})};function qC(r){return function(t,e,a,n){var i=this.range,o=i.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,a,n);if(Zn(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var qp={grid:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,t,e,a,n){var i=e.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};const QJ=JJ;function bR(r){M_(r),r.registerComponentModel($J),r.registerComponentView(QJ),jJ(r)}var tQ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=ti(Mu.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:G.color.accent10,borderRadius:0,backgroundColor:G.color.transparent,dataBackground:{lineStyle:{color:G.color.accent30,width:.5},areaStyle:{color:G.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:G.color.accent40,width:.5},areaStyle:{color:G.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:G.color.neutral00,borderColor:G.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:G.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:G.color.tertiary},brushSelect:!0,brushStyle:{color:G.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:G.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(Mu);const eQ=tQ;var wl=Mt,rQ=1,Kp=30,aQ=7,Tl="horizontal",KC="vertical",nQ=5,iQ=["line","bar","candlestick","scatter"],oQ={easing:"cubicOut",duration:100,delay:0},sQ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,a){this.api=a,this._onBrush=tt(this._onBrush,this),this._onBrushEnd=tt(this._onBrushEnd,this)},t.prototype.render=function(e,a,n,i){if(r.prototype.render.apply(this,arguments),Fs(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){vu(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 a=this._displayables.sliderGroup=new lt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(a),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,a=this.api,n=e.get("brushSelect"),i=n?aQ:0,o=Ce(e,a).refContainer,s=this._findCoordRect(),l=e.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Tl?{right:o.width-s.x-s.width,top:o.height-Kp-l-i,width:s.width,height:Kp}:{right:l,top:s.y,width:Kp,height:s.height},f=yo(e.option);A(["right","top","width","height"],function(v){f[v]==="ph"&&(f[v]=u[v])});var c=Qt(f,o);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===KC&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===Tl&&!o?{scaleY:l?1:-1,scaleX:1}:n===Tl&&o?{scaleY:l?1:-1,scaleX:-1}:n===KC&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=a.x-u.x,e.y=a.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=e.get("brushSelect");n.add(new wl({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new wl({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:tt(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var a=this._size,n=this._shadowSize||[],i=e.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var c=o.getDataExtent(e.thisDim),v=o.getDataExtent(l),h=(v[1]-v[0])*.3;v=[v[0]-h,v[1]+h];var d=[0,a[1]],p=[0,a[0]],g=[[a[0],0],[0,0]],y=[],m=p[1]/Math.max(1,o.count()-1),_=a[0]/(c[1]-c[0]),S=e.thisAxis.type==="time",b=-m,x=Math.round(o.count()/a[0]),w;o.each([e.thisDim,l],function(I,L,k){if(x>0&&k%x){S||(b+=m);return}b=S?(+I-c[0])*_:b+m;var R=L==null||isNaN(L)||L==="",P=R?0:Gt(L,v,d,!0);R&&!w&&k?(g.push([g[g.length-1][0],0]),y.push([y[y.length-1][0],0])):!R&&w&&(g.push([b,0]),y.push([b,0])),R||(g.push([b,P]),y.push([b,P])),w=R}),u=this._shadowPolygonPts=g,f=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var T=this.dataZoomModel;function C(I){var L=T.getModel(I?"selectedDataBackground":"dataBackground"),k=new lt,R=new ar({shape:{points:u},segmentIgnoreThreshold:1,style:L.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),P=new Xe({shape:{points:f},segmentIgnoreThreshold:1,style:L.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return k.add(R),k.add(P),k}for(var M=0;M<3;M++){var D=C(M===1);this._displayables.sliderGroup.add(D),this._displayables.dataShadowSegs.push(D)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,a=e.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();A(l,function(u){if(!n&&!(a!==!0&&bt(iQ,u.get("type"))<0)){var f=i.getComponent(En(o),s).axis,c=lQ(o),v,h=u.coordinateSystem;c!=null&&h.getOtherAxis&&(v=h.getOtherAxis(f).inverse),c=u.getData().mapDimension(c);var d=u.getData().mapDimension(o);n={thisAxis:f,series:u,thisDim:d,otherDim:c,otherAxisInverse:v}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,c=l.get("brushSelect"),v=a.filler=new wl({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new wl({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:rQ,fill:G.color.transparent}})),A([0,1],function(_){var S=l.get("handleIcon");!Jc[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var b=me(S,-1,0,2,2,null,!0);b.attr({cursor:uQ(this._orient),draggable:!0,drift:tt(this._onDragMove,this,_),ondragend:tt(this._onDragEnd,this),onmouseover:tt(this._showDataInfo,this,!0),onmouseout:tt(this._showDataInfo,this,!1),z2:5});var x=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=J(w,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Ki(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(n[_]=b);var C=l.getModel("textStyle"),M=l.get("handleLabel")||{},D=M.show||!1;e.add(i[_]=new Rt({silent:!0,invisible:!D,style:Zt(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var h=v;if(c){var d=J(l.get("moveHandleSize"),s[1]),p=a.moveHandle=new Mt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,y=a.moveHandleIcon=me(l.get("moveHandleIcon"),-g/2,-g/2,g,g,G.color.neutral00,!0);y.silent=!0,y.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));h=a.moveZone=new Mt({invisible:!0,shape:{y:s[1]-m,height:d+m}}),h.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(y),o.add(h)}h.attr({draggable:!0,cursor:"default",drift:tt(this._onDragMove,this,"all"),ondragstart:tt(this._showDataInfo,this,!0),ondragend:tt(this._onDragEnd,this),onmouseover:tt(this._showDataInfo,this,!0),onmouseout:tt(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[Gt(e[0],[0,100],a,!0),Gt(e[1],[0,100],a,!0)]},t.prototype._updateInterval=function(e,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Zn(a,i,o,n.get("zoomLock")?"all":e,s.minSpan!=null?Gt(s.minSpan,l,o,!0):null,s.maxSpan!=null?Gt(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=Br([Gt(i[0],o,l,!0),Gt(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var a=this._displayables,n=this._handleEnds,i=Br(n.slice()),o=this._size;A([0,1],function(h){var d=a.handles[h],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:n[h]+(h?-1:1),y:o[1]/2-p/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],f=0;fa[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var a=e.offsetX,n=e.offsetY;this._brushStart=new ct(a,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[n.x,n.x+n.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();Zn(0,l,o,0,u.minSpan!=null?Gt(u.minSpan,s,o,!0):null,u.maxSpan!=null?Gt(u.maxSpan,s,o,!0):null),this._range=Br([Gt(l[0],o,s,!0),Gt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(tn(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new wl({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,a),f=l.transformCoordToLocal(s.x,s.y),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:c[1]})},t.prototype._dispatchZoomAction=function(e){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?oQ:null,start:a[0],end:a[1]})},t.prototype._findCoordRect=function(){var e,a=rR(this.dataZoomModel).infoList;if(!e&&a.length){var n=a[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var i=this.api.getWidth(),o=this.api.getHeight();e={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return e},t.type="dataZoom.slider",t}(A_);function lQ(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function uQ(r){return r==="vertical"?"ns-resize":"ew-resize"}const fQ=sQ;function wR(r){r.registerComponentModel(eQ),r.registerComponentView(fQ),M_(r)}function cQ(r){Tt(bR),Tt(wR)}var vQ={get:function(r,t,e){var a=st((hQ[r]||{})[t]);return e&&U(a)?a[a.length-1]:a}},hQ={color:{active:["#006edd","#e0ffff"],inactive:[G.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]}};const TR=vQ;var jC=Ge.mapVisual,dQ=Ge.eachVisual,pQ=U,JC=A,gQ=Br,yQ=Gt,mQ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,a){var n=this.option;!a&&vR(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var a=this.stateList;e=tt(e,this),this.controllerVisuals=rm(this.option.controller,a,e),this.targetVisuals=rm(this.option.target,a,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesId,a=this.option.seriesIndex;a==null&&e==null&&(a="all");var n=Rs(this.ecModel,"series",{index:a,id:e},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return Y(n,function(i){return i.componentIndex})},t.prototype.eachTargetSeries=function(e,a){A(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&e.call(a,i)},this)},t.prototype.isTargetSeries=function(e){var a=!1;return this.eachTargetSeries(function(n){n===e&&(a=!0)}),a},t.prototype.formatValueText=function(e,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],U(e)&&(e=e.slice(),u=!0);var f=a?e:u?[c(e[0]),c(e[1])]:c(e);if(Q(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(ot(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?n[0]+" "+f[1]:e[1]===s[1]?n[1]+" "+f[0]:f[0]+" - "+f[1];return f;function c(v){return v===s[0]?"min":v===s[1]?"max":(+v).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,a=gQ([e.min,e.max]);this._dataExtent=a},t.prototype.getDataDimensionIndex=function(e){var a=this.option.dimension;if(a!=null)return e.getDimensionIndex(a);for(var n=e.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});wt(i,n),wt(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),f.call(this,o);function l(c){pQ(a.color)&&!c.inRange&&(c.inRange={color:a.color.slice().reverse()}),c.inRange=c.inRange||{color:e.get("gradientColor")}}function u(c,v,h){var d=c[v],p=c[h];d&&!p&&(p=c[h]={},JC(d,function(g,y){if(Ge.isValidType(y)){var m=TR.get(y,"inactive",s);m!=null&&(p[y]=m,y==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function f(c){var v=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,h=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";JC(this.stateList,function(y){var m=this.itemSize,_=c[y];_||(_=c[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=v&&st(v)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=h&&st(h)||(s?m[0]:[m[0],m[0]])),_.symbol=jC(_.symbol,function(x){return x==="none"?g:x});var S=_.symbolSize;if(S!=null){var b=-1/0;dQ(S,function(x){x>b&&(b=x)}),_.symbolSize=jC(S,function(x){return yQ(x,[0,b],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:G.color.transparent,borderColor:G.color.borderTint,contentColor:G.color.theme[0],inactiveColor:G.color.disabled,borderWidth:0,padding:G.size.m,textGap:10,precision:0,textStyle:{color:G.color.secondary}},t}(kt);const kv=mQ;var QC=[20,140],_Q=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=QC[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=QC[1])},t.prototype._resetRange=function(){var e=this.getExtent(),a=this.option.range;!a||a.auto?(e.auto=1,this.option.range=e):U(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],e[0]),a[1]=Math.min(a[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),A(this.stateList,function(e){var a=this.option.controller[e].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),a=Br((this.get("range")||[]).slice());return a[0]>e[1]&&(a[0]=e[1]),a[1]>e[1]&&(a[1]=e[1]),a[0]=n[1]||e<=a[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},t.prototype.getVisualMeta=function(e){var a=tA(this,"outOfRange",this.getExtent()),n=tA(this,"inRange",this.option.range.slice()),i=[];function o(h,d){i.push({value:h,color:e(h,d)})}for(var s=0,l=0,u=n.length,f=a.length;le[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(e[1],"color",a),offset:1}),i},t.prototype._createBarPoints=function(e,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-a[1],e[1]]]},t.prototype._createBarGroup=function(e){var a=this._orient,n=this.visualMapModel.get("inverse");return new lt(a==="horizontal"&&!n?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent(),f=this._applyTransform("left",n.mainGroup);bQ([0,1],function(c){var v=o[c];v.setStyle("fill",a.handlesColor[c]),v.y=e[c];var h=da(e[c],[0,l[1]],u,!0),d=this.getControllerVisual(h,"symbolSize");v.scaleX=v.scaleY=d/l[0],v.x=l[0]-d/2;var p=Kr(n.handleLabelPoints[c],ji(v,this.group));if(this._orient==="horizontal"){var g=f==="left"||f==="top"?(l[0]-d)/2:(l[0]-d)/-2;p[1]+=g}s[c].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,c=f.indicator;if(c){c.attr("invisible",!1);var v={convertOpacityToAlpha:!0},h=this.getControllerVisual(e,"color",v),d=this.getControllerVisual(e,"symbolSize"),p=da(e,s,u,!0),g=l[0]-d/2,y={x:c.x,y:c.y};c.y=p,c.x=g;var m=Kr(f.indicatorLabelPoint,ji(c,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),b=this._orient,x=b==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:x?S:"middle",align:x?"center":S});var w={x:g,y:p,style:{fill:h}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};c.x=y.x,c.y=y.y,c.animateTo(w,C),_.animateTo(T,C)}else c.attr(w),_.attr(T);this._firstShowIndicator=!1;var M=this._shapes.handleLabels;if(M)for(var D=0;Do[1]&&(c[1]=1/0),a&&(c[0]===-1/0?this._showIndicator(f,c[1],"< ",l):c[1]===1/0?this._showIndicator(f,c[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var v=this._hoverLinkDataIndices,h=[];(a||nA(n))&&(h=this._hoverLinkDataIndices=n.findTargetDataIndices(c));var d=ZN(v,h);this._dispatchHighDown("downplay",Dc(d[0],n)),this._dispatchHighDown("highlight",Dc(d[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var a;if(Hi(e.target,function(l){var u=pt(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(a.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function PQ(r,t,e,a){for(var n=t.targetVisuals[a],i=Ge.prepareVisualTypes(n),o={color:Bu(r.getData(),"color")},s=0,l=i.length;s0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(DQ,LQ),A(IQ,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(kQ))}function DR(r){r.registerComponentModel(SQ),r.registerComponentView(MQ),MR(r)}var RQ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],EQ[this._mode].call(this,this._pieceList),this._resetSelected(e,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=st(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=Y(this._pieceList,function(l){return l=st(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,a={},n=Ge.listVisualTypes(),i=this.isCategory();A(e.pieces,function(s){A(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),A(a,function(s,l){var u=!1;A(this.stateList,function(f){u=u||o(e,f,l)||o(e.target,f,l)},this),!u&&A(this.stateList,function(f){(e[f]||(e[f]={}))[l]=TR.get(l,f==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,a){var n=this.option,i=this._pieceList,o=(a?n:e).selected||{};if(n.selected=o,A(i,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),n.selectedMode==="single"){var s=!1;A(i,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=st(e)},t.prototype.getValueState=function(e){var a=Ge.findPieceIndex(e,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=Ge.findPieceIndex(l,n);f===e&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},t.prototype.getRepresentValue=function(e){var a;if(this.isCategory())a=e.value;else if(e.value!=null)a=e.value;else{var n=e.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(f,c){var v=i.getRepresentValue({interval:f});c||(c=i.getValueState(v));var h=e(v,c);f[0]===-1/0?n[0]=h:f[1]===1/0?n[1]=h:a.push({value:f[0],color:h},{value:f[1],color:h})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return A(s,function(f){var c=f.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:a,outerColors:n}},t.type="visualMap.piecewise",t.defaultOption=ti(kv.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}(kv),EQ={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),a=this.getExtent(),n=t.splitNumber;n=Math.max(parseInt(n,10),1),t.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(e)!==i&&e<5;)e++;t.precision=e,i=+i.toFixed(e),t.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o","≥"][a[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,n)},this)}};function lA(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}const OQ=RQ;var NQ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=this._getItemAlign(),s=a.itemSize,l=this._getViewData(),u=l.endsText,f=Ve(a.get("showLabel",!0),!u),c=!a.get("selectedMode");u&&this._renderEndsText(e,u[0],s,f,o),A(l.viewPieceList,function(v){var h=v.piece,d=new lt;d.onclick=tt(this._onItemClick,this,h),this._enableHoverLink(d,v.indexInModelPieceList);var p=a.getRepresentValue(h);if(this._createItemSymbol(d,p,[0,0,s[0],s[1]],c),f){var g=this.visualMapModel.getValueState(p),y=i.get("align")||o;d.add(new Rt({style:Zt(i,{x:y==="right"?-n:s[0]+n,y:s[1]/2,text:h.text,verticalAlign:i.get("verticalAlign")||"middle",align:y,opacity:nt(i.get("opacity"),g==="outOfRange"?.5:1)}),silent:c}))}e.add(d)},this),u&&this._renderEndsText(e,u[1],s,f,o),Ji(a.get("orient"),e,a.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,a){var n=this;e.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:Dc(s.findTargetDataIndices(a),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,a=e.option;if(a.orient==="vertical")return AR(e,this.api,e.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},t.prototype._renderEndsText=function(e,a,n,i,o){if(a){var s=new lt,l=this.visualMapModel.textStyleModel;s.add(new Rt({style:Zt(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,a=Y(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=e.get("text"),i=e.get("orient"),o=e.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},t.prototype._createItemSymbol=function(e,a,n,i){var o=me(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,e.add(o)},t.prototype._onItemClick=function(e){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=st(n.selected),s=a.getSelectedMapKey(e);i==="single"||i===!0?(o[s]=!0,A(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(CR);const BQ=NQ;function LR(r){r.registerComponentModel(OQ),r.registerComponentView(BQ),MR(r)}function zQ(r){Tt(DR),Tt(LR)}var VQ=function(){function r(t){this._thumbnailModel=t}return r.prototype.reset=function(t){this._renderVersion=t.getMainProcessVersion()},r.prototype.renderContent=function(t){var e=t.api.getViewOfComponentModel(this._thumbnailModel);e&&(t.group.silent=!0,e.renderContent({group:t.group,targetTrans:t.targetTrans,z2Range:WD(t.group),roamType:t.roamType,viewportRect:t.viewportRect,renderVersion:this._renderVersion}))},r.prototype.updateWindow=function(t,e){var a=e.getViewOfComponentModel(this._thumbnailModel);a&&a.updateWindow({targetTrans:t,renderVersion:this._renderVersion})},r}(),GQ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventAutoZ=!0,e}return t.prototype.optionUpdated=function(e,a){this._updateBridge()},t.prototype._updateBridge=function(){var e=this._birdge=this._birdge||new VQ(this);if(this._target=null,this.ecModel.eachSeries(function(n){kw(n,null)}),this.shouldShow()){var a=this.getTarget();kw(a.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:G.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:G.color.neutral30,borderColor:G.color.neutral40,opacity:.3},z:10},t}(kt),FQ=function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){if(this._api=n,this._model=e,this._coordSys||(this._coordSys=new To),!this._isEnabled()){this._clear();return}this._renderVersion=n.getMainProcessVersion();var i=this.group;i.removeAll();var o=e.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=a.get("backgroundColor")||G.color.neutral00);var l=Ce(e,n).refContainer,u=Qt(vL(e,!0),l),f=s.lineWidth||0,c=this._contentRect=oo(u.clone(),f/2,!0,!0),v=new lt;i.add(v),v.setClipPath(new Mt({shape:c.plain()}));var h=this._targetGroup=new lt;v.add(h);var d=u.plain();d.r=o.getShallow("borderRadius",!0),i.add(this._bgRect=new Mt({style:s,shape:d,silent:!1,cursor:"grab"}));var p=e.getModel("windowStyle"),g=p.getShallow("borderRadius",!0);v.add(this._windowRect=new Mt({shape:{x:0,y:0,width:0,height:0,r:g},style:p.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),fA(e,this)},t.prototype.renderContent=function(e){this._bridgeRendered=e,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),fA(this._model,this))},t.prototype._dealRenderContent=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var a=this._targetGroup,n=this._coordSys,i=this._contentRect;if(a.removeAll(),!!e){var o=e.group,s=o.getBoundingRect();a.add(o),this._bgRect.z2=e.z2Range.min-10,n.setBoundingRect(s.x,s.y,s.width,s.height);var l=Qt({left:"center",top:"center",aspect:s.width/s.height},i);n.setViewRect(l.x,l.y,l.width,l.height),o.attr(n.getTransformInfo().raw),this._windowRect.z2=e.z2Range.max+10,this._resetRoamController(e.roamType)}}},t.prototype.updateWindow=function(e){var a=this._bridgeRendered;a&&a.renderVersion===e.renderVersion&&(a.targetTrans=e.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var a=Qr([],e.targetTrans),n=Aa([],this._coordSys.transform,a);this._transThisToTarget=Qr([],n);var i=e.viewportRect;i?i=i.clone():i=new dt(0,0,this._api.getWidth(),this._api.getHeight()),i.applyTransform(n);var o=this._windowRect,s=o.shape.r;o.setShape(vt({r:s},i))}},t.prototype._resetRoamController=function(e){var a=this,n=this._api,i=this._roamController;if(i||(i=this._roamController=new wo(n.getZr())),!e||!this._isEnabled()){i.disable();return}i.enable(e,{api:n,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return a._contentRect.contain(s,l)}}}),i.off("pan").off("zoom").on("pan",tt(this._onPan,this)).on("zoom",tt(this._onZoom,this))},t.prototype._onPan=function(e){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var n=ce([],[e.oldX,e.oldY],a),i=ce([],[e.oldX-e.dx,e.oldY-e.dy],a);this._api.dispatchAction(uA(this._model.getTarget().baseMapProvider,{dx:i[0]-n[0],dy:i[1]-n[1]}))}},t.prototype._onZoom=function(e){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var n=ce([],[e.originX,e.originY],a);this._api.dispatchAction(uA(this._model.getTarget().baseMapProvider,{zoom:1/e.scale,originX:n[0],originY:n[1]}))}},t.prototype._isEnabled=function(){var e=this._model;if(!e||!e.shouldShow())return!1;var a=e.getTarget().baseMapProvider;return!!a},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}(re);function uA(r,t){var e=r.mainType==="series"?r.subType+"Roam":r.mainType+"Roam",a={type:e};return a[r.mainType+"Id"]=r.id,$(a,t),a}function fA(r,t){var e=so(r);nh(t.group,e.z,e.zlevel)}function HQ(r){r.registerComponentModel(GQ),r.registerComponentView(FQ)}var WQ={label:{enabled:!0},decal:{show:!1}},cA=Dt(),$Q={};function UQ(r,t){var e=r.getModel("aria");if(!e.get("enabled"))return;var a=st(WQ);wt(a.label,r.getLocaleModel().get("aria"),!1),wt(e.option,a,!1),n(),i();function n(){var u=e.getModel("decal"),f=u.get("show");if(f){var c=rt();r.eachSeries(function(v){if(!v.isColorBySeries()){var h=c.get(v.type);h||(h={},c.set(v.type,h)),cA(v).scope=h}}),r.eachRawSeries(function(v){if(r.isSeriesFiltered(v))return;if(ot(v.enableAriaDecal)){v.enableAriaDecal();return}var h=v.getData();if(v.isColorBySeries()){var m=jg(v.ecModel,v.name,$Q,r.getSeriesCount()),_=h.getVisual("decal");h.setVisual("decal",S(_,m))}else{var d=v.getRawData(),p={},g=cA(v).scope;h.each(function(b){var x=h.getRawIndex(b);p[x]=b});var y=d.count();d.each(function(b){var x=p[b],w=d.getName(b)||b+"",T=jg(v.ecModel,w,g,y),C=h.getItemVisual(x,"decal");h.setItemVisual(x,"decal",S(C,T))})}function S(b,x){var w=b?$($({},x),b):x;return w.dirty=!0,w}})}}function i(){var u=t.getZr().dom;if(u){var f=r.getLocaleModel().get("aria"),c=e.getModel("label");if(c.option=vt(c.option,f),!!c.get("enabled")){if(u.setAttribute("role","img"),c.get("description")){u.setAttribute("aria-label",c.get("description"));return}var v=r.getSeriesCount(),h=c.get(["data","maxCount"])||10,d=c.get(["series","maxCount"])||10,p=Math.min(v,d),g;if(!(v<1)){var y=s();if(y){var m=c.get(["general","withTitle"]);g=o(m,{title:y})}else g=c.get(["general","withoutTitle"]);var _=[],S=v>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(S,{seriesCount:v}),r.eachSeries(function(T,C){if(C1?c.get(["series","multiple",I]):c.get(["series","single",I]),M=o(M,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>h){var k=c.get(["data","partialData"]);M+=o(k,{displayCnt:h})}else M+=c.get(["data","allData"]);for(var R=c.get(["data","separator","middle"]),P=c.get(["data","separator","end"]),O=c.get(["data","excludeDimensionId"]),E=[],B=0;B":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},XQ=function(){function r(t){var e=this._condVal=Q(t)?new RegExp(t):qE(t)?t:null;if(e==null){var a="";Vt(a)}}return r.prototype.evaluate=function(t){var e=typeof t;return Q(e)?this._condVal.test(t):Pt(e)?this._condVal.test(t+""):!1},r}(),qQ=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),KQ=function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&a.push(n),n=[L,k]}function f(L,k,R,P){us(L,R)&&us(k,P)||n.push(L,k,R,P,R,P)}function c(L,k,R,P,O,E){var B=Math.abs(k-L),V=Math.tan(B/4)*4/3,H=kT:D2&&a.push(n),a}function fm(r,t,e,a,n,i,o,s,l,u){if(us(r,e)&&us(t,a)&&us(n,o)&&us(i,s)){l.push(o,s);return}var f=2/u,c=f*f,v=o-r,h=s-t,d=Math.sqrt(v*v+h*h);v/=d,h/=d;var p=e-r,g=a-t,y=n-o,m=i-s,_=p*p+g*g,S=y*y+m*m;if(_=0&&T=0){l.push(o,s);return}var C=[],M=[];Hn(r,e,n,o,.5,C),Hn(t,a,i,s,.5,M),fm(C[0],M[0],C[1],M[1],C[2],M[2],C[3],M[3],l,u),fm(C[4],M[4],C[5],M[5],C[6],M[6],C[7],M[7],l,u)}function ftt(r,t){var e=um(r),a=[];t=t||1;for(var n=0;n0)for(var u=0;uMath.abs(u),c=PR([l,u],f?0:1,t),v=(f?s:u)/c.length,h=0;hn,o=PR([a,n],i?0:1,t),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",f=i?"y":"x",c=r[s]/o.length,v=0;v1?null:new ct(p*l+r,p*u+t)}function htt(r,t,e){var a=new ct;ct.sub(a,e,t),a.normalize();var n=new ct;ct.sub(n,r,t);var i=n.dot(a);return i}function jo(r,t){var e=r[r.length-1];e&&e[0]===t[0]&&e[1]===t[1]||r.push(t)}function dtt(r,t,e){for(var a=r.length,n=[],i=0;io?(u.x=f.x=s+i/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+i),dtt(t,u,f)}function Rv(r,t,e,a){if(e===1)a.push(t);else{var n=Math.floor(e/2),i=r(t);Rv(r,i[0],n,a),Rv(r,i[1],e-n,a)}return a}function ptt(r,t){for(var e=[],a=0;a0)for(var b=a/e,x=-a/2;x<=a/2;x+=b){for(var w=Math.sin(x),T=Math.cos(x),C=0,_=0;_0;u/=2){var f=0,c=0;(r&u)>0&&(f=1),(t&u)>0&&(c=1),s+=u*u*(3*f^c),c===0&&(f===1&&(r=u-1-r,t=u-1-t),l=r,r=t,t=l)}return s}function Nv(r){var t=1/0,e=1/0,a=-1/0,n=-1/0,i=Y(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),c=l.y+l.height/2+(u?u[5]:0);return t=Math.min(f,t),e=Math.min(c,e),a=Math.max(f,a),n=Math.max(c,n),[f,c]}),o=Y(i,function(s,l){return{cp:s,z:Ttt(s[0],s[1],t,e,a,n),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function ER(r){return mtt(r.path,r.count)}function cm(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Ctt(r,t,e){var a=[];function n(b){for(var x=0;x=0;n--)if(!e[n].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var i=l.length,u=Math.ceil(i/2);e[n].many=l.slice(u,i),e[s].many=l.slice(0,u),s++}return e}var Mtt={clone:function(r){for(var t=[],e=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;SA(r)&&(u=r,f=t),SA(t)&&(u=t,f=r);function c(y,m,_,S,b){var x=y.many,w=y.one;if(x.length===1&&!b){var T=m?x[0]:w,C=m?w:x[0];if(Ev(T))c({many:[T],one:C},!0,_,S,!0);else{var M=s?vt({delay:s(_,S)},l):l;N_(T,C,M),i(T,C,T,C,M)}}else for(var D=vt({dividePath:Mtt[e],individualDelay:s&&function(O,E,B,V){return s(O+_,S)}},l),I=m?Ctt(x,w,D):Att(w,x,D),L=I.fromIndividuals,k=I.toIndividuals,R=L.length,P=0;Pt.length,h=u?xA(f,u):xA(v?t:r,[v?r:t]),d=0,p=0;pOR))for(var i=a.getIndices(),o=0;o0&&x.group.traverse(function(T){T instanceof Lt&&!T.animators.length&&T.animateFrom({style:{opacity:0}},w)})})}function AA(r){var t=r.getModel("universalTransition").get("seriesKey");return t||r.id}function MA(r){return U(r)?r.sort().join(","):r}function Cn(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Ett(r,t){var e=rt(),a=rt(),n=rt();return A(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=AA(i),f=MA(u);a.set(f,{dataGroupId:s,data:l}),U(u)&&A(u,function(c){n.set(c,{key:f,dataGroupId:s,data:l})})}),A(t.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=AA(i),u=MA(l),f=a.get(u);if(f)e.set(u,{oldSeries:[{dataGroupId:f.dataGroupId,divide:Cn(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:Cn(s),data:s}]});else if(U(l)){var c=[];A(l,function(d){var p=a.get(d);p.data&&c.push({dataGroupId:p.dataGroupId,divide:Cn(p.data),data:p.data})}),c.length&&e.set(u,{oldSeries:c,newSeries:[{dataGroupId:o,data:s,divide:Cn(s)}]})}else{var v=n.get(l);if(v){var h=e.get(v.key);h||(h={oldSeries:[{dataGroupId:v.dataGroupId,data:v.data,divide:Cn(v.data)}],newSeries:[]},e.set(v.key,h)),h.newSeries.push({dataGroupId:o,data:s,divide:Cn(s)})}}}}),e}function DA(r,t){for(var e=0;e=0&&n.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:Cn(t.oldData[s]),groupIdDim:o.dimension})}),A(Ut(r.to),function(o){var s=DA(e.updatedSeries,o);if(s>=0){var l=e.updatedSeries[s].getData();i.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:Cn(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&NR(n,i,a)}function Ntt(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){A(Ut(a.seriesTransition),function(n){A(Ut(n.to),function(i){for(var o=a.updatedSeries,s=0;so.vmin?e+=o.vmin-a+(t-o.vmin)/(o.vmax-o.vmin)*o.gapReal:e+=t-a,a=o.vmax,n=!1;break}e+=o.vmin-a+o.gapReal,a=o.vmax}return n&&(e+=t-a),e},r.prototype.unelapse=function(t){for(var e=LA,a=IA,n=!0,i=0,o=0;ol?i=s.vmin+(t-l)/(u-l)*(s.vmax-s.vmin):i=a+t-e,a=s.vmax,n=!1;break}e=u,a=s.vmax}return n&&(i=a+t-e),i},r}();function ztt(){return new Btt}var LA=0,IA=0;function Vtt(r,t){var e=0,a={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},n=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},i={S:{tpAbs:n(),tpPrct:n()},E:{tpAbs:n(),tpPrct:n()}};A(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(e+=l.val);var u=B_(s,t);if(u){var f=u.vmin!==s.vmin,c=u.vmax!==s.vmax,v=u.vmax-u.vmin;if(!(f&&c))if(f||c){var h=f?"S":"E";i[h][l.type].has=!0,i[h][l.type].span=v,i[h][l.type].inExtFrac=v/(s.vmax-s.vmin),i[h][l.type].val=l.val}else a[l.type].span+=v,a[l.type].val+=l.val}});var o=e*(0+(t[1]-t[0])+(a.tpAbs.val-a.tpAbs.span)+(i.S.tpAbs.has?(i.S.tpAbs.val-i.S.tpAbs.span)*i.S.tpAbs.inExtFrac:0)+(i.E.tpAbs.has?(i.E.tpAbs.val-i.E.tpAbs.span)*i.E.tpAbs.inExtFrac:0)-a.tpPrct.span-(i.S.tpPrct.has?i.S.tpPrct.span*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.span*i.E.tpPrct.inExtFrac:0))/(1-a.tpPrct.val-(i.S.tpPrct.has?i.S.tpPrct.val*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.val*i.E.tpPrct.inExtFrac:0));A(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=e!==0?Math.max(o,0)*l.val/e:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function Gtt(r,t,e,a,n,i){r!=="no"&&A(e,function(o){var s=B_(o,i);if(s)for(var l=t.length-1;l>=0;l--){var u=t[l],f=a(u),c=n*3/4;f>s.vmin-c&&ft[0]&&e=0&&o<1-1e-5}A(r,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:st(o),vmin:t(o.start),vmax:t(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(Q(o.gap)){var u=Nr(o.gap);if(u.match(/%$/)){var f=parseFloat(u)/100;n(f)||(f=0),s.gapParsed.type="tpPrct",s.gapParsed.val=f,l=!0}}if(!l){var c=t(o.gap);(!isFinite(c)||c<0)&&(c=0),s.gapParsed.type="tpAbs",s.gapParsed.val=c}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),e&&e.noNegative&&A(["vmin","vmax"],function(h){s[h]<0&&(s[h]=0)}),s.vmin>s.vmax){var v=s.vmax;s.vmax=s.vmin,s.vmin=v}a.push(s)}}),a.sort(function(o,s){return o.vmin-s.vmin});var i=-1/0;return A(a,function(o,s){i>o.vmin&&(a[s]=null),i=o.vmax}),{breaks:a.filter(function(o){return!!o})}}function z_(r,t){return hm(t)===hm(r)}function hm(r){return r.start+"_\0_"+r.end}function Htt(r,t,e){var a=[];A(r,function(i,o){var s=t(i);s&&s.type==="vmin"&&a.push([o])}),A(r,function(i,o){var s=t(i);if(s&&s.type==="vmax"){var l=co(a,function(u){return z_(t(r[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var n=[];return A(a,function(i){i.length===2&&n.push(e?i:[r[i[0]],r[i[1]]])}),n}function Wtt(r,t,e,a){var n,i;if(r.break){var o=r.break.parsedBreak,s=co(e,function(c){return z_(c.breakOption,r.break.parsedBreak.breakOption)}),l=a(Math.pow(t,o.vmin),s.vmin),u=a(Math.pow(t,o.vmax),s.vmax),f={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?de(Math.pow(t,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};n={type:r.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:f,gapReal:o.gapReal}},i=s[r.break.type]}return{brkRoundingCriterion:i,vBreak:n}}function $tt(r,t,e){var a={noNegative:!0},n=vm(r,e,a),i=vm(r,e,a),o=Math.log(t);return i.breaks=Y(i.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,f={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:f,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:n,parsedLogged:i}}var Utt={vmin:"start",vmax:"end"};function Ytt(r,t){return t&&(r=r||{},r.break={type:Utt[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),r}function Ztt(){dV({createScaleBreakContext:ztt,pruneTicksByBreak:Gtt,addBreaksToTicks:Ftt,parseAxisBreakOption:vm,identifyAxisBreak:z_,serializeAxisBreakIdentifier:hm,retrieveAxisBreakPairs:Htt,getTicksLogTransformBreak:Wtt,logarithmicParseBreaksFromOption:$tt,makeAxisLabelFormatterParamBreak:Ytt})}var PA=Dt();function Xtt(r,t){var e=co(r,function(a){return pe().identifyAxisBreak(a.parsedBreak.breakOption,t.breakOption)});return e||r.push(e={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),e}function qtt(r){A(r,function(t){return t.shouldRemove=!0})}function Ktt(r){for(var t=r.length-1;t>=0;t--)r[t].shouldRemove&&r.splice(t,1)}function jtt(r,t,e,a,n){var i=e.axis;if(i.scale.isBlank()||!pe())return;var o=pe().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(C){return C.break},!1);if(!o.length)return;var s=e.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),f=s.get("zigzagMaxSpan");u=Math.max(2,u||0),f=Math.max(u,f||0);var c=s.get("expandOnClick"),v=s.get("zigzagZ"),h=s.getModel("itemStyle"),d=h.getItemStyle(),p=d.stroke,g=d.lineWidth,y=d.lineDash,m=d.fill,_=new lt({ignoreModelZ:!0}),S=i.isHorizontal(),b=PA(t).visualList||(PA(t).visualList=[]);qtt(b);for(var x=function(C){var M=o[C][0].break.parsedBreak,D=[];D[0]=i.toGlobalCoord(i.dataToCoord(M.vmin,!0)),D[1]=i.toGlobalCoord(i.dataToCoord(M.vmax,!0)),D[1]=E;it&&(X=E);var St=[],at=[];St[P]=D,at[P]=I,!q&&!it&&(St[P]+=W?-l:l,at[P]-=W?l:-l),St[O]=X,at[O]=X,V.push(St),H.push(at);var N=void 0;if(jm[1]&&m.reverse(),{coordPair:m,brkId:pe().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(g,y){return g.coordPair[0]-y.coordPair[0]});for(var u=o[0],f=null,c=0;c=0?l[0].width:l[1].width),v=(c+f.x)/2-u.x,h=Math.min(v,v-f.x),d=Math.max(v,v-f.x),p=d<0?d:h>0?h:0;s=(v-p)/f.x}var g=new ct,y=new ct;ct.scale(g,a,-s),ct.scale(y,a,1-s),gy(e[0],g),gy(e[1],y)}function tet(r,t){var e={breaks:[]};return A(t.breaks,function(a){if(a){var n=co(r.get("breaks",!0),function(s){return pe().identifyAxisBreak(s,a)});if(n){var i=t.type,o={isExpanded:!!n.isExpanded};n.isExpanded=i===gh?!0:i===QI?!1:i===tP?!n.isExpanded:n.isExpanded,e.breaks.push({start:n.start,end:n.end,isExpanded:!!n.isExpanded,old:o})}}}),e}function eet(){uW({adjustBreakLabelPair:Qtt,buildAxisBreakLine:Jtt,rectCoordBuildBreakAxis:jtt,updateModelAxisBreak:tet})}function ret(r){yW(r),Ztt(),eet()}function aet(){zW(net)}function net(r,t){A(r,function(e){if(!e.model.get(["axisLabel","inside"])){var a=iet(e);if(a){var n=e.isHorizontal()?"height":"width",i=e.model.get(["axisLabel","margin"]);t[n]-=a[n]+i,e.position==="top"?t.y+=a.height+i:e.position==="left"&&(t.x+=a.width+i)}}})}function iet(r){var t=r.model,e=r.scale;if(!t.get(["axisLabel","show"])||e.isBlank())return;var a,n,i=e.getExtent();e instanceof yu?n=e.count():(a=e.getTicks(),n=a.length);var o=r.getLabelModel(),s=Ws(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var f=0;f($A("data-v-1071c65c"),r=r(),UA(),r),set={key:0,class:"loading-container"},uet={class:"loading-text"},fet={key:1,class:"error-container"},cet={key:2,class:"graph-container"},vet={class:"control-panel"},het={style:{display:"flex","align-items":"center",gap:"10px","flex-wrap":"wrap"}},det=oet(()=>Ct("div",{style:{flex:"1 1 auto"}},null,-1)),pet=Kn({__name:"TagRelationGraph",props:{folders:{},lang:{}},emits:["searchTag","openCluster"],setup(r,{emit:t}){const e=r,a=$t(!1),n=$t(""),i=$t(null),o=$t(null),s=$t(),l=$t();let u=null,f=null,c=null,v=null,h={};const d=$t("__all__"),p=$t(""),g=$t(3),y=$t(""),m=$t(!1),_=async()=>{try{if(document.fullscreenElement){await document.exitFullscreen();return}const P=l.value;if(!P||!P.requestFullscreen){$a.warning(Wt("tagGraphFullscreenUnsupported"));return}await P.requestFullscreen()}catch(P){$a.error((P==null?void 0:P.message)||Wt("tagGraphFullscreenFailed"))}},S=zt(()=>{var B;const O=(((B=i.value)==null?void 0:B.layers)??[]).map(V=>String(V.name??"")).filter(Boolean),E=Array.from(new Set(O));return[{label:Wt("tagGraphAllLayers"),value:"__all__"},...E.map(V=>({label:V,value:V}))]}),b=zt(()=>{var O;return(((O=o.value)==null?void 0:O.layers)??[]).reduce((E,B)=>{var V;return E+(((V=B==null?void 0:B.nodes)==null?void 0:V.length)??0)},0)}),x=zt(()=>{var P,O;return((O=(P=o.value)==null?void 0:P.links)==null?void 0:O.length)??0}),w=["#4A90E2","#7B68EE","#50C878","#FF6B6B"],T=P=>w[P%w.length],C=async()=>{var P,O;if(!e.folders||e.folders.length===0){n.value="No folders selected";return}a.value=!0,n.value="";try{const E={folder_paths:e.folders,lang:e.lang||"en"};i.value=await XR(E),o.value=i.value}catch(E){n.value=((O=(P=E.response)==null?void 0:P.data)==null?void 0:O.detail)||E.message||"Failed to load graph",$a.error(n.value)}finally{a.value=!1}},M=()=>{s.value&&Ch(()=>{R()})},D=()=>{const P=i.value;if(!P)return;const O=(p.value||"").trim().toLowerCase(),E=d.value,B=Math.max(1,Math.min(20,Number(g.value||1)));if(!y.value&&!O&&(E==="__all__"||!E)){o.value=P,M();return}const V=new Map;for(const N of P.layers){const F=String((N==null?void 0:N.name)??""),Z=Number((N==null?void 0:N.level)??0);for(const K of(N==null?void 0:N.nodes)??[]){const mt=String((K==null?void 0:K.id)??"");mt&&V.set(mt,{id:mt,label:String((K==null?void 0:K.label)??""),layerName:F,layerLevel:Z,metadata:K==null?void 0:K.metadata})}}const H=new Set;if(y.value)V.has(y.value)&&H.add(y.value);else for(const[N,F]of V)E&&E!=="__all__"&&F.layerName!==E||O&&!`${F.label} ${N}`.toLowerCase().includes(O)||H.add(N);const W=P.links,X=new Map,j=(N,F)=>{!N||!F||(X.has(N)||X.set(N,new Set),X.get(N).add(F))};for(const N of W){const F=String((N==null?void 0:N.source)??""),Z=String((N==null?void 0:N.target)??"");!F||!Z||(j(F,Z),j(Z,F))}const q=new Set,it=[];for(const N of H)q.add(N),it.push({id:N,d:0});for(;it.length;){const N=it.shift();if(N.d>=B)continue;const F=X.get(N.id);if(F)for(const Z of F)q.has(Z)||(q.add(Z),it.push({id:Z,d:N.d+1}))}const St=[];for(const N of P.layers){const F=((N==null?void 0:N.nodes)??[]).filter(Z=>q.has(String((Z==null?void 0:Z.id)??"")));F.length&&St.push({...N,nodes:F})}const at=W.filter(N=>q.has(String((N==null?void 0:N.source)??""))&&q.has(String((N==null?void 0:N.target)??"")));o.value={layers:St,links:at,stats:{...P.stats,total_links:at.length}},M()},I=()=>{y.value="",D()},L=(P,O,E,B)=>{d.value=O||"__all__",p.value=E||"",y.value=P;const V=B==="cluster"?3:B==="tag"?2:B==="abstract"?1:2;g.value=Math.max(Number(g.value||1),V),D()},k=()=>{d.value="__all__",p.value="",g.value=3,y.value="",i.value&&(o.value=i.value),M()},R=()=>{if(!o.value||!s.value)return;u&&u.dispose(),u=pF(s.value);const O=[...o.value.layers].reverse(),E=[],B=1500/(O.length+1),V=200;h={},O.forEach((q,it)=>{const St=B*(it+1),N=800/(q.nodes.length+1);q.nodes.forEach((F,Z)=>{const K=N*(Z+1),gt=F.id.split("").reduce((fr,wr)=>fr+wr.charCodeAt(0),0)%V-V/2,ut=St+gt,At=20,Ht=60,ne=Math.sqrt(F.size)/5,ie=Math.max(At,Math.min(Ht,At+ne));E.push({id:F.id,name:F.label,x:ut,y:K,fixed:!0,symbolSize:ie,value:F.size,category:q.level,itemStyle:{color:T(q.level)},label:{show:!0,fontSize:11,color:"#fff",formatter:fr=>{const ia=fr.name;return ia.length>10?ia.substring(0,10)+"...":ia}},metadata:F.metadata,layerName:q.name}),h[F.id]=E.length-1})});const H=o.value.links.map(q=>({source:q.source,target:q.target,value:q.weight,lineStyle:{width:Math.max(.5,Math.min(2,q.weight/100)),opacity:.3,curveness:.1}})),W=O.map(q=>({name:q.name})),X={tooltip:{renderMode:"html",appendToBody:!1,className:"iib-tg-tooltip",backgroundColor:"rgba(15, 23, 42, 0.92)",borderColor:"rgba(255,255,255,0.14)",borderWidth:1,padding:[10,12],textStyle:{color:"#fff"},extraCssText:"border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); z-index: 9999;",triggerOn:"none",enterable:!0,formatter:q=>{if(q.dataType==="node"){const it=q.data,St=String(it.id||""),at=it.metadata||{},N=Number(at.image_count??it.value??0),F=at.cluster_count!=null?Number(at.cluster_count):null,Z=at.level!=null?Number(at.level):null,K=String(at.type||""),mt=[];!Number.isNaN(N)&&N>0&&mt.push(`🖼️ ${N}`),F!=null&&!Number.isNaN(F)&&mt.push(`🧩 ${F}`),Z!=null&&!Number.isNaN(Z)&&mt.push(`🏷️ L${Z}`);const gt=K==="tag",ut=K==="tag"||K==="abstract"||K==="cluster",At=K==="cluster",Ht=[gt?``:"",ut?``:"",At?``:"",``].filter(Boolean).join("");return`
${q.name}
${mt.map(ne=>`${ne}`).join("")}
${Ht}
`}return""}},legend:[{data:W.map(q=>q.name),orient:"vertical",right:10,bottom:10,textStyle:{color:"#fff"}}],series:[{type:"graph",layout:"none",data:E,links:H,categories:W,roam:!0,scaleLimit:{min:.2,max:5},draggable:!1,blur:{itemStyle:{opacity:.15},lineStyle:{opacity:.08},label:{opacity:.25}},label:{show:!0,position:"inside"},lineStyle:{color:"source",curveness:.1},emphasis:{focus:"adjacency",lineStyle:{width:3}},zoom:1}]};u.setOption(X);const j=()=>{u&&u.dispatchAction({type:"hideTip"})};u.on("click",q=>{var it,St,at;if(q.dataType==="node"){const N=q.data;if(((it=N.metadata)==null?void 0:it.type)==="tag"){const F=h[String(N.id||"")];F!=null&&(u==null||u.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:F}))}else if(((St=N.metadata)==null?void 0:St.type)==="cluster"){const F=h[String(N.id||"")];F!=null&&(u==null||u.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:F}))}else if(((at=N.metadata)==null?void 0:at.type)==="abstract"){const F=h[String(N.id||"")];F!=null&&(u==null||u.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:F}))}else $a.info(`Abstract category: ${q.name}`)}}),u.getZr().on("click",q=>{q!=null&&q.target||j()}),c&&(document.removeEventListener("click",c,!0),c=null),c=q=>{var F,Z,K;const it=q.target;if(!it)return;const St=(F=it.closest)==null?void 0:F.call(it,"button[data-action]");if(St){const mt=St.getAttribute("data-action")||"",gt=St.getAttribute("data-nodeid")||"",ut=h[gt];if(mt==="search"&&ut!=null){const At=E[ut]&&E[ut].name||"";At&&(t("searchTag",At),$a.info(`${Wt("search")}: ${At}`)),j()}else if(mt==="filter"&&ut!=null){const At=E[ut]&&E[ut].layerName||"__all__",Ht=E[ut]&&E[ut].name||"",ne=String(E[ut]&&E[ut].id||gt),ie=String(E[ut]&&E[ut].metadata&&E[ut].metadata.type||"");d.value=At||"__all__",p.value=Ht,L(ne,String(At||"__all__"),String(Ht||""),ie),j()}else if(mt==="openCluster"&&ut!=null){const At=E[ut]&&E[ut].metadata||{},Ht=At.paths||[],ne=E[ut]&&E[ut].name||"",ie=Number(At.image_count||Ht.length||0);Ht&&Ht.length?t("openCluster",{title:ne,paths:Ht,size:ie}):$a.warning("No images found in this cluster"),j()}else mt==="close"&&j();q.preventDefault(),q.stopPropagation();return}if((Z=it.closest)==null?void 0:Z.call(it,".iib-tg-tip"))return;(((K=s.value)==null?void 0:K.contains(it))??!1)||j()},document.addEventListener("click",c,!0)};return fs(()=>e.folders,()=>{C()},{immediate:!0}),fs([o,s],()=>{o.value&&s.value&&Ch(()=>{R()})}),zA(()=>{f=()=>{u&&u.resize()},window.addEventListener("resize",f),v=()=>{m.value=!!document.fullscreenElement,Ch(()=>{u==null||u.resize()})},document.addEventListener("fullscreenchange",v)}),UR(()=>{f&&(window.removeEventListener("resize",f),f=null),v&&(document.removeEventListener("fullscreenchange",v),v=null),c&&(document.removeEventListener("click",c,!0),c=null),u&&u.dispose()}),(P,O)=>{const E=ZA,B=GA,V=qA,H=RE,W=FA,X=HA,j=XA,q=WA;return Kt(),Re("div",{ref_key:"fullscreenRef",ref:l,class:"tag-hierarchy-graph"},[a.value?(Kt(),Re("div",set,[_t(E,{size:"large"}),Ct("div",uet,Bt(Ae(Wt)("tagGraphGenerating")),1)])):n.value?(Kt(),Re("div",fet,[_t(B,{type:"error",message:n.value,"show-icon":""},null,8,["message"])])):i.value?(Kt(),Re("div",cet,[Ct("div",vet,[Ct("div",het,[_t(H,null,{default:se(()=>[_t(V,null,{default:se(()=>{var it,St;return[Ke(Bt(Ae(Wt)("tagGraphStatLayers"))+": "+Bt(((St=(it=o.value)==null?void 0:it.layers)==null?void 0:St.length)??0),1)]}),_:1}),_t(V,null,{default:se(()=>[Ke(Bt(Ae(Wt)("tagGraphStatNodes"))+": "+Bt(b.value),1)]),_:1}),_t(V,null,{default:se(()=>[Ke(Bt(Ae(Wt)("tagGraphStatLinks"))+": "+Bt(x.value),1)]),_:1})]),_:1}),det,_t(H,{size:8},{default:se(()=>[_t(W,{value:d.value,"onUpdate:value":O[0]||(O[0]=it=>d.value=it),options:S.value,style:{width:"140px"},getPopupContainer:it=>it.parentElement||it},null,8,["value","options","getPopupContainer"]),_t(X,{value:p.value,"onUpdate:value":O[1]||(O[1]=it=>p.value=it),style:{width:"200px"},"allow-clear":"",placeholder:Ae(Wt)("tagGraphFilterPlaceholder"),onKeydown:VA(I,["enter"])},null,8,["value","placeholder","onKeydown"]),_t(j,{value:g.value,"onUpdate:value":O[2]||(O[2]=it=>g.value=it),size:"small",min:1,max:20,step:1,style:{width:"92px"},title:Ae(Wt)("tagGraphFilterHopsTitle")},null,8,["value","title"]),_t(q,{size:"small",onClick:I},{default:se(()=>[Ke(Bt(Ae(Wt)("tagGraphFilterApply")),1)]),_:1}),_t(q,{size:"small",onClick:k},{default:se(()=>[Ke(Bt(Ae(Wt)("tagGraphFilterReset")),1)]),_:1}),_t(q,{size:"small",title:m.value?Ae(Wt)("exitFullscreen"):Ae(Wt)("fullscreen"),onClick:_},{default:se(()=>[m.value?(Kt(),pa(Ae(YR),{key:0})):(Kt(),pa(Ae(ZR),{key:1}))]),_:1},8,["title"])]),_:1})])]),Ct("div",{ref_key:"chartRef",ref:s,class:"chart-container"},null,512)])):vr("",!0)],512)}}});const get=YA(pet,[["__scopeId","data-v-1071c65c"]]),Hr=r=>($A("data-v-174295e7"),r=r(),UA(),r),yet={class:"topic-search"},met={class:"toolbar"},_et={class:"left"},xet={class:"title"},bet=Hr(()=>Ct("span",{class:"icon"},"🧠",-1)),wet={class:"right"},Tet={key:0,style:{opacity:"0.75"}},Cet={class:"label"},Aet={class:"label"},Met={style:{display:"grid",gap:"6px"}},Det=Hr(()=>Ct("span",{style:{"margin-right":"6px"}},"🔑",-1)),Let={key:0},Iet=Hr(()=>Ct("span",{style:{"margin-right":"6px"}},"🧩",-1)),Pet=Hr(()=>Ct("span",{style:{"margin-right":"6px"}},"🐍",-1)),ket={style:{opacity:"0.85"}},Ret=Hr(()=>Ct("span",{style:{"margin-right":"6px"}},"💻",-1)),Eet={style:{display:"flex","align-items":"center",gap:"10px","flex-wrap":"wrap"}},Oet={style:{opacity:"0.85"}},Net={key:3,style:{margin:"10px 0 0 0"}},Bet={style:{"margin-top":"10px",display:"flex","align-items":"center",gap:"8px"}},zet=Hr(()=>Ct("span",{style:{"font-size":"13px",color:"#666"}},"View:",-1)),Vet={key:4},Get={key:0,style:{"margin-top":"10px"}},Fet={key:1,class:"grid"},Het=["onClick"],Wet={class:"card-top"},$et={class:"card-title line-clamp-1"},Uet={class:"card-count"},Yet={class:"card-desc line-clamp-2"},Zet={key:2,class:"empty"},Xet={class:"guide"},qet={class:"guide-row"},Ket=Hr(()=>Ct("span",{class:"guide-icon"},"🗂️",-1)),jet={class:"guide-text"},Jet={class:"guide-row"},Qet=Hr(()=>Ct("span",{class:"guide-icon"},"🧠",-1)),trt={class:"guide-text"},ert={class:"guide-row"},rrt=Hr(()=>Ct("span",{class:"guide-icon"},"🔎",-1)),art={class:"guide-text"},nrt={class:"guide-row"},irt=Hr(()=>Ct("span",{class:"guide-icon"},"✨",-1)),ort={class:"guide-text"},srt={class:"guide-row"},lrt=Hr(()=>Ct("span",{class:"guide-icon"},"🚀",-1)),urt={class:"guide-text"},frt={class:"guide-hint"},crt=Hr(()=>Ct("span",{class:"guide-icon"},"💡",-1)),vrt={key:0,class:"guide-text"},hrt={key:1,class:"guide-text"},drt={key:5,style:{height:"calc(100vh - 300px)","min-height":"600px"}},prt="iib_topic_search_hide_requirements_v1",eg="topic_search_scope",grt=Kn({__name:"TopicSearch",props:{tabIdx:{},paneIdx:{}},setup(r){const t=r,e=qR(),a=$t(!1),n=$t(.9),i=$t(2),o=$t(null),s=$t(null),l=$t(!1),u=KR(prt,!0),f=()=>{u.value=!1},c=$t(null),v=$t("");let h=null;const d=zt(()=>{var F;const N=(F=c.value)==null?void 0:F.status;return N==="queued"||N==="running"}),p=zt(()=>{var F;const N=String(((F=c.value)==null?void 0:F.stage)||"");return!N||N==="queued"||N==="init"?Wt("topicSearchJobQueued"):N==="embedding"?Wt("topicSearchJobStageEmbedding"):N==="clustering"?Wt("topicSearchJobStageClustering"):N==="titling"?Wt("topicSearchJobStageTitling"):N==="done"?Wt("topicSearchJobStageDone"):N==="error"?Wt("topicSearchJobStageError"):`${Wt("topicSearchJobStage")}: ${N}`}),g=zt(()=>{var mt;const N=(mt=c.value)==null?void 0:mt.progress;if(!N)return 0;const F=Number(N.to_embed??0),Z=Number(N.embedded_done??0);if(F<=0)return 0;const K=Math.floor(Z/F*100);return Math.max(0,Math.min(100,K))}),y=zt(()=>{var F,Z,K,mt;const N=(F=c.value)==null?void 0:F.progress;if(!N)return"";if(((Z=c.value)==null?void 0:Z.stage)==="embedding"){const gt=Number(N.embedded_done??0),ut=Number(N.to_embed??0),At=Number(N.scanned??0),Ht=String(N.folder??"");return Wt("topicSearchJobEmbeddingDesc",[gt,ut,At,Ht])}if(((K=c.value)==null?void 0:K.stage)==="clustering"){const gt=Number(N.items_done??0),ut=Number(N.items_total??0);return Wt("topicSearchJobClusteringDesc",[gt,ut])}if(((mt=c.value)==null?void 0:mt.stage)==="titling"){const gt=Number(N.clusters_done??0),ut=Number(N.clusters_total??0);return Wt("topicSearchJobTitlingDesc",[gt,ut])}return""}),m=$t(""),_=$t(!1),S=$t(null),b=$t("clusters"),x=$t(!1),w=$t([]),T=$t(!1),C=$t(!1);let M=null,D="";const I=zt(()=>(e.quickMovePaths??[]).filter(F=>{const Z=String((F==null?void 0:F.key)??"");return((F==null?void 0:F.types)??[]).includes("preset")&&["cwd","home","desktop"].includes(Z)}).map(F=>String((F==null?void 0:F.dir)??"")).filter(Boolean));fs(I,N=>{N!=null&&N.length&&(w.value=(w.value??[]).filter(F=>!N.includes(F)))},{immediate:!0});const L=zt(()=>(e.quickMovePaths??[]).filter(F=>{const Z=String((F==null?void 0:F.key)??"");return!(((F==null?void 0:F.types)??[]).includes("preset")&&["cwd","home","desktop"].includes(Z))}).map(F=>({value:F.dir,label:F.zh||F.dir}))),k=zt(()=>(w.value??[]).filter(Boolean).length),R=zt(()=>(w.value??[]).filter(Boolean)),P=zt(()=>{var N;return((N=o.value)==null?void 0:N.clusters)??[]}),O=async()=>{var Z,K,mt;if(T.value)return;try{const gt=await tE();e.conf=gt}catch{}const N=((Z=e.conf)==null?void 0:Z.app_fe_setting)||{},F=(K=N==null?void 0:N[eg])==null?void 0:K.folder_paths;Array.isArray(F)&&F.length&&!((mt=w.value)!=null&&mt.length)&&(w.value=F.map(gt=>String(gt)).filter(Boolean)),T.value=!0},E=async()=>{var F,Z;if((F=e.conf)!=null&&F.is_readonly||!T.value)return;const N={folder_paths:R.value,updated_at:Date.now()};await eE(eg,N),(Z=e.conf)!=null&&Z.app_fe_setting&&(e.conf.app_fe_setting[eg]=N)},B=()=>{var F;if((F=e.conf)!=null&&F.is_readonly||!T.value)return;const N=JSON.stringify(R.value);N!==D&&(M&&clearTimeout(M),M=setTimeout(async()=>{C.value=!0;try{await E(),D=N}finally{C.value=!1}},500))},V=()=>{h&&(clearInterval(h),h=null)},H=async()=>{const N=v.value;if(!N)return;const F=await sE(N);c.value=F,F.status==="done"?(V(),a.value=!1,F.result&&(o.value=F.result),s.value=null):F.status==="error"&&(V(),a.value=!1,$a.error(F.error||Wt("topicSearchJobFailed")))},W=async()=>{if(k.value)try{const N=await rE({threshold:n.value,min_cluster_size:i.value,lang:e.lang,folder_paths:R.value});s.value=N,N.cache_hit&&N.result&&(o.value=N.result)}catch{}},X=async()=>{var N;if(!((N=e.conf)!=null&&N.is_readonly)){if(!k.value){$a.warning(Wt("topicSearchNeedScope")),x.value=!0;return}V(),a.value=!0,c.value=null,v.value="";try{await aE();const F=await nE({threshold:n.value,min_cluster_size:i.value,lang:e.lang,folder_paths:R.value});v.value=F.job_id,await H(),h=setInterval(()=>{H()},800)}catch(F){throw a.value=!1,F}}},j=async()=>{const N=(m.value||"").trim();if(N&&!_.value){if(!k.value){$a.warning(Wt("topicSearchNeedScope")),x.value=!0;return}_.value=!0;try{S.value=await iE({query:N,top_k:80,ensure_embed:!l.value,folder_paths:R.value}),l.value||(l.value=!0),q()}finally{_.value=!1}}},q=()=>{var mt;const N=(((mt=S.value)==null?void 0:mt.results)??[]).map(gt=>gt.path).filter(Boolean);if(!N.length)return;const F=`Query: ${m.value.trim()}(${N.length})`,Z={type:"topic-search-matched-image-grid",name:F,key:Date.now()+Ao(),id:Ao(),title:F,paths:N},K=e.tabList[t.tabIdx];K.panes.push(Z),K.key=Z.key},it=N=>{const F={type:"topic-search-matched-image-grid",name:`${N.title}(${N.size})`,key:Date.now()+Ao(),id:Ao(),title:N.title,paths:N.paths},Z=e.tabList[t.tabIdx];Z.panes.push(F),Z.key=F.key},St=N=>{const F={type:"topic-search-matched-image-grid",name:`${N.title}(${N.size})`,key:Date.now()+Ao(),id:Ao(),title:N.title,paths:N.paths},Z=e.tabList[t.tabIdx];Z.panes.push(F),Z.key=F.key},at=N=>{m.value=N,j()};return zA(()=>{(async()=>(await O(),k.value&&await W()))()}),jR(()=>{V()}),fs(R,()=>{l.value=!1},{deep:!0}),fs(()=>R.value,()=>{B()},{deep:!0}),(N,F)=>{var wr,ia,V_,G_,F_,H_;const Z=qA,K=WA,mt=HA,gt=XA,ut=GA,At=DE,Ht=uE,ne=ZA,ie=FA,fr=oE;return Kt(),Re("div",yet,[Ct("div",met,[Ct("div",_et,[Ct("div",xet,[bet,Ct("span",null,Bt(N.$t("topicSearchTitleExperimental")),1)]),o.value?(Kt(),pa(Z,{key:0,color:"blue"},{default:se(()=>[Ke("共 "+Bt(o.value.count)+" 张",1)]),_:1})):vr("",!0),o.value?(Kt(),pa(Z,{key:1,color:"geekblue"},{default:se(()=>[Ke("主题 "+Bt(o.value.clusters.length),1)]),_:1})):vr("",!0),o.value?(Kt(),pa(Z,{key:2,color:"default"},{default:se(()=>[Ke("噪声 "+Bt(o.value.noise.length),1)]),_:1})):vr("",!0)]),Ct("div",wet,[_t(K,{onClick:F[0]||(F[0]=ve=>x.value=!0)},{default:se(()=>[Ke(Bt(N.$t("topicSearchScope"))+" ",1),k.value?(Kt(),Re("span",Tet,"("+Bt(k.value)+")",1)):vr("",!0)]),_:1}),_t(mt,{value:m.value,"onUpdate:value":F[1]||(F[1]=ve=>m.value=ve),style:{width:"min(420px, 72vw)"},placeholder:N.$t("topicSearchQueryPlaceholder"),disabled:_.value,onKeydown:VA(j,["enter"]),"allow-clear":""},null,8,["value","placeholder","disabled","onKeydown"]),_t(K,{loading:_.value,onClick:j},{default:se(()=>[Ke(Bt(N.$t("search")),1)]),_:1},8,["loading"]),(ia=(wr=S.value)==null?void 0:wr.results)!=null&&ia.length?(Kt(),pa(K,{key:0,onClick:q},{default:se(()=>[Ke(Bt(N.$t("topicSearchOpenResults")),1)]),_:1})):vr("",!0),Ct("span",Cet,Bt(N.$t("topicSearchThreshold")),1),_t(gt,{value:n.value,"onUpdate:value":F[2]||(F[2]=ve=>n.value=ve),min:.5,max:.99,step:.01},null,8,["value"]),Ct("span",Aet,Bt(N.$t("topicSearchMinClusterSize")),1),_t(gt,{value:i.value,"onUpdate:value":F[3]||(F[3]=ve=>i.value=ve),min:1,max:50,step:1},null,8,["value"]),_t(K,{type:"primary",ghost:"",loading:a.value,disabled:(V_=Ae(e).conf)==null?void 0:V_.is_readonly,onClick:X},{default:se(()=>[Ke(Bt(N.$t("refresh")),1)]),_:1},8,["loading","disabled"])])]),(G_=Ae(e).conf)!=null&&G_.is_readonly?(Kt(),pa(ut,{key:0,type:"warning",message:N.$t("readonlyModeSettingPageDesc"),style:{margin:"12px 0"},"show-icon":""},null,8,["message"])):vr("",!0),Ae(u)?(Kt(),pa(ut,{key:1,type:"info","show-icon":"",closable:"",style:{margin:"10px 0 0 0"},message:N.$t("topicSearchRequirementsTitle"),onClose:f},{description:se(()=>[Ct("div",Met,[Ct("div",null,[Det,Ct("span",null,Bt(N.$t("topicSearchRequirementsOpenai")),1)]),Ae(JR)?(Kt(),Re("div",Let,[Iet,Ct("span",null,Bt(N.$t("topicSearchRequirementsDepsDesktop")),1)])):(Kt(),Re(Lc,{key:1},[Ct("div",null,[Pet,Ct("span",null,Bt(N.$t("topicSearchRequirementsDepsPython")),1)]),Ct("div",ket,[Ret,Ct("span",null,Bt(N.$t("topicSearchRequirementsInstallCmd")),1)])],64))])]),_:1},8,["message"])):vr("",!0),(F_=s.value)!=null&&F_.cache_hit&&((H_=s.value)!=null&&H_.stale)?(Kt(),pa(ut,{key:2,type:"warning","show-icon":"",style:{margin:"10px 0 0 0"},message:N.$t("topicSearchCacheStale")},{description:se(()=>{var ve;return[Ct("div",Eet,[Ct("span",Oet,Bt(N.$t("topicSearchCacheStaleDesc")),1),_t(K,{size:"small",loading:a.value||d.value,disabled:(ve=Ae(e).conf)==null?void 0:ve.is_readonly,onClick:X},{default:se(()=>[Ke(Bt(N.$t("topicSearchCacheUpdate")),1)]),_:1},8,["loading","disabled"])])]}),_:1},8,["message"])):vr("",!0),d.value?(Kt(),Re("div",Net,[_t(ut,{type:"info","show-icon":"",message:p.value,description:y.value},null,8,["message","description"]),_t(At,{percent:g.value,size:"small",style:{"margin-top":"8px"}},null,8,["percent"])])):vr("",!0),Ct("div",Bet,[zet,_t(Ht,{checked:b.value,"onUpdate:checked":F[4]||(F[4]=ve=>b.value=ve),"checked-value":"graph","un-checked-value":"clusters","checked-children":"Tag Graph","un-checked-children":"Clusters"},null,8,["checked"])]),b.value==="clusters"?(Kt(),Re("div",Vet,[_t(ne,{spinning:a.value},{default:se(()=>{var ve;return[S.value?(Kt(),Re("div",Get,[_t(ut,{type:"info",message:N.$t("topicSearchRecallMsg",[S.value.results.length,S.value.count,S.value.top_k]),"show-icon":""},null,8,["message"])])):vr("",!0),P.value.length?(Kt(),Re("div",Fet,[(Kt(!0),Re(Lc,null,QR(P.value,Co=>(Kt(),Re("div",{class:"card",key:Co.id,onClick:yrt=>it(Co)},[Ct("div",Wet,[Ct("div",$et,Bt(Co.title),1),Ct("div",Uet,Bt(Co.size),1)]),Ct("div",Yet,Bt(Co.sample_prompt),1)],8,Het))),128))])):(Kt(),Re("div",Zet,[_t(ut,{type:"info","show-icon":"",message:N.$t("topicSearchGuideTitle"),style:{"margin-bottom":"10px"}},null,8,["message"]),Ct("div",Xet,[Ct("div",qet,[Ket,Ct("span",jet,Bt(N.$t("topicSearchGuideStep1")),1),_t(K,{size:"small",onClick:F[5]||(F[5]=Co=>x.value=!0)},{default:se(()=>[Ke(Bt(N.$t("topicSearchScope")),1)]),_:1})]),Ct("div",Jet,[Qet,Ct("span",trt,Bt(N.$t("topicSearchGuideStep2")),1),_t(K,{size:"small",loading:a.value,disabled:(ve=Ae(e).conf)==null?void 0:ve.is_readonly,onClick:X},{default:se(()=>[Ke(Bt(N.$t("refresh")),1)]),_:1},8,["loading","disabled"])]),Ct("div",ert,[rrt,Ct("span",art,Bt(N.$t("topicSearchGuideStep3")),1)]),Ct("div",nrt,[irt,Ct("span",ort,Bt(N.$t("topicSearchGuideAdvantage1")),1)]),Ct("div",srt,[lrt,Ct("span",urt,Bt(N.$t("topicSearchGuideAdvantage2")),1)]),Ct("div",frt,[crt,k.value?(Kt(),Re("span",hrt,Bt(N.$t("topicSearchGuideEmptyReasonNoTopics")),1)):(Kt(),Re("span",vrt,Bt(N.$t("topicSearchGuideEmptyReasonNoScope")),1))])])]))]}),_:1},8,["spinning"])])):b.value==="graph"?(Kt(),Re("div",drt,[_t(get,{folders:R.value,lang:Ae(e).lang,onSearchTag:at,onOpenCluster:St},null,8,["folders","lang"])])):vr("",!0),_t(fr,{visible:x.value,"onUpdate:visible":F[7]||(F[7]=ve=>x.value=ve),title:N.$t("topicSearchScopeModalTitle"),"mask-closable":!0,onOk:F[8]||(F[8]=()=>{x.value=!1,E()})},{default:se(()=>[_t(ut,{type:"info","show-icon":"",message:N.$t("topicSearchScopeTip"),style:{"margin-bottom":"10px"}},null,8,["message"]),C.value?(Kt(),pa(ut,{key:0,type:"info","show-icon":"",message:N.$t("topicSearchSavingToBackend"),style:{"margin-bottom":"10px"}},null,8,["message"])):vr("",!0),_t(ie,{value:w.value,"onUpdate:value":F[6]||(F[6]=ve=>w.value=ve),mode:"multiple",style:{width:"100%"},options:L.value,placeholder:N.$t("topicSearchScopePlaceholder"),"max-tag-count":3,getPopupContainer:ve=>ve.parentElement||ve,"allow-clear":""},null,8,["value","options","placeholder","getPopupContainer"])]),_:1},8,["visible","title"])])}}});const Crt=YA(grt,[["__scopeId","data-v-174295e7"]]);export{Crt as default};