79 lines
1.2 MiB
79 lines
1.2 MiB
var TO=Object.defineProperty;var MO=(r,t,e)=>t in r?TO(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var j=(r,t,e)=>MO(r,typeof t!="symbol"?t+"":t,e);import{r as Wr,b as b0,g as CO}from"./react-vendor-CmFgShSM.js";/*!
|
||
* @kurkle/color v0.3.4
|
||
* https://github.com/kurkle/color#readme
|
||
* (c) 2024 Jukka Kurkela
|
||
* Released under the MIT License
|
||
*/function ah(r){return r+.5|0}const bn=(r,t,e)=>Math.max(Math.min(r,e),t);function El(r){return bn(ah(r*2.55),0,255)}function En(r){return bn(ah(r*255),0,255)}function Vi(r){return bn(ah(r/2.55)/100,0,1)}function ub(r){return bn(ah(r*100),0,100)}const gr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},vy=[..."0123456789ABCDEF"],AO=r=>vy[r&15],DO=r=>vy[(r&240)>>4]+vy[r&15],Ph=r=>(r&240)>>4===(r&15),LO=r=>Ph(r.r)&&Ph(r.g)&&Ph(r.b)&&Ph(r.a);function IO(r){var t=r.length,e;return r[0]==="#"&&(t===4||t===5?e={r:255&gr[r[1]]*17,g:255&gr[r[2]]*17,b:255&gr[r[3]]*17,a:t===5?gr[r[4]]*17:255}:(t===7||t===9)&&(e={r:gr[r[1]]<<4|gr[r[2]],g:gr[r[3]]<<4|gr[r[4]],b:gr[r[5]]<<4|gr[r[6]],a:t===9?gr[r[7]]<<4|gr[r[8]]:255})),e}const PO=(r,t)=>r<255?t(r):"";function kO(r){var t=LO(r)?AO:DO;return r?"#"+t(r.r)+t(r.g)+t(r.b)+PO(r.a,t):void 0}const RO=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ID(r,t,e){const i=t*Math.min(e,1-e),n=(a,o=(a+r/30)%12)=>e-i*Math.max(Math.min(o-3,9-o,1),-1);return[n(0),n(8),n(4)]}function EO(r,t,e){const i=(n,a=(n+r/60)%6)=>e-e*t*Math.max(Math.min(a,4-a,1),0);return[i(5),i(3),i(1)]}function OO(r,t,e){const i=ID(r,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)i[n]*=1-t-e,i[n]+=t;return i}function NO(r,t,e,i,n){return r===n?(t-e)/i+(t<e?6:0):t===n?(e-r)/i+2:(r-t)/i+4}function S0(r){const e=r.r/255,i=r.g/255,n=r.b/255,a=Math.max(e,i,n),o=Math.min(e,i,n),s=(a+o)/2;let l,u,h;return a!==o&&(h=a-o,u=s>.5?h/(2-a-o):h/(a+o),l=NO(e,i,n,h,a),l=l*60+.5),[l|0,u||0,s]}function w0(r,t,e,i){return(Array.isArray(t)?r(t[0],t[1],t[2]):r(t,e,i)).map(En)}function T0(r,t,e){return w0(ID,r,t,e)}function BO(r,t,e){return w0(OO,r,t,e)}function zO(r,t,e){return w0(EO,r,t,e)}function PD(r){return(r%360+360)%360}function VO(r){const t=RO.exec(r);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?El(+t[5]):En(+t[5]));const n=PD(+t[2]),a=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?i=BO(n,a,o):t[1]==="hsv"?i=zO(n,a,o):i=T0(n,a,o),{r:i[0],g:i[1],b:i[2],a:e}}function FO(r,t){var e=S0(r);e[0]=PD(e[0]+t),e=T0(e),r.r=e[0],r.g=e[1],r.b=e[2]}function GO(r){if(!r)return;const t=S0(r),e=t[0],i=ub(t[1]),n=ub(t[2]);return r.a<255?`hsla(${e}, ${i}%, ${n}%, ${Vi(r.a)})`:`hsl(${e}, ${i}%, ${n}%)`}const hb={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},cb={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function HO(){const r={},t=Object.keys(cb),e=Object.keys(hb);let i,n,a,o,s;for(i=0;i<t.length;i++){for(o=s=t[i],n=0;n<e.length;n++)a=e[n],s=s.replace(a,hb[a]);a=parseInt(cb[o],16),r[s]=[a>>16&255,a>>8&255,a&255]}return r}let kh;function WO(r){kh||(kh=HO(),kh.transparent=[0,0,0,0]);const t=kh[r.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const UO=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function YO(r){const t=UO.exec(r);let e=255,i,n,a;if(t){if(t[7]!==i){const o=+t[7];e=t[8]?El(o):bn(o*255,0,255)}return i=+t[1],n=+t[3],a=+t[5],i=255&(t[2]?El(i):bn(i,0,255)),n=255&(t[4]?El(n):bn(n,0,255)),a=255&(t[6]?El(a):bn(a,0,255)),{r:i,g:n,b:a,a:e}}}function $O(r){return r&&(r.a<255?`rgba(${r.r}, ${r.g}, ${r.b}, ${Vi(r.a)})`:`rgb(${r.r}, ${r.g}, ${r.b})`)}const Id=r=>r<=.0031308?r*12.92:Math.pow(r,1/2.4)*1.055-.055,Lo=r=>r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4);function XO(r,t,e){const i=Lo(Vi(r.r)),n=Lo(Vi(r.g)),a=Lo(Vi(r.b));return{r:En(Id(i+e*(Lo(Vi(t.r))-i))),g:En(Id(n+e*(Lo(Vi(t.g))-n))),b:En(Id(a+e*(Lo(Vi(t.b))-a))),a:r.a+e*(t.a-r.a)}}function Rh(r,t,e){if(r){let i=S0(r);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=T0(i),r.r=i[0],r.g=i[1],r.b=i[2]}}function kD(r,t){return r&&Object.assign(t||{},r)}function fb(r){var t={r:0,g:0,b:0,a:255};return Array.isArray(r)?r.length>=3&&(t={r:r[0],g:r[1],b:r[2],a:255},r.length>3&&(t.a=En(r[3]))):(t=kD(r,{r:0,g:0,b:0,a:1}),t.a=En(t.a)),t}function ZO(r){return r.charAt(0)==="r"?YO(r):VO(r)}class Su{constructor(t){if(t instanceof Su)return t;const e=typeof t;let i;e==="object"?i=fb(t):e==="string"&&(i=IO(t)||WO(t)||ZO(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=kD(this._rgb);return t&&(t.a=Vi(t.a)),t}set rgb(t){this._rgb=fb(t)}rgbString(){return this._valid?$O(this._rgb):void 0}hexString(){return this._valid?kO(this._rgb):void 0}hslString(){return this._valid?GO(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let a;const o=e===a?.5:e,s=2*o-1,l=i.a-n.a,u=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;a=1-u,i.r=255&u*i.r+a*n.r+.5,i.g=255&u*i.g+a*n.g+.5,i.b=255&u*i.b+a*n.b+.5,i.a=o*i.a+(1-o)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=XO(this._rgb,t._rgb,e)),this}clone(){return new Su(this.rgb)}alpha(t){return this._rgb.a=En(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=ah(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Rh(this._rgb,2,t),this}darken(t){return Rh(this._rgb,2,-t),this}saturate(t){return Rh(this._rgb,1,t),this}desaturate(t){return Rh(this._rgb,1,-t),this}rotate(t){return FO(this._rgb,t),this}}/*!
|
||
* Chart.js v4.5.1
|
||
* https://www.chartjs.org
|
||
* (c) 2025 Chart.js Contributors
|
||
* Released under the MIT License
|
||
*/function Pi(){}const jO=(()=>{let r=0;return()=>r++})();function It(r){return r==null}function jt(r){if(Array.isArray&&Array.isArray(r))return!0;const t=Object.prototype.toString.call(r);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Rt(r){return r!==null&&Object.prototype.toString.call(r)==="[object Object]"}function ne(r){return(typeof r=="number"||r instanceof Number)&&isFinite(+r)}function ur(r,t){return ne(r)?r:t}function bt(r,t){return typeof r>"u"?t:r}const qO=(r,t)=>typeof r=="string"&&r.endsWith("%")?parseFloat(r)/100:+r/t,RD=(r,t)=>typeof r=="string"&&r.endsWith("%")?parseFloat(r)/100*t:+r;function Zt(r,t,e){if(r&&typeof r.call=="function")return r.apply(e,t)}function Wt(r,t,e,i){let n,a,o;if(jt(r))for(a=r.length,n=0;n<a;n++)t.call(e,r[n],n);else if(Rt(r))for(o=Object.keys(r),a=o.length,n=0;n<a;n++)t.call(e,r[o[n]],o[n])}function bf(r,t){let e,i,n,a;if(!r||!t||r.length!==t.length)return!1;for(e=0,i=r.length;e<i;++e)if(n=r[e],a=t[e],n.datasetIndex!==a.datasetIndex||n.index!==a.index)return!1;return!0}function Sf(r){if(jt(r))return r.map(Sf);if(Rt(r)){const t=Object.create(null),e=Object.keys(r),i=e.length;let n=0;for(;n<i;++n)t[e[n]]=Sf(r[e[n]]);return t}return r}function ED(r){return["__proto__","prototype","constructor"].indexOf(r)===-1}function KO(r,t,e,i){if(!ED(r))return;const n=t[r],a=e[r];Rt(n)&&Rt(a)?wu(n,a,i):t[r]=Sf(a)}function wu(r,t,e){const i=jt(t)?t:[t],n=i.length;if(!Rt(r))return r;e=e||{};const a=e.merger||KO;let o;for(let s=0;s<n;++s){if(o=i[s],!Rt(o))continue;const l=Object.keys(o);for(let u=0,h=l.length;u<h;++u)a(l[u],r,o,e)}return r}function Jl(r,t){return wu(r,t,{merger:JO})}function JO(r,t,e){if(!ED(r))return;const i=t[r],n=e[r];Rt(i)&&Rt(n)?Jl(i,n):Object.prototype.hasOwnProperty.call(t,r)||(t[r]=Sf(n))}const vb={"":r=>r,x:r=>r.x,y:r=>r.y};function QO(r){const t=r.split("."),e=[];let i="";for(const n of t)i+=n,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function tN(r){const t=QO(r);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function Wn(r,t){return(vb[t]||(vb[t]=tN(t)))(r)}function M0(r){return r.charAt(0).toUpperCase()+r.slice(1)}const Tu=r=>typeof r<"u",Un=r=>typeof r=="function",db=(r,t)=>{if(r.size!==t.size)return!1;for(const e of r)if(!t.has(e))return!1;return!0};function eN(r){return r.type==="mouseup"||r.type==="click"||r.type==="contextmenu"}const Nt=Math.PI,qt=2*Nt,rN=qt+Nt,wf=Number.POSITIVE_INFINITY,iN=Nt/180,se=Nt/2,na=Nt/4,pb=Nt*2/3,Sn=Math.log10,_i=Math.sign;function Ql(r,t,e){return Math.abs(r-t)<e}function gb(r){const t=Math.round(r);r=Ql(r,t,r/1e3)?t:r;const e=Math.pow(10,Math.floor(Sn(r))),i=r/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function nN(r){const t=[],e=Math.sqrt(r);let i;for(i=1;i<e;i++)r%i===0&&(t.push(i),t.push(r/i));return e===(e|0)&&t.push(e),t.sort((n,a)=>n-a).pop(),t}function aN(r){return typeof r=="symbol"||typeof r=="object"&&r!==null&&!(Symbol.toPrimitive in r||"toString"in r||"valueOf"in r)}function _s(r){return!aN(r)&&!isNaN(parseFloat(r))&&isFinite(r)}function oN(r,t){const e=Math.round(r);return e-t<=r&&e+t>=r}function OD(r,t,e){let i,n,a;for(i=0,n=r.length;i<n;i++)a=r[i][e],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function Yr(r){return r*(Nt/180)}function C0(r){return r*(180/Nt)}function yb(r){if(!ne(r))return;let t=1,e=0;for(;Math.round(r*t)/t!==r;)t*=10,e++;return e}function ND(r,t){const e=t.x-r.x,i=t.y-r.y,n=Math.sqrt(e*e+i*i);let a=Math.atan2(i,e);return a<-.5*Nt&&(a+=qt),{angle:a,distance:n}}function dy(r,t){return Math.sqrt(Math.pow(t.x-r.x,2)+Math.pow(t.y-r.y,2))}function sN(r,t){return(r-t+rN)%qt-Nt}function Ee(r){return(r%qt+qt)%qt}function Mu(r,t,e,i){const n=Ee(r),a=Ee(t),o=Ee(e),s=Ee(a-n),l=Ee(o-n),u=Ee(n-a),h=Ee(n-o);return n===a||n===o||i&&a===o||s>l&&u<h}function Se(r,t,e){return Math.max(t,Math.min(e,r))}function lN(r){return Se(r,-32768,32767)}function Fi(r,t,e,i=1e-6){return r>=Math.min(t,e)-i&&r<=Math.max(t,e)+i}function A0(r,t,e){e=e||(o=>r[o]<t);let i=r.length-1,n=0,a;for(;i-n>1;)a=n+i>>1,e(a)?n=a:i=a;return{lo:n,hi:i}}const Gi=(r,t,e,i)=>A0(r,e,i?n=>{const a=r[n][t];return a<e||a===e&&r[n+1][t]===e}:n=>r[n][t]<e),uN=(r,t,e)=>A0(r,e,i=>r[i][t]>=e);function hN(r,t,e){let i=0,n=r.length;for(;i<n&&r[i]<t;)i++;for(;n>i&&r[n-1]>e;)n--;return i>0||n<r.length?r.slice(i,n):r}const BD=["push","pop","shift","splice","unshift"];function cN(r,t){if(r._chartjs){r._chartjs.listeners.push(t);return}Object.defineProperty(r,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),BD.forEach(e=>{const i="_onData"+M0(e),n=r[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,value(...a){const o=n.apply(this,a);return r._chartjs.listeners.forEach(s=>{typeof s[i]=="function"&&s[i](...a)}),o}})})}function mb(r,t){const e=r._chartjs;if(!e)return;const i=e.listeners,n=i.indexOf(t);n!==-1&&i.splice(n,1),!(i.length>0)&&(BD.forEach(a=>{delete r[a]}),delete r._chartjs)}function zD(r){const t=new Set(r);return t.size===r.length?r:Array.from(t)}const VD=function(){return typeof window>"u"?function(r){return r()}:window.requestAnimationFrame}();function FD(r,t){let e=[],i=!1;return function(...n){e=n,i||(i=!0,VD.call(window,()=>{i=!1,r.apply(t,e)}))}}function fN(r,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(r,t,i)):r.apply(this,i),t}}const D0=r=>r==="start"?"left":r==="end"?"right":"center",Pe=(r,t,e)=>r==="start"?t:r==="end"?e:(t+e)/2,vN=(r,t,e,i)=>r===(i?"left":"right")?e:r==="center"?(t+e)/2:t;function GD(r,t,e){const i=t.length;let n=0,a=i;if(r._sorted){const{iScale:o,vScale:s,_parsed:l}=r,u=r.dataset&&r.dataset.options?r.dataset.options.spanGaps:null,h=o.axis,{min:c,max:f,minDefined:v,maxDefined:d}=o.getUserBounds();if(v){if(n=Math.min(Gi(l,h,c).lo,e?i:Gi(t,h,o.getPixelForValue(c)).lo),u){const p=l.slice(0,n+1).reverse().findIndex(g=>!It(g[s.axis]));n-=Math.max(0,p)}n=Se(n,0,i-1)}if(d){let p=Math.max(Gi(l,o.axis,f,!0).hi+1,e?0:Gi(t,h,o.getPixelForValue(f),!0).hi+1);if(u){const g=l.slice(p-1).findIndex(y=>!It(y[s.axis]));p+=Math.max(0,g)}a=Se(p,n,i)-n}else a=i-n}return{start:n,count:a}}function HD(r){const{xScale:t,yScale:e,_scaleRanges:i}=r,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return r._scaleRanges=n,!0;const a=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,n),a}const Eh=r=>r===0||r===1,_b=(r,t,e)=>-(Math.pow(2,10*(r-=1))*Math.sin((r-t)*qt/e)),xb=(r,t,e)=>Math.pow(2,-10*r)*Math.sin((r-t)*qt/e)+1,tu={linear:r=>r,easeInQuad:r=>r*r,easeOutQuad:r=>-r*(r-2),easeInOutQuad:r=>(r/=.5)<1?.5*r*r:-.5*(--r*(r-2)-1),easeInCubic:r=>r*r*r,easeOutCubic:r=>(r-=1)*r*r+1,easeInOutCubic:r=>(r/=.5)<1?.5*r*r*r:.5*((r-=2)*r*r+2),easeInQuart:r=>r*r*r*r,easeOutQuart:r=>-((r-=1)*r*r*r-1),easeInOutQuart:r=>(r/=.5)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2),easeInQuint:r=>r*r*r*r*r,easeOutQuint:r=>(r-=1)*r*r*r*r+1,easeInOutQuint:r=>(r/=.5)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2),easeInSine:r=>-Math.cos(r*se)+1,easeOutSine:r=>Math.sin(r*se),easeInOutSine:r=>-.5*(Math.cos(Nt*r)-1),easeInExpo:r=>r===0?0:Math.pow(2,10*(r-1)),easeOutExpo:r=>r===1?1:-Math.pow(2,-10*r)+1,easeInOutExpo:r=>Eh(r)?r:r<.5?.5*Math.pow(2,10*(r*2-1)):.5*(-Math.pow(2,-10*(r*2-1))+2),easeInCirc:r=>r>=1?r:-(Math.sqrt(1-r*r)-1),easeOutCirc:r=>Math.sqrt(1-(r-=1)*r),easeInOutCirc:r=>(r/=.5)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1),easeInElastic:r=>Eh(r)?r:_b(r,.075,.3),easeOutElastic:r=>Eh(r)?r:xb(r,.075,.3),easeInOutElastic(r){return Eh(r)?r:r<.5?.5*_b(r*2,.1125,.45):.5+.5*xb(r*2-1,.1125,.45)},easeInBack(r){return r*r*((1.70158+1)*r-1.70158)},easeOutBack(r){return(r-=1)*r*((1.70158+1)*r+1.70158)+1},easeInOutBack(r){let t=1.70158;return(r/=.5)<1?.5*(r*r*(((t*=1.525)+1)*r-t)):.5*((r-=2)*r*(((t*=1.525)+1)*r+t)+2)},easeInBounce:r=>1-tu.easeOutBounce(1-r),easeOutBounce(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},easeInOutBounce:r=>r<.5?tu.easeInBounce(r*2)*.5:tu.easeOutBounce(r*2-1)*.5+.5};function L0(r){if(r&&typeof r=="object"){const t=r.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function bb(r){return L0(r)?r:new Su(r)}function Pd(r){return L0(r)?r:new Su(r).saturate(.5).darken(.1).hexString()}const dN=["x","y","borderWidth","radius","tension"],pN=["color","borderColor","backgroundColor"];function gN(r){r.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),r.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),r.set("animations",{colors:{type:"color",properties:pN},numbers:{type:"number",properties:dN}}),r.describe("animations",{_fallback:"animation"}),r.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function yN(r){r.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Sb=new Map;function mN(r,t){t=t||{};const e=r+JSON.stringify(t);let i=Sb.get(e);return i||(i=new Intl.NumberFormat(r,t),Sb.set(e,i)),i}function oh(r,t,e){return mN(t,e).format(r)}const WD={values(r){return jt(r)?r:""+r},numeric(r,t,e){if(r===0)return"0";const i=this.chart.options.locale;let n,a=r;if(e.length>1){const u=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(u<1e-4||u>1e15)&&(n="scientific"),a=_N(r,e)}const o=Sn(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:n,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),oh(r,i,l)},logarithmic(r,t,e){if(r===0)return"0";const i=e[t].significand||r/Math.pow(10,Math.floor(Sn(r)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?WD.numeric.call(this,r,t,e):""}};function _N(r,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&r!==Math.floor(r)&&(e=r-Math.floor(r)),e}var Dv={formatters:WD};function xN(r){r.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Dv.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),r.route("scale.ticks","color","","color"),r.route("scale.grid","color","","borderColor"),r.route("scale.border","color","","borderColor"),r.route("scale.title","color","","color"),r.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),r.describe("scales",{_fallback:"scale"}),r.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const lo=Object.create(null),py=Object.create(null);function eu(r,t){if(!t)return r;const e=t.split(".");for(let i=0,n=e.length;i<n;++i){const a=e[i];r=r[a]||(r[a]=Object.create(null))}return r}function kd(r,t,e){return typeof t=="string"?wu(eu(r,t),e):wu(eu(r,""),t)}class bN{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,n)=>Pd(n.backgroundColor),this.hoverBorderColor=(i,n)=>Pd(n.borderColor),this.hoverColor=(i,n)=>Pd(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return kd(this,t,e)}get(t){return eu(this,t)}describe(t,e){return kd(py,t,e)}override(t,e){return kd(lo,t,e)}route(t,e,i,n){const a=eu(this,t),o=eu(this,i),s="_"+e;Object.defineProperties(a,{[s]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[s],u=o[n];return Rt(l)?Object.assign({},u,l):bt(l,u)},set(l){this[s]=l}}})}apply(t){t.forEach(e=>e(this))}}var Jt=new bN({_scriptable:r=>!r.startsWith("on"),_indexable:r=>r!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[gN,yN,xN]);function SN(r){return!r||It(r.size)||It(r.family)?null:(r.style?r.style+" ":"")+(r.weight?r.weight+" ":"")+r.size+"px "+r.family}function Tf(r,t,e,i,n){let a=t[n];return a||(a=t[n]=r.measureText(n).width,e.push(n)),a>i&&(i=a),i}function wN(r,t,e,i){i=i||{};let n=i.data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(n=i.data={},a=i.garbageCollect=[],i.font=t),r.save(),r.font=t;let o=0;const s=e.length;let l,u,h,c,f;for(l=0;l<s;l++)if(c=e[l],c!=null&&!jt(c))o=Tf(r,n,a,o,c);else if(jt(c))for(u=0,h=c.length;u<h;u++)f=c[u],f!=null&&!jt(f)&&(o=Tf(r,n,a,o,f));r.restore();const v=a.length/2;if(v>e.length){for(l=0;l<v;l++)delete n[a[l]];a.splice(0,v)}return o}function aa(r,t,e){const i=r.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*i)/i+n}function wb(r,t){!t&&!r||(t=t||r.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,r.width,r.height),t.restore())}function gy(r,t,e,i){UD(r,t,e,i,null)}function UD(r,t,e,i,n){let a,o,s,l,u,h,c,f;const v=t.pointStyle,d=t.rotation,p=t.radius;let g=(d||0)*iN;if(v&&typeof v=="object"&&(a=v.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){r.save(),r.translate(e,i),r.rotate(g),r.drawImage(v,-v.width/2,-v.height/2,v.width,v.height),r.restore();return}if(!(isNaN(p)||p<=0)){switch(r.beginPath(),v){default:n?r.ellipse(e,i,n/2,p,0,0,qt):r.arc(e,i,p,0,qt),r.closePath();break;case"triangle":h=n?n/2:p,r.moveTo(e+Math.sin(g)*h,i-Math.cos(g)*p),g+=pb,r.lineTo(e+Math.sin(g)*h,i-Math.cos(g)*p),g+=pb,r.lineTo(e+Math.sin(g)*h,i-Math.cos(g)*p),r.closePath();break;case"rectRounded":u=p*.516,l=p-u,o=Math.cos(g+na)*l,c=Math.cos(g+na)*(n?n/2-u:l),s=Math.sin(g+na)*l,f=Math.sin(g+na)*(n?n/2-u:l),r.arc(e-c,i-s,u,g-Nt,g-se),r.arc(e+f,i-o,u,g-se,g),r.arc(e+c,i+s,u,g,g+se),r.arc(e-f,i+o,u,g+se,g+Nt),r.closePath();break;case"rect":if(!d){l=Math.SQRT1_2*p,h=n?n/2:l,r.rect(e-h,i-l,2*h,2*l);break}g+=na;case"rectRot":c=Math.cos(g)*(n?n/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,f=Math.sin(g)*(n?n/2:p),r.moveTo(e-c,i-s),r.lineTo(e+f,i-o),r.lineTo(e+c,i+s),r.lineTo(e-f,i+o),r.closePath();break;case"crossRot":g+=na;case"cross":c=Math.cos(g)*(n?n/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,f=Math.sin(g)*(n?n/2:p),r.moveTo(e-c,i-s),r.lineTo(e+c,i+s),r.moveTo(e+f,i-o),r.lineTo(e-f,i+o);break;case"star":c=Math.cos(g)*(n?n/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,f=Math.sin(g)*(n?n/2:p),r.moveTo(e-c,i-s),r.lineTo(e+c,i+s),r.moveTo(e+f,i-o),r.lineTo(e-f,i+o),g+=na,c=Math.cos(g)*(n?n/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,f=Math.sin(g)*(n?n/2:p),r.moveTo(e-c,i-s),r.lineTo(e+c,i+s),r.moveTo(e+f,i-o),r.lineTo(e-f,i+o);break;case"line":o=n?n/2:Math.cos(g)*p,s=Math.sin(g)*p,r.moveTo(e-o,i-s),r.lineTo(e+o,i+s);break;case"dash":r.moveTo(e,i),r.lineTo(e+Math.cos(g)*(n?n/2:p),i+Math.sin(g)*p);break;case!1:r.closePath();break}r.fill(),t.borderWidth>0&&r.stroke()}}function Hi(r,t,e){return e=e||.5,!t||r&&r.x>t.left-e&&r.x<t.right+e&&r.y>t.top-e&&r.y<t.bottom+e}function Lv(r,t){r.save(),r.beginPath(),r.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),r.clip()}function Iv(r){r.restore()}function TN(r,t,e,i,n){if(!t)return r.lineTo(e.x,e.y);if(n==="middle"){const a=(t.x+e.x)/2;r.lineTo(a,t.y),r.lineTo(a,e.y)}else n==="after"!=!!i?r.lineTo(t.x,e.y):r.lineTo(e.x,t.y);r.lineTo(e.x,e.y)}function MN(r,t,e,i){if(!t)return r.lineTo(e.x,e.y);r.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function CN(r,t){t.translation&&r.translate(t.translation[0],t.translation[1]),It(t.rotation)||r.rotate(t.rotation),t.color&&(r.fillStyle=t.color),t.textAlign&&(r.textAlign=t.textAlign),t.textBaseline&&(r.textBaseline=t.textBaseline)}function AN(r,t,e,i,n){if(n.strikethrough||n.underline){const a=r.measureText(i),o=t-a.actualBoundingBoxLeft,s=t+a.actualBoundingBoxRight,l=e-a.actualBoundingBoxAscent,u=e+a.actualBoundingBoxDescent,h=n.strikethrough?(l+u)/2:u;r.strokeStyle=r.fillStyle,r.beginPath(),r.lineWidth=n.decorationWidth||2,r.moveTo(o,h),r.lineTo(s,h),r.stroke()}}function DN(r,t){const e=r.fillStyle;r.fillStyle=t.color,r.fillRect(t.left,t.top,t.width,t.height),r.fillStyle=e}function uo(r,t,e,i,n,a={}){const o=jt(t)?t:[t],s=a.strokeWidth>0&&a.strokeColor!=="";let l,u;for(r.save(),r.font=n.string,CN(r,a),l=0;l<o.length;++l)u=o[l],a.backdrop&&DN(r,a.backdrop),s&&(a.strokeColor&&(r.strokeStyle=a.strokeColor),It(a.strokeWidth)||(r.lineWidth=a.strokeWidth),r.strokeText(u,e,i,a.maxWidth)),r.fillText(u,e,i,a.maxWidth),AN(r,e,i,u,a),i+=Number(n.lineHeight);r.restore()}function Cu(r,t){const{x:e,y:i,w:n,h:a,radius:o}=t;r.arc(e+o.topLeft,i+o.topLeft,o.topLeft,1.5*Nt,Nt,!0),r.lineTo(e,i+a-o.bottomLeft),r.arc(e+o.bottomLeft,i+a-o.bottomLeft,o.bottomLeft,Nt,se,!0),r.lineTo(e+n-o.bottomRight,i+a),r.arc(e+n-o.bottomRight,i+a-o.bottomRight,o.bottomRight,se,0,!0),r.lineTo(e+n,i+o.topRight),r.arc(e+n-o.topRight,i+o.topRight,o.topRight,0,-se,!0),r.lineTo(e+o.topLeft,i)}const LN=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,IN=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function PN(r,t){const e=(""+r).match(LN);if(!e||e[1]==="normal")return t*1.2;switch(r=+e[2],e[3]){case"px":return r;case"%":r/=100;break}return t*r}const kN=r=>+r||0;function I0(r,t){const e={},i=Rt(t),n=i?Object.keys(t):t,a=Rt(r)?i?o=>bt(r[o],r[t[o]]):o=>r[o]:()=>r;for(const o of n)e[o]=kN(a(o));return e}function YD(r){return I0(r,{top:"y",right:"x",bottom:"y",left:"x"})}function Ja(r){return I0(r,["topLeft","topRight","bottomLeft","bottomRight"])}function ze(r){const t=YD(r);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function de(r,t){r=r||{},t=t||Jt.font;let e=bt(r.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=bt(r.style,t.style);i&&!(""+i).match(IN)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const n={family:bt(r.family,t.family),lineHeight:PN(bt(r.lineHeight,t.lineHeight),e),size:e,style:i,weight:bt(r.weight,t.weight),string:""};return n.string=SN(n),n}function Ol(r,t,e,i){let n,a,o;for(n=0,a=r.length;n<a;++n)if(o=r[n],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t)),e!==void 0&&jt(o)&&(o=o[e%o.length]),o!==void 0))return o}function RN(r,t,e){const{min:i,max:n}=r,a=RD(t,(n-i)/2),o=(s,l)=>e&&s===0?0:s+l;return{min:o(i,-Math.abs(a)),max:o(n,a)}}function Kn(r,t){return Object.assign(Object.create(r),t)}function P0(r,t=[""],e,i,n=()=>r[0]){const a=e||r;typeof i>"u"&&(i=jD("_fallback",r));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:r,_rootScopes:a,_fallback:i,_getTarget:n,override:s=>P0([s,...r],t,a,i)};return new Proxy(o,{deleteProperty(s,l){return delete s[l],delete s._keys,delete r[0][l],!0},get(s,l){return XD(s,l,()=>GN(l,t,r,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(r[0])},has(s,l){return Mb(s).includes(l)},ownKeys(s){return Mb(s)},set(s,l,u){const h=s._storage||(s._storage=n());return s[l]=h[l]=u,delete s._keys,!0}})}function xs(r,t,e,i){const n={_cacheable:!1,_proxy:r,_context:t,_subProxy:e,_stack:new Set,_descriptors:$D(r,i),setContext:a=>xs(r,a,e,i),override:a=>xs(r.override(a),t,e,i)};return new Proxy(n,{deleteProperty(a,o){return delete a[o],delete r[o],!0},get(a,o,s){return XD(a,o,()=>ON(a,o,s))},getOwnPropertyDescriptor(a,o){return a._descriptors.allKeys?Reflect.has(r,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(r,o)},getPrototypeOf(){return Reflect.getPrototypeOf(r)},has(a,o){return Reflect.has(r,o)},ownKeys(){return Reflect.ownKeys(r)},set(a,o,s){return r[o]=s,delete a[o],!0}})}function $D(r,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:n=t.allKeys}=r;return{allKeys:n,scriptable:e,indexable:i,isScriptable:Un(e)?e:()=>e,isIndexable:Un(i)?i:()=>i}}const EN=(r,t)=>r?r+M0(t):t,k0=(r,t)=>Rt(t)&&r!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function XD(r,t,e){if(Object.prototype.hasOwnProperty.call(r,t)||t==="constructor")return r[t];const i=e();return r[t]=i,i}function ON(r,t,e){const{_proxy:i,_context:n,_subProxy:a,_descriptors:o}=r;let s=i[t];return Un(s)&&o.isScriptable(t)&&(s=NN(t,s,r,e)),jt(s)&&s.length&&(s=BN(t,s,r,o.isIndexable)),k0(t,s)&&(s=xs(s,n,a&&a[t],o)),s}function NN(r,t,e,i){const{_proxy:n,_context:a,_subProxy:o,_stack:s}=e;if(s.has(r))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+r);s.add(r);let l=t(a,o||i);return s.delete(r),k0(r,l)&&(l=R0(n._scopes,n,r,l)),l}function BN(r,t,e,i){const{_proxy:n,_context:a,_subProxy:o,_descriptors:s}=e;if(typeof a.index<"u"&&i(r))return t[a.index%t.length];if(Rt(t[0])){const l=t,u=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const c=R0(u,n,r,h);t.push(xs(c,a,o&&o[r],s))}}return t}function ZD(r,t,e){return Un(r)?r(t,e):r}const zN=(r,t)=>r===!0?t:typeof r=="string"?Wn(t,r):void 0;function VN(r,t,e,i,n){for(const a of t){const o=zN(e,a);if(o){r.add(o);const s=ZD(o._fallback,e,n);if(typeof s<"u"&&s!==e&&s!==i)return s}else if(o===!1&&typeof i<"u"&&e!==i)return null}return!1}function R0(r,t,e,i){const n=t._rootScopes,a=ZD(t._fallback,e,i),o=[...r,...n],s=new Set;s.add(i);let l=Tb(s,o,e,a||e,i);return l===null||typeof a<"u"&&a!==e&&(l=Tb(s,o,a,l,i),l===null)?!1:P0(Array.from(s),[""],n,a,()=>FN(t,e,i))}function Tb(r,t,e,i,n){for(;e;)e=VN(r,t,e,i,n);return e}function FN(r,t,e){const i=r._getTarget();t in i||(i[t]={});const n=i[t];return jt(n)&&Rt(e)?e:n||{}}function GN(r,t,e,i){let n;for(const a of t)if(n=jD(EN(a,r),e),typeof n<"u")return k0(r,n)?R0(e,i,r,n):n}function jD(r,t){for(const e of t){if(!e)continue;const i=e[r];if(typeof i<"u")return i}}function Mb(r){let t=r._keys;return t||(t=r._keys=HN(r._scopes)),t}function HN(r){const t=new Set;for(const e of r)for(const i of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(i);return Array.from(t)}function qD(r,t,e,i){const{iScale:n}=r,{key:a="r"}=this._parsing,o=new Array(i);let s,l,u,h;for(s=0,l=i;s<l;++s)u=s+e,h=t[u],o[s]={r:n.parse(Wn(h,a),u)};return o}const WN=Number.EPSILON||1e-14,bs=(r,t)=>t<r.length&&!r[t].skip&&r[t],KD=r=>r==="x"?"y":"x";function UN(r,t,e,i){const n=r.skip?t:r,a=t,o=e.skip?t:e,s=dy(a,n),l=dy(o,a);let u=s/(s+l),h=l/(s+l);u=isNaN(u)?0:u,h=isNaN(h)?0:h;const c=i*u,f=i*h;return{previous:{x:a.x-c*(o.x-n.x),y:a.y-c*(o.y-n.y)},next:{x:a.x+f*(o.x-n.x),y:a.y+f*(o.y-n.y)}}}function YN(r,t,e){const i=r.length;let n,a,o,s,l,u=bs(r,0);for(let h=0;h<i-1;++h)if(l=u,u=bs(r,h+1),!(!l||!u)){if(Ql(t[h],0,WN)){e[h]=e[h+1]=0;continue}n=e[h]/t[h],a=e[h+1]/t[h],s=Math.pow(n,2)+Math.pow(a,2),!(s<=9)&&(o=3/Math.sqrt(s),e[h]=n*o*t[h],e[h+1]=a*o*t[h])}}function $N(r,t,e="x"){const i=KD(e),n=r.length;let a,o,s,l=bs(r,0);for(let u=0;u<n;++u){if(o=s,s=l,l=bs(r,u+1),!s)continue;const h=s[e],c=s[i];o&&(a=(h-o[e])/3,s[`cp1${e}`]=h-a,s[`cp1${i}`]=c-a*t[u]),l&&(a=(l[e]-h)/3,s[`cp2${e}`]=h+a,s[`cp2${i}`]=c+a*t[u])}}function XN(r,t="x"){const e=KD(t),i=r.length,n=Array(i).fill(0),a=Array(i);let o,s,l,u=bs(r,0);for(o=0;o<i;++o)if(s=l,l=u,u=bs(r,o+1),!!l){if(u){const h=u[t]-l[t];n[o]=h!==0?(u[e]-l[e])/h:0}a[o]=s?u?_i(n[o-1])!==_i(n[o])?0:(n[o-1]+n[o])/2:n[o-1]:n[o]}YN(r,n,a),$N(r,a,t)}function Oh(r,t,e){return Math.max(Math.min(r,e),t)}function ZN(r,t){let e,i,n,a,o,s=Hi(r[0],t);for(e=0,i=r.length;e<i;++e)o=a,a=s,s=e<i-1&&Hi(r[e+1],t),a&&(n=r[e],o&&(n.cp1x=Oh(n.cp1x,t.left,t.right),n.cp1y=Oh(n.cp1y,t.top,t.bottom)),s&&(n.cp2x=Oh(n.cp2x,t.left,t.right),n.cp2y=Oh(n.cp2y,t.top,t.bottom)))}function jN(r,t,e,i,n){let a,o,s,l;if(t.spanGaps&&(r=r.filter(u=>!u.skip)),t.cubicInterpolationMode==="monotone")XN(r,n);else{let u=i?r[r.length-1]:r[0];for(a=0,o=r.length;a<o;++a)s=r[a],l=UN(u,s,r[Math.min(a+1,o-(i?0:1))%o],t.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,u=s}t.capBezierPoints&&ZN(r,e)}function E0(){return typeof window<"u"&&typeof document<"u"}function O0(r){let t=r.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Mf(r,t,e){let i;return typeof r=="string"?(i=parseInt(r,10),r.indexOf("%")!==-1&&(i=i/100*t.parentNode[e])):i=r,i}const Pv=r=>r.ownerDocument.defaultView.getComputedStyle(r,null);function qN(r,t){return Pv(r).getPropertyValue(t)}const KN=["top","right","bottom","left"];function Qa(r,t,e){const i={};e=e?"-"+e:"";for(let n=0;n<4;n++){const a=KN[n];i[a]=parseFloat(r[t+"-"+a+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const JN=(r,t,e)=>(r>0||t>0)&&(!e||!e.shadowRoot);function QN(r,t){const e=r.touches,i=e&&e.length?e[0]:r,{offsetX:n,offsetY:a}=i;let o=!1,s,l;if(JN(n,a,r.target))s=n,l=a;else{const u=t.getBoundingClientRect();s=i.clientX-u.left,l=i.clientY-u.top,o=!0}return{x:s,y:l,box:o}}function ka(r,t){if("native"in r)return r;const{canvas:e,currentDevicePixelRatio:i}=t,n=Pv(e),a=n.boxSizing==="border-box",o=Qa(n,"padding"),s=Qa(n,"border","width"),{x:l,y:u,box:h}=QN(r,e),c=o.left+(h&&s.left),f=o.top+(h&&s.top);let{width:v,height:d}=t;return a&&(v-=o.width+s.width,d-=o.height+s.height),{x:Math.round((l-c)/v*e.width/i),y:Math.round((u-f)/d*e.height/i)}}function tB(r,t,e){let i,n;if(t===void 0||e===void 0){const a=r&&O0(r);if(!a)t=r.clientWidth,e=r.clientHeight;else{const o=a.getBoundingClientRect(),s=Pv(a),l=Qa(s,"border","width"),u=Qa(s,"padding");t=o.width-u.width-l.width,e=o.height-u.height-l.height,i=Mf(s.maxWidth,a,"clientWidth"),n=Mf(s.maxHeight,a,"clientHeight")}}return{width:t,height:e,maxWidth:i||wf,maxHeight:n||wf}}const wn=r=>Math.round(r*10)/10;function eB(r,t,e,i){const n=Pv(r),a=Qa(n,"margin"),o=Mf(n.maxWidth,r,"clientWidth")||wf,s=Mf(n.maxHeight,r,"clientHeight")||wf,l=tB(r,t,e);let{width:u,height:h}=l;if(n.boxSizing==="content-box"){const f=Qa(n,"border","width"),v=Qa(n,"padding");u-=v.width+f.width,h-=v.height+f.height}return u=Math.max(0,u-a.width),h=Math.max(0,i?u/i:h-a.height),u=wn(Math.min(u,o,l.maxWidth)),h=wn(Math.min(h,s,l.maxHeight)),u&&!h&&(h=wn(u/2)),(t!==void 0||e!==void 0)&&i&&l.height&&h>l.height&&(h=l.height,u=wn(Math.floor(h*i))),{width:u,height:h}}function Cb(r,t,e){const i=t||1,n=wn(r.height*i),a=wn(r.width*i);r.height=wn(r.height),r.width=wn(r.width);const o=r.canvas;return o.style&&(e||!o.style.height&&!o.style.width)&&(o.style.height=`${r.height}px`,o.style.width=`${r.width}px`),r.currentDevicePixelRatio!==i||o.height!==n||o.width!==a?(r.currentDevicePixelRatio=i,o.height=n,o.width=a,r.ctx.setTransform(i,0,0,i,0,0),!0):!1}const rB=function(){let r=!1;try{const t={get passive(){return r=!0,!1}};E0()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return r}();function Ab(r,t){const e=qN(r,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Ra(r,t,e,i){return{x:r.x+e*(t.x-r.x),y:r.y+e*(t.y-r.y)}}function iB(r,t,e,i){return{x:r.x+e*(t.x-r.x),y:i==="middle"?e<.5?r.y:t.y:i==="after"?e<1?r.y:t.y:e>0?t.y:r.y}}function nB(r,t,e,i){const n={x:r.cp2x,y:r.cp2y},a={x:t.cp1x,y:t.cp1y},o=Ra(r,n,e),s=Ra(n,a,e),l=Ra(a,t,e),u=Ra(o,s,e),h=Ra(s,l,e);return Ra(u,h,e)}const aB=function(r,t){return{x(e){return r+r+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},oB=function(){return{x(r){return r},setWidth(r){},textAlign(r){return r},xPlus(r,t){return r+t},leftForLtr(r,t){return r}}};function us(r,t,e){return r?aB(t,e):oB()}function JD(r,t){let e,i;(t==="ltr"||t==="rtl")&&(e=r.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),r.prevTextDirection=i)}function QD(r,t){t!==void 0&&(delete r.prevTextDirection,r.canvas.style.setProperty("direction",t[0],t[1]))}function tL(r){return r==="angle"?{between:Mu,compare:sN,normalize:Ee}:{between:Fi,compare:(t,e)=>t-e,normalize:t=>t}}function Db({start:r,end:t,count:e,loop:i,style:n}){return{start:r%e,end:t%e,loop:i&&(t-r+1)%e===0,style:n}}function sB(r,t,e){const{property:i,start:n,end:a}=e,{between:o,normalize:s}=tL(i),l=t.length;let{start:u,end:h,loop:c}=r,f,v;if(c){for(u+=l,h+=l,f=0,v=l;f<v&&o(s(t[u%l][i]),n,a);++f)u--,h--;u%=l,h%=l}return h<u&&(h+=l),{start:u,end:h,loop:c,style:r.style}}function eL(r,t,e){if(!e)return[r];const{property:i,start:n,end:a}=e,o=t.length,{compare:s,between:l,normalize:u}=tL(i),{start:h,end:c,loop:f,style:v}=sB(r,t,e),d=[];let p=!1,g=null,y,m,_;const x=()=>l(n,_,y)&&s(n,_)!==0,b=()=>s(a,y)===0||l(a,_,y),S=()=>p||x(),w=()=>!p||b();for(let T=h,M=h;T<=c;++T)m=t[T%o],!m.skip&&(y=u(m[i]),y!==_&&(p=l(y,n,a),g===null&&S()&&(g=s(y,n)===0?T:M),g!==null&&w()&&(d.push(Db({start:g,end:T,loop:f,count:o,style:v})),g=null),M=T,_=y));return g!==null&&d.push(Db({start:g,end:c,loop:f,count:o,style:v})),d}function rL(r,t){const e=[],i=r.segments;for(let n=0;n<i.length;n++){const a=eL(i[n],r.points,t);a.length&&e.push(...a)}return e}function lB(r,t,e,i){let n=0,a=t-1;if(e&&!i)for(;n<t&&!r[n].skip;)n++;for(;n<t&&r[n].skip;)n++;for(n%=t,e&&(a+=n);a>n&&r[a%t].skip;)a--;return a%=t,{start:n,end:a}}function uB(r,t,e,i){const n=r.length,a=[];let o=t,s=r[t],l;for(l=t+1;l<=e;++l){const u=r[l%n];u.skip||u.stop?s.skip||(i=!1,a.push({start:t%n,end:(l-1)%n,loop:i}),t=o=u.stop?l:null):(o=l,s.skip&&(t=l)),s=u}return o!==null&&a.push({start:t%n,end:o%n,loop:i}),a}function hB(r,t){const e=r.points,i=r.options.spanGaps,n=e.length;if(!n)return[];const a=!!r._loop,{start:o,end:s}=lB(e,n,a,i);if(i===!0)return Lb(r,[{start:o,end:s,loop:a}],e,t);const l=s<o?s+n:s,u=!!r._fullLoop&&o===0&&s===n-1;return Lb(r,uB(e,o,l,u),e,t)}function Lb(r,t,e,i){return!i||!i.setContext||!e?t:cB(r,t,e,i)}function cB(r,t,e,i){const n=r._chart.getContext(),a=Ib(r.options),{_datasetIndex:o,options:{spanGaps:s}}=r,l=e.length,u=[];let h=a,c=t[0].start,f=c;function v(d,p,g,y){const m=s?-1:1;if(d!==p){for(d+=l;e[d%l].skip;)d-=m;for(;e[p%l].skip;)p+=m;d%l!==p%l&&(u.push({start:d%l,end:p%l,loop:g,style:y}),h=y,c=p%l)}}for(const d of t){c=s?c:d.start;let p=e[c%l],g;for(f=c+1;f<=d.end;f++){const y=e[f%l];g=Ib(i.setContext(Kn(n,{type:"segment",p0:p,p1:y,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:o}))),fB(g,h)&&v(c,f-1,d.loop,h),p=y,h=g}c<f-1&&v(c,f-1,d.loop,h)}return u}function Ib(r){return{backgroundColor:r.backgroundColor,borderCapStyle:r.borderCapStyle,borderDash:r.borderDash,borderDashOffset:r.borderDashOffset,borderJoinStyle:r.borderJoinStyle,borderWidth:r.borderWidth,borderColor:r.borderColor}}function fB(r,t){if(!t)return!1;const e=[],i=function(n,a){return L0(a)?(e.includes(a)||e.push(a),e.indexOf(a)):a};return JSON.stringify(r,i)!==JSON.stringify(t,i)}function Nh(r,t,e){return r.options.clip?r[e]:t[e]}function vB(r,t){const{xScale:e,yScale:i}=r;return e&&i?{left:Nh(e,t,"left"),right:Nh(e,t,"right"),top:Nh(i,t,"top"),bottom:Nh(i,t,"bottom")}:t}function iL(r,t){const e=t._clip;if(e.disabled)return!1;const i=vB(t,r.chartArea);return{left:e.left===!1?0:i.left-(e.left===!0?0:e.left),right:e.right===!1?r.width:i.right+(e.right===!0?0:e.right),top:e.top===!1?0:i.top-(e.top===!0?0:e.top),bottom:e.bottom===!1?r.height:i.bottom+(e.bottom===!0?0:e.bottom)}}/*!
|
||
* Chart.js v4.5.1
|
||
* https://www.chartjs.org
|
||
* (c) 2025 Chart.js Contributors
|
||
* Released under the MIT License
|
||
*/let dB=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const a=e.listeners[n],o=e.duration;a.forEach(s=>s({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=VD.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const a=i.items;let o=a.length-1,s=!1,l;for(;o>=0;--o)l=a[o],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),s=!0):(a[o]=a[a.length-1],a.pop());s&&(n.draw(),this._notify(n,i,t,"progress")),a.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=a.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,n)=>Math.max(i,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};var Oi=new dB;const Pb="transparent",pB={boolean(r,t,e){return e>.5?t:r},color(r,t,e){const i=bb(r||Pb),n=i.valid&&bb(t||Pb);return n&&n.valid?n.mix(i,e).hexString():t},number(r,t,e){return r+(t-r)*e}};let gB=class{constructor(t,e,i,n){const a=e[i];n=Ol([t.to,n,a,t.from]);const o=Ol([t.from,a,n]);this._active=!0,this._fn=t.fn||pB[t.type||typeof o],this._easing=tu[t.easing]||tu.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],a=i-this._start,o=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=Ol([t.to,e,n,t.from]),this._from=Ol([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,a=this._from,o=this._loop,s=this._to;let l;if(this._active=a!==s&&(o||e<i),!this._active){this._target[n]=s,this._notify(!0);return}if(e<0){this._target[n]=a;return}l=e/i%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(a,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let n=0;n<i.length;n++)i[n][e]()}};class nL{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!Rt(t))return;const e=Object.keys(Jt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const a=t[n];if(!Rt(a))return;const o={};for(const s of e)o[s]=a[s];(jt(a.properties)&&a.properties||[n]).forEach(s=>{(s===n||!i.has(s))&&i.set(s,o)})})}_animateOptions(t,e){const i=e.options,n=mB(t,i);if(!n)return[];const a=this._createAnimations(n,i);return i.$shared&&yB(t.options.$animations,i).then(()=>{t.options=i},()=>{}),a}_createAnimations(t,e){const i=this._properties,n=[],a=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[u];let c=a[u];const f=i.get(u);if(c)if(f&&c.active()){c.update(f,h,s);continue}else c.cancel();if(!f||!f.duration){t[u]=h;continue}a[u]=c=new gB(f,t,u,h),n.push(c)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return Oi.add(this._chart,i),!0}}function yB(r,t){const e=[],i=Object.keys(t);for(let n=0;n<i.length;n++){const a=r[i[n]];a&&a.active()&&e.push(a.wait())}return Promise.all(e)}function mB(r,t){if(!t)return;let e=r.options;if(!e){r.options=t;return}return e.$shared&&(r.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function kb(r,t){const e=r&&r.options||{},i=e.reverse,n=e.min===void 0?t:0,a=e.max===void 0?t:0;return{start:i?a:n,end:i?n:a}}function _B(r,t,e){if(e===!1)return!1;const i=kb(r,e),n=kb(t,e);return{top:n.end,right:i.end,bottom:n.start,left:i.start}}function xB(r){let t,e,i,n;return Rt(r)?(t=r.top,e=r.right,i=r.bottom,n=r.left):t=e=i=n=r,{top:t,right:e,bottom:i,left:n,disabled:r===!1}}function aL(r,t){const e=[],i=r._getSortedDatasetMetas(t);let n,a;for(n=0,a=i.length;n<a;++n)e.push(i[n].index);return e}function Rb(r,t,e,i={}){const n=r.keys,a=i.mode==="single";let o,s,l,u;if(t===null)return;let h=!1;for(o=0,s=n.length;o<s;++o){if(l=+n[o],l===e){if(h=!0,i.all)continue;break}u=r.values[l],ne(u)&&(a||t===0||_i(t)===_i(u))&&(t+=u)}return!h&&!i.all?0:t}function bB(r,t){const{iScale:e,vScale:i}=t,n=e.axis==="x"?"x":"y",a=i.axis==="x"?"x":"y",o=Object.keys(r),s=new Array(o.length);let l,u,h;for(l=0,u=o.length;l<u;++l)h=o[l],s[l]={[n]:h,[a]:r[h]};return s}function Rd(r,t){const e=r&&r.options.stacked;return e||e===void 0&&t.stack!==void 0}function SB(r,t,e){return`${r.id}.${t.id}.${e.stack||e.type}`}function wB(r){const{min:t,max:e,minDefined:i,maxDefined:n}=r.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:n?e:Number.POSITIVE_INFINITY}}function TB(r,t,e){const i=r[t]||(r[t]={});return i[e]||(i[e]={})}function Eb(r,t,e,i){for(const n of t.getMatchingVisibleMetas(i).reverse()){const a=r[n.index];if(e&&a>0||!e&&a<0)return n.index}return null}function Ob(r,t){const{chart:e,_cachedMeta:i}=r,n=e._stacks||(e._stacks={}),{iScale:a,vScale:o,index:s}=i,l=a.axis,u=o.axis,h=SB(a,o,i),c=t.length;let f;for(let v=0;v<c;++v){const d=t[v],{[l]:p,[u]:g}=d,y=d._stacks||(d._stacks={});f=y[u]=TB(n,h,p),f[s]=g,f._top=Eb(f,o,!0,i.type),f._bottom=Eb(f,o,!1,i.type);const m=f._visualValues||(f._visualValues={});m[s]=g}}function Ed(r,t){const e=r.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function MB(r,t){return Kn(r,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function CB(r,t,e){return Kn(r,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function tl(r,t){const e=r.controller.index,i=r.vScale&&r.vScale.axis;if(i){t=t||r._parsed;for(const n of t){const a=n._stacks;if(!a||a[i]===void 0||a[i][e]===void 0)return;delete a[i][e],a[i]._visualValues!==void 0&&a[i]._visualValues[e]!==void 0&&delete a[i]._visualValues[e]}}}const Od=r=>r==="reset"||r==="none",Nb=(r,t)=>t?r:Object.assign({},r),AB=(r,t,e)=>r&&!t.hidden&&t._stacked&&{keys:aL(e,!0),values:null};class Zr{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Rd(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&tl(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(c,f,v,d)=>c==="x"?f:c==="r"?d:v,a=e.xAxisID=bt(i.xAxisID,Ed(t,"x")),o=e.yAxisID=bt(i.yAxisID,Ed(t,"y")),s=e.rAxisID=bt(i.rAxisID,Ed(t,"r")),l=e.indexAxis,u=e.iAxisID=n(l,a,o,s),h=e.vAxisID=n(l,o,a,s);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(u),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&mb(this._data,this),t._stacked&&tl(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(Rt(e)){const n=this._cachedMeta;this._data=bB(e,n)}else if(i!==e){if(i){mb(i,this);const n=this._cachedMeta;tl(n),n._parsed=[]}e&&Object.isExtensible(e)&&cN(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const a=e._stacked;e._stacked=Rd(e.vScale,e),e.stack!==i.stack&&(n=!0,tl(e),e.stack=i.stack),this._resyncElements(t),(n||a!==e._stacked)&&(Ob(this,e._parsed),e._stacked=Rd(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:a,_stacked:o}=i,s=a.axis;let l=t===0&&e===n.length?!0:i._sorted,u=t>0&&i._parsed[t-1],h,c,f;if(this._parsing===!1)i._parsed=n,i._sorted=!0,f=n;else{jt(n[t])?f=this.parseArrayData(i,n,t,e):Rt(n[t])?f=this.parseObjectData(i,n,t,e):f=this.parsePrimitiveData(i,n,t,e);const v=()=>c[s]===null||u&&c[s]<u[s];for(h=0;h<e;++h)i._parsed[h+t]=c=f[h],l&&(v()&&(l=!1),u=c);i._sorted=l}o&&Ob(this,f)}parsePrimitiveData(t,e,i,n){const{iScale:a,vScale:o}=t,s=a.axis,l=o.axis,u=a.getLabels(),h=a===o,c=new Array(n);let f,v,d;for(f=0,v=n;f<v;++f)d=f+i,c[f]={[s]:h||a.parse(u[d],d),[l]:o.parse(e[d],d)};return c}parseArrayData(t,e,i,n){const{xScale:a,yScale:o}=t,s=new Array(n);let l,u,h,c;for(l=0,u=n;l<u;++l)h=l+i,c=e[h],s[l]={x:a.parse(c[0],h),y:o.parse(c[1],h)};return s}parseObjectData(t,e,i,n){const{xScale:a,yScale:o}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=new Array(n);let h,c,f,v;for(h=0,c=n;h<c;++h)f=h+i,v=e[f],u[h]={x:a.parse(Wn(v,s),f),y:o.parse(Wn(v,l),f)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,a=this._cachedMeta,o=e[t.axis],s={keys:aL(n,!0),values:e._stacks[t.axis]._visualValues};return Rb(s,o,a.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const a=i[e.axis];let o=a===null?NaN:a;const s=n&&i._stacks[e.axis];n&&s&&(n.values=s,o=Rb(n,a,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const i=this._cachedMeta,n=i._parsed,a=i._sorted&&t===i.iScale,o=n.length,s=this._getOtherScale(t),l=AB(e,i,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=wB(s);let f,v;function d(){v=n[f];const p=v[s.axis];return!ne(v[t.axis])||h>p||c<p}for(f=0;f<o&&!(!d()&&(this.updateRangeFromParsed(u,t,v,l),a));++f);if(a){for(f=o-1;f>=0;--f)if(!d()){this.updateRangeFromParsed(u,t,v,l);break}}return u}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,a,o;for(n=0,a=e.length;n<a;++n)o=e[n][t.axis],ne(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,a=this.getParsed(t);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:n?""+n.getLabelForValue(a[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=xB(bt(this.options.clip,_B(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],a=e.chartArea,o=[],s=this._drawStart||0,l=this._drawCount||n.length-s,u=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,a,s,l),h=s;h<s+l;++h){const c=n[h];c.hidden||(c.active&&u?o.push(c):c.draw(t,a))}for(h=0;h<o.length;++h)o[h].draw(t,a)}getStyle(t,e){const i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];a=o.$context||(o.$context=CB(this.getContext(),t,o)),a.parsed=this.getParsed(t),a.raw=n.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=MB(this.chart.getContext(),this.index)),a.dataset=n,a.index=a.datasetIndex=this.index;return a.active=!!e,a.mode=i,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n=e==="active",a=this._cachedDataOpts,o=t+"-"+e,s=a[o],l=this.enableOptionSharing&&Tu(i);if(s)return Nb(s,l);const u=this.chart.config,h=u.datasetElementScopeKeys(this._type,t),c=n?[`${t}Hover`,"hover",t,""]:[t,""],f=u.getOptionScopes(this.getDataset(),h),v=Object.keys(Jt.elements[t]),d=()=>this.getContext(i,n,e),p=u.resolveNamedOptions(f,v,d,c);return p.$shared&&(p.$shared=l,a[o]=Object.freeze(Nb(p,l))),p}_resolveAnimations(t,e,i){const n=this.chart,a=this._cachedDataOpts,o=`animation-${e}`,s=a[o];if(s)return s;let l;if(n.options.animation!==!1){const h=this.chart.config,c=h.datasetAnimationScopeKeys(this._type,e),f=h.getOptionScopes(this.getDataset(),c);l=h.createResolver(f,this.getContext(t,i,e))}const u=new nL(n,l&&l.animations);return l&&l._cacheable&&(a[o]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Od(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,a=this.getSharedOptions(i),o=this.includeOptions(e,a)||a!==n;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:o}}updateElement(t,e,i,n){Od(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Od(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const a=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[s,l,u]of this._syncList)this[s](l,u);this._syncList=[];const n=i.length,a=e.length,o=Math.min(a,n);o&&this.parse(0,o),a>n?this._insertElements(n,a-n,t):a<n&&this._removeElements(a,n-a)}_insertElements(t,e,i=!0){const n=this._cachedMeta,a=n.data,o=t+e;let s;const l=u=>{for(u.length+=e,s=u.length-1;s>=o;s--)u[s]=u[s-e]};for(l(a),s=t;s<o;++s)a[s]=new this.dataElementType;this._parsing&&l(n._parsed),this.parse(t,e),i&&this.updateElements(a,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&tl(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}j(Zr,"defaults",{}),j(Zr,"datasetElementType",null),j(Zr,"dataElementType",null);function DB(r,t){if(!r._cache.$bar){const e=r.getMatchingVisibleMetas(t);let i=[];for(let n=0,a=e.length;n<a;n++)i=i.concat(e[n].controller.getAllParsedValues(r));r._cache.$bar=zD(i.sort((n,a)=>n-a))}return r._cache.$bar}function LB(r){const t=r.iScale,e=DB(t,r.type);let i=t._length,n,a,o,s;const l=()=>{o===32767||o===-32768||(Tu(s)&&(i=Math.min(i,Math.abs(o-s)||i)),s=o)};for(n=0,a=e.length;n<a;++n)o=t.getPixelForValue(e[n]),l();for(s=void 0,n=0,a=t.ticks.length;n<a;++n)o=t.getPixelForTick(n),l();return i}function IB(r,t,e,i){const n=e.barThickness;let a,o;return It(n)?(a=t.min*e.categoryPercentage,o=e.barPercentage):(a=n*i,o=1),{chunk:a/i,ratio:o,start:t.pixels[r]-a/2}}function PB(r,t,e,i){const n=t.pixels,a=n[r];let o=r>0?n[r-1]:null,s=r<n.length-1?n[r+1]:null;const l=e.categoryPercentage;o===null&&(o=a-(s===null?t.end-t.start:s-a)),s===null&&(s=a+a-o);const u=a-(a-Math.min(o,s))/2*l;return{chunk:Math.abs(s-o)/2*l/i,ratio:e.barPercentage,start:u}}function kB(r,t,e,i){const n=e.parse(r[0],i),a=e.parse(r[1],i),o=Math.min(n,a),s=Math.max(n,a);let l=o,u=s;Math.abs(o)>Math.abs(s)&&(l=s,u=o),t[e.axis]=u,t._custom={barStart:l,barEnd:u,start:n,end:a,min:o,max:s}}function oL(r,t,e,i){return jt(r)?kB(r,t,e,i):t[e.axis]=e.parse(r,i),t}function Bb(r,t,e,i){const n=r.iScale,a=r.vScale,o=n.getLabels(),s=n===a,l=[];let u,h,c,f;for(u=e,h=e+i;u<h;++u)f=t[u],c={},c[n.axis]=s||n.parse(o[u],u),l.push(oL(f,c,a,u));return l}function Nd(r){return r&&r.barStart!==void 0&&r.barEnd!==void 0}function RB(r,t,e){return r!==0?_i(r):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function EB(r){let t,e,i,n,a;return r.horizontal?(t=r.base>r.x,e="left",i="right"):(t=r.base<r.y,e="bottom",i="top"),t?(n="end",a="start"):(n="start",a="end"),{start:e,end:i,reverse:t,top:n,bottom:a}}function OB(r,t,e,i){let n=t.borderSkipped;const a={};if(!n){r.borderSkipped=a;return}if(n===!0){r.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:s,reverse:l,top:u,bottom:h}=EB(r);n==="middle"&&e&&(r.enableBorderRadius=!0,(e._top||0)===i?n=u:(e._bottom||0)===i?n=h:(a[zb(h,o,s,l)]=!0,n=u)),a[zb(n,o,s,l)]=!0,r.borderSkipped=a}function zb(r,t,e,i){return i?(r=NB(r,t,e),r=Vb(r,e,t)):r=Vb(r,t,e),r}function NB(r,t,e){return r===t?e:r===e?t:r}function Vb(r,t,e){return r==="start"?t:r==="end"?e:r}function BB(r,{inflateAmount:t},e){r.inflateAmount=t==="auto"?e===1?.33:0:t}class ru extends Zr{parsePrimitiveData(t,e,i,n){return Bb(t,e,i,n)}parseArrayData(t,e,i,n){return Bb(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:a,vScale:o}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=a.axis==="x"?s:l,h=o.axis==="x"?s:l,c=[];let f,v,d,p;for(f=i,v=i+n;f<v;++f)p=e[f],d={},d[a.axis]=a.parse(Wn(p,u),f),c.push(oL(Wn(p,h),d,o,f));return c}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const a=i._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,a=this.getParsed(t),o=a._custom,s=Nd(o)?"["+o.start+", "+o.end+"]":""+n.getLabelForValue(a[n.axis]);return{label:""+i.getLabelForValue(a[i.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const a=n==="reset",{index:o,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),u=s.isHorizontal(),h=this._getRuler(),{sharedOptions:c,includeOptions:f}=this._getSharedOptions(e,n);for(let v=e;v<e+i;v++){const d=this.getParsed(v),p=a||It(d[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(v),g=this._calculateBarIndexPixels(v,h),y=(d._stacks||{})[s.axis],m={horizontal:u,base:p.base,enableBorderRadius:!y||Nd(d._custom)||o===y._top||o===y._bottom,x:u?p.head:g.center,y:u?g.center:p.head,height:u?g.size:Math.abs(p.size),width:u?Math.abs(p.size):g.size};f&&(m.options=c||this.resolveDataElementOptions(v,t[v].active?"active":n));const _=m.options||t[v].options;OB(m,_,y,o),BB(m,_,h.ratio),this.updateElement(t[v],v,m,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),a=i.options.stacked,o=[],s=this._cachedMeta.controller.getParsed(e),l=s&&s[i.axis],u=h=>{const c=h._parsed.find(v=>v[i.axis]===l),f=c&&c[h.vScale.axis];if(It(f)||isNaN(f))return!0};for(const h of n)if(!(e!==void 0&&u(h))&&((a===!1||o.indexOf(h.stack)===-1||a===void 0&&h.stack===void 0)&&o.push(h.stack),h.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(i=>t[i].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[bt(this.chart.options.indexAxis==="x"?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){const n=this._getStacks(t,i),a=e!==void 0?n.indexOf(e):-1;return a===-1?n.length-1:a}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let a,o;for(a=0,o=e.data.length;a<o;++a)n.push(i.getPixelForValue(this.getParsed(a)[i.axis],a));const s=t.barThickness;return{min:s||LB(e),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:n},options:{base:a,minBarLength:o}}=this,s=a||0,l=this.getParsed(t),u=l._custom,h=Nd(u);let c=l[e.axis],f=0,v=i?this.applyStack(e,l,i):c,d,p;v!==c&&(f=v-c,v=c),h&&(c=u.barStart,v=u.barEnd-u.barStart,c!==0&&_i(c)!==_i(u.barEnd)&&(f=0),f+=c);const g=!It(a)&&!h?a:f;let y=e.getPixelForValue(g);if(this.chart.getDataVisibility(t)?d=e.getPixelForValue(f+v):d=y,p=d-y,Math.abs(p)<o){p=RB(p,e,s)*o,c===s&&(y-=p/2);const m=e.getPixelForDecimal(0),_=e.getPixelForDecimal(1),x=Math.min(m,_),b=Math.max(m,_);y=Math.max(Math.min(y,b),x),d=y+p,i&&!h&&(l._stacks[e.axis]._visualValues[n]=e.getValueForPixel(d)-e.getValueForPixel(y))}if(y===e.getPixelForValue(s)){const m=_i(p)*e.getLineWidthForValue(s)/2;y+=m,p-=m}return{size:p,base:y,head:d,center:d+p/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,a=n.skipNull,o=bt(n.maxBarThickness,1/0);let s,l;const u=this._getAxisCount();if(e.grouped){const h=a?this._getStackCount(t):e.stackCount,c=n.barThickness==="flex"?PB(t,e,n,h*u):IB(t,e,n,h*u),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,v=this._getAxis().indexOf(bt(f,this.getFirstScaleIdForIndexAxis())),d=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0)+v;s=c.start+c.chunk*d+c.chunk/2,l=Math.min(o,c.chunk*c.ratio)}else s=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(o,e.min*e.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let a=0;for(;a<n;++a)this.getParsed(a)[e.axis]!==null&&!i[a].hidden&&i[a].draw(this._ctx)}}j(ru,"id","bar"),j(ru,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),j(ru,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Zc extends Zr{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,n){const a=super.parsePrimitiveData(t,e,i,n);for(let o=0;o<a.length;o++)a[o]._custom=this.resolveDataElementOptions(o+i).radius;return a}parseArrayData(t,e,i,n){const a=super.parseArrayData(t,e,i,n);for(let o=0;o<a.length;o++){const s=e[i+o];a[o]._custom=bt(s[2],this.resolveDataElementOptions(o+i).radius)}return a}parseObjectData(t,e,i,n){const a=super.parseObjectData(t,e,i,n);for(let o=0;o<a.length;o++){const s=e[i+o];a[o]._custom=bt(s&&s.r&&+s.r,this.resolveDataElementOptions(o+i).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:a}=e,o=this.getParsed(t),s=n.getLabelForValue(o.x),l=a.getLabelForValue(o.y),u=o._custom;return{label:i[t]||"",value:"("+s+", "+l+(u?", "+u:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const a=n==="reset",{iScale:o,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(e,n),h=o.axis,c=s.axis;for(let f=e;f<e+i;f++){const v=t[f],d=!a&&this.getParsed(f),p={},g=p[h]=a?o.getPixelForDecimal(.5):o.getPixelForValue(d[h]),y=p[c]=a?s.getBasePixel():s.getPixelForValue(d[c]);p.skip=isNaN(g)||isNaN(y),u&&(p.options=l||this.resolveDataElementOptions(f,v.active?"active":n),a&&(p.options.radius=0)),this.updateElement(v,f,p,n)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const a=n.radius;return e!=="active"&&(n.radius=0),n.radius+=bt(i&&i._custom,a),n}}j(Zc,"id","bubble"),j(Zc,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),j(Zc,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function zB(r,t,e){let i=1,n=1,a=0,o=0;if(t<qt){const s=r,l=s+t,u=Math.cos(s),h=Math.sin(s),c=Math.cos(l),f=Math.sin(l),v=(_,x,b)=>Mu(_,s,l,!0)?1:Math.max(x,x*e,b,b*e),d=(_,x,b)=>Mu(_,s,l,!0)?-1:Math.min(x,x*e,b,b*e),p=v(0,u,c),g=v(se,h,f),y=d(Nt,u,c),m=d(Nt+se,h,f);i=(p-y)/2,n=(g-m)/2,a=-(p+y)/2,o=-(g+m)/2}return{ratioX:i,ratioY:n,offsetX:a,offsetY:o}}class Tn extends Zr{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=i;else{let a=l=>+i[l];if(Rt(i[t])){const{key:l="value"}=this._parsing;a=u=>+Wn(i[u],l)}let o,s;for(o=t,s=t+e;o<s;++o)n._parsed[o]=a(o)}}_getRotation(){return Yr(this.options.rotation-90)}_getCircumference(){return Yr(this.options.circumference)}_getRotationExtents(){let t=qt,e=-qt;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const n=this.chart.getDatasetMeta(i).controller,a=n._getRotation(),o=n._getCircumference();t=Math.min(t,a),e=Math.max(e,a+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,n=this._cachedMeta,a=n.data,o=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,s=Math.max((Math.min(i.width,i.height)-o)/2,0),l=Math.min(qO(this.options.cutout,s),1),u=this._getRingWeight(this.index),{circumference:h,rotation:c}=this._getRotationExtents(),{ratioX:f,ratioY:v,offsetX:d,offsetY:p}=zB(c,h,l),g=(i.width-o)/f,y=(i.height-o)/v,m=Math.max(Math.min(g,y)/2,0),_=RD(this.options.radius,m),x=Math.max(_*l,0),b=(_-x)/this._getVisibleDatasetWeightTotal();this.offsetX=d*_,this.offsetY=p*_,n.total=this.calculateTotal(),this.outerRadius=_-b*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-b*u,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,a=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*a/qt)}updateElements(t,e,i,n){const a=n==="reset",o=this.chart,s=o.chartArea,u=o.options.animation,h=(s.left+s.right)/2,c=(s.top+s.bottom)/2,f=a&&u.animateScale,v=f?0:this.innerRadius,d=f?0:this.outerRadius,{sharedOptions:p,includeOptions:g}=this._getSharedOptions(e,n);let y=this._getRotation(),m;for(m=0;m<e;++m)y+=this._circumference(m,a);for(m=e;m<e+i;++m){const _=this._circumference(m,a),x=t[m],b={x:h+this.offsetX,y:c+this.offsetY,startAngle:y,endAngle:y+_,circumference:_,outerRadius:d,innerRadius:v};g&&(b.options=p||this.resolveDataElementOptions(m,x.active?"active":n)),y+=_,this.updateElement(x,m,b,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i=0,n;for(n=0;n<e.length;n++){const a=t._parsed[n];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(n)&&!e[n].hidden&&(i+=Math.abs(a))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?qt*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=oh(e._parsed[t],i.options.locale);return{label:n[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,a,o,s,l;if(!t){for(n=0,a=i.data.datasets.length;n<a;++n)if(i.isDatasetVisible(n)){o=i.getDatasetMeta(n),t=o.data,s=o.controller;break}}if(!t)return 0;for(n=0,a=t.length;n<a;++n)l=s.resolveDataElementOptions(n),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const a=this.resolveDataElementOptions(i);e=Math.max(e,a.offset||0,a.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(bt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}j(Tn,"id","doughnut"),j(Tn,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),j(Tn,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),j(Tn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:i,textAlign:n,color:a,useBorderRadius:o,borderRadius:s}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((l,u)=>{const c=t.getDatasetMeta(0).controller.getStyle(u);return{text:l,fillStyle:c.backgroundColor,fontColor:a,hidden:!t.getDataVisibility(u),lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,textAlign:n,pointStyle:i,borderRadius:o&&(s||c.borderRadius),index:u}}):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class iu extends Zr{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:a}=e,o=this.chart._animationsDisabled;let{start:s,count:l}=GD(e,n,o);this._drawStart=s,this._drawCount=l,HD(e)&&(s=0,l=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=n;const u=this.resolveDatasetElementOptions(t);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:u},t),this.updateElements(n,s,l,t)}updateElements(t,e,i,n){const a=n==="reset",{iScale:o,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:h,includeOptions:c}=this._getSharedOptions(e,n),f=o.axis,v=s.axis,{spanGaps:d,segment:p}=this.options,g=_s(d)?d:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||n==="none",m=e+i,_=t.length;let x=e>0&&this.getParsed(e-1);for(let b=0;b<_;++b){const S=t[b],w=y?S:{};if(b<e||b>=m){w.skip=!0;continue}const T=this.getParsed(b),M=It(T[v]),C=w[f]=o.getPixelForValue(T[f],b),D=w[v]=a||M?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,T,l):T[v],b);w.skip=isNaN(C)||isNaN(D)||M,w.stop=b>0&&Math.abs(T[f]-x[f])>g,p&&(w.parsed=T,w.raw=u.data[b]),c&&(w.options=h||this.resolveDataElementOptions(b,S.active?"active":n)),y||this.updateElement(S,b,w,n),x=T}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const a=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}j(iu,"id","line"),j(iu,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),j(iu,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class nu extends Zr{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=oh(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:a}}parseObjectData(t,e,i,n){return qD.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,n)=>{const a=this.getParsed(n).r;!isNaN(a)&&this.chart.getDataVisibility(n)&&(a<e.min&&(e.min=a),a>e.max&&(e.max=a))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(n/2,0),o=Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0),s=(a-o)/t.getVisibleDatasetCount();this.outerRadius=a-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,e,i,n){const a=n==="reset",o=this.chart,l=o.options.animation,u=this._cachedMeta.rScale,h=u.xCenter,c=u.yCenter,f=u.getIndexAngle(0)-.5*Nt;let v=f,d;const p=360/this.countVisibleElements();for(d=0;d<e;++d)v+=this._computeAngle(d,n,p);for(d=e;d<e+i;d++){const g=t[d];let y=v,m=v+this._computeAngle(d,n,p),_=o.getDataVisibility(d)?u.getDistanceFromCenterForValue(this.getParsed(d).r):0;v=m,a&&(l.animateScale&&(_=0),l.animateRotate&&(y=m=f));const x={x:h,y:c,innerRadius:0,outerRadius:_,startAngle:y,endAngle:m,options:this.resolveDataElementOptions(d,g.active?"active":n)};this.updateElement(g,d,x,n)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((i,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Yr(this.resolveDataElementOptions(t,e).angle||i):0}}j(nu,"id","polarArea"),j(nu,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),j(nu,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map((a,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:n,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Cf extends Tn{}j(Cf,"id","pie"),j(Cf,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class jc extends Zr{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,n){return qD.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],a=e.iScale.getLabels();if(i.points=n,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const s={_loop:!0,_fullLoop:a.length===n.length,options:o};this.updateElement(i,void 0,s,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const a=this._cachedMeta.rScale,o=n==="reset";for(let s=e;s<e+i;s++){const l=t[s],u=this.resolveDataElementOptions(s,l.active?"active":n),h=a.getPointPositionForValue(s,this.getParsed(s).r),c=o?a.xCenter:h.x,f=o?a.yCenter:h.y,v={x:c,y:f,angle:h.angle,skip:isNaN(c)||isNaN(f),options:u};this.updateElement(l,s,v,n)}}}j(jc,"id","radar"),j(jc,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),j(jc,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class qc extends Zr{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:a}=e,o=this.getParsed(t),s=n.getLabelForValue(o.x),l=a.getLabelForValue(o.y);return{label:i[t]||"",value:"("+s+", "+l+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,n=this.chart._animationsDisabled;let{start:a,count:o}=GD(e,i,n);if(this._drawStart=a,this._drawCount=o,HD(e)&&(a=0,o=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:s,_dataset:l}=e;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=i;const u=this.resolveDatasetElementOptions(t);u.segment=this.options.segment,this.updateElement(s,void 0,{animated:!n,options:u},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,a,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,n){const a=n==="reset",{iScale:o,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,h=this.resolveDataElementOptions(e,n),c=this.getSharedOptions(h),f=this.includeOptions(n,c),v=o.axis,d=s.axis,{spanGaps:p,segment:g}=this.options,y=_s(p)?p:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||a||n==="none";let _=e>0&&this.getParsed(e-1);for(let x=e;x<e+i;++x){const b=t[x],S=this.getParsed(x),w=m?b:{},T=It(S[d]),M=w[v]=o.getPixelForValue(S[v],x),C=w[d]=a||T?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,S,l):S[d],x);w.skip=isNaN(M)||isNaN(C)||T,w.stop=x>0&&Math.abs(S[v]-_[v])>y,g&&(w.parsed=S,w.raw=u.data[x]),f&&(w.options=c||this.resolveDataElementOptions(x,b.active?"active":n)),m||this.updateElement(b,x,w,n),_=S}this.updateSharedOptions(c,n,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let s=0;for(let l=e.length-1;l>=0;--l)s=Math.max(s,e[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const a=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,a,o)/2}}j(qc,"id","scatter"),j(qc,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),j(qc,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var VB=Object.freeze({__proto__:null,BarController:ru,BubbleController:Zc,DoughnutController:Tn,LineController:iu,PieController:Cf,PolarAreaController:nu,RadarController:jc,ScatterController:qc});function oa(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class N0{constructor(t){j(this,"options");this.options=t||{}}static override(t){Object.assign(N0.prototype,t)}init(){}formats(){return oa()}parse(){return oa()}format(){return oa()}add(){return oa()}diff(){return oa()}startOf(){return oa()}endOf(){return oa()}}var FB={_date:N0};function GB(r,t,e,i){const{controller:n,data:a,_sorted:o}=r,s=n._cachedMeta.iScale,l=r.dataset&&r.dataset.options?r.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&o&&a.length){const u=s._reversePixels?uN:Gi;if(i){if(n._sharedOptions){const h=a[0],c=typeof h.getRange=="function"&&h.getRange(t);if(c){const f=u(a,t,e-c),v=u(a,t,e+c);return{lo:f.lo,hi:v.hi}}}}else{const h=u(a,t,e);if(l){const{vScale:c}=n._cachedMeta,{_parsed:f}=r,v=f.slice(0,h.lo+1).reverse().findIndex(p=>!It(p[c.axis]));h.lo-=Math.max(0,v);const d=f.slice(h.hi).findIndex(p=>!It(p[c.axis]));h.hi+=Math.max(0,d)}return h}}return{lo:0,hi:a.length-1}}function kv(r,t,e,i,n){const a=r.getSortedVisibleDatasetMetas(),o=e[t];for(let s=0,l=a.length;s<l;++s){const{index:u,data:h}=a[s],{lo:c,hi:f}=GB(a[s],t,o,n);for(let v=c;v<=f;++v){const d=h[v];d.skip||i(d,u,v)}}}function HB(r){const t=r.indexOf("x")!==-1,e=r.indexOf("y")!==-1;return function(i,n){const a=t?Math.abs(i.x-n.x):0,o=e?Math.abs(i.y-n.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function Bd(r,t,e,i,n){const a=[];return!n&&!r.isPointInArea(t)||kv(r,e,t,function(s,l,u){!n&&!Hi(s,r.chartArea,0)||s.inRange(t.x,t.y,i)&&a.push({element:s,datasetIndex:l,index:u})},!0),a}function WB(r,t,e,i){let n=[];function a(o,s,l){const{startAngle:u,endAngle:h}=o.getProps(["startAngle","endAngle"],i),{angle:c}=ND(o,{x:t.x,y:t.y});Mu(c,u,h)&&n.push({element:o,datasetIndex:s,index:l})}return kv(r,e,t,a),n}function UB(r,t,e,i,n,a){let o=[];const s=HB(e);let l=Number.POSITIVE_INFINITY;function u(h,c,f){const v=h.inRange(t.x,t.y,n);if(i&&!v)return;const d=h.getCenterPoint(n);if(!(!!a||r.isPointInArea(d))&&!v)return;const g=s(t,d);g<l?(o=[{element:h,datasetIndex:c,index:f}],l=g):g===l&&o.push({element:h,datasetIndex:c,index:f})}return kv(r,e,t,u),o}function zd(r,t,e,i,n,a){return!a&&!r.isPointInArea(t)?[]:e==="r"&&!i?WB(r,t,e,n):UB(r,t,e,i,n,a)}function Fb(r,t,e,i,n){const a=[],o=e==="x"?"inXRange":"inYRange";let s=!1;return kv(r,e,t,(l,u,h)=>{l[o]&&l[o](t[e],n)&&(a.push({element:l,datasetIndex:u,index:h}),s=s||l.inRange(t.x,t.y,n))}),i&&!s?[]:a}var YB={modes:{index(r,t,e,i){const n=ka(t,r),a=e.axis||"x",o=e.includeInvisible||!1,s=e.intersect?Bd(r,n,a,i,o):zd(r,n,a,!1,i,o),l=[];return s.length?(r.getSortedVisibleDatasetMetas().forEach(u=>{const h=s[0].index,c=u.data[h];c&&!c.skip&&l.push({element:c,datasetIndex:u.index,index:h})}),l):[]},dataset(r,t,e,i){const n=ka(t,r),a=e.axis||"xy",o=e.includeInvisible||!1;let s=e.intersect?Bd(r,n,a,i,o):zd(r,n,a,!1,i,o);if(s.length>0){const l=s[0].datasetIndex,u=r.getDatasetMeta(l).data;s=[];for(let h=0;h<u.length;++h)s.push({element:u[h],datasetIndex:l,index:h})}return s},point(r,t,e,i){const n=ka(t,r),a=e.axis||"xy",o=e.includeInvisible||!1;return Bd(r,n,a,i,o)},nearest(r,t,e,i){const n=ka(t,r),a=e.axis||"xy",o=e.includeInvisible||!1;return zd(r,n,a,e.intersect,i,o)},x(r,t,e,i){const n=ka(t,r);return Fb(r,n,"x",e.intersect,i)},y(r,t,e,i){const n=ka(t,r);return Fb(r,n,"y",e.intersect,i)}}};const sL=["left","top","right","bottom"];function el(r,t){return r.filter(e=>e.pos===t)}function Gb(r,t){return r.filter(e=>sL.indexOf(e.pos)===-1&&e.box.axis===t)}function rl(r,t){return r.sort((e,i)=>{const n=t?i:e,a=t?e:i;return n.weight===a.weight?n.index-a.index:n.weight-a.weight})}function $B(r){const t=[];let e,i,n,a,o,s;for(e=0,i=(r||[]).length;e<i;++e)n=r[e],{position:a,options:{stack:o,stackWeight:s=1}}=n,t.push({index:e,box:n,pos:a,horizontal:n.isHorizontal(),weight:n.weight,stack:o&&a+o,stackWeight:s});return t}function XB(r){const t={};for(const e of r){const{stack:i,pos:n,stackWeight:a}=e;if(!i||!sL.includes(n))continue;const o=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=a}return t}function ZB(r,t){const e=XB(r),{vBoxMaxWidth:i,hBoxMaxHeight:n}=t;let a,o,s;for(a=0,o=r.length;a<o;++a){s=r[a];const{fullSize:l}=s.box,u=e[s.stack],h=u&&s.stackWeight/u.weight;s.horizontal?(s.width=h?h*i:l&&t.availableWidth,s.height=n):(s.width=i,s.height=h?h*n:l&&t.availableHeight)}return e}function jB(r){const t=$B(r),e=rl(t.filter(u=>u.box.fullSize),!0),i=rl(el(t,"left"),!0),n=rl(el(t,"right")),a=rl(el(t,"top"),!0),o=rl(el(t,"bottom")),s=Gb(t,"x"),l=Gb(t,"y");return{fullSize:e,leftAndTop:i.concat(a),rightAndBottom:n.concat(l).concat(o).concat(s),chartArea:el(t,"chartArea"),vertical:i.concat(n).concat(l),horizontal:a.concat(o).concat(s)}}function Hb(r,t,e,i){return Math.max(r[e],t[e])+Math.max(r[i],t[i])}function lL(r,t){r.top=Math.max(r.top,t.top),r.left=Math.max(r.left,t.left),r.bottom=Math.max(r.bottom,t.bottom),r.right=Math.max(r.right,t.right)}function qB(r,t,e,i){const{pos:n,box:a}=e,o=r.maxPadding;if(!Rt(n)){e.size&&(r[n]-=e.size);const c=i[e.stack]||{size:0,count:1};c.size=Math.max(c.size,e.horizontal?a.height:a.width),e.size=c.size/c.count,r[n]+=e.size}a.getPadding&&lL(o,a.getPadding());const s=Math.max(0,t.outerWidth-Hb(o,r,"left","right")),l=Math.max(0,t.outerHeight-Hb(o,r,"top","bottom")),u=s!==r.w,h=l!==r.h;return r.w=s,r.h=l,e.horizontal?{same:u,other:h}:{same:h,other:u}}function KB(r){const t=r.maxPadding;function e(i){const n=Math.max(t[i]-r[i],0);return r[i]+=n,n}r.y+=e("top"),r.x+=e("left"),e("right"),e("bottom")}function JB(r,t){const e=t.maxPadding;function i(n){const a={left:0,top:0,right:0,bottom:0};return n.forEach(o=>{a[o]=Math.max(t[o],e[o])}),a}return i(r?["left","right"]:["top","bottom"])}function Nl(r,t,e,i){const n=[];let a,o,s,l,u,h;for(a=0,o=r.length,u=0;a<o;++a){s=r[a],l=s.box,l.update(s.width||t.w,s.height||t.h,JB(s.horizontal,t));const{same:c,other:f}=qB(t,e,s,i);u|=c&&n.length,h=h||f,l.fullSize||n.push(s)}return u&&Nl(n,t,e,i)||h}function Bh(r,t,e,i,n){r.top=e,r.left=t,r.right=t+i,r.bottom=e+n,r.width=i,r.height=n}function Wb(r,t,e,i){const n=e.padding;let{x:a,y:o}=t;for(const s of r){const l=s.box,u=i[s.stack]||{placed:0,weight:1},h=s.stackWeight/u.weight||1;if(s.horizontal){const c=t.w*h,f=u.size||l.height;Tu(u.start)&&(o=u.start),l.fullSize?Bh(l,n.left,o,e.outerWidth-n.right-n.left,f):Bh(l,t.left+u.placed,o,c,f),u.start=o,u.placed+=c,o=l.bottom}else{const c=t.h*h,f=u.size||l.width;Tu(u.start)&&(a=u.start),l.fullSize?Bh(l,a,n.top,f,e.outerHeight-n.bottom-n.top):Bh(l,a,t.top+u.placed,f,c),u.start=a,u.placed+=c,a=l.right}}t.x=a,t.y=o}var Ne={addBox(r,t){r.boxes||(r.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},r.boxes.push(t)},removeBox(r,t){const e=r.boxes?r.boxes.indexOf(t):-1;e!==-1&&r.boxes.splice(e,1)},configure(r,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(r,t,e,i){if(!r)return;const n=ze(r.options.layout.padding),a=Math.max(t-n.width,0),o=Math.max(e-n.height,0),s=jB(r.boxes),l=s.vertical,u=s.horizontal;Wt(r.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const h=l.reduce((p,g)=>g.box.options&&g.box.options.display===!1?p:p+1,0)||1,c=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/h,hBoxMaxHeight:o/2}),f=Object.assign({},n);lL(f,ze(i));const v=Object.assign({maxPadding:f,w:a,h:o,x:n.left,y:n.top},n),d=ZB(l.concat(u),c);Nl(s.fullSize,v,c,d),Nl(l,v,c,d),Nl(u,v,c,d)&&Nl(l,v,c,d),KB(v),Wb(s.leftAndTop,v,c,d),v.x+=v.w,v.y+=v.h,Wb(s.rightAndBottom,v,c,d),r.chartArea={left:v.left,top:v.top,right:v.left+v.w,bottom:v.top+v.h,height:v.h,width:v.w},Wt(s.chartArea,p=>{const g=p.box;Object.assign(g,r.chartArea),g.update(v.w,v.h,{left:0,top:0,right:0,bottom:0})})}};class uL{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class QB extends uL{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Kc="$chartjs",tz={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ub=r=>r===null||r==="";function ez(r,t){const e=r.style,i=r.getAttribute("height"),n=r.getAttribute("width");if(r[Kc]={initial:{height:i,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Ub(n)){const a=Ab(r,"width");a!==void 0&&(r.width=a)}if(Ub(i))if(r.style.height==="")r.height=r.width/(t||2);else{const a=Ab(r,"height");a!==void 0&&(r.height=a)}return r}const hL=rB?{passive:!0}:!1;function rz(r,t,e){r&&r.addEventListener(t,e,hL)}function iz(r,t,e){r&&r.canvas&&r.canvas.removeEventListener(t,e,hL)}function nz(r,t){const e=tz[r.type]||r.type,{x:i,y:n}=ka(r,t);return{type:e,chart:t,native:r,x:i!==void 0?i:null,y:n!==void 0?n:null}}function Af(r,t){for(const e of r)if(e===t||e.contains(t))return!0}function az(r,t,e){const i=r.canvas,n=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||Af(s.addedNodes,i),o=o&&!Af(s.removedNodes,i);o&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function oz(r,t,e){const i=r.canvas,n=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||Af(s.removedNodes,i),o=o&&!Af(s.addedNodes,i);o&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const Au=new Map;let Yb=0;function cL(){const r=window.devicePixelRatio;r!==Yb&&(Yb=r,Au.forEach((t,e)=>{e.currentDevicePixelRatio!==r&&t()}))}function sz(r,t){Au.size||window.addEventListener("resize",cL),Au.set(r,t)}function lz(r){Au.delete(r),Au.size||window.removeEventListener("resize",cL)}function uz(r,t,e){const i=r.canvas,n=i&&O0(i);if(!n)return;const a=FD((s,l)=>{const u=n.clientWidth;e(s,l),u<n.clientWidth&&e()},window),o=new ResizeObserver(s=>{const l=s[0],u=l.contentRect.width,h=l.contentRect.height;u===0&&h===0||a(u,h)});return o.observe(n),sz(r,a),o}function Vd(r,t,e){e&&e.disconnect(),t==="resize"&&lz(r)}function hz(r,t,e){const i=r.canvas,n=FD(a=>{r.ctx!==null&&e(nz(a,r))},r);return rz(i,t,n),n}class cz extends uL{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(ez(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Kc])return!1;const i=e[Kc].initial;["height","width"].forEach(a=>{const o=i[a];It(o)?e.removeAttribute(a):e.setAttribute(a,o)});const n=i.style||{};return Object.keys(n).forEach(a=>{e.style[a]=n[a]}),e.width=e.width,delete e[Kc],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),o={attach:az,detach:oz,resize:uz}[e]||hz;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:Vd,detach:Vd,resize:Vd}[e]||iz)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return eB(t,e,i,n)}isAttached(t){const e=t&&O0(t);return!!(e&&e.isConnected)}}function fz(r){return!E0()||typeof OffscreenCanvas<"u"&&r instanceof OffscreenCanvas?QB:cz}var $c;let an=($c=class{constructor(){j(this,"x");j(this,"y");j(this,"active",!1);j(this,"options");j(this,"$animations")}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return _s(this.x)&&_s(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(a=>{n[a]=i[a]&&i[a].active()?i[a]._to:this[a]}),n}},j($c,"defaults",{}),j($c,"defaultRoutes"),$c);function vz(r,t){const e=r.options.ticks,i=dz(r),n=Math.min(e.maxTicksLimit||i,i),a=e.major.enabled?gz(t):[],o=a.length,s=a[0],l=a[o-1],u=[];if(o>n)return yz(t,u,a,o/n),u;const h=pz(a,t,n);if(o>0){let c,f;const v=o>1?Math.round((l-s)/(o-1)):null;for(zh(t,u,h,It(v)?0:s-v,s),c=0,f=o-1;c<f;c++)zh(t,u,h,a[c],a[c+1]);return zh(t,u,h,l,It(v)?t.length:l+v),u}return zh(t,u,h),u}function dz(r){const t=r.options.offset,e=r._tickSize(),i=r._length/e+(t?0:1),n=r._maxLength/e;return Math.floor(Math.min(i,n))}function pz(r,t,e){const i=mz(r),n=t.length/e;if(!i)return Math.max(n,1);const a=nN(i);for(let o=0,s=a.length-1;o<s;o++){const l=a[o];if(l>n)return l}return Math.max(n,1)}function gz(r){const t=[];let e,i;for(e=0,i=r.length;e<i;e++)r[e].major&&t.push(e);return t}function yz(r,t,e,i){let n=0,a=e[0],o;for(i=Math.ceil(i),o=0;o<r.length;o++)o===a&&(t.push(r[o]),n++,a=e[n*i])}function zh(r,t,e,i,n){const a=bt(i,0),o=Math.min(bt(n,r.length),r.length);let s=0,l,u,h;for(e=Math.ceil(e),n&&(l=n-i,e=l/Math.floor(l/e)),h=a;h<0;)s++,h=Math.round(a+s*e);for(u=Math.max(a,0);u<o;u++)u===h&&(t.push(r[u]),s++,h=Math.round(a+s*e))}function mz(r){const t=r.length;let e,i;if(t<2)return!1;for(i=r[0],e=1;e<t;++e)if(r[e]-r[e-1]!==i)return!1;return i}const _z=r=>r==="left"?"right":r==="right"?"left":r,$b=(r,t,e)=>t==="top"||t==="left"?r[t]+e:r[t]-e,Xb=(r,t)=>Math.min(t||r,r);function Zb(r,t){const e=[],i=r.length/t,n=r.length;let a=0;for(;a<n;a+=i)e.push(r[Math.floor(a)]);return e}function xz(r,t,e){const i=r.ticks.length,n=Math.min(t,i-1),a=r._startPixel,o=r._endPixel,s=1e-6;let l=r.getPixelForTick(n),u;if(!(e&&(i===1?u=Math.max(l-a,o-l):t===0?u=(r.getPixelForTick(1)-l)/2:u=(l-r.getPixelForTick(n-1))/2,l+=n<t?u:-u,l<a-s||l>o+s)))return l}function bz(r,t){Wt(r,e=>{const i=e.gc,n=i.length/2;let a;if(n>t){for(a=0;a<n;++a)delete e.data[i[a]];i.splice(0,n)}})}function il(r){return r.drawTicks?r.tickLength:0}function jb(r,t){if(!r.display)return 0;const e=de(r.font,t),i=ze(r.padding);return(jt(r.text)?r.text.length:1)*e.lineHeight+i.height}function Sz(r,t){return Kn(r,{scale:t,type:"scale"})}function wz(r,t,e){return Kn(r,{tick:e,index:t,type:"tick"})}function Tz(r,t,e){let i=D0(r);return(e&&t!=="right"||!e&&t==="right")&&(i=_z(i)),i}function Mz(r,t,e,i){const{top:n,left:a,bottom:o,right:s,chart:l}=r,{chartArea:u,scales:h}=l;let c=0,f,v,d;const p=o-n,g=s-a;if(r.isHorizontal()){if(v=Pe(i,a,s),Rt(e)){const y=Object.keys(e)[0],m=e[y];d=h[y].getPixelForValue(m)+p-t}else e==="center"?d=(u.bottom+u.top)/2+p-t:d=$b(r,e,t);f=s-a}else{if(Rt(e)){const y=Object.keys(e)[0],m=e[y];v=h[y].getPixelForValue(m)-g+t}else e==="center"?v=(u.left+u.right)/2-g+t:v=$b(r,e,t);d=Pe(i,o,n),c=e==="left"?-se:se}return{titleX:v,titleY:d,maxWidth:f,rotation:c}}let sh=class fL extends an{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=ur(t,Number.POSITIVE_INFINITY),e=ur(e,Number.NEGATIVE_INFINITY),i=ur(i,Number.POSITIVE_INFINITY),n=ur(n,Number.NEGATIVE_INFINITY),{min:ur(t,i),max:ur(e,n),minDefined:ne(t),maxDefined:ne(e)}}getMinMax(t){let{min:e,max:i,minDefined:n,maxDefined:a}=this.getUserBounds(),o;if(n&&a)return{min:e,max:i};const s=this.getMatchingVisibleMetas();for(let l=0,u=s.length;l<u;++l)o=s[l].controller.getMinMax(this,t),n||(e=Math.min(e,o.min)),a||(i=Math.max(i,o.max));return e=a&&e>i?i:e,i=n&&e>i?e:i,{min:ur(e,ur(i,e)),max:ur(i,ur(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Zt(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:a,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=RN(this,a,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?Zb(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=vz(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Zt(this.options.afterUpdate,[this])}beforeSetDimensions(){Zt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Zt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Zt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Zt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,n,a;for(i=0,n=t.length;i<n;i++)a=t[i],a.label=Zt(e.callback,[a.value,i,t],this)}afterTickToLabelConversion(){Zt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Zt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=Xb(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,a=e.maxRotation;let o=n,s,l,u;if(!this._isVisible()||!e.display||n>=a||i<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),c=h.widest.width,f=h.highest.height,v=Se(this.chart.width-c,0,this.maxWidth);s=t.offset?this.maxWidth/i:v/(i-1),c+6>s&&(s=v/(i-(t.offset?.5:1)),l=this.maxHeight-il(t.grid)-e.padding-jb(t.title,this.chart.options.font),u=Math.sqrt(c*c+f*f),o=C0(Math.min(Math.asin(Se((h.highest.height+6)/s,-1,1)),Math.asin(Se(l/u,-1,1))-Math.asin(Se(f/u,-1,1)))),o=Math.max(n,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){Zt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Zt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:a}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const l=jb(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=il(a)+l):(t.height=this.maxHeight,t.width=il(a)+l),i.display&&this.ticks.length){const{first:u,last:h,widest:c,highest:f}=this._getLabelSizes(),v=i.padding*2,d=Yr(this.labelRotation),p=Math.cos(d),g=Math.sin(d);if(s){const y=i.mirror?0:g*c.width+p*f.height;t.height=Math.min(this.maxHeight,t.height+y+v)}else{const y=i.mirror?0:p*c.width+g*f.height;t.width=Math.min(this.maxWidth,t.width+y+v)}this._calculatePadding(u,h,g,p)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:a,padding:o},position:s}=this.options,l=this.labelRotation!==0,u=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,v=0;l?u?(f=n*t.width,v=i*e.height):(f=i*t.height,v=n*e.width):a==="start"?v=e.width:a==="end"?f=t.width:a!=="inner"&&(f=t.width/2,v=e.width/2),this.paddingLeft=Math.max((f-h+o)*this.width/(this.width-h),0),this.paddingRight=Math.max((v-c+o)*this.width/(this.width-c),0)}else{let h=e.height/2,c=t.height/2;a==="start"?(h=0,c=t.height):a==="end"&&(h=e.height,c=0),this.paddingTop=h+o,this.paddingBottom=c+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Zt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e<i;e++)It(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Zb(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:n,_longestTextCache:a}=this,o=[],s=[],l=Math.floor(e/Xb(e,i));let u=0,h=0,c,f,v,d,p,g,y,m,_,x,b;for(c=0;c<e;c+=l){if(d=t[c].label,p=this._resolveTickFontOptions(c),n.font=g=p.string,y=a[g]=a[g]||{data:{},gc:[]},m=p.lineHeight,_=x=0,!It(d)&&!jt(d))_=Tf(n,y.data,y.gc,_,d),x=m;else if(jt(d))for(f=0,v=d.length;f<v;++f)b=d[f],!It(b)&&!jt(b)&&(_=Tf(n,y.data,y.gc,_,b),x+=m);o.push(_),s.push(x),u=Math.max(_,u),h=Math.max(x,h)}bz(a,e);const S=o.indexOf(u),w=s.indexOf(h),T=M=>({width:o[M]||0,height:s[M]||0});return{first:T(0),last:T(e-1),widest:T(S),highest:T(w),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return lN(this._alignToPixels?aa(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=wz(this.getContext(),t,i))}return this.$context||(this.$context=Sz(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=Yr(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),a=this._getLabelSizes(),o=t.autoSkipPadding||0,s=a?a.widest.width+o:0,l=a?a.highest.height+o:0;return this.isHorizontal()?l*i>s*n?s/i:l/n:l*n<s*i?l/i:s/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:a,position:o,border:s}=n,l=a.offset,u=this.isHorizontal(),c=this.ticks.length+(l?1:0),f=il(a),v=[],d=s.setContext(this.getContext()),p=d.display?d.width:0,g=p/2,y=function(R){return aa(i,R,p)};let m,_,x,b,S,w,T,M,C,D,L,I;if(o==="top")m=y(this.bottom),w=this.bottom-f,M=m-g,D=y(t.top)+g,I=t.bottom;else if(o==="bottom")m=y(this.top),D=t.top,I=y(t.bottom)-g,w=m+g,M=this.top+f;else if(o==="left")m=y(this.right),S=this.right-f,T=m-g,C=y(t.left)+g,L=t.right;else if(o==="right")m=y(this.left),C=t.left,L=y(t.right)-g,S=m+g,T=this.left+f;else if(e==="x"){if(o==="center")m=y((t.top+t.bottom)/2+.5);else if(Rt(o)){const R=Object.keys(o)[0],N=o[R];m=y(this.chart.scales[R].getPixelForValue(N))}D=t.top,I=t.bottom,w=m+g,M=w+f}else if(e==="y"){if(o==="center")m=y((t.left+t.right)/2);else if(Rt(o)){const R=Object.keys(o)[0],N=o[R];m=y(this.chart.scales[R].getPixelForValue(N))}S=m-g,T=S-f,C=t.left,L=t.right}const P=bt(n.ticks.maxTicksLimit,c),k=Math.max(1,Math.ceil(c/P));for(_=0;_<c;_+=k){const R=this.getContext(_),N=a.setContext(R),O=s.setContext(R),B=N.lineWidth,G=N.color,H=O.dash||[],W=O.dashOffset,q=N.tickWidth,K=N.tickColor,nt=N.tickBorderDash||[],Ct=N.tickBorderDashOffset;x=xz(this,_,l),x!==void 0&&(b=aa(i,x,B),u?S=T=C=L=b:w=M=D=I=b,v.push({tx1:S,ty1:w,tx2:T,ty2:M,x1:C,y1:D,x2:L,y2:I,width:B,color:G,borderDash:H,borderDashOffset:W,tickWidth:q,tickColor:K,tickBorderDash:nt,tickBorderDashOffset:Ct}))}return this._ticksLength=c,this._borderValue=m,v}_computeLabelItems(t){const e=this.axis,i=this.options,{position:n,ticks:a}=i,o=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:u,padding:h,mirror:c}=a,f=il(i.grid),v=f+h,d=c?-h:v,p=-Yr(this.labelRotation),g=[];let y,m,_,x,b,S,w,T,M,C,D,L,I="middle";if(n==="top")S=this.bottom-d,w=this._getXAxisLabelAlignment();else if(n==="bottom")S=this.top+d,w=this._getXAxisLabelAlignment();else if(n==="left"){const k=this._getYAxisLabelAlignment(f);w=k.textAlign,b=k.x}else if(n==="right"){const k=this._getYAxisLabelAlignment(f);w=k.textAlign,b=k.x}else if(e==="x"){if(n==="center")S=(t.top+t.bottom)/2+v;else if(Rt(n)){const k=Object.keys(n)[0],R=n[k];S=this.chart.scales[k].getPixelForValue(R)+v}w=this._getXAxisLabelAlignment()}else if(e==="y"){if(n==="center")b=(t.left+t.right)/2-v;else if(Rt(n)){const k=Object.keys(n)[0],R=n[k];b=this.chart.scales[k].getPixelForValue(R)}w=this._getYAxisLabelAlignment(f).textAlign}e==="y"&&(l==="start"?I="top":l==="end"&&(I="bottom"));const P=this._getLabelSizes();for(y=0,m=s.length;y<m;++y){_=s[y],x=_.label;const k=a.setContext(this.getContext(y));T=this.getPixelForTick(y)+a.labelOffset,M=this._resolveTickFontOptions(y),C=M.lineHeight,D=jt(x)?x.length:1;const R=D/2,N=k.color,O=k.textStrokeColor,B=k.textStrokeWidth;let G=w;o?(b=T,w==="inner"&&(y===m-1?G=this.options.reverse?"left":"right":y===0?G=this.options.reverse?"right":"left":G="center"),n==="top"?u==="near"||p!==0?L=-D*C+C/2:u==="center"?L=-P.highest.height/2-R*C+C:L=-P.highest.height+C/2:u==="near"||p!==0?L=C/2:u==="center"?L=P.highest.height/2-R*C:L=P.highest.height-D*C,c&&(L*=-1),p!==0&&!k.showLabelBackdrop&&(b+=C/2*Math.sin(p))):(S=T,L=(1-D)*C/2);let H;if(k.showLabelBackdrop){const W=ze(k.backdropPadding),q=P.heights[y],K=P.widths[y];let nt=L-W.top,Ct=0-W.left;switch(I){case"middle":nt-=q/2;break;case"bottom":nt-=q;break}switch(w){case"center":Ct-=K/2;break;case"right":Ct-=K;break;case"inner":y===m-1?Ct-=K:y>0&&(Ct-=K/2);break}H={left:Ct,top:nt,width:K+W.width,height:q+W.height,color:k.backdropColor}}g.push({label:x,font:M,textOffset:L,options:{rotation:p,color:N,strokeColor:O,strokeWidth:B,textAlign:G,textBaseline:I,translation:[b,S],backdrop:H}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Yr(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:a}}=this.options,o=this._getLabelSizes(),s=t+a,l=o.widest.width;let u,h;return e==="left"?n?(h=this.right+a,i==="near"?u="left":i==="center"?(u="center",h+=l/2):(u="right",h+=l)):(h=this.right-s,i==="near"?u="right":i==="center"?(u="center",h-=l/2):(u="left",h=this.left)):e==="right"?n?(h=this.left+a,i==="near"?u="right":i==="center"?(u="center",h-=l/2):(u="left",h-=l)):(h=this.left+s,i==="near"?u="left":i==="center"?(u="center",h+=l/2):(u="right",h=this.right)):u="right",{textAlign:u,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:a,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,a,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(a=>a.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,o;const s=(l,u,h)=>{!h.width||!h.color||(i.save(),i.lineWidth=h.width,i.strokeStyle=h.color,i.setLineDash(h.borderDash||[]),i.lineDashOffset=h.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(e.display)for(a=0,o=n.length;a<o;++a){const l=n[a];e.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:n}}=this,a=i.setContext(this.getContext()),o=i.display?a.width:0;if(!o)return;const s=n.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,h,c,f;this.isHorizontal()?(u=aa(t,this.left,o)-o/2,h=aa(t,this.right,s)+s/2,c=f=l):(c=aa(t,this.top,o)-o/2,f=aa(t,this.bottom,s)+s/2,u=h=l),e.save(),e.lineWidth=a.width,e.strokeStyle=a.color,e.beginPath(),e.moveTo(u,c),e.lineTo(h,f),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,n=this._computeLabelArea();n&&Lv(i,n);const a=this.getLabelItems(t);for(const o of a){const s=o.options,l=o.font,u=o.label,h=o.textOffset;uo(i,u,0,h,l,s)}n&&Iv(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const a=de(i.font),o=ze(i.padding),s=i.align;let l=a.lineHeight/2;e==="bottom"||e==="center"||Rt(e)?(l+=o.bottom,jt(i.text)&&(l+=a.lineHeight*(i.text.length-1))):l+=o.top;const{titleX:u,titleY:h,maxWidth:c,rotation:f}=Mz(this,l,e,s);uo(t,i.text,0,0,a,{color:i.color,maxWidth:c,rotation:f,textAlign:Tz(s,e,n),textBaseline:"middle",translation:[u,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=bt(t.grid&&t.grid.z,-1),n=bt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==fL.prototype.draw?[{z:e,draw:a=>{this.draw(a)}}]:[{z:i,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let a,o;for(a=0,o=e.length;a<o;++a){const s=e[a];s[i]===this.id&&(!t||s.type===t)&&n.push(s)}return n}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return de(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}};class Vh{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;Dz(e)&&(i=this.register(e));const n=this.items,a=t.id,o=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in n||(n[a]=t,Cz(t,o,i),this.override&&Jt.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in Jt[n]&&(delete Jt[n][i],this.override&&delete lo[i])}}function Cz(r,t,e){const i=wu(Object.create(null),[e?Jt.get(e):{},Jt.get(t),r.defaults]);Jt.set(t,i),r.defaultRoutes&&Az(t,r.defaultRoutes),r.descriptors&&Jt.describe(t,r.descriptors)}function Az(r,t){Object.keys(t).forEach(e=>{const i=e.split("."),n=i.pop(),a=[r].concat(i).join("."),o=t[e].split("."),s=o.pop(),l=o.join(".");Jt.route(a,n,l,s)})}function Dz(r){return"id"in r&&"defaults"in r}class Lz{constructor(){this.controllers=new Vh(Zr,"datasets",!0),this.elements=new Vh(an,"elements"),this.plugins=new Vh(Object,"plugins"),this.scales=new Vh(sh,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(n=>{const a=i||this._getRegistryForType(n);i||a.isForType(n)||a===this.plugins&&n.id?this._exec(t,a,n):Wt(n,o=>{const s=i||this._getRegistryForType(o);this._exec(t,s,o)})})}_exec(t,e,i){const n=M0(t);Zt(i["before"+n],[],i),e[t](i),Zt(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return n}}var fi=new Lz;class Iz{constructor(){this._init=void 0}notify(t,e,i,n){if(e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const a=n?this._descriptors(t).filter(n):this._descriptors(t),o=this._notify(a,t,e,i);return e==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),o}_notify(t,e,i,n){n=n||{};for(const a of t){const o=a.plugin,s=o[i],l=[e,n,a.options];if(Zt(s,l,o)===!1&&n.cancelable)return!1}return!0}invalidate(){It(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=bt(i.options&&i.options.plugins,{}),a=Pz(i);return n===!1&&!e?[]:Rz(t,a,n,e)}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(a,o)=>a.filter(s=>!o.some(l=>s.plugin.id===l.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Pz(r){const t={},e=[],i=Object.keys(fi.plugins.items);for(let a=0;a<i.length;a++)e.push(fi.getPlugin(i[a]));const n=r.plugins||[];for(let a=0;a<n.length;a++){const o=n[a];e.indexOf(o)===-1&&(e.push(o),t[o.id]=!0)}return{plugins:e,localIds:t}}function kz(r,t){return!t&&r===!1?null:r===!0?{}:r}function Rz(r,{plugins:t,localIds:e},i,n){const a=[],o=r.getContext();for(const s of t){const l=s.id,u=kz(i[l],n);u!==null&&a.push({plugin:s,options:Ez(r.config,{plugin:s,local:e[l]},u,o)})}return a}function Ez(r,{plugin:t,local:e},i,n){const a=r.pluginScopeKeys(t),o=r.getOptionScopes(i,a);return e&&t.defaults&&o.push(t.defaults),r.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function yy(r,t){const e=Jt.datasets[r]||{};return((t.datasets||{})[r]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Oz(r,t){let e=r;return r==="_index_"?e=t:r==="_value_"&&(e=t==="x"?"y":"x"),e}function Nz(r,t){return r===t?"_index_":"_value_"}function qb(r){if(r==="x"||r==="y"||r==="r")return r}function Bz(r){if(r==="top"||r==="bottom")return"x";if(r==="left"||r==="right")return"y"}function my(r,...t){if(qb(r))return r;for(const e of t){const i=e.axis||Bz(e.position)||r.length>1&&qb(r[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${r}' axis. Please provide 'axis' or 'position' option.`)}function Kb(r,t,e){if(e[t+"AxisID"]===r)return{axis:t}}function zz(r,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===r||i.yAxisID===r);if(e.length)return Kb(r,"x",e[0])||Kb(r,"y",e[0])}return{}}function Vz(r,t){const e=lo[r.type]||{scales:{}},i=t.scales||{},n=yy(r.type,t),a=Object.create(null);return Object.keys(i).forEach(o=>{const s=i[o];if(!Rt(s))return console.error(`Invalid scale configuration for scale: ${o}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=my(o,s,zz(o,r),Jt.scales[s.type]),u=Nz(l,n),h=e.scales||{};a[o]=Jl(Object.create(null),[{axis:l},s,h[l],h[u]])}),r.data.datasets.forEach(o=>{const s=o.type||r.type,l=o.indexAxis||yy(s,t),h=(lo[s]||{}).scales||{};Object.keys(h).forEach(c=>{const f=Oz(c,l),v=o[f+"AxisID"]||f;a[v]=a[v]||Object.create(null),Jl(a[v],[{axis:f},i[v],h[c]])})}),Object.keys(a).forEach(o=>{const s=a[o];Jl(s,[Jt.scales[s.type],Jt.scale])}),a}function vL(r){const t=r.options||(r.options={});t.plugins=bt(t.plugins,{}),t.scales=Vz(r,t)}function dL(r){return r=r||{},r.datasets=r.datasets||[],r.labels=r.labels||[],r}function Fz(r){return r=r||{},r.data=dL(r.data),vL(r),r}const Jb=new Map,pL=new Set;function Fh(r,t){let e=Jb.get(r);return e||(e=t(),Jb.set(r,e),pL.add(e)),e}const nl=(r,t,e)=>{const i=Wn(t,e);i!==void 0&&r.add(i)};class Gz{constructor(t){this._config=Fz(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=dL(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),vL(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Fh(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Fh(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Fh(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return Fh(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return(!n||e)&&(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:a}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(c=>nl(l,t,c))),h.forEach(c=>nl(l,n,c)),h.forEach(c=>nl(l,lo[a]||{},c)),h.forEach(c=>nl(l,Jt,c)),h.forEach(c=>nl(l,py,c))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),pL.has(e)&&o.set(e,u),u}chartOptionScopes(){const{options:t,type:e}=this;return[t,lo[e]||{},Jt.datasets[e]||{},{type:e},Jt,py]}resolveNamedOptions(t,e,i,n=[""]){const a={$shared:!0},{resolver:o,subPrefixes:s}=Qb(this._resolverCache,t,n);let l=o;if(Wz(o,e)){a.$shared=!1,i=Un(i)?i():i;const u=this.createResolver(t,i,s);l=xs(o,i,u)}for(const u of e)a[u]=l[u];return a}createResolver(t,e,i=[""],n){const{resolver:a}=Qb(this._resolverCache,t,i);return Rt(e)?xs(a,e,void 0,n):a}}function Qb(r,t,e){let i=r.get(t);i||(i=new Map,r.set(t,i));const n=e.join();let a=i.get(n);return a||(a={resolver:P0(t,e),subPrefixes:e.filter(s=>!s.toLowerCase().includes("hover"))},i.set(n,a)),a}const Hz=r=>Rt(r)&&Object.getOwnPropertyNames(r).some(t=>Un(r[t]));function Wz(r,t){const{isScriptable:e,isIndexable:i}=$D(r);for(const n of t){const a=e(n),o=i(n),s=(o||a)&&r[n];if(a&&(Un(s)||Hz(s))||o&&jt(s))return!0}return!1}var Uz="4.5.1";const Yz=["top","bottom","left","right","chartArea"];function t1(r,t){return r==="top"||r==="bottom"||Yz.indexOf(r)===-1&&t==="x"}function e1(r,t){return function(e,i){return e[r]===i[r]?e[t]-i[t]:e[r]-i[r]}}function r1(r){const t=r.chart,e=t.options.animation;t.notifyPlugins("afterRender"),Zt(e&&e.onComplete,[r],t)}function $z(r){const t=r.chart,e=t.options.animation;Zt(e&&e.onProgress,[r],t)}function gL(r){return E0()&&typeof r=="string"?r=document.getElementById(r):r&&r.length&&(r=r[0]),r&&r.canvas&&(r=r.canvas),r}const Jc={},i1=r=>{const t=gL(r);return Object.values(Jc).filter(e=>e.canvas===t).pop()};function Xz(r,t,e){const i=Object.keys(r);for(const n of i){const a=+n;if(a>=t){const o=r[n];delete r[n],(e>0||a>t)&&(r[a+e]=o)}}}function Zz(r,t,e,i){return!e||r.type==="mouseout"?null:i?t:r}var gn;let B0=(gn=class{static register(...t){fi.add(...t),n1()}static unregister(...t){fi.remove(...t),n1()}constructor(t,e){const i=this.config=new Gz(e),n=gL(t),a=i1(n);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||fz(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),l=s&&s.canvas,u=l&&l.height,h=l&&l.width;if(this.id=jO(),this.ctx=s,this.canvas=l,this.width=h,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Iz,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=fN(c=>this.update(c),o.resizeDelay||0),this._dataChanges=[],Jc[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Oi.listen(this,"complete",r1),Oi.listen(this,"progress",$z),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:a}=this;return It(t)?e&&a?a:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return fi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Cb(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return wb(this.canvas,this.ctx),this}stop(){return Oi.stop(this),this}resize(t,e){Oi.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,a),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Cb(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),Zt(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};Wt(e,(i,n)=>{i.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((o,s)=>(o[s]=!1,o),{});let a=[];e&&(a=a.concat(Object.keys(e).map(o=>{const s=e[o],l=my(o,s),u=l==="r",h=l==="x";return{options:s,dposition:u?"chartArea":h?"bottom":"left",dtype:u?"radialLinear":h?"category":"linear"}}))),Wt(a,o=>{const s=o.options,l=s.id,u=my(l,s),h=bt(s.type,o.dtype);(s.position===void 0||t1(s.position,u)!==t1(o.dposition))&&(s.position=o.dposition),n[l]=!0;let c=null;if(l in i&&i[l].type===h)c=i[l];else{const f=fi.getScale(h);c=new f({id:l,type:h,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(s,t)}),Wt(n,(o,s)=>{o||delete i[s]}),Wt(i,o=>{Ne.configure(this,o,o.options),Ne.addBox(this,o)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((n,a)=>n.index-a.index),i>e){for(let n=e;n<i;++n)this._destroyDatasetMeta(n);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(e1("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,n)=>{e.filter(a=>a===i._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i<n;i++){const a=e[i];let o=this.getDatasetMeta(i);const s=a.type||this.config.type;if(o.type&&o.type!==s&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=s,o.indexAxis=a.indexAxis||yy(s,this.options),o.order=a.order||0,o.index=i,o.label=""+a.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const l=fi.getController(s),{datasetElementType:u,dataElementType:h}=Jt.datasets[s];Object.assign(l,{dataElementType:fi.getElement(h),datasetElementType:u&&fi.getElement(u)}),o.controller=new l(this,i),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Wt(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,h=this.data.datasets.length;u<h;u++){const{controller:c}=this.getDatasetMeta(u),f=!n&&a.indexOf(c)===-1;c.buildOrUpdateElements(f),o=Math.max(+c.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),n||Wt(a,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(e1("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Wt(this.scales,t=>{Ne.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!db(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:a}of e){const o=i==="_removeElements"?-a:a;Xz(t,n,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=a=>new Set(t.filter(o=>o[0]===a).map((o,s)=>s+","+o.splice(1).join(","))),n=i(0);for(let a=1;a<e;a++)if(!db(n,i(a)))return;return Array.from(n).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ne.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],Wt(this.boxes,n=>{i&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,a)=>{n._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,Un(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Oi.has(this)?this.attached&&!Oi.running(this)&&Oi.start(this):(this.draw(),r1({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,n)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,a;for(n=0,a=e.length;n<a;++n){const o=e[n];(!t||o.visible)&&i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},n=iL(this,t);this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(n&&Lv(e,n),t.controller.draw(),n&&Iv(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return Hi(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const a=YB.modes[e];return typeof a=="function"?a(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(a=>a&&a._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=Kn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",a=this.getDatasetMeta(t),o=a.controller._resolveAnimations(void 0,n);Tu(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(a,{visible:i}),this.update(s=>s.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Oi.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),wb(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Jc[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(a,o)=>{e.addEventListener(this,a,o),t[a]=o},n=(a,o,s)=>{a.offsetX=o,a.offsetY=s,this._eventHandler(a)};Wt(this.options.events,a=>i(a,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(l,u)=>{e.addEventListener(this,l,u),t[l]=u},n=(l,u)=>{t[l]&&(e.removeEventListener(this,l,u),delete t[l])},a=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",a),i("detach",o)};o=()=>{this.attached=!1,n("resize",a),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){Wt(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},Wt(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let a,o,s,l;for(e==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+n+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){o=t[s];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[n+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:a,index:o})=>{const s=this.getDatasetMeta(a);if(!s)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:s.data[o],index:o}});!bf(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const n=this.options.hover,a=(l,u)=>l.filter(h=>!u.some(c=>h.datasetIndex===c.datasetIndex&&h.index===c.index)),o=a(e,t),s=i?t:a(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,n)===!1)return;const a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:a}=this,o=e,s=this._getActiveElements(t,n,i,o),l=eN(t),u=Zz(t,this._lastEvent,i,l);i&&(this._lastEvent=null,Zt(a.onHover,[t,s,this],this),l&&Zt(a.onClick,[t,s,this],this));const h=!bf(s,n);return(h||e)&&(this._active=s,this._updateHoverStyles(s,n,e)),this._lastEvent=u,h}_getActiveElements(t,e,i,n){if(t.type==="mouseout")return[];if(!i)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,n)}},j(gn,"defaults",Jt),j(gn,"instances",Jc),j(gn,"overrides",lo),j(gn,"registry",fi),j(gn,"version",Uz),j(gn,"getChart",i1),gn);function n1(){return Wt(B0.instances,r=>r._plugins.invalidate())}function jz(r,t,e){const{startAngle:i,x:n,y:a,outerRadius:o,innerRadius:s,options:l}=t,{borderWidth:u,borderJoinStyle:h}=l,c=Math.min(u/o,Ee(i-e));if(r.beginPath(),r.arc(n,a,o-u/2,i+c/2,e-c/2),s>0){const f=Math.min(u/s,Ee(i-e));r.arc(n,a,s+u/2,e-f/2,i+f/2,!0)}else{const f=Math.min(u/2,o*Ee(i-e));if(h==="round")r.arc(n,a,f,e-Nt/2,i+Nt/2,!0);else if(h==="bevel"){const v=2*f*f,d=-v*Math.cos(e+Nt/2)+n,p=-v*Math.sin(e+Nt/2)+a,g=v*Math.cos(i+Nt/2)+n,y=v*Math.sin(i+Nt/2)+a;r.lineTo(d,p),r.lineTo(g,y)}}r.closePath(),r.moveTo(0,0),r.rect(0,0,r.canvas.width,r.canvas.height),r.clip("evenodd")}function qz(r,t,e){const{startAngle:i,pixelMargin:n,x:a,y:o,outerRadius:s,innerRadius:l}=t;let u=n/s;r.beginPath(),r.arc(a,o,s,i-u,e+u),l>n?(u=n/l,r.arc(a,o,l,e+u,i-u,!0)):r.arc(a,o,n,e+se,i-se),r.closePath(),r.clip()}function Kz(r){return I0(r,["outerStart","outerEnd","innerStart","innerEnd"])}function Jz(r,t,e,i){const n=Kz(r.options.borderRadius),a=(e-t)/2,o=Math.min(a,i*t/2),s=l=>{const u=(e-Math.min(a,l))*i/2;return Se(l,0,Math.min(a,u))};return{outerStart:s(n.outerStart),outerEnd:s(n.outerEnd),innerStart:Se(n.innerStart,0,o),innerEnd:Se(n.innerEnd,0,o)}}function Io(r,t,e,i){return{x:e+r*Math.cos(t),y:i+r*Math.sin(t)}}function Df(r,t,e,i,n,a){const{x:o,y:s,startAngle:l,pixelMargin:u,innerRadius:h}=t,c=Math.max(t.outerRadius+i+e-u,0),f=h>0?h+i+e+u:0;let v=0;const d=n-l;if(i){const k=h>0?h-i:0,R=c>0?c-i:0,N=(k+R)/2,O=N!==0?d*N/(N+i):d;v=(d-O)/2}const p=Math.max(.001,d*c-e/Nt)/c,g=(d-p)/2,y=l+g+v,m=n-g-v,{outerStart:_,outerEnd:x,innerStart:b,innerEnd:S}=Jz(t,f,c,m-y),w=c-_,T=c-x,M=y+_/w,C=m-x/T,D=f+b,L=f+S,I=y+b/D,P=m-S/L;if(r.beginPath(),a){const k=(M+C)/2;if(r.arc(o,s,c,M,k),r.arc(o,s,c,k,C),x>0){const B=Io(T,C,o,s);r.arc(B.x,B.y,x,C,m+se)}const R=Io(L,m,o,s);if(r.lineTo(R.x,R.y),S>0){const B=Io(L,P,o,s);r.arc(B.x,B.y,S,m+se,P+Math.PI)}const N=(m-S/f+(y+b/f))/2;if(r.arc(o,s,f,m-S/f,N,!0),r.arc(o,s,f,N,y+b/f,!0),b>0){const B=Io(D,I,o,s);r.arc(B.x,B.y,b,I+Math.PI,y-se)}const O=Io(w,y,o,s);if(r.lineTo(O.x,O.y),_>0){const B=Io(w,M,o,s);r.arc(B.x,B.y,_,y-se,M)}}else{r.moveTo(o,s);const k=Math.cos(M)*c+o,R=Math.sin(M)*c+s;r.lineTo(k,R);const N=Math.cos(C)*c+o,O=Math.sin(C)*c+s;r.lineTo(N,O)}r.closePath()}function Qz(r,t,e,i,n){const{fullCircles:a,startAngle:o,circumference:s}=t;let l=t.endAngle;if(a){Df(r,t,e,i,l,n);for(let u=0;u<a;++u)r.fill();isNaN(s)||(l=o+(s%qt||qt))}return Df(r,t,e,i,l,n),r.fill(),l}function tV(r,t,e,i,n){const{fullCircles:a,startAngle:o,circumference:s,options:l}=t,{borderWidth:u,borderJoinStyle:h,borderDash:c,borderDashOffset:f,borderRadius:v}=l,d=l.borderAlign==="inner";if(!u)return;r.setLineDash(c||[]),r.lineDashOffset=f,d?(r.lineWidth=u*2,r.lineJoin=h||"round"):(r.lineWidth=u,r.lineJoin=h||"bevel");let p=t.endAngle;if(a){Df(r,t,e,i,p,n);for(let g=0;g<a;++g)r.stroke();isNaN(s)||(p=o+(s%qt||qt))}d&&qz(r,t,p),l.selfJoin&&p-o>=Nt&&v===0&&h!=="miter"&&jz(r,t,p),a||(Df(r,t,e,i,p,n),r.stroke())}class Bl extends an{constructor(e){super();j(this,"circumference");j(this,"endAngle");j(this,"fullCircles");j(this,"innerRadius");j(this,"outerRadius");j(this,"pixelMargin");j(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,i,n){const a=this.getProps(["x","y"],n),{angle:o,distance:s}=ND(a,{x:e,y:i}),{startAngle:l,endAngle:u,innerRadius:h,outerRadius:c,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),v=(this.options.spacing+this.options.borderWidth)/2,d=bt(f,u-l),p=Mu(o,l,u)&&l!==u,g=d>=qt||p,y=Fi(s,h+v,c+v);return g&&y}getCenterPoint(e){const{x:i,y:n,startAngle:a,endAngle:o,innerRadius:s,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:u,spacing:h}=this.options,c=(a+o)/2,f=(s+l+h+u)/2;return{x:i+Math.cos(c)*f,y:n+Math.sin(c)*f}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:n}=this,a=(i.offset||0)/4,o=(i.spacing||0)/2,s=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=n>qt?Math.floor(n/qt):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*a,Math.sin(l)*a);const u=1-Math.sin(Math.min(Nt,n||0)),h=a*u;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,Qz(e,this,h,o,s),tV(e,this,h,o,s),e.restore()}}j(Bl,"id","arc"),j(Bl,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),j(Bl,"defaultRoutes",{backgroundColor:"backgroundColor"}),j(Bl,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function yL(r,t,e=t){r.lineCap=bt(e.borderCapStyle,t.borderCapStyle),r.setLineDash(bt(e.borderDash,t.borderDash)),r.lineDashOffset=bt(e.borderDashOffset,t.borderDashOffset),r.lineJoin=bt(e.borderJoinStyle,t.borderJoinStyle),r.lineWidth=bt(e.borderWidth,t.borderWidth),r.strokeStyle=bt(e.borderColor,t.borderColor)}function eV(r,t,e){r.lineTo(e.x,e.y)}function rV(r){return r.stepped?TN:r.tension||r.cubicInterpolationMode==="monotone"?MN:eV}function mL(r,t,e={}){const i=r.length,{start:n=0,end:a=i-1}=e,{start:o,end:s}=t,l=Math.max(n,o),u=Math.min(a,s),h=n<o&&a<o||n>s&&a>s;return{count:i,start:l,loop:t.loop,ilen:u<l&&!h?i+u-l:u-l}}function iV(r,t,e,i){const{points:n,options:a}=t,{count:o,start:s,loop:l,ilen:u}=mL(n,e,i),h=rV(a);let{move:c=!0,reverse:f}=i||{},v,d,p;for(v=0;v<=u;++v)d=n[(s+(f?u-v:v))%o],!d.skip&&(c?(r.moveTo(d.x,d.y),c=!1):h(r,p,d,f,a.stepped),p=d);return l&&(d=n[(s+(f?u:0))%o],h(r,p,d,f,a.stepped)),!!l}function nV(r,t,e,i){const n=t.points,{count:a,start:o,ilen:s}=mL(n,e,i),{move:l=!0,reverse:u}=i||{};let h=0,c=0,f,v,d,p,g,y;const m=x=>(o+(u?s-x:x))%a,_=()=>{p!==g&&(r.lineTo(h,g),r.lineTo(h,p),r.lineTo(h,y))};for(l&&(v=n[m(0)],r.moveTo(v.x,v.y)),f=0;f<=s;++f){if(v=n[m(f)],v.skip)continue;const x=v.x,b=v.y,S=x|0;S===d?(b<p?p=b:b>g&&(g=b),h=(c*h+x)/++c):(_(),r.lineTo(x,b),d=S,c=0,p=g=b),y=b}_()}function _y(r){const t=r.options,e=t.borderDash&&t.borderDash.length;return!r._decimated&&!r._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?nV:iV}function aV(r){return r.stepped?iB:r.tension||r.cubicInterpolationMode==="monotone"?nB:Ra}function oV(r,t,e,i){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,i)&&n.closePath()),yL(r,t.options),r.stroke(n)}function sV(r,t,e,i){const{segments:n,options:a}=t,o=_y(t);for(const s of n)yL(r,a,s.style),r.beginPath(),o(r,t,s,{start:e,end:e+i-1})&&r.closePath(),r.stroke()}const lV=typeof Path2D=="function";function uV(r,t,e,i){lV&&!t.options.segment?oV(r,t,e,i):sV(r,t,e,i)}class Mn extends an{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;jN(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=hB(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],a=this.points,o=rL(this,{property:e,start:n,end:n});if(!o.length)return;const s=[],l=aV(i);let u,h;for(u=0,h=o.length;u<h;++u){const{start:c,end:f}=o[u],v=a[c],d=a[f];if(v===d){s.push(v);continue}const p=Math.abs((n-v[e])/(d[e]-v[e])),g=l(v,d,p,i.stepped);g[e]=t[e],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,e,i){return _y(this)(t,this,e,i)}path(t,e,i){const n=this.segments,a=_y(this);let o=this._loop;e=e||0,i=i||this.points.length-e;for(const s of n)o&=a(t,this,s,{start:e,end:e+i-1});return!!o}draw(t,e,i,n){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),uV(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}j(Mn,"id","line"),j(Mn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),j(Mn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),j(Mn,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function a1(r,t,e,i){const n=r.options,{[e]:a}=r.getProps([e],i);return Math.abs(t-a)<n.radius+n.hitRadius}class Qc extends an{constructor(e){super();j(this,"parsed");j(this,"skip");j(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,n){const a=this.options,{x:o,y:s}=this.getProps(["x","y"],n);return Math.pow(e-o,2)+Math.pow(i-s,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(e,i){return a1(this,e,"x",i)}inYRange(e,i){return a1(this,e,"y",i)}getCenterPoint(e){const{x:i,y:n}=this.getProps(["x","y"],e);return{x:i,y:n}}size(e){e=e||this.options||{};let i=e.radius||0;i=Math.max(i,i&&e.hoverRadius||0);const n=i&&e.borderWidth||0;return(i+n)*2}draw(e,i){const n=this.options;this.skip||n.radius<.1||!Hi(this,i,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,gy(e,n,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}j(Qc,"id","point"),j(Qc,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),j(Qc,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function _L(r,t){const{x:e,y:i,base:n,width:a,height:o}=r.getProps(["x","y","base","width","height"],t);let s,l,u,h,c;return r.horizontal?(c=o/2,s=Math.min(e,n),l=Math.max(e,n),u=i-c,h=i+c):(c=a/2,s=e-c,l=e+c,u=Math.min(i,n),h=Math.max(i,n)),{left:s,top:u,right:l,bottom:h}}function Cn(r,t,e,i){return r?0:Se(t,e,i)}function hV(r,t,e){const i=r.options.borderWidth,n=r.borderSkipped,a=YD(i);return{t:Cn(n.top,a.top,0,e),r:Cn(n.right,a.right,0,t),b:Cn(n.bottom,a.bottom,0,e),l:Cn(n.left,a.left,0,t)}}function cV(r,t,e){const{enableBorderRadius:i}=r.getProps(["enableBorderRadius"]),n=r.options.borderRadius,a=Ja(n),o=Math.min(t,e),s=r.borderSkipped,l=i||Rt(n);return{topLeft:Cn(!l||s.top||s.left,a.topLeft,0,o),topRight:Cn(!l||s.top||s.right,a.topRight,0,o),bottomLeft:Cn(!l||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:Cn(!l||s.bottom||s.right,a.bottomRight,0,o)}}function fV(r){const t=_L(r),e=t.right-t.left,i=t.bottom-t.top,n=hV(r,e/2,i/2),a=cV(r,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:a},inner:{x:t.left+n.l,y:t.top+n.t,w:e-n.l-n.r,h:i-n.t-n.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,a.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(n.b,n.r))}}}}function Fd(r,t,e,i){const n=t===null,a=e===null,s=r&&!(n&&a)&&_L(r,i);return s&&(n||Fi(t,s.left,s.right))&&(a||Fi(e,s.top,s.bottom))}function vV(r){return r.topLeft||r.topRight||r.bottomLeft||r.bottomRight}function dV(r,t){r.rect(t.x,t.y,t.w,t.h)}function Gd(r,t,e={}){const i=r.x!==e.x?-t:0,n=r.y!==e.y?-t:0,a=(r.x+r.w!==e.x+e.w?t:0)-i,o=(r.y+r.h!==e.y+e.h?t:0)-n;return{x:r.x+i,y:r.y+n,w:r.w+a,h:r.h+o,radius:r.radius}}class tf extends an{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:a,outer:o}=fV(this),s=vV(o.radius)?Cu:dV;t.save(),(o.w!==a.w||o.h!==a.h)&&(t.beginPath(),s(t,Gd(o,e,a)),t.clip(),s(t,Gd(a,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Gd(a,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Fd(this,t,e,i)}inXRange(t,e){return Fd(this,t,null,e)}inYRange(t,e){return Fd(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(e+n)/2:e,y:a?i:(i+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}j(tf,"id","bar"),j(tf,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),j(tf,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var pV=Object.freeze({__proto__:null,ArcElement:Bl,BarElement:tf,LineElement:Mn,PointElement:Qc});const xy=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],o1=xy.map(r=>r.replace("rgb(","rgba(").replace(")",", 0.5)"));function xL(r){return xy[r%xy.length]}function bL(r){return o1[r%o1.length]}function gV(r,t){return r.borderColor=xL(t),r.backgroundColor=bL(t),++t}function yV(r,t){return r.backgroundColor=r.data.map(()=>xL(t++)),t}function mV(r,t){return r.backgroundColor=r.data.map(()=>bL(t++)),t}function _V(r){let t=0;return(e,i)=>{const n=r.getDatasetMeta(i).controller;n instanceof Tn?t=yV(e,t):n instanceof nu?t=mV(e,t):n&&(t=gV(e,t))}}function s1(r){let t;for(t in r)if(r[t].borderColor||r[t].backgroundColor)return!0;return!1}function xV(r){return r&&(r.borderColor||r.backgroundColor)}function bV(){return Jt.borderColor!=="rgba(0,0,0,0.1)"||Jt.backgroundColor!=="rgba(0,0,0,0.1)"}var SV={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(r,t,e){if(!e.enabled)return;const{data:{datasets:i},options:n}=r.config,{elements:a}=n,o=s1(i)||xV(n)||a&&s1(a)||bV();if(!e.forceOverride&&o)return;const s=_V(r);i.forEach(s)}};function wV(r,t,e,i,n){const a=n.samples||i;if(a>=e)return r.slice(t,t+e);const o=[],s=(e-2)/(a-2);let l=0;const u=t+e-1;let h=t,c,f,v,d,p;for(o[l++]=r[h],c=0;c<a-2;c++){let g=0,y=0,m;const _=Math.floor((c+1)*s)+1+t,x=Math.min(Math.floor((c+2)*s)+1,e)+t,b=x-_;for(m=_;m<x;m++)g+=r[m].x,y+=r[m].y;g/=b,y/=b;const S=Math.floor(c*s)+1+t,w=Math.min(Math.floor((c+1)*s)+1,e)+t,{x:T,y:M}=r[h];for(v=d=-1,m=S;m<w;m++)d=.5*Math.abs((T-g)*(r[m].y-M)-(T-r[m].x)*(y-M)),d>v&&(v=d,f=r[m],p=m);o[l++]=f,h=p}return o[l++]=r[u],o}function TV(r,t,e,i){let n=0,a=0,o,s,l,u,h,c,f,v,d,p;const g=[],y=t+e-1,m=r[t].x,x=r[y].x-m;for(o=t;o<t+e;++o){s=r[o],l=(s.x-m)/x*i,u=s.y;const b=l|0;if(b===h)u<d?(d=u,c=o):u>p&&(p=u,f=o),n=(a*n+s.x)/++a;else{const S=o-1;if(!It(c)&&!It(f)){const w=Math.min(c,f),T=Math.max(c,f);w!==v&&w!==S&&g.push({...r[w],x:n}),T!==v&&T!==S&&g.push({...r[T],x:n})}o>0&&S!==v&&g.push(r[S]),g.push(s),h=b,a=0,d=p=u,c=f=v=o}}return g}function SL(r){if(r._decimated){const t=r._data;delete r._decimated,delete r._data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function l1(r){r.data.datasets.forEach(t=>{SL(t)})}function MV(r,t){const e=t.length;let i=0,n;const{iScale:a}=r,{min:o,max:s,minDefined:l,maxDefined:u}=a.getUserBounds();return l&&(i=Se(Gi(t,a.axis,o).lo,0,e-1)),u?n=Se(Gi(t,a.axis,s).hi+1,i,e)-i:n=e-i,{start:i,count:n}}var CV={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(r,t,e)=>{if(!e.enabled){l1(r);return}const i=r.width;r.data.datasets.forEach((n,a)=>{const{_data:o,indexAxis:s}=n,l=r.getDatasetMeta(a),u=o||n.data;if(Ol([s,r.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const h=r.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||r.options.parsing)return;let{start:c,count:f}=MV(l,u);const v=e.threshold||4*i;if(f<=v){SL(n);return}It(o)&&(n._data=u,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let d;switch(e.algorithm){case"lttb":d=wV(u,c,f,i,e);break;case"min-max":d=TV(u,c,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=d})},destroy(r){l1(r)}};function AV(r,t,e){const i=r.segments,n=r.points,a=t.points,o=[];for(const s of i){let{start:l,end:u}=s;u=Rv(l,u,n);const h=by(e,n[l],n[u],s.loop);if(!t.segments){o.push({source:s,target:h,start:n[l],end:n[u]});continue}const c=rL(t,h);for(const f of c){const v=by(e,a[f.start],a[f.end],f.loop),d=eL(s,n,v);for(const p of d)o.push({source:p,target:f,start:{[e]:u1(h,v,"start",Math.max)},end:{[e]:u1(h,v,"end",Math.min)}})}}return o}function by(r,t,e,i){if(i)return;let n=t[r],a=e[r];return r==="angle"&&(n=Ee(n),a=Ee(a)),{property:r,start:n,end:a}}function DV(r,t){const{x:e=null,y:i=null}=r||{},n=t.points,a=[];return t.segments.forEach(({start:o,end:s})=>{s=Rv(o,s,n);const l=n[o],u=n[s];i!==null?(a.push({x:l.x,y:i}),a.push({x:u.x,y:i})):e!==null&&(a.push({x:e,y:l.y}),a.push({x:e,y:u.y}))}),a}function Rv(r,t,e){for(;t>r;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function u1(r,t,e,i){return r&&t?i(r[e],t[e]):r?r[e]:t?t[e]:0}function wL(r,t){let e=[],i=!1;return jt(r)?(i=!0,e=r):e=DV(r,t),e.length?new Mn({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function h1(r){return r&&r.fill!==!1}function LV(r,t,e){let n=r[t].fill;const a=[t];let o;if(!e)return n;for(;n!==!1&&a.indexOf(n)===-1;){if(!ne(n))return n;if(o=r[n],!o)return!1;if(o.visible)return n;a.push(n),n=o.fill}return!1}function IV(r,t,e){const i=EV(r);if(Rt(i))return isNaN(i.value)?!1:i;let n=parseFloat(i);return ne(n)&&Math.floor(n)===n?PV(i[0],t,n,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function PV(r,t,e,i){return(r==="-"||r==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function kV(r,t){let e=null;return r==="start"?e=t.bottom:r==="end"?e=t.top:Rt(r)?e=t.getPixelForValue(r.value):t.getBasePixel&&(e=t.getBasePixel()),e}function RV(r,t,e){let i;return r==="start"?i=e:r==="end"?i=t.options.reverse?t.min:t.max:Rt(r)?i=r.value:i=t.getBaseValue(),i}function EV(r){const t=r.options,e=t.fill;let i=bt(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function OV(r){const{scale:t,index:e,line:i}=r,n=[],a=i.segments,o=i.points,s=NV(t,e);s.push(wL({x:null,y:t.bottom},i));for(let l=0;l<a.length;l++){const u=a[l];for(let h=u.start;h<=u.end;h++)BV(n,o[h],s)}return new Mn({points:n,options:{}})}function NV(r,t){const e=[],i=r.getMatchingVisibleMetas("line");for(let n=0;n<i.length;n++){const a=i[n];if(a.index===t)break;a.hidden||e.unshift(a.dataset)}return e}function BV(r,t,e){const i=[];for(let n=0;n<e.length;n++){const a=e[n],{first:o,last:s,point:l}=zV(a,t,"x");if(!(!l||o&&s)){if(o)i.unshift(l);else if(r.push(l),!s)break}}r.push(...i)}function zV(r,t,e){const i=r.interpolate(t,e);if(!i)return{};const n=i[e],a=r.segments,o=r.points;let s=!1,l=!1;for(let u=0;u<a.length;u++){const h=a[u],c=o[h.start][e],f=o[h.end][e];if(Fi(n,c,f)){s=n===c,l=n===f;break}}return{first:s,last:l,point:i}}class TL{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:a,radius:o}=this;return e=e||{start:0,end:qt},t.arc(n,a,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,a=t.angle;return{x:e+Math.cos(a)*n,y:i+Math.sin(a)*n,angle:a}}}function VV(r){const{chart:t,fill:e,line:i}=r;if(ne(e))return FV(t,e);if(e==="stack")return OV(r);if(e==="shape")return!0;const n=GV(r);return n instanceof TL?n:wL(n,i)}function FV(r,t){const e=r.getDatasetMeta(t);return e&&r.isDatasetVisible(t)?e.dataset:null}function GV(r){return(r.scale||{}).getPointPositionForValue?WV(r):HV(r)}function HV(r){const{scale:t={},fill:e}=r,i=kV(e,t);if(ne(i)){const n=t.isHorizontal();return{x:n?i:null,y:n?null:i}}return null}function WV(r){const{scale:t,fill:e}=r,i=t.options,n=t.getLabels().length,a=i.reverse?t.max:t.min,o=RV(e,t,a),s=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,a);return new TL({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(o)})}for(let l=0;l<n;++l)s.push(t.getPointPositionForValue(l,o));return s}function Hd(r,t,e){const i=VV(t),{chart:n,index:a,line:o,scale:s,axis:l}=t,u=o.options,h=u.fill,c=u.backgroundColor,{above:f=c,below:v=c}=h||{},d=n.getDatasetMeta(a),p=iL(n,d);i&&o.points.length&&(Lv(r,e),UV(r,{line:o,target:i,above:f,below:v,area:e,scale:s,axis:l,clip:p}),Iv(r))}function UV(r,t){const{line:e,target:i,above:n,below:a,area:o,scale:s,clip:l}=t,u=e._loop?"angle":t.axis;r.save();let h=a;a!==n&&(u==="x"?(c1(r,i,o.top),Wd(r,{line:e,target:i,color:n,scale:s,property:u,clip:l}),r.restore(),r.save(),c1(r,i,o.bottom)):u==="y"&&(f1(r,i,o.left),Wd(r,{line:e,target:i,color:a,scale:s,property:u,clip:l}),r.restore(),r.save(),f1(r,i,o.right),h=n)),Wd(r,{line:e,target:i,color:h,scale:s,property:u,clip:l}),r.restore()}function c1(r,t,e){const{segments:i,points:n}=t;let a=!0,o=!1;r.beginPath();for(const s of i){const{start:l,end:u}=s,h=n[l],c=n[Rv(l,u,n)];a?(r.moveTo(h.x,h.y),a=!1):(r.lineTo(h.x,e),r.lineTo(h.x,h.y)),o=!!t.pathSegment(r,s,{move:o}),o?r.closePath():r.lineTo(c.x,e)}r.lineTo(t.first().x,e),r.closePath(),r.clip()}function f1(r,t,e){const{segments:i,points:n}=t;let a=!0,o=!1;r.beginPath();for(const s of i){const{start:l,end:u}=s,h=n[l],c=n[Rv(l,u,n)];a?(r.moveTo(h.x,h.y),a=!1):(r.lineTo(e,h.y),r.lineTo(h.x,h.y)),o=!!t.pathSegment(r,s,{move:o}),o?r.closePath():r.lineTo(e,c.y)}r.lineTo(e,t.first().y),r.closePath(),r.clip()}function Wd(r,t){const{line:e,target:i,property:n,color:a,scale:o,clip:s}=t,l=AV(e,i,n);for(const{source:u,target:h,start:c,end:f}of l){const{style:{backgroundColor:v=a}={}}=u,d=i!==!0;r.save(),r.fillStyle=v,YV(r,o,s,d&&by(n,c,f)),r.beginPath();const p=!!e.pathSegment(r,u);let g;if(d){p?r.closePath():v1(r,i,f,n);const y=!!i.pathSegment(r,h,{move:p,reverse:!0});g=p&&y,g||v1(r,i,c,n)}r.closePath(),r.fill(g?"evenodd":"nonzero"),r.restore()}}function YV(r,t,e,i){const n=t.chart.chartArea,{property:a,start:o,end:s}=i||{};if(a==="x"||a==="y"){let l,u,h,c;a==="x"?(l=o,u=n.top,h=s,c=n.bottom):(l=n.left,u=o,h=n.right,c=s),r.beginPath(),e&&(l=Math.max(l,e.left),h=Math.min(h,e.right),u=Math.max(u,e.top),c=Math.min(c,e.bottom)),r.rect(l,u,h-l,c-u),r.clip()}}function v1(r,t,e,i){const n=t.interpolate(e,i);n&&r.lineTo(n.x,n.y)}var $V={id:"filler",afterDatasetsUpdate(r,t,e){const i=(r.data.datasets||[]).length,n=[];let a,o,s,l;for(o=0;o<i;++o)a=r.getDatasetMeta(o),s=a.dataset,l=null,s&&s.options&&s instanceof Mn&&(l={visible:r.isDatasetVisible(o),index:o,fill:IV(s,o,i),chart:r,axis:a.controller.options.indexAxis,scale:a.vScale,line:s}),a.$filler=l,n.push(l);for(o=0;o<i;++o)l=n[o],!(!l||l.fill===!1)&&(l.fill=LV(n,o,e.propagate))},beforeDraw(r,t,e){const i=e.drawTime==="beforeDraw",n=r.getSortedVisibleDatasetMetas(),a=r.chartArea;for(let o=n.length-1;o>=0;--o){const s=n[o].$filler;s&&(s.line.updateControlPoints(a,s.axis),i&&s.fill&&Hd(r.ctx,s,a))}},beforeDatasetsDraw(r,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=r.getSortedVisibleDatasetMetas();for(let n=i.length-1;n>=0;--n){const a=i[n].$filler;h1(a)&&Hd(r.ctx,a,r.chartArea)}},beforeDatasetDraw(r,t,e){const i=t.meta.$filler;!h1(i)||e.drawTime!=="beforeDatasetDraw"||Hd(r.ctx,i,r.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const d1=(r,t)=>{let{boxHeight:e=t,boxWidth:i=t}=r;return r.usePointStyle&&(e=Math.min(e,t),i=r.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},XV=(r,t)=>r!==null&&t!==null&&r.datasetIndex===t.datasetIndex&&r.index===t.index;class p1 extends an{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=Zt(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,n)=>t.sort(i,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,n=de(i.font),a=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=d1(i,a);let u,h;e.font=n.string,this.isHorizontal()?(u=this.maxWidth,h=this._fitRows(o,a,s,l)+10):(h=this.maxHeight,u=this._fitCols(o,n,s,l)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:a,maxWidth:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],h=n+s;let c=t;a.textAlign="left",a.textBaseline="middle";let f=-1,v=-h;return this.legendItems.forEach((d,p)=>{const g=i+e/2+a.measureText(d.text).width;(p===0||u[u.length-1]+g+2*s>o)&&(c+=h,u[u.length-(p>0?0:1)]=0,v+=h,f++),l[p]={left:0,top:v,row:f,width:g,height:n},u[u.length-1]+=g+s}),c}_fitCols(t,e,i,n){const{ctx:a,maxHeight:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],h=o-t;let c=s,f=0,v=0,d=0,p=0;return this.legendItems.forEach((g,y)=>{const{itemWidth:m,itemHeight:_}=ZV(i,e,a,g,n);y>0&&v+_+2*s>h&&(c+=f+s,u.push({width:f,height:v}),d+=f+s,p++,f=v=0),l[y]={left:d,top:v,col:p,width:m,height:_},f=Math.max(f,m),v+=_+s}),c+=f,u.push({width:f,height:v}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:a}}=this,o=us(a,this.left,this.width);if(this.isHorizontal()){let s=0,l=Pe(i,this.left+n,this.right-this.lineWidths[s]);for(const u of e)s!==u.row&&(s=u.row,l=Pe(i,this.left+n,this.right-this.lineWidths[s])),u.top+=this.top+t+n,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+n}else{let s=0,l=Pe(i,this.top+t+n,this.bottom-this.columnSizes[s].height);for(const u of e)u.col!==s&&(s=u.col,l=Pe(i,this.top+t+n,this.bottom-this.columnSizes[s].height)),u.top=l,u.left+=this.left+n,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Lv(t,this),this._draw(),Iv(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:a,labels:o}=t,s=Jt.color,l=us(t.rtl,this.left,this.width),u=de(o.font),{padding:h}=o,c=u.size,f=c/2;let v;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=u.string;const{boxWidth:d,boxHeight:p,itemHeight:g}=d1(o,c),y=function(S,w,T){if(isNaN(d)||d<=0||isNaN(p)||p<0)return;n.save();const M=bt(T.lineWidth,1);if(n.fillStyle=bt(T.fillStyle,s),n.lineCap=bt(T.lineCap,"butt"),n.lineDashOffset=bt(T.lineDashOffset,0),n.lineJoin=bt(T.lineJoin,"miter"),n.lineWidth=M,n.strokeStyle=bt(T.strokeStyle,s),n.setLineDash(bt(T.lineDash,[])),o.usePointStyle){const C={radius:p*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:M},D=l.xPlus(S,d/2),L=w+f;UD(n,C,D,L,o.pointStyleWidth&&d)}else{const C=w+Math.max((c-p)/2,0),D=l.leftForLtr(S,d),L=Ja(T.borderRadius);n.beginPath(),Object.values(L).some(I=>I!==0)?Cu(n,{x:D,y:C,w:d,h:p,radius:L}):n.rect(D,C,d,p),n.fill(),M!==0&&n.stroke()}n.restore()},m=function(S,w,T){uo(n,T.text,S,w+g/2,u,{strikethrough:T.hidden,textAlign:l.textAlign(T.textAlign)})},_=this.isHorizontal(),x=this._computeTitleHeight();_?v={x:Pe(a,this.left+h,this.right-i[0]),y:this.top+h+x,line:0}:v={x:this.left+h,y:Pe(a,this.top+x+h,this.bottom-e[0].height),line:0},JD(this.ctx,t.textDirection);const b=g+h;this.legendItems.forEach((S,w)=>{n.strokeStyle=S.fontColor,n.fillStyle=S.fontColor;const T=n.measureText(S.text).width,M=l.textAlign(S.textAlign||(S.textAlign=o.textAlign)),C=d+f+T;let D=v.x,L=v.y;l.setWidth(this.width),_?w>0&&D+C+h>this.right&&(L=v.y+=b,v.line++,D=v.x=Pe(a,this.left+h,this.right-i[v.line])):w>0&&L+b>this.bottom&&(D=v.x=D+e[v.line].width+h,v.line++,L=v.y=Pe(a,this.top+x+h,this.bottom-e[v.line].height));const I=l.x(D);if(y(I,L,S),D=vN(M,D+d+f,_?D+C:this.right,t.rtl),m(l.x(D),L,S),_)v.x+=C+h;else if(typeof S.text!="string"){const P=u.lineHeight;v.y+=ML(S,P)+h}else v.y+=b}),QD(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=de(e.font),n=ze(e.padding);if(!e.display)return;const a=us(t.rtl,this.left,this.width),o=this.ctx,s=e.position,l=i.size/2,u=n.top+l;let h,c=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),h=this.top+u,c=Pe(t.align,c,this.right-f);else{const d=this.columnSizes.reduce((p,g)=>Math.max(p,g.height),0);h=u+Pe(t.align,this.top,this.bottom-d-t.labels.padding-this._computeTitleHeight())}const v=Pe(s,c,c+f);o.textAlign=a.textAlign(D0(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,uo(o,e.text,v,h,i)}_computeTitleHeight(){const t=this.options.title,e=de(t.font),i=ze(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,a;if(Fi(t,this.left,this.right)&&Fi(e,this.top,this.bottom)){for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(n=a[i],Fi(t,n.left,n.left+n.width)&&Fi(e,n.top,n.top+n.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!KV(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,a=XV(n,i);n&&!a&&Zt(e.onLeave,[t,n,this],this),this._hoveredItem=i,i&&!a&&Zt(e.onHover,[t,i,this],this)}else i&&Zt(e.onClick,[t,i,this],this)}}function ZV(r,t,e,i,n){const a=jV(i,r,t,e),o=qV(n,i,t.lineHeight);return{itemWidth:a,itemHeight:o}}function jV(r,t,e,i){let n=r.text;return n&&typeof n!="string"&&(n=n.reduce((a,o)=>a.length>o.length?a:o)),t+e.size/2+i.measureText(n).width}function qV(r,t,e){let i=r;return typeof t.text!="string"&&(i=ML(t,e)),i}function ML(r,t){const e=r.text?r.text.length:0;return t*e}function KV(r,t){return!!((r==="mousemove"||r==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(r==="click"||r==="mouseup"))}var JV={id:"legend",_element:p1,start(r,t,e){const i=r.legend=new p1({ctx:r.ctx,options:e,chart:r});Ne.configure(r,i,e),Ne.addBox(r,i)},stop(r){Ne.removeBox(r,r.legend),delete r.legend},beforeUpdate(r,t,e){const i=r.legend;Ne.configure(r,i,e),i.options=e},afterUpdate(r){const t=r.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(r,t){t.replay||r.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(r,t,e){const i=t.datasetIndex,n=e.chart;n.isDatasetVisible(i)?(n.hide(i),t.hidden=!0):(n.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:r=>r.chart.options.color,boxWidth:40,padding:10,generateLabels(r){const t=r.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:n,color:a,useBorderRadius:o,borderRadius:s}}=r.legend.options;return r._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(e?0:void 0),h=ze(u.borderWidth);return{text:t[l.index].label,fillStyle:u.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:u.borderColor,pointStyle:i||u.pointStyle,rotation:u.rotation,textAlign:n||u.textAlign,borderRadius:o&&(s||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:r=>r.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:r=>!r.startsWith("on"),labels:{_scriptable:r=>!["generateLabels","filter","sort"].includes(r)}}};class z0 extends an{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=jt(i.text)?i.text.length:1;this._padding=ze(i.padding);const a=n*de(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:n,right:a,options:o}=this,s=o.align;let l=0,u,h,c;return this.isHorizontal()?(h=Pe(s,i,a),c=e+t,u=a-i):(o.position==="left"?(h=i+t,c=Pe(s,n,e),l=Nt*-.5):(h=a-t,c=Pe(s,e,n),l=Nt*.5),u=n-e),{titleX:h,titleY:c,maxWidth:u,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=de(e.font),a=i.lineHeight/2+this._padding.top,{titleX:o,titleY:s,maxWidth:l,rotation:u}=this._drawArgs(a);uo(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:u,textAlign:D0(e.align),textBaseline:"middle",translation:[o,s]})}}function QV(r,t){const e=new z0({ctx:r.ctx,options:t,chart:r});Ne.configure(r,e,t),Ne.addBox(r,e),r.titleBlock=e}var t5={id:"title",_element:z0,start(r,t,e){QV(r,e)},stop(r){const t=r.titleBlock;Ne.removeBox(r,t),delete r.titleBlock},beforeUpdate(r,t,e){const i=r.titleBlock;Ne.configure(r,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Gh=new WeakMap;var e5={id:"subtitle",start(r,t,e){const i=new z0({ctx:r.ctx,options:e,chart:r});Ne.configure(r,i,e),Ne.addBox(r,i),Gh.set(r,i)},stop(r){Ne.removeBox(r,Gh.get(r)),Gh.delete(r)},beforeUpdate(r,t,e){const i=Gh.get(r);Ne.configure(r,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const zl={average(r){if(!r.length)return!1;let t,e,i=new Set,n=0,a=0;for(t=0,e=r.length;t<e;++t){const s=r[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();i.add(l.x),n+=l.y,++a}}return a===0||i.size===0?!1:{x:[...i].reduce((s,l)=>s+l)/i.size,y:n/a}},nearest(r,t){if(!r.length)return!1;let e=t.x,i=t.y,n=Number.POSITIVE_INFINITY,a,o,s;for(a=0,o=r.length;a<o;++a){const l=r[a].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),h=dy(t,u);h<n&&(n=h,s=l)}}if(s){const l=s.tooltipPosition();e=l.x,i=l.y}return{x:e,y:i}}};function ui(r,t){return t&&(jt(t)?Array.prototype.push.apply(r,t):r.push(t)),r}function Ni(r){return(typeof r=="string"||r instanceof String)&&r.indexOf(`
|
||
`)>-1?r.split(`
|
||
`):r}function r5(r,t){const{element:e,datasetIndex:i,index:n}=t,a=r.getDatasetMeta(i).controller,{label:o,value:s}=a.getLabelAndValue(n);return{chart:r,label:o,parsed:a.getParsed(n),raw:r.data.datasets[i].data[n],formattedValue:s,dataset:a.getDataset(),dataIndex:n,datasetIndex:i,element:e}}function g1(r,t){const e=r.chart.ctx,{body:i,footer:n,title:a}=r,{boxWidth:o,boxHeight:s}=t,l=de(t.bodyFont),u=de(t.titleFont),h=de(t.footerFont),c=a.length,f=n.length,v=i.length,d=ze(t.padding);let p=d.height,g=0,y=i.reduce((x,b)=>x+b.before.length+b.lines.length+b.after.length,0);if(y+=r.beforeBody.length+r.afterBody.length,c&&(p+=c*u.lineHeight+(c-1)*t.titleSpacing+t.titleMarginBottom),y){const x=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;p+=v*x+(y-v)*l.lineHeight+(y-1)*t.bodySpacing}f&&(p+=t.footerMarginTop+f*h.lineHeight+(f-1)*t.footerSpacing);let m=0;const _=function(x){g=Math.max(g,e.measureText(x).width+m)};return e.save(),e.font=u.string,Wt(r.title,_),e.font=l.string,Wt(r.beforeBody.concat(r.afterBody),_),m=t.displayColors?o+2+t.boxPadding:0,Wt(i,x=>{Wt(x.before,_),Wt(x.lines,_),Wt(x.after,_)}),m=0,e.font=h.string,Wt(r.footer,_),e.restore(),g+=d.width,{width:g,height:p}}function i5(r,t){const{y:e,height:i}=t;return e<i/2?"top":e>r.height-i/2?"bottom":"center"}function n5(r,t,e,i){const{x:n,width:a}=i,o=e.caretSize+e.caretPadding;if(r==="left"&&n+a+o>t.width||r==="right"&&n-a-o<0)return!0}function a5(r,t,e,i){const{x:n,width:a}=e,{width:o,chartArea:{left:s,right:l}}=r;let u="center";return i==="center"?u=n<=(s+l)/2?"left":"right":n<=a/2?u="left":n>=o-a/2&&(u="right"),n5(u,r,t,e)&&(u="center"),u}function y1(r,t,e){const i=e.yAlign||t.yAlign||i5(r,e);return{xAlign:e.xAlign||t.xAlign||a5(r,t,e,i),yAlign:i}}function o5(r,t){let{x:e,width:i}=r;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function s5(r,t,e){let{y:i,height:n}=r;return t==="top"?i+=e:t==="bottom"?i-=n+e:i-=n/2,i}function m1(r,t,e,i){const{caretSize:n,caretPadding:a,cornerRadius:o}=r,{xAlign:s,yAlign:l}=e,u=n+a,{topLeft:h,topRight:c,bottomLeft:f,bottomRight:v}=Ja(o);let d=o5(t,s);const p=s5(t,l,u);return l==="center"?s==="left"?d+=u:s==="right"&&(d-=u):s==="left"?d-=Math.max(h,f)+n:s==="right"&&(d+=Math.max(c,v)+n),{x:Se(d,0,i.width-t.width),y:Se(p,0,i.height-t.height)}}function Hh(r,t,e){const i=ze(e.padding);return t==="center"?r.x+r.width/2:t==="right"?r.x+r.width-i.right:r.x+i.left}function _1(r){return ui([],Ni(r))}function l5(r,t,e){return Kn(r,{tooltip:t,tooltipItems:e,type:"tooltip"})}function x1(r,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?r.override(e):r}const CL={beforeTitle:Pi,title(r){if(r.length>0){const t=r[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:Pi,beforeBody:Pi,beforeLabel:Pi,label(r){if(this&&this.options&&this.options.mode==="dataset")return r.label+": "+r.formattedValue||r.formattedValue;let t=r.dataset.label||"";t&&(t+=": ");const e=r.formattedValue;return It(e)||(t+=e),t},labelColor(r){const e=r.chart.getDatasetMeta(r.datasetIndex).controller.getStyle(r.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(r){const e=r.chart.getDatasetMeta(r.datasetIndex).controller.getStyle(r.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Pi,afterBody:Pi,beforeFooter:Pi,footer:Pi,afterFooter:Pi};function Qe(r,t,e,i){const n=r[t].call(e,i);return typeof n>"u"?CL[t].call(e,i):n}class Sy extends an{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,a=new nL(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=l5(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,n=Qe(i,"beforeTitle",this,t),a=Qe(i,"title",this,t),o=Qe(i,"afterTitle",this,t);let s=[];return s=ui(s,Ni(n)),s=ui(s,Ni(a)),s=ui(s,Ni(o)),s}getBeforeBody(t,e){return _1(Qe(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,n=[];return Wt(t,a=>{const o={before:[],lines:[],after:[]},s=x1(i,a);ui(o.before,Ni(Qe(s,"beforeLabel",this,a))),ui(o.lines,Qe(s,"label",this,a)),ui(o.after,Ni(Qe(s,"afterLabel",this,a))),n.push(o)}),n}getAfterBody(t,e){return _1(Qe(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,n=Qe(i,"beforeFooter",this,t),a=Qe(i,"footer",this,t),o=Qe(i,"afterFooter",this,t);let s=[];return s=ui(s,Ni(n)),s=ui(s,Ni(a)),s=ui(s,Ni(o)),s}_createItems(t){const e=this._active,i=this.chart.data,n=[],a=[],o=[];let s=[],l,u;for(l=0,u=e.length;l<u;++l)s.push(r5(this.chart,e[l]));return t.filter&&(s=s.filter((h,c,f)=>t.filter(h,c,f,i))),t.itemSort&&(s=s.sort((h,c)=>t.itemSort(h,c,i))),Wt(s,h=>{const c=x1(t.callbacks,h);n.push(Qe(c,"labelColor",this,h)),a.push(Qe(c,"labelPointStyle",this,h)),o.push(Qe(c,"labelTextColor",this,h))}),this.labelColors=n,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=s,s}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let a,o=[];if(!n.length)this.opacity!==0&&(a={opacity:0});else{const s=zl[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const l=this._size=g1(this,i),u=Object.assign({},s,l),h=y1(this.chart,i,u),c=m1(i,u,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,a={opacity:1,x:c.x,y:c.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=o,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const a=this.getCaretPosition(t,i,n);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:a}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:l,topRight:u,bottomLeft:h,bottomRight:c}=Ja(s),{x:f,y:v}=t,{width:d,height:p}=e;let g,y,m,_,x,b;return a==="center"?(x=v+p/2,n==="left"?(g=f,y=g-o,_=x+o,b=x-o):(g=f+d,y=g+o,_=x-o,b=x+o),m=g):(n==="left"?y=f+Math.max(l,h)+o:n==="right"?y=f+d-Math.max(u,c)-o:y=this.caretX,a==="top"?(_=v,x=_-o,g=y-o,m=y+o):(_=v+p,x=_+o,g=y+o,m=y-o),b=_),{x1:g,x2:y,x3:m,y1:_,y2:x,y3:b}}drawTitle(t,e,i){const n=this.title,a=n.length;let o,s,l;if(a){const u=us(i.rtl,this.x,this.width);for(t.x=Hh(this,i.titleAlign,i),e.textAlign=u.textAlign(i.titleAlign),e.textBaseline="middle",o=de(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,l=0;l<a;++l)e.fillText(n[l],u.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+s,l+1===a&&(t.y+=i.titleMarginBottom-s)}}_drawColorBox(t,e,i,n,a){const o=this.labelColors[i],s=this.labelPointStyles[i],{boxHeight:l,boxWidth:u}=a,h=de(a.bodyFont),c=Hh(this,"left",a),f=n.x(c),v=l<h.lineHeight?(h.lineHeight-l)/2:0,d=e.y+v;if(a.usePointStyle){const p={radius:Math.min(u,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=n.leftForLtr(f,u)+u/2,y=d+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,gy(t,p,g,y),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,gy(t,p,g,y)}else{t.lineWidth=Rt(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const p=n.leftForLtr(f,u),g=n.leftForLtr(n.xPlus(f,1),u-2),y=Ja(o.borderRadius);Object.values(y).some(m=>m!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,Cu(t,{x:p,y:d,w:u,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Cu(t,{x:g,y:d+1,w:u-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(p,d,u,l),t.strokeRect(p,d,u,l),t.fillStyle=o.backgroundColor,t.fillRect(g,d+1,u-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:a,bodyAlign:o,displayColors:s,boxHeight:l,boxWidth:u,boxPadding:h}=i,c=de(i.bodyFont);let f=c.lineHeight,v=0;const d=us(i.rtl,this.x,this.width),p=function(T){e.fillText(T,d.x(t.x+v),t.y+f/2),t.y+=f+a},g=d.textAlign(o);let y,m,_,x,b,S,w;for(e.textAlign=o,e.textBaseline="middle",e.font=c.string,t.x=Hh(this,g,i),e.fillStyle=i.bodyColor,Wt(this.beforeBody,p),v=s&&g!=="right"?o==="center"?u/2+h:u+2+h:0,x=0,S=n.length;x<S;++x){for(y=n[x],m=this.labelTextColors[x],e.fillStyle=m,Wt(y.before,p),_=y.lines,s&&_.length&&(this._drawColorBox(e,t,x,d,i),f=Math.max(c.lineHeight,l)),b=0,w=_.length;b<w;++b)p(_[b]),f=c.lineHeight;Wt(y.after,p)}v=0,f=c.lineHeight,Wt(this.afterBody,p),t.y-=a}drawFooter(t,e,i){const n=this.footer,a=n.length;let o,s;if(a){const l=us(i.rtl,this.x,this.width);for(t.x=Hh(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",o=de(i.footerFont),e.fillStyle=i.footerColor,e.font=o.string,s=0;s<a;++s)e.fillText(n[s],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:a,yAlign:o}=this,{x:s,y:l}=t,{width:u,height:h}=i,{topLeft:c,topRight:f,bottomLeft:v,bottomRight:d}=Ja(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(s+c,l),o==="top"&&this.drawCaret(t,e,i,n),e.lineTo(s+u-f,l),e.quadraticCurveTo(s+u,l,s+u,l+f),o==="center"&&a==="right"&&this.drawCaret(t,e,i,n),e.lineTo(s+u,l+h-d),e.quadraticCurveTo(s+u,l+h,s+u-d,l+h),o==="bottom"&&this.drawCaret(t,e,i,n),e.lineTo(s+v,l+h),e.quadraticCurveTo(s,l+h,s,l+h-v),o==="center"&&a==="left"&&this.drawCaret(t,e,i,n),e.lineTo(s,l+c),e.quadraticCurveTo(s,l,s+c,l),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,a=i&&i.y;if(n||a){const o=zl[t.position].call(this,this._active,this._eventPosition);if(!o)return;const s=this._size=g1(this,t),l=Object.assign({},o,this._size),u=y1(e,t,l),h=m1(t,l,u,e);(n._to!==h.x||a._to!==h.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=s.width,this.height=s.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=ze(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,n,e),JD(t,e.textDirection),a.y+=o.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),QD(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map(({datasetIndex:s,index:l})=>{const u=this.chart.getDatasetMeta(s);if(!u)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:u.data[l],index:l}}),a=!bf(i,n),o=this._positionChanged(n,e);(a||o)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,a=this._active||[],o=this._getActiveElements(t,a,e,i),s=this._positionChanged(o,t),l=e||!bf(o,a)||s;return l&&(this._active=o,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,n){const a=this.options;if(t.type==="mouseout")return[];if(!n)return e.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:n,options:a}=this,o=zl[a.position].call(this,t,e);return o!==!1&&(i!==o.x||n!==o.y)}}j(Sy,"positioners",zl);var u5={id:"tooltip",_element:Sy,positioners:zl,afterInit(r,t,e){e&&(r.tooltip=new Sy({chart:r,options:e}))},beforeUpdate(r,t,e){r.tooltip&&r.tooltip.initialize(e)},reset(r,t,e){r.tooltip&&r.tooltip.initialize(e)},afterDraw(r){const t=r.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(r.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(r.ctx),r.notifyPlugins("afterTooltipDraw",e)}},afterEvent(r,t){if(r.tooltip){const e=t.replay;r.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(r,t)=>t.bodyFont.size,boxWidth:(r,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:CL},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:r=>r!=="filter"&&r!=="itemSort"&&r!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},h5=Object.freeze({__proto__:null,Colors:SV,Decimation:CV,Filler:$V,Legend:JV,SubTitle:e5,Title:t5,Tooltip:u5});const c5=(r,t,e,i)=>(typeof t=="string"?(e=r.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function f5(r,t,e,i){const n=r.indexOf(t);if(n===-1)return c5(r,t,e,i);const a=r.lastIndexOf(t);return n!==a?e:n}const v5=(r,t)=>r===null?null:Se(Math.round(r),0,t);function b1(r){const t=this.getLabels();return r>=0&&r<t.length?t[r]:r}class wy extends sh{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:n,label:a}of e)i[n]===a&&i.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(It(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:f5(i,t,bt(e,t),this._addedLabels),v5(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let a=this.getLabels();a=t===0&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=t;o<=e;o++)n.push({value:o});return n}getLabelForValue(t){return b1.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}j(wy,"id","category"),j(wy,"defaults",{ticks:{callback:b1}});function d5(r,t){const e=[],{bounds:n,step:a,min:o,max:s,precision:l,count:u,maxTicks:h,maxDigits:c,includeBounds:f}=r,v=a||1,d=h-1,{min:p,max:g}=t,y=!It(o),m=!It(s),_=!It(u),x=(g-p)/(c+1);let b=gb((g-p)/d/v)*v,S,w,T,M;if(b<1e-14&&!y&&!m)return[{value:p},{value:g}];M=Math.ceil(g/b)-Math.floor(p/b),M>d&&(b=gb(M*b/d/v)*v),It(l)||(S=Math.pow(10,l),b=Math.ceil(b*S)/S),n==="ticks"?(w=Math.floor(p/b)*b,T=Math.ceil(g/b)*b):(w=p,T=g),y&&m&&a&&oN((s-o)/a,b/1e3)?(M=Math.round(Math.min((s-o)/b,h)),b=(s-o)/M,w=o,T=s):_?(w=y?o:w,T=m?s:T,M=u-1,b=(T-w)/M):(M=(T-w)/b,Ql(M,Math.round(M),b/1e3)?M=Math.round(M):M=Math.ceil(M));const C=Math.max(yb(b),yb(w));S=Math.pow(10,It(l)?C:l),w=Math.round(w*S)/S,T=Math.round(T*S)/S;let D=0;for(y&&(f&&w!==o?(e.push({value:o}),w<o&&D++,Ql(Math.round((w+D*b)*S)/S,o,S1(o,x,r))&&D++):w<o&&D++);D<M;++D){const L=Math.round((w+D*b)*S)/S;if(m&&L>s)break;e.push({value:L})}return m&&f&&T!==s?e.length&&Ql(e[e.length-1].value,s,S1(s,x,r))?e[e.length-1].value=s:e.push({value:s}):(!m||T===s)&&e.push({value:T}),e}function S1(r,t,{horizontal:e,minRotation:i}){const n=Yr(i),a=(e?Math.sin(n):Math.cos(n))||.001,o=.75*t*(""+r).length;return Math.min(t/a,o)}class Lf extends sh{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return It(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:a}=this;const o=l=>n=e?n:l,s=l=>a=i?a:l;if(t){const l=_i(n),u=_i(a);l<0&&u<0?s(0):l>0&&u>0&&o(0)}if(n===a){let l=a===0?1:Math.abs(a*.05);s(a+l),t||o(n-l)}this.min=n,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,n;return i?(n=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},a=this._range||this,o=d5(n,a);return t.bounds==="ticks"&&OD(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return oh(t,this.chart.options.locale,this.options.ticks.format)}}class Ty extends Lf{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ne(t)?t:0,this.max=ne(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Yr(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}j(Ty,"id","linear"),j(Ty,"defaults",{ticks:{callback:Dv.formatters.numeric}});const Du=r=>Math.floor(Sn(r)),sa=(r,t)=>Math.pow(10,Du(r)+t);function w1(r){return r/Math.pow(10,Du(r))===1}function T1(r,t,e){const i=Math.pow(10,e),n=Math.floor(r/i);return Math.ceil(t/i)-n}function p5(r,t){const e=t-r;let i=Du(e);for(;T1(r,t,i)>10;)i++;for(;T1(r,t,i)<10;)i--;return Math.min(i,Du(r))}function g5(r,{min:t,max:e}){t=ur(r.min,t);const i=[],n=Du(t);let a=p5(t,e),o=a<0?Math.pow(10,Math.abs(a)):1;const s=Math.pow(10,a),l=n>a?Math.pow(10,n):0,u=Math.round((t-l)*o)/o,h=Math.floor((t-l)/s/10)*s*10;let c=Math.floor((u-h)/Math.pow(10,a)),f=ur(r.min,Math.round((l+h+c*Math.pow(10,a))*o)/o);for(;f<e;)i.push({value:f,major:w1(f),significand:c}),c>=10?c=c<15?15:20:c++,c>=20&&(a++,c=2,o=a>=0?1:o),f=Math.round((l+h+c*Math.pow(10,a))*o)/o;const v=ur(r.max,f);return i.push({value:v,major:w1(v),significand:c}),i}class My extends sh{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Lf.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return ne(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ne(t)?Math.max(0,t):null,this.max=ne(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ne(this._userMin)&&(this.min=t===sa(this.min,0)?sa(this.min,-1):sa(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const a=s=>i=t?i:s,o=s=>n=e?n:s;i===n&&(i<=0?(a(1),o(10)):(a(sa(i,-1)),o(sa(n,1)))),i<=0&&a(sa(n,-1)),n<=0&&o(sa(i,1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=g5(e,this);return t.bounds==="ticks"&&OD(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":oh(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Sn(t),this._valueRange=Sn(this.max)-Sn(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Sn(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}j(My,"id","logarithmic"),j(My,"defaults",{ticks:{callback:Dv.formatters.logarithmic,major:{enabled:!0}}});function Cy(r){const t=r.ticks;if(t.display&&r.display){const e=ze(t.backdropPadding);return bt(t.font&&t.font.size,Jt.font.size)+e.height}return 0}function y5(r,t,e){return e=jt(e)?e:[e],{w:wN(r,t.string,e),h:e.length*t.lineHeight}}function M1(r,t,e,i,n){return r===i||r===n?{start:t-e/2,end:t+e/2}:r<i||r>n?{start:t-e,end:t}:{start:t,end:t+e}}function m5(r){const t={l:r.left+r._padding.left,r:r.right-r._padding.right,t:r.top+r._padding.top,b:r.bottom-r._padding.bottom},e=Object.assign({},t),i=[],n=[],a=r._pointLabels.length,o=r.options.pointLabels,s=o.centerPointLabels?Nt/a:0;for(let l=0;l<a;l++){const u=o.setContext(r.getPointLabelContext(l));n[l]=u.padding;const h=r.getPointPosition(l,r.drawingArea+n[l],s),c=de(u.font),f=y5(r.ctx,c,r._pointLabels[l]);i[l]=f;const v=Ee(r.getIndexAngle(l)+s),d=Math.round(C0(v)),p=M1(d,h.x,f.w,0,180),g=M1(d,h.y,f.h,90,270);_5(e,t,v,p,g)}r.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),r._pointLabelItems=S5(r,i,n)}function _5(r,t,e,i,n){const a=Math.abs(Math.sin(e)),o=Math.abs(Math.cos(e));let s=0,l=0;i.start<t.l?(s=(t.l-i.start)/a,r.l=Math.min(r.l,t.l-s)):i.end>t.r&&(s=(i.end-t.r)/a,r.r=Math.max(r.r,t.r+s)),n.start<t.t?(l=(t.t-n.start)/o,r.t=Math.min(r.t,t.t-l)):n.end>t.b&&(l=(n.end-t.b)/o,r.b=Math.max(r.b,t.b+l))}function x5(r,t,e){const i=r.drawingArea,{extra:n,additionalAngle:a,padding:o,size:s}=e,l=r.getPointPosition(t,i+n+o,a),u=Math.round(C0(Ee(l.angle+se))),h=M5(l.y,s.h,u),c=w5(u),f=T5(l.x,s.w,c);return{visible:!0,x:l.x,y:h,textAlign:c,left:f,top:h,right:f+s.w,bottom:h+s.h}}function b5(r,t){if(!t)return!0;const{left:e,top:i,right:n,bottom:a}=r;return!(Hi({x:e,y:i},t)||Hi({x:e,y:a},t)||Hi({x:n,y:i},t)||Hi({x:n,y:a},t))}function S5(r,t,e){const i=[],n=r._pointLabels.length,a=r.options,{centerPointLabels:o,display:s}=a.pointLabels,l={extra:Cy(a)/2,additionalAngle:o?Nt/n:0};let u;for(let h=0;h<n;h++){l.padding=e[h],l.size=t[h];const c=x5(r,h,l);i.push(c),s==="auto"&&(c.visible=b5(c,u),c.visible&&(u=c))}return i}function w5(r){return r===0||r===180?"center":r<180?"left":"right"}function T5(r,t,e){return e==="right"?r-=t:e==="center"&&(r-=t/2),r}function M5(r,t,e){return e===90||e===270?r-=t/2:(e>270||e<90)&&(r-=t),r}function C5(r,t,e){const{left:i,top:n,right:a,bottom:o}=e,{backdropColor:s}=t;if(!It(s)){const l=Ja(t.borderRadius),u=ze(t.backdropPadding);r.fillStyle=s;const h=i-u.left,c=n-u.top,f=a-i+u.width,v=o-n+u.height;Object.values(l).some(d=>d!==0)?(r.beginPath(),Cu(r,{x:h,y:c,w:f,h:v,radius:l}),r.fill()):r.fillRect(h,c,f,v)}}function A5(r,t){const{ctx:e,options:{pointLabels:i}}=r;for(let n=t-1;n>=0;n--){const a=r._pointLabelItems[n];if(!a.visible)continue;const o=i.setContext(r.getPointLabelContext(n));C5(e,o,a);const s=de(o.font),{x:l,y:u,textAlign:h}=a;uo(e,r._pointLabels[n],l,u+s.lineHeight/2,s,{color:o.color,textAlign:h,textBaseline:"middle"})}}function AL(r,t,e,i){const{ctx:n}=r;if(e)n.arc(r.xCenter,r.yCenter,t,0,qt);else{let a=r.getPointPosition(0,t);n.moveTo(a.x,a.y);for(let o=1;o<i;o++)a=r.getPointPosition(o,t),n.lineTo(a.x,a.y)}}function D5(r,t,e,i,n){const a=r.ctx,o=t.circular,{color:s,lineWidth:l}=t;!o&&!i||!s||!l||e<0||(a.save(),a.strokeStyle=s,a.lineWidth=l,a.setLineDash(n.dash||[]),a.lineDashOffset=n.dashOffset,a.beginPath(),AL(r,e,o,i),a.closePath(),a.stroke(),a.restore())}function L5(r,t,e){return Kn(r,{label:e,index:t,type:"pointLabel"})}class Vl extends Lf{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=ze(Cy(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=ne(t)&&!isNaN(t)?t:0,this.max=ne(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Cy(this.options))}generateTickLabels(t){Lf.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const n=Zt(this.options.pointLabels.callback,[e,i],this);return n||n===0?n:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?m5(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){const e=qt/(this._pointLabels.length||1),i=this.options.startAngle||0;return Ee(t*e+Yr(i))}getDistanceFromCenterForValue(t){if(It(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(It(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return L5(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const n=this.getIndexAngle(t)-se+i;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:a}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),AL(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:n,border:a}=e,o=this._pointLabels.length;let s,l,u;if(e.pointLabels.display&&A5(this,o),n.display&&this.ticks.forEach((h,c)=>{if(c!==0||c===0&&this.min<0){l=this.getDistanceFromCenterForValue(h.value);const f=this.getContext(c),v=n.setContext(f),d=a.setContext(f);D5(this,v,l,o,d)}}),i.display){for(t.save(),s=o-1;s>=0;s--){const h=i.setContext(this.getPointLabelContext(s)),{color:c,lineWidth:f}=h;!f||!c||(t.lineWidth=f,t.strokeStyle=c,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),u=this.getPointPosition(s,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(u.x,u.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let a,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&this.min>=0&&!e.reverse)return;const u=i.setContext(this.getContext(l)),h=de(u.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){t.font=h.string,o=t.measureText(s.label).width,t.fillStyle=u.backdropColor;const c=ze(u.backdropPadding);t.fillRect(-o/2-c.left,-a-h.size/2-c.top,o+c.width,h.size+c.height)}uo(t,s.label,0,-a,h,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),t.restore()}drawTitle(){}}j(Vl,"id","radialLinear"),j(Vl,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Dv.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),j(Vl,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),j(Vl,"descriptors",{angleLines:{_fallback:"grid"}});const Ev={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},nr=Object.keys(Ev);function C1(r,t){return r-t}function A1(r,t){if(It(t))return null;const e=r._adapter,{parser:i,round:n,isoWeekday:a}=r._parseOpts;let o=t;return typeof i=="function"&&(o=i(o)),ne(o)||(o=typeof i=="string"?e.parse(o,i):e.parse(o)),o===null?null:(n&&(o=n==="week"&&(_s(a)||a===!0)?e.startOf(o,"isoWeek",a):e.startOf(o,n)),+o)}function D1(r,t,e,i){const n=nr.length;for(let a=nr.indexOf(r);a<n-1;++a){const o=Ev[nr[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((e-t)/(s*o.size))<=i)return nr[a]}return nr[n-1]}function I5(r,t,e,i,n){for(let a=nr.length-1;a>=nr.indexOf(e);a--){const o=nr[a];if(Ev[o].common&&r._adapter.diff(n,i,o)>=t-1)return o}return nr[e?nr.indexOf(e):0]}function P5(r){for(let t=nr.indexOf(r)+1,e=nr.length;t<e;++t)if(Ev[nr[t]].common)return nr[t]}function L1(r,t,e){if(!e)r[t]=!0;else if(e.length){const{lo:i,hi:n}=A0(e,t),a=e[i]>=t?e[i]:e[n];r[a]=!0}}function k5(r,t,e,i){const n=r._adapter,a=+n.startOf(t[0].value,i),o=t[t.length-1].value;let s,l;for(s=a;s<=o;s=+n.add(s,1,i))l=e[s],l>=0&&(t[l].major=!0);return t}function I1(r,t,e){const i=[],n={},a=t.length;let o,s;for(o=0;o<a;++o)s=t[o],n[s]=o,i.push({value:s,major:!1});return a===0||!e?i:k5(r,i,n,e)}var Xc;let Ay=(Xc=class extends sh{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),n=this._adapter=new FB._date(t.adapters.date);n.init(e),Jl(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:A1(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:a,minDefined:o,maxDefined:s}=this.getUserBounds();function l(u){!o&&!isNaN(u.min)&&(n=Math.min(n,u.min)),!s&&!isNaN(u.max)&&(a=Math.max(a,u.max))}(!o||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),n=ne(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),a=ne(a)&&!isNaN(a)?a:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,a-1),this.max=Math.max(n+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const a=this.min,o=this.max,s=hN(n,a,o);return this._unit=e.unit||(i.autoSkip?D1(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):I5(this,s.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:P5(this._unit),this.initOffsets(n),t.reverse&&s.reverse(),I1(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,i=0,n,a;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?i=a:i=(a-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;e=Se(e,0,o),i=Se(i,0,o),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,a=n.time,o=a.unit||D1(a.minUnit,e,i,this._getLabelCapacity(e)),s=bt(n.ticks.stepSize,1),l=o==="week"?a.isoWeekday:!1,u=_s(l)||l===!0,h={};let c=e,f,v;if(u&&(c=+t.startOf(c,"isoWeek",l)),c=+t.startOf(c,u?"day":o),t.diff(i,e,o)>1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const d=n.ticks.source==="data"&&this.getDataTimestamps();for(f=c,v=0;f<i;f=+t.add(f,s,o),v++)L1(h,f,d);return(f===i||n.bounds==="ticks"||v===1)&&L1(h,f,d),Object.keys(h).sort(C1).map(p=>+p)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,a=this._unit,o=e||n[a];return this._adapter.format(t,o)}_tickFormatFunction(t,e,i,n){const a=this.options,o=a.ticks.callback;if(o)return Zt(o,[t,e,i],this);const s=a.time.displayFormats,l=this._unit,u=this._majorUnit,h=l&&s[l],c=u&&s[u],f=i[e],v=u&&c&&f&&f.major;return this._adapter.format(t,n||(v?c:h))}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,n=Yr(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(n),o=Math.sin(n),s=this._resolveTickFontOptions(0).size;return{w:i*a+s*o,h:i*o+s*a}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,n=i[e.unit]||i.millisecond,a=this._tickFormatFunction(t,0,I1(this,[t],this._majorUnit),n),o=this._getLabelSize(a),s=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,i=n.length;e<i;++e)t=t.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const n=this.getLabels();for(e=0,i=n.length;e<i;++e)t.push(A1(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return zD(t.sort(C1))}},j(Xc,"id","time"),j(Xc,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}}),Xc);function Wh(r,t,e){let i=0,n=r.length-1,a,o,s,l;e?(t>=r[i].pos&&t<=r[n].pos&&({lo:i,hi:n}=Gi(r,"pos",t)),{pos:a,time:s}=r[i],{pos:o,time:l}=r[n]):(t>=r[i].time&&t<=r[n].time&&({lo:i,hi:n}=Gi(r,"time",t)),{time:a,pos:s}=r[i],{time:o,pos:l}=r[n]);const u=o-a;return u?s+(l-s)*(t-a)/u:s}class Dy extends Ay{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Wh(e,this.min),this._tableRange=Wh(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],a=[];let o,s,l,u,h;for(o=0,s=t.length;o<s;++o)u=t[o],u>=e&&u<=i&&n.push(u);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o<s;++o)h=n[o+1],l=n[o-1],u=n[o],Math.round((h+l)/2)!==u&&a.push({time:u,pos:o/(s-1)});return a}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(e)||i.length===1)&&i.push(e),i.sort((n,a)=>n-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Wh(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Wh(this._table,i*this._tableRange+this._minPos,!0)}}j(Dy,"id","timeseries"),j(Dy,"defaults",Ay.defaults);var R5=Object.freeze({__proto__:null,CategoryScale:wy,LinearScale:Ty,LogarithmicScale:My,RadialLinearScale:Vl,TimeScale:Ay,TimeSeriesScale:Dy});const Prt=[VB,pV,h5,R5],DL="label";function P1(r,t){typeof r=="function"?r(t):r&&(r.current=t)}function E5(r,t){const e=r.options;e&&t&&Object.assign(e,t)}function LL(r,t){r.labels=t}function IL(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:DL;const i=[];r.datasets=t.map(n=>{const a=r.datasets.find(o=>o[e]===n[e]);return!a||!n.data||i.includes(a)?{...n}:(i.push(a),Object.assign(a,n),a)})}function O5(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:DL;const e={labels:[],datasets:[]};return LL(e,r.labels),IL(e,r.datasets,t),e}function N5(r,t){const{height:e=150,width:i=300,redraw:n=!1,datasetIdKey:a,type:o,data:s,options:l,plugins:u=[],fallbackContent:h,updateMode:c,...f}=r,v=Wr.useRef(null),d=Wr.useRef(null),p=()=>{v.current&&(d.current=new B0(v.current,{type:o,data:O5(s,a),options:l&&{...l},plugins:u}),P1(t,d.current))},g=()=>{P1(t,null),d.current&&(d.current.destroy(),d.current=null)};return Wr.useEffect(()=>{!n&&d.current&&l&&E5(d.current,l)},[n,l]),Wr.useEffect(()=>{!n&&d.current&&LL(d.current.config.data,s.labels)},[n,s.labels]),Wr.useEffect(()=>{!n&&d.current&&s.datasets&&IL(d.current.config.data,s.datasets,a)},[n,s.datasets]),Wr.useEffect(()=>{d.current&&(n?(g(),setTimeout(p)):d.current.update(c))},[n,l,s.labels,s.datasets,c]),Wr.useEffect(()=>{d.current&&(g(),setTimeout(p))},[o]),Wr.useEffect(()=>(p(),()=>g()),[]),b0.createElement("canvas",{ref:v,role:"img",height:e,width:i,...f},h)}const B5=Wr.forwardRef(N5);function Ov(r,t){return B0.register(t),Wr.forwardRef((e,i)=>b0.createElement(B5,{...e,ref:i,type:r}))}const krt=Ov("line",iu),Rrt=Ov("bar",ru),Ert=Ov("doughnut",Tn),Ort=Ov("pie",Cf);/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation.
|
||
|
||
Permission to use, copy, modify, and/or distribute this software for any
|
||
purpose with or without fee is hereby granted.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
PERFORMANCE OF THIS SOFTWARE.
|
||
***************************************************************************** */var Ly=function(r,t){return Ly=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])},Ly(r,t)};function E(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ly(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Iy=function(){return Iy=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++){e=arguments[i];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},Iy.apply(this,arguments)},z5=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),V5=function(){function r(){this.browser=new z5,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),mt=new V5;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(mt.wxa=!0,mt.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?mt.worker=!0:!mt.hasGlobalWindow||"Deno"in window?(mt.node=!0,mt.svgSupported=!0):F5(navigator.userAgent,mt);function F5(r,t){var e=t.browser,i=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);i&&(e.firefox=!0,e.version=i[1]),n&&(e.ie=!0,e.version=n[1]),a&&(e.edge=!0,e.version=a[1],e.newEdge=+a[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),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in s||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}var V0=12,PL="sans-serif",Yn=V0+"px "+PL,G5=20,H5=100,W5="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function U5(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e<r.length;e++){var i=String.fromCharCode(e+32),n=(r.charCodeAt(e)-G5)/H5;t[i]=n}return t}var Y5=U5(W5),Qr={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var r,t;return function(e,i){if(!r){var n=Qr.createCanvas();r=n&&n.getContext("2d")}if(r)return t!==i&&(t=r.font=i||Yn),r.measureText(e);e=e||"",i=i||Yn;var a=/((?:\d+)?\.?\d*)px/.exec(i),o=a&&+a[1]||V0,s=0;if(i.indexOf("mono")>=0)s=o*e.length;else for(var l=0;l<e.length;l++){var u=Y5[e[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(r,t,e){var i=new Image;return i.onload=t,i.onerror=e,i.src=r,i}};function kL(r){for(var t in Qr)r[t]&&(Qr[t]=r[t])}var RL=Pr(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,t){return r["[object "+t+"]"]=!0,r},{}),EL=Pr(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,t){return r["[object "+t+"Array]"]=!0,r},{}),Es=Object.prototype.toString,Nv=Array.prototype,$5=Nv.forEach,X5=Nv.filter,F0=Nv.slice,Z5=Nv.map,k1=(function(){}).constructor,Uh=k1?k1.prototype:null,G0="__proto__",j5=2311;function H0(){return j5++}function Bv(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];typeof console<"u"&&console.error.apply(console,r)}function it(r){if(r==null||typeof r!="object")return r;var t=r,e=Es.call(r);if(e==="[object Array]"){if(!hs(r)){t=[];for(var i=0,n=r.length;i<n;i++)t[i]=it(r[i])}}else if(EL[e]){if(!hs(r)){var a=r.constructor;if(a.from)t=a.from(r);else{t=new a(r.length);for(var i=0,n=r.length;i<n;i++)t[i]=r[i]}}}else if(!RL[e]&&!hs(r)&&!ho(r)){t={};for(var o in r)r.hasOwnProperty(o)&&o!==G0&&(t[o]=it(r[o]))}return t}function ht(r,t,e){if(!et(t)||!et(r))return e?it(t):r;for(var i in t)if(t.hasOwnProperty(i)&&i!==G0){var n=r[i],a=t[i];et(a)&&et(n)&&!V(a)&&!V(n)&&!ho(a)&&!ho(n)&&!Py(a)&&!Py(n)&&!hs(a)&&!hs(n)?ht(n,a,e):(e||!(i in r))&&(r[i]=it(t[i]))}return r}function zv(r,t){for(var e=r[0],i=1,n=r.length;i<n;i++)e=ht(e,r[i],t);return e}function z(r,t){if(Object.assign)Object.assign(r,t);else for(var e in t)t.hasOwnProperty(e)&&e!==G0&&(r[e]=t[e]);return r}function tt(r,t,e){for(var i=xt(t),n=0,a=i.length;n<a;n++){var o=i[n];(e?t[o]!=null:r[o]==null)&&(r[o]=t[o])}return r}var q5=Qr.createCanvas;function vt(r,t){if(r){if(r.indexOf)return r.indexOf(t);for(var e=0,i=r.length;e<i;e++)if(r[e]===t)return e}return-1}function W0(r,t){var e=r.prototype;function i(){}i.prototype=t.prototype,r.prototype=new i;for(var n in e)e.hasOwnProperty(n)&&(r.prototype[n]=e[n]);r.prototype.constructor=r,r.superClass=t}function re(r,t,e){if(r="prototype"in r?r.prototype:r,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(t),n=0;n<i.length;n++){var a=i[n];a!=="constructor"&&(e?t[a]!=null:r[a]==null)&&(r[a]=t[a])}else tt(r,t,e)}function Me(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function A(r,t,e){if(r&&t)if(r.forEach&&r.forEach===$5)r.forEach(t,e);else if(r.length===+r.length)for(var i=0,n=r.length;i<n;i++)t.call(e,r[i],i,r);else for(var a in r)r.hasOwnProperty(a)&&t.call(e,r[a],a,r)}function F(r,t,e){if(!r)return[];if(!t)return Vv(r);if(r.map&&r.map===Z5)return r.map(t,e);for(var i=[],n=0,a=r.length;n<a;n++)i.push(t.call(e,r[n],n,r));return i}function Pr(r,t,e,i){if(r&&t){for(var n=0,a=r.length;n<a;n++)e=t.call(i,e,r[n],n,r);return e}}function Dt(r,t,e){if(!r)return[];if(!t)return Vv(r);if(r.filter&&r.filter===X5)return r.filter(t,e);for(var i=[],n=0,a=r.length;n<a;n++)t.call(e,r[n],n,r)&&i.push(r[n]);return i}function OL(r,t,e){if(r&&t){for(var i=0,n=r.length;i<n;i++)if(t.call(e,r[i],i,r))return r[i]}}function xt(r){if(!r)return[];if(Object.keys)return Object.keys(r);var t=[];for(var e in r)r.hasOwnProperty(e)&&t.push(e);return t}function K5(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return function(){return r.apply(t,e.concat(F0.call(arguments)))}}var $=Uh&&Q(Uh.bind)?Uh.call.bind(Uh.bind):K5;function ut(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){return r.apply(this,t.concat(F0.call(arguments)))}}function V(r){return Array.isArray?Array.isArray(r):Es.call(r)==="[object Array]"}function Q(r){return typeof r=="function"}function Y(r){return typeof r=="string"}function If(r){return Es.call(r)==="[object String]"}function Mt(r){return typeof r=="number"}function et(r){var t=typeof r;return t==="function"||!!r&&t==="object"}function Py(r){return!!RL[Es.call(r)]}function qe(r){return!!EL[Es.call(r)]}function ho(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function lh(r){return r.colorStops!=null}function NL(r){return r.image!=null}function BL(r){return Es.call(r)==="[object RegExp]"}function Ss(r){return r!==r}function pe(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=0,i=r.length;e<i;e++)if(r[e]!=null)return r[e]}function lt(r,t){return r??t}function jr(r,t,e){return r??t??e}function Vv(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return F0.apply(r,t)}function Fv(r){if(typeof r=="number")return[r,r,r,r];var t=r.length;return t===2?[r[0],r[1],r[0],r[1]]:t===3?[r[0],r[1],r[2],r[1]]:r}function Ve(r,t){if(!r)throw new Error(t)}function Lr(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var zL="__ec_primitive__";function Lu(r){r[zL]=!0}function hs(r){return r[zL]}var J5=function(){function r(){this.data={}}return r.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},r.prototype.has=function(t){return this.data.hasOwnProperty(t)},r.prototype.get=function(t){return this.data[t]},r.prototype.set=function(t,e){return this.data[t]=e,this},r.prototype.keys=function(){return xt(this.data)},r.prototype.forEach=function(t){var e=this.data;for(var i in e)e.hasOwnProperty(i)&&t(e[i],i)},r}(),VL=typeof Map=="function";function Q5(){return VL?new Map:new J5}var FL=function(){function r(t){var e=V(t);this.data=Q5();var i=this;t instanceof r?t.each(n):t&&A(t,n);function n(a,o){e?i.set(a,o):i.set(o,a)}}return r.prototype.hasKey=function(t){return this.data.has(t)},r.prototype.get=function(t){return this.data.get(t)},r.prototype.set=function(t,e){return this.data.set(t,e),e},r.prototype.each=function(t,e){this.data.forEach(function(i,n){t.call(e,i,n)})},r.prototype.keys=function(){var t=this.data.keys();return VL?Array.from(t):t},r.prototype.removeKey=function(t){this.data.delete(t)},r}();function Z(r){return new FL(r)}function ws(r,t){for(var e=new r.constructor(r.length+t.length),i=0;i<r.length;i++)e[i]=r[i];for(var n=r.length,i=0;i<t.length;i++)e[i+n]=t[i];return e}function uh(r,t){var e;if(Object.create)e=Object.create(r);else{var i=function(){};i.prototype=r,e=new i}return t&&z(e,t),e}function U0(r){var t=r.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function X(r,t){return r.hasOwnProperty(t)}function ee(){}var au=180/Math.PI;const tF=Object.freeze(Object.defineProperty({__proto__:null,HashMap:FL,RADIAN_TO_DEGREE:au,assert:Ve,bind:$,clone:it,concatArray:ws,createCanvas:q5,createHashMap:Z,createObject:uh,curry:ut,defaults:tt,disableUserSelect:U0,each:A,eqNaN:Ss,extend:z,filter:Dt,find:OL,guid:H0,hasOwn:X,indexOf:vt,inherits:W0,isArray:V,isArrayLike:Me,isBuiltInObject:Py,isDom:ho,isFunction:Q,isGradientObject:lh,isImagePatternObject:NL,isNumber:Mt,isObject:et,isPrimitive:hs,isRegExp:BL,isString:Y,isStringSafe:If,isTypedArray:qe,keys:xt,logError:Bv,map:F,merge:ht,mergeAll:zv,mixin:re,noop:ee,normalizeCssArray:Fv,reduce:Pr,retrieve:pe,retrieve2:lt,retrieve3:jr,setAsPrimitive:Lu,slice:Vv,trim:Lr},Symbol.toStringTag,{value:"Module"}));function Jn(r,t){return r==null&&(r=0),t==null&&(t=0),[r,t]}function ke(r,t){return r[0]=t[0],r[1]=t[1],r}function xi(r){return[r[0],r[1]]}function GL(r,t,e){return r[0]=t,r[1]=e,r}function ky(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function Pf(r,t,e,i){return r[0]=t[0]+e[0]*i,r[1]=t[1]+e[1]*i,r}function An(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function Iu(r){return Math.sqrt(Y0(r))}var eF=Iu;function Y0(r){return r[0]*r[0]+r[1]*r[1]}var rF=Y0;function iF(r,t,e){return r[0]=t[0]*e[0],r[1]=t[1]*e[1],r}function nF(r,t,e){return r[0]=t[0]/e[0],r[1]=t[1]/e[1],r}function aF(r,t){return r[0]*t[0]+r[1]*t[1]}function ou(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function xo(r,t){var e=Iu(t);return e===0?(r[0]=0,r[1]=0):(r[0]=t[0]/e,r[1]=t[1]/e),r}function kf(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}var Wi=kf;function HL(r,t){return(r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1])}var On=HL;function oF(r,t){return r[0]=-t[0],r[1]=-t[1],r}function su(r,t,e,i){return r[0]=t[0]+i*(e[0]-t[0]),r[1]=t[1]+i*(e[1]-t[1]),r}function we(r,t,e){var i=t[0],n=t[1];return r[0]=e[0]*i+e[2]*n+e[4],r[1]=e[1]*i+e[3]*n+e[5],r}function Ui(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function Yi(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}const sF=Object.freeze(Object.defineProperty({__proto__:null,add:ky,applyTransform:we,clone:xi,copy:ke,create:Jn,dist:Wi,distSquare:On,distance:kf,distanceSquare:HL,div:nF,dot:aF,len:Iu,lenSquare:Y0,length:eF,lengthSquare:rF,lerp:su,max:Yi,min:Ui,mul:iF,negate:oF,normalize:xo,scale:ou,scaleAndAdd:Pf,set:GL,sub:An},Symbol.toStringTag,{value:"Module"}));var Po=function(){function r(t,e){this.target=t,this.topTarget=e&&e.topTarget}return r}(),lF=function(){function r(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Po(e,t),"dragstart",t.event))},r.prototype._drag=function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,a=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(a,o,t),this.handler.dispatchToElement(new Po(e,t),"drag",t.event);var s=this.handler.findHover(i,n,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Po(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new Po(s,t),"dragenter",t.event))}},r.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Po(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Po(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},r}(),Rr=function(){function r(t){t&&(this._$eventProcessor=t)}return r.prototype.on=function(t,e,i,n){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof e=="function"&&(n=i,i=e,e=null),!i||!t)return this;var o=this._$eventProcessor;e!=null&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),a[t]||(a[t]=[]);for(var s=0;s<a[t].length;s++)if(a[t][s].h===i)return this;var l={h:i,query:e,ctx:n||this,callAtLast:i.zrEventfulCallAtLast},u=a[t].length-1,h=a[t][u];return h&&h.callAtLast?a[t].splice(u,0,l):a[t].push(l),this},r.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},r.prototype.off=function(t,e){var i=this._$handlers;if(!i)return this;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],a=0,o=i[t].length;a<o;a++)i[t][a].h!==e&&n.push(i[t][a]);i[t]=n}i[t]&&i[t].length===0&&delete i[t]}else delete i[t];return this},r.prototype.trigger=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],a=this._$eventProcessor;if(n)for(var o=e.length,s=n.length,l=0;l<s;l++){var u=n[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(t,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,e[0]);break;case 2:u.h.call(u.ctx,e[0],e[1]);break;default:u.h.apply(u.ctx,e);break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r.prototype.triggerWithContext=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],a=this._$eventProcessor;if(n)for(var o=e.length,s=e[o-1],l=n.length,u=0;u<l;u++){var h=n[u];if(!(a&&a.filter&&h.query!=null&&!a.filter(t,h.query)))switch(o){case 0:h.h.call(s);break;case 1:h.h.call(s,e[0]);break;case 2:h.h.call(s,e[0],e[1]);break;default:h.h.apply(s,e.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r}(),uF=Math.log(2);function Ry(r,t,e,i,n,a){var o=i+"-"+n,s=r.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var l=Math.round(Math.log((1<<s)-1&~n)/uF);return r[e][l]}for(var u=i|1<<e,h=e+1;i&1<<h;)h++;for(var c=0,f=0,v=0;f<s;f++){var d=1<<f;d&n||(c+=(v%2?-1:1)*r[e][f]*Ry(r,t-1,h,u,n|d,a),v++)}return a[o]=c,c}function R1(r,t){var e=[[r[0],r[1],1,0,0,0,-t[0]*r[0],-t[0]*r[1]],[0,0,0,r[0],r[1],1,-t[1]*r[0],-t[1]*r[1]],[r[2],r[3],1,0,0,0,-t[2]*r[2],-t[2]*r[3]],[0,0,0,r[2],r[3],1,-t[3]*r[2],-t[3]*r[3]],[r[4],r[5],1,0,0,0,-t[4]*r[4],-t[4]*r[5]],[0,0,0,r[4],r[5],1,-t[5]*r[4],-t[5]*r[5]],[r[6],r[7],1,0,0,0,-t[6]*r[6],-t[6]*r[7]],[0,0,0,r[6],r[7],1,-t[7]*r[6],-t[7]*r[7]]],i={},n=Ry(e,8,0,0,0,i);if(n!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*Ry(e,7,o===0?1:0,1<<o,1<<s,i)/n*t[o];return function(l,u,h){var c=u*a[6]+h*a[7]+1;l[0]=(u*a[0]+h*a[1]+a[2])/c,l[1]=(u*a[3]+h*a[4]+a[5])/c}}}var E1="___zrEVENTSAVED",Ud=[];function hF(r,t,e,i,n){return Ey(Ud,t,i,n,!0)&&Ey(r,e,Ud[0],Ud[1])}function Ey(r,t,e,i,n){if(t.getBoundingClientRect&&mt.domSupported&&!WL(t)){var a=t[E1]||(t[E1]={}),o=cF(t,a),s=fF(o,a,n);if(s)return s(r,e,i),!0}return!1}function cF(r,t){var e=t.markers;if(e)return e;e=t.markers=[];for(var i=["left","right"],n=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",n[u]+":0",i[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return e}function fF(r,t,e){for(var i=e?"invTrans":"trans",n=t[i],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var h=r[u].getBoundingClientRect(),c=2*u,f=h.left,v=h.top;o.push(f,v),l=l&&a&&f===a[c]&&v===a[c+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(t.srcCoords=o,t[i]=e?R1(s,o):R1(o,s))}function WL(r){return r.nodeName.toUpperCase()==="CANVAS"}var vF=/([&<>"'])/g,dF={"&":"&","<":"<",">":">",'"':""","'":"'"};function Oe(r){return r==null?"":(r+"").replace(vF,function(t,e){return dF[e]})}var pF=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Yd=[],gF=mt.browser.firefox&&+mt.browser.version.split(".")[0]<39;function Oy(r,t,e,i){return e=e||{},i?O1(r,t,e):gF&&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):O1(r,t,e),e}function O1(r,t,e){if(mt.domSupported&&r.getBoundingClientRect){var i=t.clientX,n=t.clientY;if(WL(r)){var a=r.getBoundingClientRect();e.zrX=i-a.left,e.zrY=n-a.top;return}else if(Ey(Yd,r,i,n)){e.zrX=Yd[0],e.zrY=Yd[1];return}}e.zrX=e.zrY=0}function $0(r){return r||window.event}function Sr(r,t,e){if(t=$0(t),t.zrX!=null)return t;var i=t.type,n=i&&i.indexOf("touch")>=0;if(n){var o=i!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Oy(r,o,t,e)}else{Oy(r,t,t,e);var a=yF(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&pF.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function yF(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,i=r.deltaY;if(e==null||i==null)return t;var n=Math.abs(i!==0?i:e),a=i>0?-1:i<0?1:e>0?-1:1;return 3*n*a}function Ny(r,t,e,i){r.addEventListener(t,e,i)}function mF(r,t,e,i){r.removeEventListener(t,e,i)}var qi=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function N1(r){return r.which===2||r.which===3}var _F=function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,s=n.length;o<s;o++){var l=n[o],u=Oy(i,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},r.prototype._recognize=function(t){for(var e in $d)if($d.hasOwnProperty(e)){var i=$d[e](this._track,t);if(i)return i}},r}();function B1(r){var t=r[1][0]-r[0][0],e=r[1][1]-r[0][1];return Math.sqrt(t*t+e*e)}function xF(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var $d={pinch:function(r,t){var e=r.length;if(e){var i=(r[e-1]||{}).points,n=(r[e-2]||{}).points||i;if(n&&n.length>1&&i&&i.length>1){var a=B1(i)/B1(n);!isFinite(a)&&(a=1),t.pinchScale=a;var o=xF(i);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function or(){return[1,0,0,1,0,0]}function hh(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Gv(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 bi(r,t,e){var i=t[0]*e[0]+t[2]*e[1],n=t[1]*e[0]+t[3]*e[1],a=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=i,r[1]=n,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function ti(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 Qn(r,t,e,i){i===void 0&&(i=[0,0]);var n=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],h=Math.sin(e),c=Math.cos(e);return r[0]=n*c+s*h,r[1]=-n*h+s*c,r[2]=a*c+l*h,r[3]=-a*h+c*l,r[4]=c*(o-i[0])+h*(u-i[1])+i[0],r[5]=c*(u-i[1])-h*(o-i[0])+i[1],r}function Hv(r,t,e){var i=e[0],n=e[1];return r[0]=t[0]*i,r[1]=t[1]*n,r[2]=t[2]*i,r[3]=t[3]*n,r[4]=t[4]*i,r[5]=t[5]*n,r}function bo(r,t){var e=t[0],i=t[2],n=t[4],a=t[1],o=t[3],s=t[5],l=e*o-a*i;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-i*l,r[3]=e*l,r[4]=(i*s-o*n)*l,r[5]=(a*n-e*s)*l,r):null}function UL(r){var t=or();return Gv(t,r),t}const bF=Object.freeze(Object.defineProperty({__proto__:null,clone:UL,copy:Gv,create:or,identity:hh,invert:bo,mul:bi,rotate:Qn,scale:Hv,translate:ti},Symbol.toStringTag,{value:"Module"}));var ct=function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,i=this.y;return this.x=t[0]*e+t[2]*i+t[4],this.y=t[1]*e+t[3]*i+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,i){t.x=e,t.y=i},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,i){t.x=e.x+i.x,t.y=e.y+i.y},r.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},r.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},r.scaleAndAdd=function(t,e,i,n){t.x=e.x+i.x*n,t.y=e.y+i.y*n},r.lerp=function(t,e,i,n){var a=1-n;t.x=a*e.x+n*i.x,t.y=a*e.y+n*i.y},r}(),Yh=Math.min,$h=Math.max,la=new ct,ua=new ct,ha=new ct,ca=new ct,al=new ct,ol=new ct,ft=function(){function r(t,e,i,n){i<0&&(t=t+i,i=-i),n<0&&(e=e+n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}return r.prototype.union=function(t){var e=Yh(t.x,this.x),i=Yh(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=$h(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=$h(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,i=t.width/e.width,n=t.height/e.height,a=or();return ti(a,a,[-e.x,-e.y]),Hv(a,a,[i,n]),ti(a,a,[t.x,t.y]),a},r.prototype.intersect=function(t,e){if(!t)return!1;t instanceof r||(t=r.create(t));var i=this,n=i.x,a=i.x+i.width,o=i.y,s=i.y+i.height,l=t.x,u=t.x+t.width,h=t.y,c=t.y+t.height,f=!(a<l||u<n||s<h||c<o);if(e){var v=1/0,d=0,p=Math.abs(a-l),g=Math.abs(u-n),y=Math.abs(s-h),m=Math.abs(c-o),_=Math.min(p,g),x=Math.min(y,m);a<l||u<n?_>d&&(d=_,p<g?ct.set(ol,-p,0):ct.set(ol,g,0)):_<v&&(v=_,p<g?ct.set(al,p,0):ct.set(al,-g,0)),s<h||c<o?x>d&&(d=x,y<m?ct.set(ol,0,-y):ct.set(ol,0,m)):_<v&&(v=_,y<m?ct.set(al,0,y):ct.set(al,0,-m))}return e&&ct.copy(e,f?al:ol),f},r.prototype.contain=function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},r.applyTransform=function(t,e,i){if(!i){t!==e&&r.copy(t,e);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],a=i[3],o=i[4],s=i[5];t.x=e.x*n+o,t.y=e.y*a+s,t.width=e.width*n,t.height=e.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}la.x=ha.x=e.x,la.y=ca.y=e.y,ua.x=ca.x=e.x+e.width,ua.y=ha.y=e.y+e.height,la.transform(i),ca.transform(i),ua.transform(i),ha.transform(i),t.x=Yh(la.x,ua.x,ha.x,ca.x),t.y=Yh(la.y,ua.y,ha.y,ca.y);var l=$h(la.x,ua.x,ha.x,ca.x),u=$h(la.y,ua.y,ha.y,ca.y);t.width=l-t.x,t.height=u-t.y},r}(),YL="silent";function SF(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:wF}}function wF(){qi(this.event)}var TF=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Rr),sl=function(){function r(t,e){this.x=t,this.y=e}return r}(),MF=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Xd=new ft(0,0,0,0),$L=function(r){E(t,r);function t(e,i,n,a,o){var s=r.call(this)||this;return s._hovered=new sl(0,0),s.storage=e,s.painter=i,s.painterRoot=a,s._pointerSize=o,n=n||new TF,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new lF(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(A(MF,function(i){e.on&&e.on(i,this[i],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var i=e.zrX,n=e.zrY,a=XL(this,i,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new sl(i,n):this.findHover(i,n),u=l.target,h=this.proxy;h.setCursor&&h.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(l,"mousemove",e),u&&u!==s&&this.dispatchToElement(l,"mouseover",e)},t.prototype.mouseout=function(e){var i=e.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new sl(0,0)},t.prototype.dispatch=function(e,i){var n=this[e];n&&n.call(this,i)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var i=this.proxy;i.setCursor&&i.setCursor(e)},t.prototype.dispatchToElement=function(e,i,n){e=e||{};var a=e.target;if(!(a&&a.silent)){for(var o="on"+i,s=SF(i,e,n);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(i,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(i,s)}))}},t.prototype.findHover=function(e,i,n){var a=this.storage.getDisplayList(),o=new sl(e,i);if(z1(a,o,e,i,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,h=new ft(e-u,i-u,l,l),c=a.length-1;c>=0;c--){var f=a[c];f!==n&&!f.ignore&&!f.ignoreCoarsePointer&&(!f.parent||!f.parent.ignoreCoarsePointer)&&(Xd.copy(f.getBoundingRect()),f.transform&&Xd.applyTransform(f.transform),Xd.intersect(h)&&s.push(f))}if(s.length)for(var v=4,d=Math.PI/12,p=Math.PI*2,g=0;g<u;g+=v)for(var y=0;y<p;y+=d){var m=e+g*Math.cos(y),_=i+g*Math.sin(y);if(z1(s,o,m,_,n),o.target)return o}}return o},t.prototype.processGesture=function(e,i){this._gestureMgr||(this._gestureMgr=new _F);var n=this._gestureMgr;i==="start"&&n.clear();var a=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(i==="end"&&n.clear(),a){var o=a.type;e.gestureEvent=o;var s=new sl;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t}(Rr);A(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){$L.prototype[r]=function(t){var e=t.zrX,i=t.zrY,n=XL(this,e,i),a,o;if((r!=="mouseup"||!n)&&(a=this.findHover(e,i),o=a.target),r==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||Wi(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function CF(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var i=r,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(t,e))return!1}i.silent&&(n=!0);var s=i.__hostTarget;i=s||i.parent}return n?YL:!0}return!1}function z1(r,t,e,i,n){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==n&&!o.ignore&&(s=CF(o,e,i))&&(!t.topTarget&&(t.topTarget=o),s!==YL)){t.target=o;break}}}function XL(r,t,e){var i=r.painter;return t<0||t>i.getWidth()||e<0||e>i.getHeight()}var ZL=32,ll=7;function AF(r){for(var t=0;r>=ZL;)t|=r&1,r>>=1;return r+t}function V1(r,t,e,i){var n=t+1;if(n===e)return 1;if(i(r[n++],r[t])<0){for(;n<e&&i(r[n],r[n-1])<0;)n++;DF(r,t,n)}else for(;n<e&&i(r[n],r[n-1])>=0;)n++;return n-t}function DF(r,t,e){for(e--;t<e;){var i=r[t];r[t++]=r[e],r[e--]=i}}function F1(r,t,e,i,n){for(i===t&&i++;i<e;i++){for(var a=r[i],o=t,s=i,l;o<s;)l=o+s>>>1,n(a,r[l])<0?s=l:o=l+1;var u=i-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function Zd(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])>0){for(s=i-n;l<s&&a(r,t[e+n+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;l<s&&a(r,t[e+n-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o<l;){var h=o+(l-o>>>1);a(r,t[e+h])>0?o=h+1:l=h}return l}function jd(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])<0){for(s=n+1;l<s&&a(r,t[e+n-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=i-n;l<s&&a(r,t[e+n+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o<l;){var h=o+(l-o>>>1);a(r,t[e+h])<0?l=h:o=h+1}return l}function LF(r,t){var e=ll,i,n,a=0,o=[];i=[],n=[];function s(v,d){i[a]=v,n[a]=d,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&n[v-1]<=n[v]+n[v+1]||v>=2&&n[v-2]<=n[v]+n[v-1])n[v-1]<n[v+1]&&v--;else if(n[v]>n[v+1])break;h(v)}}function u(){for(;a>1;){var v=a-2;v>0&&n[v-1]<n[v+1]&&v--,h(v)}}function h(v){var d=i[v],p=n[v],g=i[v+1],y=n[v+1];n[v]=p+y,v===a-3&&(i[v+1]=i[v+2],n[v+1]=n[v+2]),a--;var m=jd(r[g],r,d,p,0,t);d+=m,p-=m,p!==0&&(y=Zd(r[d+p-1],r,g,y,y-1,t),y!==0&&(p<=y?c(d,p,g,y):f(d,p,g,y)))}function c(v,d,p,g){var y=0;for(y=0;y<d;y++)o[y]=r[v+y];var m=0,_=p,x=v;if(r[x++]=r[_++],--g===0){for(y=0;y<d;y++)r[x+y]=o[m+y];return}if(d===1){for(y=0;y<g;y++)r[x+y]=r[_+y];r[x+g]=o[m];return}for(var b=e,S,w,T;;){S=0,w=0,T=!1;do if(t(r[_],o[m])<0){if(r[x++]=r[_++],w++,S=0,--g===0){T=!0;break}}else if(r[x++]=o[m++],S++,w=0,--d===1){T=!0;break}while((S|w)<b);if(T)break;do{if(S=jd(r[_],o,m,d,0,t),S!==0){for(y=0;y<S;y++)r[x+y]=o[m+y];if(x+=S,m+=S,d-=S,d<=1){T=!0;break}}if(r[x++]=r[_++],--g===0){T=!0;break}if(w=Zd(o[m],r,_,g,0,t),w!==0){for(y=0;y<w;y++)r[x+y]=r[_+y];if(x+=w,_+=w,g-=w,g===0){T=!0;break}}if(r[x++]=o[m++],--d===1){T=!0;break}b--}while(S>=ll||w>=ll);if(T)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),d===1){for(y=0;y<g;y++)r[x+y]=r[_+y];r[x+g]=o[m]}else{if(d===0)throw new Error;for(y=0;y<d;y++)r[x+y]=o[m+y]}}function f(v,d,p,g){var y=0;for(y=0;y<g;y++)o[y]=r[p+y];var m=v+d-1,_=g-1,x=p+g-1,b=0,S=0;if(r[x--]=r[m--],--d===0){for(b=x-(g-1),y=0;y<g;y++)r[b+y]=o[y];return}if(g===1){for(x-=d,m-=d,S=x+1,b=m+1,y=d-1;y>=0;y--)r[S+y]=r[b+y];r[x]=o[_];return}for(var w=e;;){var T=0,M=0,C=!1;do if(t(o[_],r[m])<0){if(r[x--]=r[m--],T++,M=0,--d===0){C=!0;break}}else if(r[x--]=o[_--],M++,T=0,--g===1){C=!0;break}while((T|M)<w);if(C)break;do{if(T=d-jd(o[_],r,v,d,d-1,t),T!==0){for(x-=T,m-=T,d-=T,S=x+1,b=m+1,y=T-1;y>=0;y--)r[S+y]=r[b+y];if(d===0){C=!0;break}}if(r[x--]=o[_--],--g===1){C=!0;break}if(M=g-Zd(r[m],o,0,g,g-1,t),M!==0){for(x-=M,_-=M,g-=M,S=x+1,b=_+1,y=0;y<M;y++)r[S+y]=o[b+y];if(g<=1){C=!0;break}}if(r[x--]=r[m--],--d===0){C=!0;break}w--}while(T>=ll||M>=ll);if(C)break;w<0&&(w=0),w+=2}if(e=w,e<1&&(e=1),g===1){for(x-=d,m-=d,S=x+1,b=m+1,y=d-1;y>=0;y--)r[S+y]=r[b+y];r[x]=o[_]}else{if(g===0)throw new Error;for(b=x-(g-1),y=0;y<g;y++)r[b+y]=o[y]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function ef(r,t,e,i){e||(e=0),i||(i=r.length);var n=i-e;if(!(n<2)){var a=0;if(n<ZL){a=V1(r,e,i,t),F1(r,e,i,e+a,t);return}var o=LF(r,t),s=AF(n);do{if(a=V1(r,e,i,t),a<s){var l=n;l>s&&(l=s),F1(r,e,e+l,e+a,t),a=l}o.pushRun(e,a),o.mergeRuns(),n-=a,e+=a}while(n!==0);o.forceMergeRuns()}}var hr=1,Fl=2,ts=4,G1=!1;function qd(){G1||(G1=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function H1(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var IF=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=H1}return r.prototype.traverse=function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},r.prototype.getDisplayList=function(t,e){e=e||!1;var i=this._displayList;return(t||!i.length)&&this.updateDisplayList(e),i},r.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,a=e.length;n<a;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,ef(i,H1)},r.prototype._updateAndAddDisplayable=function(t,e,i){if(!(t.ignore&&!i)){t.beforeUpdate(),t.update(),t.afterUpdate();var n=t.getClipPath();if(t.ignoreClip)e=null;else if(n){e?e=e.slice():e=[];for(var a=n,o=t;a;)a.parent=o,a.updateTransform(),e.push(a),o=a,a=a.getClipPath()}if(t.childrenRef){for(var s=t.childrenRef(),l=0;l<s.length;l++){var u=s[l];t.__dirty&&(u.__dirty|=hr),this._updateAndAddDisplayable(u,e,i)}t.__dirty=0}else{var h=t;e&&e.length?h.__clipPaths=e:h.__clipPaths&&h.__clipPaths.length>0&&(h.__clipPaths=[]),isNaN(h.z)&&(qd(),h.z=0),isNaN(h.z2)&&(qd(),h.z2=0),isNaN(h.zlevel)&&(qd(),h.zlevel=0),this._displayList[this._displayListLen++]=h}var c=t.getDecalElement&&t.getDecalElement();c&&this._updateAndAddDisplayable(c,e,i);var f=t.getTextGuideLine();f&&this._updateAndAddDisplayable(f,e,i);var v=t.getTextContent();v&&this._updateAndAddDisplayable(v,e,i)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,i=t.length;e<i;e++)this.delRoot(t[e]);return}var n=vt(this._roots,t);n>=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}(),Rf;Rf=mt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var lu={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)))},elasticOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-lu.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?lu.bounceIn(r*2)*.5:lu.bounceOut(r*2-1)*.5+.5}},Xh=Math.pow,Nn=Math.sqrt,Ef=1e-8,jL=1e-4,W1=Nn(3),Zh=1/3,di=Jn(),Cr=Jn(),cs=Jn();function Dn(r){return r>-Ef&&r<Ef}function qL(r){return r>Ef||r<-Ef}function ve(r,t,e,i,n){var a=1-n;return a*a*(a*r+3*n*t)+n*n*(n*i+3*a*e)}function U1(r,t,e,i,n){var a=1-n;return 3*(((t-r)*a+2*(e-t)*n)*a+(i-e)*n*n)}function Of(r,t,e,i,n,a){var o=i+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-n,h=s*s-3*o*l,c=s*l-9*o*u,f=l*l-3*s*u,v=0;if(Dn(h)&&Dn(c))if(Dn(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[v++]=d)}else{var p=c*c-4*h*f;if(Dn(p)){var g=c/h,d=-s/o+g,y=-g/2;d>=0&&d<=1&&(a[v++]=d),y>=0&&y<=1&&(a[v++]=y)}else if(p>0){var m=Nn(p),_=h*s+1.5*o*(-c+m),x=h*s+1.5*o*(-c-m);_<0?_=-Xh(-_,Zh):_=Xh(_,Zh),x<0?x=-Xh(-x,Zh):x=Xh(x,Zh);var d=(-s-(_+x))/(3*o);d>=0&&d<=1&&(a[v++]=d)}else{var b=(2*h*s-3*o*c)/(2*Nn(h*h*h)),S=Math.acos(b)/3,w=Nn(h),T=Math.cos(S),d=(-s-2*w*T)/(3*o),y=(-s+w*(T+W1*Math.sin(S)))/(3*o),M=(-s+w*(T-W1*Math.sin(S)))/(3*o);d>=0&&d<=1&&(a[v++]=d),y>=0&&y<=1&&(a[v++]=y),M>=0&&M<=1&&(a[v++]=M)}}return v}function KL(r,t,e,i,n){var a=6*e-12*t+6*r,o=9*t+3*i-3*r-9*e,s=3*t-3*r,l=0;if(Dn(o)){if(qL(a)){var u=-s/a;u>=0&&u<=1&&(n[l++]=u)}}else{var h=a*a-4*o*s;if(Dn(h))n[0]=-a/(2*o);else if(h>0){var c=Nn(h),u=(-a+c)/(2*o),f=(-a-c)/(2*o);u>=0&&u<=1&&(n[l++]=u),f>=0&&f<=1&&(n[l++]=f)}}return l}function $n(r,t,e,i,n,a){var o=(t-r)*n+r,s=(e-t)*n+t,l=(i-e)*n+e,u=(s-o)*n+o,h=(l-s)*n+s,c=(h-u)*n+u;a[0]=r,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=i}function JL(r,t,e,i,n,a,o,s,l,u,h){var c,f=.005,v=1/0,d,p,g,y;di[0]=l,di[1]=u;for(var m=0;m<1;m+=.05)Cr[0]=ve(r,e,n,o,m),Cr[1]=ve(t,i,a,s,m),g=On(di,Cr),g<v&&(c=m,v=g);v=1/0;for(var _=0;_<32&&!(f<jL);_++)d=c-f,p=c+f,Cr[0]=ve(r,e,n,o,d),Cr[1]=ve(t,i,a,s,d),g=On(Cr,di),d>=0&&g<v?(c=d,v=g):(cs[0]=ve(r,e,n,o,p),cs[1]=ve(t,i,a,s,p),y=On(cs,di),p<=1&&y<v?(c=p,v=y):f*=.5);return h&&(h[0]=ve(r,e,n,o,c),h[1]=ve(t,i,a,s,c)),Nn(v)}function PF(r,t,e,i,n,a,o,s,l){for(var u=r,h=t,c=0,f=1/l,v=1;v<=l;v++){var d=v*f,p=ve(r,e,n,o,d),g=ve(t,i,a,s,d),y=p-u,m=g-h;c+=Math.sqrt(y*y+m*m),u=p,h=g}return c}function be(r,t,e,i){var n=1-i;return n*(n*r+2*i*t)+i*i*e}function By(r,t,e,i){return 2*((1-i)*(t-r)+i*(e-t))}function kF(r,t,e,i,n){var a=r-2*t+e,o=2*(t-r),s=r-i,l=0;if(Dn(a)){if(qL(o)){var u=-s/o;u>=0&&u<=1&&(n[l++]=u)}}else{var h=o*o-4*a*s;if(Dn(h)){var u=-o/(2*a);u>=0&&u<=1&&(n[l++]=u)}else if(h>0){var c=Nn(h),u=(-o+c)/(2*a),f=(-o-c)/(2*a);u>=0&&u<=1&&(n[l++]=u),f>=0&&f<=1&&(n[l++]=f)}}return l}function QL(r,t,e){var i=r+e-2*t;return i===0?.5:(r-t)/i}function Pu(r,t,e,i,n){var a=(t-r)*i+r,o=(e-t)*i+t,s=(o-a)*i+a;n[0]=r,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=e}function t2(r,t,e,i,n,a,o,s,l){var u,h=.005,c=1/0;di[0]=o,di[1]=s;for(var f=0;f<1;f+=.05){Cr[0]=be(r,e,n,f),Cr[1]=be(t,i,a,f);var v=On(di,Cr);v<c&&(u=f,c=v)}c=1/0;for(var d=0;d<32&&!(h<jL);d++){var p=u-h,g=u+h;Cr[0]=be(r,e,n,p),Cr[1]=be(t,i,a,p);var v=On(Cr,di);if(p>=0&&v<c)u=p,c=v;else{cs[0]=be(r,e,n,g),cs[1]=be(t,i,a,g);var y=On(cs,di);g<=1&&y<c?(u=g,c=y):h*=.5}}return l&&(l[0]=be(r,e,n,u),l[1]=be(t,i,a,u)),Nn(c)}function RF(r,t,e,i,n,a,o){for(var s=r,l=t,u=0,h=1/o,c=1;c<=o;c++){var f=c*h,v=be(r,e,n,f),d=be(t,i,a,f),p=v-s,g=d-l;u+=Math.sqrt(p*p+g*g),s=v,l=d}return u}var EF=/cubic-bezier\(([0-9,\.e ]+)\)/;function X0(r){var t=r&&EF.exec(r);if(t){var e=t[1].split(","),i=+Lr(e[0]),n=+Lr(e[1]),a=+Lr(e[2]),o=+Lr(e[3]);if(isNaN(i+n+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Of(0,i,a,1,l,s)&&ve(0,n,o,1,s[0])}}}var OF=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||ee,this.ondestroy=t.ondestroy||ee,this.onrestart=t.onrestart||ee,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var i=this._life,n=t-this._startTime-this._pausedTime,a=n/i;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=n%i;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Q(t)?t:lu[t]||X0(t)},r}(),e2=function(){function r(t){this.value=t}return r}(),NF=function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new e2(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),ch=function(){function r(t){this._list=new NF,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var i=this._list,n=this._map,a=null;if(n[t]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new e2(e),s.key=t,i.insertEntry(s),n[t]=s}return a},r.prototype.get=function(t){var e=this._map[t],i=this._list;if(e!=null)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),Y1={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 BF(r){return r=Math.round(r),r<0?0:r>360?360:r}function ku(r){return r<0?0:r>1?1:r}function Kd(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?qr(parseFloat(t)/100*255):qr(parseInt(t,10))}function to(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?ku(parseFloat(t)/100):ku(parseFloat(t))}function Jd(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 Ln(r,t,e){return r+(t-r)*e}function br(r,t,e,i,n){return r[0]=t,r[1]=e,r[2]=i,r[3]=n,r}function zy(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var r2=new ch(20),jh=null;function ko(r,t){jh&&zy(jh,t),jh=r2.put(r,jh||t.slice())}function Ze(r,t){if(r){t=t||[];var e=r2.get(r);if(e)return zy(t,e);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in Y1)return zy(t,Y1[i]),ko(r,t),t;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){br(t,0,0,0,1);return}return br(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),ko(r,t),t}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){br(t,0,0,0,1);return}return br(t,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),ko(r,t),t}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===n){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),h=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?br(t,+u[0],+u[1],+u[2],1):br(t,0,0,0,1);h=to(u.pop());case"rgb":if(u.length>=3)return br(t,Kd(u[0]),Kd(u[1]),Kd(u[2]),u.length===3?h:to(u[3])),ko(r,t),t;br(t,0,0,0,1);return;case"hsla":if(u.length!==4){br(t,0,0,0,1);return}return u[3]=to(u[3]),Vy(u,t),ko(r,t),t;case"hsl":if(u.length!==3){br(t,0,0,0,1);return}return Vy(u,t),ko(r,t),t;default:return}}br(t,0,0,0,1)}}function Vy(r,t){var e=(parseFloat(r[0])%360+360)%360/360,i=to(r[1]),n=to(r[2]),a=n<=.5?n*(i+1):n+i-n*i,o=n*2-a;return t=t||[],br(t,qr(Jd(o,a,e+1/3)*255),qr(Jd(o,a,e)*255),qr(Jd(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function zF(r){if(r){var t=r[0]/255,e=r[1]/255,i=r[2]/255,n=Math.min(t,e,i),a=Math.max(t,e,i),o=a-n,s=(a+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+n):u=o/(2-a-n);var h=((a-t)/6+o/2)/o,c=((a-e)/6+o/2)/o,f=((a-i)/6+o/2)/o;t===a?l=f-c:e===a?l=1/3+h-f:i===a&&(l=2/3+c-h),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return r[3]!=null&&v.push(r[3]),v}}function Nf(r,t){var e=Ze(r);if(e){for(var i=0;i<3;i++)t<0?e[i]=e[i]*(1-t)|0:e[i]=(255-e[i])*t+e[i]|0,e[i]>255?e[i]=255:e[i]<0&&(e[i]=0);return Kr(e,e.length===4?"rgba":"rgb")}}function VF(r){var t=Ze(r);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function uu(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=t[n],s=t[a],l=i-n;return e[0]=qr(Ln(o[0],s[0],l)),e[1]=qr(Ln(o[1],s[1],l)),e[2]=qr(Ln(o[2],s[2],l)),e[3]=ku(Ln(o[3],s[3],l)),e}}var FF=uu;function Z0(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=Ze(t[n]),s=Ze(t[a]),l=i-n,u=Kr([qr(Ln(o[0],s[0],l)),qr(Ln(o[1],s[1],l)),qr(Ln(o[2],s[2],l)),ku(Ln(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:n,rightIndex:a,value:i}:u}}var GF=Z0;function fs(r,t,e,i){var n=Ze(r);if(r)return n=zF(n),t!=null&&(n[0]=BF(t)),e!=null&&(n[1]=to(e)),i!=null&&(n[2]=to(i)),Kr(Vy(n),"rgba")}function Ru(r,t){var e=Ze(r);if(e&&t!=null)return e[3]=ku(t),Kr(e,"rgba")}function Kr(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 Eu(r,t){var e=Ze(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}function HF(){return Kr([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var $1=new ch(100);function Bf(r){if(Y(r)){var t=$1.get(r);return t||(t=Nf(r,-.1),$1.put(r,t)),t}else if(lh(r)){var e=z({},r);return e.colorStops=F(r.colorStops,function(i){return{offset:i.offset,color:Nf(i.color,-.1)}}),e}return r}const WF=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:uu,fastMapToColor:FF,lerp:Z0,lift:Nf,liftColor:Bf,lum:Eu,mapToColor:GF,modifyAlpha:Ru,modifyHSL:fs,parse:Ze,random:HF,stringify:Kr,toHex:VF},Symbol.toStringTag,{value:"Module"}));var zf=Math.round;function Ou(r){var t;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var e=Ze(r);e&&(r="rgb("+e[0]+","+e[1]+","+e[2]+")",t=e[3])}return{color:r,opacity:t??1}}var X1=1e-4;function In(r){return r<X1&&r>-X1}function qh(r){return zf(r*1e3)/1e3}function Fy(r){return zf(r*1e4)/1e4}function UF(r){return"matrix("+qh(r[0])+","+qh(r[1])+","+qh(r[2])+","+qh(r[3])+","+Fy(r[4])+","+Fy(r[5])+")"}var YF={left:"start",right:"end",center:"middle",middle:"middle"};function $F(r,t,e){return e==="top"?r+=t/2:e==="bottom"&&(r-=t/2),r}function XF(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function ZF(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 i2(r){return r&&!!r.image}function jF(r){return r&&!!r.svgElement}function j0(r){return i2(r)||jF(r)}function n2(r){return r.type==="linear"}function a2(r){return r.type==="radial"}function o2(r){return r&&(r.type==="linear"||r.type==="radial")}function Wv(r){return"url(#"+r+")"}function s2(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 l2(r){var t=r.x||0,e=r.y||0,i=(r.rotation||0)*au,n=lt(r.scaleX,1),a=lt(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(t||e)&&l.push("translate("+t+"px,"+e+"px)"),i&&l.push("rotate("+i+")"),(n!==1||a!==1)&&l.push("scale("+n+","+a+")"),(o||s)&&l.push("skew("+zf(o*au)+"deg, "+zf(s*au)+"deg)"),l.join(" ")}var qF=function(){return mt.hasGlobalWindow&&Q(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),Gy=Array.prototype.slice;function Bi(r,t,e){return(t-r)*e+r}function Qd(r,t,e,i){for(var n=t.length,a=0;a<n;a++)r[a]=Bi(t[a],e[a],i);return r}function KF(r,t,e,i){for(var n=t.length,a=n&&t[0].length,o=0;o<n;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=Bi(t[o][s],e[o][s],i)}return r}function Kh(r,t,e,i){for(var n=t.length,a=0;a<n;a++)r[a]=t[a]+e[a]*i;return r}function Z1(r,t,e,i){for(var n=t.length,a=n&&t[0].length,o=0;o<n;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=t[o][s]+e[o][s]*i}return r}function JF(r,t){for(var e=r.length,i=t.length,n=e>i?t:r,a=Math.min(e,i),o=n[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(e,i);s++)n.push({offset:o.offset,color:o.color.slice()})}function QF(r,t,e){var i=r,n=t;if(!(!i.push||!n.push)){var a=i.length,o=n.length;if(a!==o){var s=a>o;if(s)i.length=o;else for(var l=a;l<o;l++)i.push(e===1?n[l]:Gy.call(n[l]))}for(var u=i[0]&&i[0].length,l=0;l<i.length;l++)if(e===1)isNaN(i[l])&&(i[l]=n[l]);else for(var h=0;h<u;h++)isNaN(i[l][h])&&(i[l][h]=n[l][h])}}function hu(r){if(Me(r)){var t=r.length;if(Me(r[0])){for(var e=[],i=0;i<t;i++)e.push(Gy.call(r[i]));return e}return Gy.call(r)}return r}function rf(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function tG(r){return Me(r&&r[0])?2:1}var Jh=0,nf=1,u2=2,Gl=3,Hy=4,Wy=5,j1=6;function q1(r){return r===Hy||r===Wy}function Qh(r){return r===nf||r===u2}var ul=[0,0,0,0],eG=function(){function r(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,i){this._needsSort=!0;var n=this.keyframes,a=n.length,o=!1,s=j1,l=e;if(Me(e)){var u=tG(e);s=u,(u===1&&!Mt(e[0])||u===2&&!Mt(e[0][0]))&&(o=!0)}else if(Mt(e)&&!Ss(e))s=Jh;else if(Y(e))if(!isNaN(+e))s=Jh;else{var h=Ze(e);h&&(l=h,s=Gl)}else if(lh(e)){var c=z({},l);c.colorStops=F(e.colorStops,function(v){return{offset:v.offset,color:Ze(v.color)}}),n2(e)?s=Hy:a2(e)&&(s=Wy),l=c}a===0?this.valType=s:(s!==this.valType||s===j1)&&(o=!0),this.discrete=this.discrete||o;var f={time:t,value:l,rawValue:e,percent:0};return i&&(f.easing=i,f.easingFunc=Q(i)?i:lu[i]||X0(i)),n.push(f),f},r.prototype.prepare=function(t,e){var i=this.keyframes;this._needsSort&&i.sort(function(p,g){return p.time-g.time});for(var n=this.valType,a=i.length,o=i[a-1],s=this.discrete,l=Qh(n),u=q1(n),h=0;h<a;h++){var c=i[h],f=c.value,v=o.value;c.percent=c.time/t,s||(l&&h!==a-1?QF(f,v,n):u&&JF(f.colorStops,v.colorStops))}if(!s&&n!==Wy&&e&&this.needsAnimate()&&e.needsAnimate()&&n===e.valType&&!e._finished){this._additiveTrack=e;for(var d=i[0].value,h=0;h<a;h++)n===Jh?i[h].additiveValue=i[h].value-d:n===Gl?i[h].additiveValue=Kh([],i[h].value,d,-1):Qh(n)&&(i[h].additiveValue=n===nf?Kh([],i[h].value,d,-1):Z1([],i[h].value,d,-1))}},r.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i=this._additiveTrack!=null,n=i?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===Gl,h,c=this._lastFr,f=Math.min,v,d;if(s===1)v=d=o[0];else{if(e<0)h=0;else if(e<this._lastFrP){var p=f(c+1,s-1);for(h=p;h>=0&&!(o[h].percent<=e);h--);h=f(h,s-2)}else{for(h=c;h<s&&!(o[h].percent>e);h++);h=f(h-1,s-2)}d=o[h+1],v=o[h]}if(v&&d){this._lastFr=h,this._lastFrP=e;var g=d.percent-v.percent,y=g===0?1:f((e-v.percent)/g,1);d.easingFunc&&(y=d.easingFunc(y));var m=i?this._additiveValue:u?ul:t[l];if((Qh(a)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)t[l]=y<1?v.rawValue:d.rawValue;else if(Qh(a))a===nf?Qd(m,v[n],d[n],y):KF(m,v[n],d[n],y);else if(q1(a)){var _=v[n],x=d[n],b=a===Hy;t[l]={type:b?"linear":"radial",x:Bi(_.x,x.x,y),y:Bi(_.y,x.y,y),colorStops:F(_.colorStops,function(w,T){var M=x.colorStops[T];return{offset:Bi(w.offset,M.offset,y),color:rf(Qd([],w.color,M.color,y))}}),global:x.global},b?(t[l].x2=Bi(_.x2,x.x2,y),t[l].y2=Bi(_.y2,x.y2,y)):t[l].r=Bi(_.r,x.r,y)}else if(u)Qd(m,v[n],d[n],y),i||(t[l]=rf(m));else{var S=Bi(v[n],d[n],y);i?this._additiveValue=S:t[l]=S}i&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,i=this.propName,n=this._additiveValue;e===Jh?t[i]=t[i]+n:e===Gl?(Ze(t[i],ul),Kh(ul,ul,n,1),t[i]=rf(ul)):e===nf?Kh(t[i],t[i],n,1):e===u2&&Z1(t[i],t[i],n,1)},r}(),q0=function(){function r(t,e,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n){Bv("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,i){return this.whenWithKeys(t,e,xt(e),i)},r.prototype.whenWithKeys=function(t,e,i,n){for(var a=this._tracks,o=0;o<i.length;o++){var s=i[o],l=a[s];if(!l){l=a[s]=new eG(s);var u=void 0,h=this._getAdditiveTrack(s);if(h){var c=h.keyframes,f=c[c.length-1];u=f&&f.value,h.valType===Gl&&u&&(u=rf(u))}else u=this._target[s];if(u==null)continue;t>0&&l.addKeyframe(0,hu(u),n),this._trackKeys.push(s)}l.addKeyframe(t,hu(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,i=0;i<e;i++)t[i].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var i=0;i<e.length;i++)e[i].call(this)},r.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,i=0;i<e.length;i++)t[e[i]].setFinished()},r.prototype._getAdditiveTrack=function(t){var e,i=this._additiveAnimators;if(i)for(var n=0;n<i.length;n++){var a=i[n].getTrack(t);a&&(e=a)}return e},r.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=this,i=[],n=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,h=u.length;if(s.prepare(n,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var c=u[h-1];c&&(e._target[s.propName]=c.rawValue),s.setFinished()}else i.push(s)}if(i.length||this._force){var f=new OF({life:n,loop:this._loop,delay:this._delay||0,onframe:function(v){e._started=2;var d=e._additiveAnimators;if(d){for(var p=!1,g=0;g<d.length;g++)if(d[g]._clip){p=!0;break}p||(e._additiveAnimators=null)}for(var g=0;g<i.length;g++)i[g].step(e._target,v);var y=e._onframeCbs;if(y)for(var g=0;g<y.length;g++)y[g](e._target,v)},ondestroy:function(){e._doneCallback()}});this._clip=f,this.animation&&this.animation.addClip(f),t&&f.setEasing(t)}else this._doneCallback();return this}},r.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},r.prototype.delay=function(t){return this._delay=t,this},r.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},r.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},r.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(t){return this._tracks[t]},r.prototype.getTracks=function(){var t=this;return F(this._trackKeys,function(e){return t._tracks[e]})},r.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var i=this._tracks,n=this._trackKeys,a=0;a<t.length;a++){var o=i[t[a]];o&&!o.isFinished()&&(e?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<n.length;a++)if(!i[n[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(t,e,i){if(t){e=e||this._trackKeys;for(var n=0;n<e.length;n++){var a=e[n],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[i?0:s.length-1];l&&(t[a]=hu(l.rawValue))}}}},r.prototype.__changeFinalValue=function(t,e){e=e||xt(t);for(var i=0;i<e.length;i++){var n=e[i],a=this._tracks[n];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,t[n]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}();function as(){return new Date().getTime()}var rG=function(r){E(t,r);function t(e){var i=r.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,e=e||{},i.stage=e.stage||{},i}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var i=e.getClip();i&&this.addClip(i)},t.prototype.removeClip=function(e){if(e.animation){var i=e.prev,n=e.next;i?i.next=n:this._head=n,n?n.prev=i:this._tail=i,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var i=e.getClip();i&&this.removeClip(i),e.animation=null},t.prototype.update=function(e){for(var i=as()-this._pausedTime,n=i-this._time,a=this._head;a;){var o=a.next,s=a.step(i,n);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=i,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function i(){e._running&&(Rf(i),!e._paused&&e.update())}Rf(i)},t.prototype.start=function(){this._running||(this._time=as(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=as(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=as()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var i=e.next;e.prev=e.next=e.animation=null,e=i}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,i){i=i||{},this.start();var n=new q0(e,i.loop);return this.addAnimator(n),n},t}(Rr),iG=300,tp=mt.domSupported,ep=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=F(r,function(n){var a=n.replace("mouse","pointer");return e.hasOwnProperty(a)?a:n});return{mouse:r,touch:t,pointer:i}}(),K1={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},J1=!1;function Uy(r){var t=r.pointerType;return t==="pen"||t==="touch"}function nG(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 rp(r){r&&(r.zrByTouch=!0)}function aG(r,t){return Sr(r.dom,new oG(r,t),!0)}function h2(r,t){for(var e=t,i=!1;e&&e.nodeType!==9&&!(i=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return i}var oG=function(){function r(t,e){this.stopPropagation=ee,this.stopImmediatePropagation=ee,this.preventDefault=ee,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r}(),Gr={mousedown:function(r){r=Sr(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Sr(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=Sr(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Sr(this.dom,r);var t=r.toElement||r.relatedTarget;h2(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){J1=!0,r=Sr(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){J1||(r=Sr(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Sr(this.dom,r),rp(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Gr.mousemove.call(this,r),Gr.mousedown.call(this,r)},touchmove:function(r){r=Sr(this.dom,r),rp(r),this.handler.processGesture(r,"change"),Gr.mousemove.call(this,r)},touchend:function(r){r=Sr(this.dom,r),rp(r),this.handler.processGesture(r,"end"),Gr.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<iG&&Gr.click.call(this,r)},pointerdown:function(r){Gr.mousedown.call(this,r)},pointermove:function(r){Uy(r)||Gr.mousemove.call(this,r)},pointerup:function(r){Gr.mouseup.call(this,r)},pointerout:function(r){Uy(r)||Gr.mouseout.call(this,r)}};A(["click","dblclick","contextmenu"],function(r){Gr[r]=function(t){t=Sr(this.dom,t),this.trigger(r,t)}});var Yy={pointermove:function(r){Uy(r)||Yy.mousemove.call(this,r)},pointerup:function(r){Yy.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),t&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function sG(r,t){var e=t.domHandlers;mt.pointerEventsSupported?A(ep.pointer,function(i){af(t,i,function(n){e[i].call(r,n)})}):(mt.touchEventsSupported&&A(ep.touch,function(i){af(t,i,function(n){e[i].call(r,n),nG(t)})}),A(ep.mouse,function(i){af(t,i,function(n){n=$0(n),t.touching||e[i].call(r,n)})}))}function lG(r,t){mt.pointerEventsSupported?A(K1.pointer,e):mt.touchEventsSupported||A(K1.mouse,e);function e(i){function n(a){a=$0(a),h2(r,a.target)||(a=aG(r,a),t.domHandlers[i].call(r,a))}af(t,i,n,{capture:!0})}}function af(r,t,e,i){r.mounted[t]=e,r.listenerOpts[t]=i,Ny(r.domTarget,t,e,i)}function ip(r){var t=r.mounted;for(var e in t)t.hasOwnProperty(e)&&mF(r.domTarget,e,t[e],r.listenerOpts[e]);r.mounted={}}var Q1=function(){function r(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e}return r}(),uG=function(r){E(t,r);function t(e,i){var n=r.call(this)||this;return n.__pointerCapturing=!1,n.dom=e,n.painterRoot=i,n._localHandlerScope=new Q1(e,Gr),tp&&(n._globalHandlerScope=new Q1(document,Yy)),sG(n,n._localHandlerScope),n}return t.prototype.dispose=function(){ip(this._localHandlerScope),tp&&ip(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,tp&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var i=this._globalHandlerScope;e?lG(this,i):ip(i)}},t}(Rr),c2=1;mt.hasGlobalWindow&&(c2=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Vf=c2,$y=.4,Xy="#333",Zy="#ccc",hG="#eee",tS=hh,eS=5e-5;function fa(r){return r>eS||r<-eS}var va=[],Ro=[],np=or(),ap=Math.abs,$i=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 fa(this.rotation)||fa(this.x)||fa(this.y)||fa(this.scaleX-1)||fa(this.scaleY-1)||fa(this.skewX)||fa(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),i=this.transform;if(!(e||t)){i&&(tS(i),this.invTransform=null);return}i=i||or(),e?this.getLocalTransform(i):tS(i),t&&(e?bi(i,t,i):Gv(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(va);var i=va[0]<0?-1:1,n=va[1]<0?-1:1,a=((va[0]-i)*e+i)/va[0]||0,o=((va[1]-n)*e+n)/va[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||or(),bo(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),a=Math.PI/2+n-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(a),e=Math.sqrt(e),this.skewX=a,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=i,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||or(),bi(Ro,t.invTransform,e),e=Ro);var i=this.originX,n=this.originY;(i||n)&&(np[4]=i,np[5]=n,bi(Ro,e,np),Ro[4]-=i,Ro[5]-=n,e=Ro),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&we(i,i,n),i},r.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&we(i,i,n),i},r.prototype.getLineScale=function(){var t=this.transform;return t&&ap(t[0]-1)>1e-10&&ap(t[3]-1)>1e-10?Math.sqrt(ap(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){f2(this,t)},r.getLocalTransform=function(t,e){e=e||[];var i=t.originX||0,n=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,h=t.x,c=t.y,f=t.skewX?Math.tan(t.skewX):0,v=t.skewY?Math.tan(-t.skewY):0;if(i||n||s||l){var d=i+s,p=n+l;e[4]=-d*a-f*p*o,e[5]=-p*o-v*d*a}else e[4]=e[5]=0;return e[0]=a,e[3]=o,e[1]=v*a,e[2]=f*o,u&&Qn(e,e,u),e[4]+=i+h,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}(),Ti=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function f2(r,t){for(var e=0;e<Ti.length;e++){var i=Ti[e];r[i]=t[i]}}var rS={};function dr(r,t){t=t||Yn;var e=rS[t];e||(e=rS[t]=new ch(500));var i=e.get(r);return i==null&&(i=Qr.measureText(r,t).width,e.put(r,i)),i}function iS(r,t,e,i){var n=dr(r,t),a=Uv(t),o=Hl(0,n,e),s=es(0,a,i),l=new ft(o,s,n,a);return l}function fh(r,t,e,i){var n=((r||"")+"").split(`
|
||
`),a=n.length;if(a===1)return iS(n[0],t,e,i);for(var o=new ft(0,0,0,0),s=0;s<n.length;s++){var l=iS(n[s],t,e,i);s===0?o.copy(l):o.union(l)}return o}function Hl(r,t,e){return e==="right"?r-=t:e==="center"&&(r-=t/2),r}function es(r,t,e){return e==="middle"?r-=t/2:e==="bottom"&&(r-=t),r}function Uv(r){return dr("国",r)}function ei(r,t){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*t:parseFloat(r):r}function Ff(r,t,e){var i=t.position||"inside",n=t.distance!=null?t.distance:5,a=e.height,o=e.width,s=a/2,l=e.x,u=e.y,h="left",c="top";if(i instanceof Array)l+=ei(i[0],e.width),u+=ei(i[1],e.height),h=null,c=null;else switch(i){case"left":l-=n,u+=s,h="right",c="middle";break;case"right":l+=n+o,u+=s,c="middle";break;case"top":l+=o/2,u-=n,h="center",c="bottom";break;case"bottom":l+=o/2,u+=a+n,h="center";break;case"inside":l+=o/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=n,u+=s,c="middle";break;case"insideRight":l+=o-n,u+=s,h="right",c="middle";break;case"insideTop":l+=o/2,u+=n,h="center";break;case"insideBottom":l+=o/2,u+=a-n,h="center",c="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,h="right";break;case"insideBottomLeft":l+=n,u+=a-n,c="bottom";break;case"insideBottomRight":l+=o-n,u+=a-n,h="right",c="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=h,r.verticalAlign=c,r}var op="__zr_normal__",sp=Ti.concat(["ignore"]),cG=Pr(Ti,function(r,t){return r[t]=!0,r},{ignore:!1}),Eo={},fG=new ft(0,0,0,0),Yv=function(){function r(t){this.id=H0(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var 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 i=this.textConfig,n=i.local,a=e.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=n?this:null;var u=!1;if(a.copyTransform(e),i.position!=null){var h=fG;i.layoutRect?h.copy(i.layoutRect):h.copy(this.getBoundingRect()),n||h.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Eo,i,h):Ff(Eo,i,h),a.x=Eo.x,a.y=Eo.y,o=Eo.align,s=Eo.verticalAlign;var c=i.origin;if(c&&i.rotation!=null){var f=void 0,v=void 0;c==="center"?(f=h.width*.5,v=h.height*.5):(f=ei(c[0],h.width),v=ei(c[1],h.height)),u=!0,a.originX=-a.x+f+(n?0:h.x),a.originY=-a.y+v+(n?0:h.y)}}i.rotation!=null&&(a.rotation=i.rotation);var d=i.offset;d&&(a.x+=d[0],a.y+=d[1],u||(a.originX=-d[0],a.originY=-d[1]));var p=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;p&&this.canBeInsideText()?(y=i.insideFill,m=i.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=i.outsideFill,m=i.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==g.fill||m!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=y,g.stroke=m,g.autoStroke=_,g.align=o,g.verticalAlign=s,e.setDefaultTextStyle(g)),e.__dirty|=hr,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()?Zy:Xy},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i=typeof e=="string"&&Ze(e);i||(i=[255,255,255,1]);for(var n=i[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*n+(a?0:255)*(1-n);return i[3]=1,Kr(i,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},z(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(et(t))for(var i=t,n=xt(i),a=0;a<n.length;a++){var o=n[a];this.attrKV(o,t[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,i=0;i<this.animators.length;i++){var n=this.animators[i],a=n.__fromStateTransition;if(!(n.getLoop()||a&&a!==op)){var o=n.targetName,s=o?e[o]:e;n.saveTo(s)}}},r.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,sp)},r.prototype._savePrimaryToNormal=function(t,e,i){for(var n=0;n<i.length;n++){var a=i[n];t[a]!=null&&!(a in e)&&(e[a]=this[a])}},r.prototype.hasState=function(){return this.currentStates.length>0},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(op,!1,t)},r.prototype.useState=function(t,e,i,n){var a=t===op,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(vt(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){Bv("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var h=!!(u&&u.hoverLayer||n);h&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!i&&!this.__inHover&&l&&l.duration>0,l);var c=this._textContent,f=this._textGuide;return c&&c.useState(t,e,i,h),f&&f.useState(t,e,i,h),a?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~hr),u}}},r.prototype.useStates=function(t,e,i){if(!t.length)this.clearStates();else{var n=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(t[l]!==a[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=t[l],h=void 0;this.stateProxy&&(h=this.stateProxy(u,t)),h||(h=this.states[u]),h&&n.push(h)}var c=n[o-1],f=!!(c&&c.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0);var v=this._mergeStates(n),d=this.stateTransition;this.saveCurrentToNormalState(v),this._applyStateObj(t.join(","),v,this._normalState,!1,!e&&!this.__inHover&&d&&d.duration>0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(t,e,f),g&&g.useStates(t,e,f),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~hr)}},r.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},r.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},r.prototype.removeState=function(t){var e=vt(this.currentStates,t);if(e>=0){var i=this.currentStates.slice();i.splice(e,1),this.useStates(i)}},r.prototype.replaceState=function(t,e,i){var n=this.currentStates.slice(),a=vt(n,t),o=vt(n,e)>=0;a>=0?o?n.splice(a,1):n[a]=e:i&&!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={},i,n=0;n<t.length;n++){var a=t[n];z(e,a),a.textConfig&&(i=i||{},z(i,a.textConfig))}return i&&(e.textConfig=i),e},r.prototype._applyStateObj=function(t,e,i,n,a,o){var s=!(e&&n);e&&e.textConfig?(this.textConfig=z({},n?this.textConfig:i.textConfig),z(this.textConfig,e.textConfig)):s&&i.textConfig&&(this.textConfig=i.textConfig);for(var l={},u=!1,h=0;h<sp.length;h++){var c=sp[h],f=a&&cG[c];e&&e[c]!=null?f?(u=!0,l[c]=e[c]):this[c]=e[c]:s&&i[c]!=null&&(f?(u=!0,l[c]=i[c]):this[c]=i[c])}if(!a)for(var h=0;h<this.animators.length;h++){var v=this.animators[h],d=v.targetName;v.getLoop()||v.__changeFinalValue(d?(e||i)[d]:e||i)}u&&this._transitionState(t,l,o)},r.prototype._attachComponent=function(t){if(!(t.__zr&&!t.__hostTarget)&&t!==this){var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this}},r.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},r.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(t){var e=this._textContent;e!==t&&(e&&e!==t&&this.removeTextContent(),t.innerTransformable=new $i,this._attachComponent(t),this._textContent=t,this.markRedraw())},r.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),z(this.textConfig,t),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=hr;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,i=this._textGuide;e&&(e.__inHover=t),i&&(i.__inHover=t)},r.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},r.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},r.prototype.animate=function(t,e,i){var n=t?this[t]:this,a=new q0(n,e,i);return t&&(a.targetName=t),this.addAnimator(a,t),a},r.prototype.addAnimator=function(t,e){var i=this.__zr,n=this;t.during(function(){n.updateDuringAnimation(e)}).done(function(){var a=n.animators,o=vt(a,t);o>=0&&a.splice(o,1)}),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var i=this.animators,n=i.length,a=[],o=0;o<n;o++){var s=i[o];!t||t===s.scope?s.stop(e):a.push(s)}return this.animators=a,this},r.prototype.animateTo=function(t,e,i){lp(this,t,e,i)},r.prototype.animateFrom=function(t,e,i){lp(this,t,e,i,!0)},r.prototype._transitionState=function(t,e,i,n){for(var a=lp(this,e,i,n),o=0;o<a.length;o++)a[o].__fromStateTransition=t},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=function(){var t=r.prototype;t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=hr;function e(i,n,a,o){Object.defineProperty(t,i,{get:function(){if(!this[n]){var l=this[n]=[];s(this,l)}return this[n]},set:function(l){this[a]=l[0],this[o]=l[1],this[n]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[a]},set:function(h){l[a]=h}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(h){l[o]=h}})}}Object.defineProperty&&(e("position","_legacyPos","x","y"),e("scale","_legacyScale","scaleX","scaleY"),e("origin","_legacyOrigin","originX","originY"))}(),r}();re(Yv,Rr);re(Yv,$i);function lp(r,t,e,i,n){e=e||{};var a=[];v2(r,"",r,t,e,i,a,n);var o=a.length,s=!1,l=e.done,u=e.aborted,h=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},c=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&e.during&&a[0].during(function(d,p){e.during(p)});for(var f=0;f<a.length;f++){var v=a[f];h&&v.done(h),c&&v.aborted(c),e.force&&v.duration(e.duration),v.start(e.easing)}return a}function up(r,t,e){for(var i=0;i<e;i++)r[i]=t[i]}function vG(r){return Me(r[0])}function dG(r,t,e){if(Me(t[e]))if(Me(r[e])||(r[e]=[]),qe(t[e])){var i=t[e].length;r[e].length!==i&&(r[e]=new t[e].constructor(i),up(r[e],t[e],i))}else{var n=t[e],a=r[e],o=n.length;if(vG(n))for(var s=n[0].length,l=0;l<o;l++)a[l]?up(a[l],n[l],s):a[l]=Array.prototype.slice.call(n[l]);else up(a,n,o);a.length=n.length}else r[e]=t[e]}function pG(r,t){return r===t||Me(r)&&Me(t)&&gG(r,t)}function gG(r,t){var e=r.length;if(e!==t.length)return!1;for(var i=0;i<e;i++)if(r[i]!==t[i])return!1;return!0}function v2(r,t,e,i,n,a,o,s){for(var l=xt(i),u=n.duration,h=n.delay,c=n.additive,f=n.setToFinal,v=!et(a),d=r.animators,p=[],g=0;g<l.length;g++){var y=l[g],m=i[y];if(m!=null&&e[y]!=null&&(v||a[y]))if(et(m)&&!Me(m)&&!lh(m)){if(t){s||(e[y]=m,r.updateDuringAnimation(t));continue}v2(r,y,e[y],m,n,a&&a[y],o,s)}else p.push(y);else s||(e[y]=m,r.updateDuringAnimation(t),p.push(y))}var _=p.length;if(!c&&_)for(var x=0;x<d.length;x++){var b=d[x];if(b.targetName===t){var S=b.stopTracks(p);if(S){var w=vt(d,b);d.splice(w,1)}}}if(n.force||(p=Dt(p,function(D){return!pG(i[D],e[D])}),_=p.length),_>0||n.force&&!o.length){var T=void 0,M=void 0,C=void 0;if(s){M={},f&&(T={});for(var x=0;x<_;x++){var y=p[x];M[y]=e[y],f?T[y]=i[y]:e[y]=i[y]}}else if(f){C={};for(var x=0;x<_;x++){var y=p[x];C[y]=hu(e[y]),dG(e,i,y)}}var b=new q0(e,!1,!1,c?Dt(d,function(L){return L.targetName===t}):null);b.targetName=t,n.scope&&(b.scope=n.scope),f&&T&&b.whenWithKeys(0,T,p),C&&b.whenWithKeys(0,C,p),b.whenWithKeys(u??500,s?M:i,p).delay(h||0),r.addAnimator(b,t),o.push(b)}}var at=function(r){E(t,r);function t(e){var i=r.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(e),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var i=this._children,n=0;n<i.length;n++)if(i[n].name===e)return i[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,i){if(e&&e!==this&&e.parent!==this&&i&&i.parent===this){var n=this._children,a=n.indexOf(i);a>=0&&(n.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,i){var n=vt(this._children,e);return n>=0&&this.replaceAt(i,n),this},t.prototype.replaceAt=function(e,i){var n=this._children,a=n[i];if(e&&e!==this&&e.parent!==this&&e!==a){n[i]=e,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var i=this.__zr;i&&i!==e.__zr&&e.addSelfToZr(i),i&&i.refresh()},t.prototype.remove=function(e){var i=this.__zr,n=this._children,a=vt(n,e);return a<0?this:(n.splice(a,1),e.parent=null,i&&e.removeSelfFromZr(i),i&&i.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,i=this.__zr,n=0;n<e.length;n++){var a=e[n];i&&a.removeSelfFromZr(i),a.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,i){for(var n=this._children,a=0;a<n.length;a++){var o=n[a];e.call(i,o,a)}return this},t.prototype.traverse=function(e,i){for(var n=0;n<this._children.length;n++){var a=this._children[n],o=e.call(i,a);a.isGroup&&!o&&a.traverse(e,i)}return this},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.removeSelfFromZr(e)}},t.prototype.getBoundingRect=function(e){for(var i=new ft(0,0,0,0),n=e||this._children,a=[],o=null,s=0;s<n.length;s++){var l=n[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),h=l.getLocalTransform(a);h?(ft.applyTransform(i,u,h),o=o||i.clone(),o.union(i)):(o=o||u.clone(),o.union(u))}}return o||i},t}(Yv);at.prototype.type="group";/*!
|
||
* ZRender, a high performance 2d drawing library.
|
||
*
|
||
* Copyright (c) 2013, Baidu Inc.
|
||
* All rights reserved.
|
||
*
|
||
* LICENSE
|
||
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
||
*/var of={},Ua={};function yG(r){delete Ua[r]}function mG(r){if(!r)return!1;if(typeof r=="string")return Eu(r,1)<$y;if(r.colorStops){for(var t=r.colorStops,e=0,i=t.length,n=0;n<i;n++)e+=Eu(t[n].color,1);return e/=i,e<$y}return!1}var _G=function(){function r(t,e,i){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=e,this.id=t;var a=new IF,o=i.renderer||"canvas";of[o]||(o=xt(of)[0]),i.useDirtyRect=i.useDirtyRect==null?!1:i.useDirtyRect;var s=new of[o](e,a,i,t),l=i.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!mt.node&&!mt.worker&&!l?new uG(s.getViewportRoot(),s.root):null,h=i.useCoarsePointer,c=h==null||h==="auto"?mt.touchEventsSupported:!!h,f=44,v;c&&(v=lt(i.pointerSize,f)),this.handler=new $L(a,s,u,s.root,v),this.animation=new rG({stage:{update:l?null:function(){return n._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},r.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},r.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=mG(t))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(t){this._darkMode=t},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(t){var e,i=as();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var n=as();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:n-i})):this._sleepAfterStill>0&&(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,i){return this._disposed||this.handler.on(t,e,i),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;e<t.length;e++)t[e]instanceof at&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,yG(this.id))},r}();function jy(r,t){var e=new _G(H0(),r,t);return Ua[e.id]=e,e}function xG(r){r.dispose()}function bG(){for(var r in Ua)Ua.hasOwnProperty(r)&&Ua[r].dispose();Ua={}}function SG(r){return Ua[r]}function d2(r,t){of[r]=t}var qy;function p2(r){if(typeof qy=="function")return qy(r)}function g2(r){qy=r}var wG="5.6.1";const TG=Object.freeze(Object.defineProperty({__proto__:null,dispose:xG,disposeAll:bG,getElementSSRData:p2,getInstance:SG,init:jy,registerPainter:d2,registerSSRDataGetter:g2,version:wG},Symbol.toStringTag,{value:"Module"}));var nS=1e-4,y2=20;function MG(r){return r.replace(/^\s+|\s+$/g,"")}function Pt(r,t,e,i){var n=t[0],a=t[1],o=e[0],s=e[1],l=a-n,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(i)if(l>0){if(r<=n)return o;if(r>=a)return s}else{if(r>=n)return o;if(r<=a)return s}else{if(r===n)return o;if(r===a)return s}return(r-n)/l*u+o}function U(r,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Y(r)?MG(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function Qt(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),y2),r=(+r).toFixed(t),e?r:+r}function fr(r){return r.sort(function(t,e){return t-e}),r}function $r(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 m2(r)}function m2(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),i=e>0?+t.slice(e+1):0,n=e>0?e:t.length,a=t.indexOf("."),o=a<0?0:n-1-a;return Math.max(0,o-i)}function K0(r,t){var e=Math.log,i=Math.LN10,n=Math.floor(e(r[1]-r[0])/i),a=Math.round(e(Math.abs(t[1]-t[0]))/i),o=Math.min(Math.max(-n+a,0),20);return isFinite(o)?o:20}function CG(r,t,e){if(!r[t])return 0;var i=_2(r,e);return i[t]||0}function _2(r,t){var e=Pr(r,function(v,d){return v+(isNaN(d)?0:d)},0);if(e===0)return[];for(var i=Math.pow(10,t),n=F(r,function(v){return(isNaN(v)?0:v)/e*i*100}),a=i*100,o=F(n,function(v){return Math.floor(v)}),s=Pr(o,function(v,d){return v+d},0),l=F(n,function(v,d){return v-o[d]});s<a;){for(var u=Number.NEGATIVE_INFINITY,h=null,c=0,f=l.length;c<f;++c)l[c]>u&&(u=l[c],h=c);++o[h],l[h]=0,++s}return F(o,function(v){return v/i})}function AG(r,t){var e=Math.max($r(r),$r(t)),i=r+t;return e>y2?i:Qt(i,e)}var Ky=9007199254740991;function J0(r){var t=Math.PI*2;return(r%t+t)%t}function Ts(r){return r>-nS&&r<nS}var DG=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function pr(r){if(r instanceof Date)return r;if(Y(r)){var t=DG.exec(r);if(!t)return new Date(NaN);if(t[8]){var e=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(e-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,e,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function x2(r){return Math.pow(10,$v(r))}function $v(r){if(r===0)return 0;var t=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,t)>=10&&t++,t}function Q0(r,t){var e=$v(r),i=Math.pow(10,e),n=r/i,a;return t?n<1.5?a=1:n<2.5?a=2:n<4?a=3:n<7?a=5:a=10:n<1?a=1:n<2?a=2:n<3?a=3:n<5?a=5:a=10,r=a*i,e>=-20?+r.toFixed(e<0?-e:0):r}function sf(r,t){var e=(r.length-1)*t+1,i=Math.floor(e),n=+r[i-1],a=e-i;return a?n+a*(r[i]-n):n}function Jy(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,i=0;i<r.length;){for(var n=r[i].interval,a=r[i].close,o=0;o<2;o++)n[o]<=t&&(n[o]=t,a[o]=o?1:1-e),t=n[o],e=a[o];n[0]===n[1]&&a[0]*a[1]!==1?r.splice(i,1):i++}return r;function s(l,u,h){return l.interval[h]<u.interval[h]||l.interval[h]===u.interval[h]&&(l.close[h]-u.close[h]===(h?-1:1)||!h&&s(l,u,1))}}function Mi(r){var t=parseFloat(r);return t==r&&(t!==0||!Y(r)||r.indexOf("x")<=0)?t:NaN}function t_(r){return!isNaN(Mi(r))}function b2(){return Math.round(Math.random()*9)}function S2(r,t){return t===0?r:S2(t,r%t)}function aS(r,t){return r==null?t:t==null?r:r*t/S2(r,t)}function kt(r){throw new Error(r)}function oS(r,t,e){return(t-r)*e+r}var w2="series\0",T2="\0_ec_\0";function Bt(r){return r instanceof Array?r:r==null?[]:[r]}function co(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var i=0,n=e.length;i<n;i++){var a=e[i];!r.emphasis[t].hasOwnProperty(a)&&r[t].hasOwnProperty(a)&&(r.emphasis[t][a]=r[t][a])}}}var sS=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Os(r){return et(r)&&!V(r)&&!(r instanceof Date)?r.value:r}function LG(r){return et(r)&&!(r instanceof Array)}function M2(r,t,e){var i=e==="normalMerge",n=e==="replaceMerge",a=e==="replaceAll";r=r||[],t=(t||[]).slice();var o=Z();A(t,function(l,u){if(!et(l)){t[u]=null;return}});var s=IG(r,o,e);return(i||n)&&PG(s,r,o,t),i&&kG(s,t),i||n?RG(s,t,n):a&&EG(s,t),OG(s),s}function IG(r,t,e){var i=[];if(e==="replaceAll")return i;for(var n=0;n<r.length;n++){var a=r[n];a&&a.id!=null&&t.set(a.id,n),i.push({existing:e==="replaceMerge"||Nu(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return i}function PG(r,t,e,i){A(i,function(n,a){if(!(!n||n.id==null)){var o=cu(n.id),s=e.get(o);if(s!=null){var l=r[s];Ve(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=n,l.existing=t[s],i[a]=null}}})}function kG(r,t){A(t,function(e,i){if(!(!e||e.name==null))for(var n=0;n<r.length;n++){var a=r[n].existing;if(!r[n].newOption&&a&&(a.id==null||e.id==null)&&!Nu(e)&&!Nu(a)&&C2("name",a,e)){r[n].newOption=e,t[i]=null;return}}})}function RG(r,t,e){A(t,function(i){if(i){for(var n,a=0;(n=r[a])&&(n.newOption||Nu(n.existing)||n.existing&&i.id!=null&&!C2("id",i,n.existing));)a++;n?(n.newOption=i,n.brandNew=e):r.push({newOption:i,brandNew:e,existing:null,keyInfo:null}),a++}})}function EG(r,t){A(t,function(e){r.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})}function OG(r){var t=Z();A(r,function(e){var i=e.existing;i&&t.set(i.id,e)}),A(r,function(e){var i=e.newOption;Ve(!i||i.id==null||!t.get(i.id)||t.get(i.id)===e,"id duplicates: "+(i&&i.id)),i&&i.id!=null&&t.set(i.id,e),!e.keyInfo&&(e.keyInfo={})}),A(r,function(e,i){var n=e.existing,a=e.newOption,o=e.keyInfo;if(et(a)){if(o.name=a.name!=null?cu(a.name):n?n.name:w2+i,n)o.id=cu(n.id);else if(a.id!=null)o.id=cu(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(t.get(o.id))}t.set(o.id,e)}})}function C2(r,t,e){var i=he(t[r],null),n=he(e[r],null);return i!=null&&n!=null&&i===n}function cu(r){return he(r,"")}function he(r,t){return r==null?t:Y(r)?r:Mt(r)||If(r)?r+"":t}function e_(r){var t=r.name;return!!(t&&t.indexOf(w2))}function Nu(r){return r&&r.id!=null&&cu(r.id).indexOf(T2)===0}function NG(r){return T2+r}function BG(r,t,e){A(r,function(i){var n=i.newOption;et(n)&&(i.keyInfo.mainType=t,i.keyInfo.subType=zG(t,n,i.existing,e))})}function zG(r,t,e,i){var n=t.type?t.type:e?e.subType:i.determineSubType(r,t);return n}function VG(r,t){var e={},i={};return n(r||[],e),n(t||[],i,e),[a(e),a(i)];function n(o,s,l){for(var u=0,h=o.length;u<h;u++){var c=he(o[u].seriesId,null);if(c==null)return;for(var f=Bt(o[u].dataIndex),v=l&&l[c],d=0,p=f.length;d<p;d++){var g=f[d];v&&v[g]?v[g]=null:(s[c]||(s[c]={}))[g]=1}}}function a(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var h=a(o[u],!0);h.length&&l.push({seriesId:u,dataIndex:h})}return l}}function fo(r,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return V(t.dataIndex)?F(t.dataIndex,function(e){return r.indexOfRawIndex(e)}):r.indexOfRawIndex(t.dataIndex);if(t.name!=null)return V(t.name)?F(t.name,function(e){return r.indexOfName(e)}):r.indexOfName(t.name)}function Tt(){var r="__ec_inner_"+FG++;return function(t){return t[r]||(t[r]={})}}var FG=b2();function fu(r,t,e){var i=r_(t,e),n=i.mainTypeSpecified,a=i.queryOptionMap,o=i.others,s=o,l=e?e.defaultMainType:null;return!n&&l&&a.set(l,{}),a.each(function(u,h){var c=vh(r,h,u,{useDefault:l===h,enableAll:e&&e.enableAll!=null?e.enableAll:!0,enableNone:e&&e.enableNone!=null?e.enableNone:!0});s[h+"Models"]=c.models,s[h+"Model"]=c.models[0]}),s}function r_(r,t){var e;if(Y(r)){var i={};i[r+"Index"]=0,e=i}else e=r;var n=Z(),a={},o=!1;return A(e,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],h=u[1],c=(u[2]||"").toLowerCase();if(!(!h||!c||t&&t.includeMainTypes&&vt(t.includeMainTypes,h)<0)){o=o||!!h;var f=n.get(h)||n.set(h,{});f[c]=s}}),{mainTypeSpecified:o,queryOptionMap:n,others:a}}var le={useDefault:!0,enableAll:!1,enableNone:!1},GG={useDefault:!1,enableAll:!0,enableNone:!0};function vh(r,t,e,i){i=i||le;var n=e.index,a=e.id,o=e.name,s={models:null,specified:n!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=i.useDefault&&(l=r.getComponent(t))?[l]:[],s}return n==="none"||n===!1?(Ve(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(n==="all"&&(Ve(i.enableAll,'`"all"` is not a valid value on index option.'),n=a=o=null),s.models=r.queryComponents({mainType:t,index:n,id:a,name:o}),s)}function A2(r,t,e){r.setAttribute?r.setAttribute(t,e):r[t]=e}function HG(r,t){return r.getAttribute?r.getAttribute(t):r[t]}function WG(r){return r==="auto"?mt.domSupported?"html":"richText":r||"html"}function Qy(r,t){var e=Z(),i=[];return A(r,function(n){var a=t(n);(e.get(a)||(i.push(a),e.set(a,[]))).push(n)}),{keys:i,buckets:e}}function D2(r,t,e,i,n){var a=t==null||t==="auto";if(i==null)return i;if(Mt(i)){var o=oS(e||0,i,n);return Qt(o,a?Math.max($r(e||0),$r(i)):t)}else{if(Y(i))return n<1?e:i;for(var s=[],l=e,u=i,h=Math.max(l?l.length:0,u.length),c=0;c<h;++c){var f=r.getDimensionInfo(c);if(f&&f.type==="ordinal")s[c]=(n<1&&l?l:u)[c];else{var v=l&&l[c]?l[c]:0,d=u[c],o=oS(v,d,n);s[c]=Qt(o,a?Math.max($r(v),$r(d)):t)}}return s}}var UG=".",da="___EC__COMPONENT__CONTAINER___",L2="___EC__EXTENDED_CLASS___";function gi(r){var t={main:"",sub:""};if(r){var e=r.split(UG);t.main=e[0]||"",t.sub=e[1]||""}return t}function YG(r){Ve(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function $G(r){return!!(r&&r[L2])}function i_(r,t){r.$constructor=r,r.extend=function(e){var i=this,n;return XG(i)?n=function(a){E(o,a);function o(){return a.apply(this,arguments)||this}return o}(i):(n=function(){(e.$constructor||i).apply(this,arguments)},W0(n,this)),z(n.prototype,e),n[L2]=!0,n.extend=this.extend,n.superCall=qG,n.superApply=KG,n.superClass=i,n}}function XG(r){return Q(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function I2(r,t){r.extend=t.extend}var ZG=Math.round(Math.random()*10);function jG(r){var t=["__\0is_clz",ZG++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function qG(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return this.superClass.prototype[t].apply(r,e)}function KG(r,t,e){return this.superClass.prototype[t].apply(r,e)}function Xv(r){var t={};r.registerClass=function(i){var n=i.type||i.prototype.type;if(n){YG(n),i.prototype.type=n;var a=gi(n);if(!a.sub)t[a.main]=i;else if(a.sub!==da){var o=e(a);o[a.sub]=i}}return i},r.getClass=function(i,n,a){var o=t[i];if(o&&o[da]&&(o=n?o[n]:null),a&&!o)throw new Error(n?"Component "+i+"."+(n||"")+" is used but not imported.":i+".type should be specified.");return o},r.getClassesByMainType=function(i){var n=gi(i),a=[],o=t[n.main];return o&&o[da]?A(o,function(s,l){l!==da&&a.push(s)}):a.push(o),a},r.hasClass=function(i){var n=gi(i);return!!t[n.main]},r.getAllClassMainTypes=function(){var i=[];return A(t,function(n,a){i.push(a)}),i},r.hasSubTypes=function(i){var n=gi(i),a=t[n.main];return a&&a[da]};function e(i){var n=t[i.main];return(!n||!n[da])&&(n=t[i.main]={},n[da]=!0),n}}function vo(r,t){for(var e=0;e<r.length;e++)r[e][1]||(r[e][1]=r[e][0]);return t=t||!1,function(i,n,a){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(n&&vt(n,l)>=0||a&&vt(a,l)<0)){var u=i.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var JG=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],QG=vo(JG),t3=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return QG(this,t,e)},r}(),tm=new ch(50);function e3(r){if(typeof r=="string"){var t=tm.get(r);return t&&t.image}else return r}function n_(r,t,e,i,n){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var a=tm.get(r),o={hostEl:e,cb:i,cbPayload:n};return a?(t=a.image,!Zv(t)&&a.pending.push(o)):(t=Qr.loadImage(r,lS,lS),t.__zrImageSrc=r,tm.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function lS(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<r.pending.length;t++){var e=r.pending[t],i=e.cb;i&&i(this,e.cbPayload),e.hostEl.dirty()}r.pending.length=0}function Zv(r){return r&&r.width&&r.height}var hp=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function r3(r,t,e,i,n){var a={};return P2(a,r,t,e,i,n),a.text}function P2(r,t,e,i,n,a){if(!e){r.text="",r.isTruncated=!1;return}var o=(t+"").split(`
|
||
`);a=k2(e,i,n,a);for(var s=!1,l={},u=0,h=o.length;u<h;u++)R2(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
|
||
`),r.isTruncated=s}function k2(r,t,e,i){i=i||{};var n=z({},i);n.font=t,e=lt(e,"..."),n.maxIterations=lt(i.maxIterations,2);var a=n.minChar=lt(i.minChar,0);n.cnCharWidth=dr("国",t);var o=n.ascCharWidth=dr("a",t);n.placeholder=lt(i.placeholder,"");for(var s=r=Math.max(0,r-1),l=0;l<a&&s>=o;l++)s-=o;var u=dr(e,t);return u>s&&(e="",u=0),s=r-u,n.ellipsis=e,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=r,n}function R2(r,t,e){var i=e.containerWidth,n=e.font,a=e.contentWidth;if(!i){r.textLine="",r.isTruncated=!1;return}var o=dr(t,n);if(o<=i){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?i3(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,l),o=dr(t,n)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function i3(r,t,e,i){for(var n=0,a=0,o=r.length;a<o&&n<t;a++){var s=r.charCodeAt(a);n+=0<=s&&s<=127?e:i}return a}function n3(r,t){r!=null&&(r+="");var e=t.overflow,i=t.padding,n=t.font,a=e==="truncate",o=Uv(n),s=lt(t.lineHeight,o),l=!!t.backgroundColor,u=t.lineOverflow==="truncate",h=!1,c=t.width,f;c!=null&&(e==="break"||e==="breakAll")?f=r?E2(r,t.font,c,e==="breakAll",0).lines:[]:f=r?r.split(`
|
||
`):[];var v=f.length*s,d=lt(t.height,v);if(v>d&&u){var p=Math.floor(d/s);h=h||f.length>p,f=f.slice(0,p)}if(r&&a&&c!=null)for(var g=k2(c,n,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),y={},m=0;m<f.length;m++)R2(y,f[m],g),f[m]=y.textLine,h=h||y.isTruncated;for(var _=d,x=0,m=0;m<f.length;m++)x=Math.max(dr(f[m],n),x);c==null&&(c=x);var b=x;return i&&(_+=i[0]+i[2],b+=i[1]+i[3],c+=i[1]+i[3]),l&&(b=c),{lines:f,height:d,outerWidth:b,outerHeight:_,lineHeight:s,calculatedLineHeight:o,contentWidth:x,contentHeight:v,width:c,isTruncated:h}}var a3=function(){function r(){}return r}(),uS=function(){function r(t){this.tokens=[],t&&(this.tokens=t)}return r}(),o3=function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r}();function s3(r,t){var e=new o3;if(r!=null&&(r+=""),!r)return e;for(var i=t.width,n=t.height,a=t.overflow,o=(a==="break"||a==="breakAll")&&i!=null?{width:i,accumWidth:0,breakAll:a==="breakAll"}:null,s=hp.lastIndex=0,l;(l=hp.exec(r))!=null;){var u=l.index;u>s&&cp(e,r.substring(s,u),t,o),cp(e,l[2],t,o,l[1]),s=hp.lastIndex}s<r.length&&cp(e,r.substring(s,r.length),t,o);var h=[],c=0,f=0,v=t.padding,d=a==="truncate",p=t.lineOverflow==="truncate",g={};function y(G,H,W){G.width=H,G.lineHeight=W,c+=W,f=Math.max(f,H)}t:for(var m=0;m<e.lines.length;m++){for(var _=e.lines[m],x=0,b=0,S=0;S<_.tokens.length;S++){var w=_.tokens[S],T=w.styleName&&t.rich[w.styleName]||{},M=w.textPadding=T.padding,C=M?M[1]+M[3]:0,D=w.font=T.font||t.font;w.contentHeight=Uv(D);var L=lt(T.height,w.contentHeight);if(w.innerHeight=L,M&&(L+=M[0]+M[2]),w.height=L,w.lineHeight=jr(T.lineHeight,t.lineHeight,L),w.align=T&&T.align||t.align,w.verticalAlign=T&&T.verticalAlign||"middle",p&&n!=null&&c+w.lineHeight>n){var I=e.lines.length;S>0?(_.tokens=_.tokens.slice(0,S),y(_,b,x),e.lines=e.lines.slice(0,m+1)):e.lines=e.lines.slice(0,m),e.isTruncated=e.isTruncated||e.lines.length<I;break t}var P=T.width,k=P==null||P==="auto";if(typeof P=="string"&&P.charAt(P.length-1)==="%")w.percentWidth=P,h.push(w),w.contentWidth=dr(w.text,D);else{if(k){var R=T.backgroundColor,N=R&&R.image;N&&(N=e3(N),Zv(N)&&(w.width=Math.max(w.width,N.width*L/N.height)))}var O=d&&i!=null?i-b:null;O!=null&&O<w.width?!k||O<C?(w.text="",w.width=w.contentWidth=0):(P2(g,w.text,O-C,D,t.ellipsis,{minChar:t.truncateMinChar}),w.text=g.text,e.isTruncated=e.isTruncated||g.isTruncated,w.width=w.contentWidth=dr(w.text,D)):w.contentWidth=dr(w.text,D)}w.width+=C,b+=w.width,T&&(x=Math.max(x,w.lineHeight))}y(_,b,x)}e.outerWidth=e.width=lt(i,f),e.outerHeight=e.height=lt(n,c),e.contentHeight=c,e.contentWidth=f,v&&(e.outerWidth+=v[1]+v[3],e.outerHeight+=v[0]+v[2]);for(var m=0;m<h.length;m++){var w=h[m],B=w.percentWidth;w.width=parseInt(B,10)/100*e.width}return e}function cp(r,t,e,i,n){var a=t==="",o=n&&e.rich[n]||{},s=r.lines,l=o.font||e.font,u=!1,h,c;if(i){var f=o.padding,v=f?f[1]+f[3]:0;if(o.width!=null&&o.width!=="auto"){var d=ei(o.width,i.width)+v;s.length>0&&d+i.accumWidth>i.width&&(h=t.split(`
|
||
`),u=!0),i.accumWidth=d}else{var p=E2(t,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=p.accumWidth+v,c=p.linesWidths,h=p.lines}}else h=t.split(`
|
||
`);for(var g=0;g<h.length;g++){var y=h[g],m=new a3;if(m.styleName=n,m.text=y,m.isLineHolder=!y&&!a,typeof o.width=="number"?m.width=o.width:m.width=c?c[g]:dr(y,l),!g&&!u){var _=(s[s.length-1]||(s[0]=new uS)).tokens,x=_.length;x===1&&_[0].isLineHolder?_[0]=m:(y||!x||a)&&_.push(m)}else s.push(new uS([m]))}}function l3(r){var t=r.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var u3=Pr(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function h3(r){return l3(r)?!!u3[r]:!0}function E2(r,t,e,i,n){for(var a=[],o=[],s="",l="",u=0,h=0,c=0;c<r.length;c++){var f=r.charAt(c);if(f===`
|
||
`){l&&(s+=l,h+=u),a.push(s),o.push(h),s="",l="",u=0,h=0;continue}var v=dr(f,t),d=i?!1:!h3(f);if(a.length?h+v>e:n+h+v>e){h?(s||l)&&(d?(s||(s=l,l="",u=0,h=u),a.push(s),o.push(h-u),l+=f,u+=v,s="",h=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(h),s=f,h=v)):d?(a.push(l),o.push(u),l=f,u=v):(a.push(f),o.push(v));continue}h+=v,d?(l+=f,u+=v):(l&&(s+=l,l="",u=0),s+=f)}return!a.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(h)),a.length===1&&(h+=n),{accumWidth:h,lines:a,linesWidths:o}}var em="__zr_style_"+Math.round(Math.random()*10),eo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},jv={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};eo[em]=!0;var hS=["z","z2","invisible"],c3=["invisible"],kr=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var i=xt(e),n=0;n<i.length;n++){var a=i[n];a==="style"?this.useStyle(e[a]):r.prototype.attrKV.call(this,a,e[a])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,i,n,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&f3(this,e,i)||o&&!o[0]&&!o[3])return!1;if(n&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},t.prototype.contain=function(e,i){return this.rectContain(e,i)},t.prototype.traverse=function(e,i){e.call(i,this)},t.prototype.rectContain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect();return a.contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var i=this.transform,n=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new ft(0,0,0,0)),i?ft.applyTransform(e,n,i):e.copy(n),(o||s||l)&&(e.width+=o*2+Math.abs(s),e.height+=o*2+Math.abs(l),e.x=Math.min(e.x,e.x+s-o),e.y=Math.min(e.y,e.y+l-o));var u=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-u),e.y=Math.floor(e.y-u),e.width=Math.ceil(e.width+1+u*2),e.height=Math.ceil(e.height+1+u*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new ft(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(e,i){e!=="style"?r.prototype.attrKV.call(this,e,i):this.style?this.setStyle(i):this.useStyle(i)},t.prototype.setStyle=function(e,i){return typeof e=="string"?this.style[e]=i:z(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=Fl,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&Fl)},t.prototype.styleUpdated=function(){this.__dirty&=~Fl},t.prototype.createStyle=function(e){return uh(eo,e)},t.prototype.useStyle=function(e){e[em]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[em]},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,i,hS)},t.prototype._applyStateObj=function(e,i,n,a,o,s){r.prototype._applyStateObj.call(this,e,i,n,a,o,s);var l=!(i&&a),u;if(i&&i.style?o?a?u=i.style:(u=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(u,i.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:n.style),this._mergeStyle(u,i.style)):l&&(u=n.style),u)if(o){var h=this.style;if(this.style=this.createStyle(l?{}:h),l)for(var c=xt(h),f=0;f<c.length;f++){var v=c[f];v in u&&(u[v]=u[v],this.style[v]=h[v])}for(var d=xt(u),f=0;f<d.length;f++){var v=d[f];this.style[v]=this.style[v]}this._transitionState(e,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var p=this.__inHover?c3:hS,f=0;f<p.length;f++){var v=p[f];i&&i[v]!=null?this[v]=i[v]:l&&n[v]!=null&&(this[v]=n[v])}},t.prototype._mergeStates=function(e){for(var i=r.prototype._mergeStates.call(this,e),n,a=0;a<e.length;a++){var o=e[a];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(i.style=n),i},t.prototype._mergeStyle=function(e,i){return z(e,i),e},t.prototype.getAnimationStyleProps=function(){return jv},t.initDefaultProps=function(){var e=t.prototype;e.type="displayable",e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor="pointer",e.rectHover=!1,e.incremental=!1,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=hr|Fl}(),t}(Yv),fp=new ft(0,0,0,0),vp=new ft(0,0,0,0);function f3(r,t,e){return fp.copy(r.getBoundingRect()),r.transform&&fp.applyTransform(r.transform),vp.width=t,vp.height=e,!fp.intersect(vp)}var rr=Math.min,ir=Math.max,dp=Math.sin,pp=Math.cos,pa=Math.PI*2,tc=Jn(),ec=Jn(),rc=Jn();function qv(r,t,e){if(r.length!==0){for(var i=r[0],n=i[0],a=i[0],o=i[1],s=i[1],l=1;l<r.length;l++)i=r[l],n=rr(n,i[0]),a=ir(a,i[0]),o=rr(o,i[1]),s=ir(s,i[1]);t[0]=n,t[1]=o,e[0]=a,e[1]=s}}function cS(r,t,e,i,n,a){n[0]=rr(r,e),n[1]=rr(t,i),a[0]=ir(r,e),a[1]=ir(t,i)}var fS=[],vS=[];function v3(r,t,e,i,n,a,o,s,l,u){var h=KL,c=ve,f=h(r,e,n,o,fS);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var v=0;v<f;v++){var d=c(r,e,n,o,fS[v]);l[0]=rr(d,l[0]),u[0]=ir(d,u[0])}f=h(t,i,a,s,vS);for(var v=0;v<f;v++){var p=c(t,i,a,s,vS[v]);l[1]=rr(p,l[1]),u[1]=ir(p,u[1])}l[0]=rr(r,l[0]),u[0]=ir(r,u[0]),l[0]=rr(o,l[0]),u[0]=ir(o,u[0]),l[1]=rr(t,l[1]),u[1]=ir(t,u[1]),l[1]=rr(s,l[1]),u[1]=ir(s,u[1])}function d3(r,t,e,i,n,a,o,s){var l=QL,u=be,h=ir(rr(l(r,e,n),1),0),c=ir(rr(l(t,i,a),1),0),f=u(r,e,n,h),v=u(t,i,a,c);o[0]=rr(r,n,f),o[1]=rr(t,a,v),s[0]=ir(r,n,f),s[1]=ir(t,a,v)}function p3(r,t,e,i,n,a,o,s,l){var u=Ui,h=Yi,c=Math.abs(n-a);if(c%pa<1e-4&&c>1e-4){s[0]=r-e,s[1]=t-i,l[0]=r+e,l[1]=t+i;return}if(tc[0]=pp(n)*e+r,tc[1]=dp(n)*i+t,ec[0]=pp(a)*e+r,ec[1]=dp(a)*i+t,u(s,tc,ec),h(l,tc,ec),n=n%pa,n<0&&(n=n+pa),a=a%pa,a<0&&(a=a+pa),n>a&&!o?a+=pa:n<a&&o&&(n+=pa),o){var f=a;a=n,n=f}for(var v=0;v<a;v+=Math.PI/2)v>n&&(rc[0]=pp(v)*e+r,rc[1]=dp(v)*i+t,u(s,rc,s),h(l,rc,l))}var Ft={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ga=[],ya=[],ni=[],ln=[],ai=[],oi=[],gp=Math.min,yp=Math.max,ma=Math.cos,_a=Math.sin,ki=Math.abs,rm=Math.PI,yn=rm*2,mp=typeof Float32Array<"u",hl=[];function _p(r){var t=Math.round(r/rm*1e8)/1e8;return t%2*rm}function a_(r,t){var e=_p(r[0]);e<0&&(e+=yn);var i=e-r[0],n=r[1];n+=i,!t&&n-e>=yn?n=e+yn:t&&e-n>=yn?n=e-yn:!t&&e>n?n=e+(yn-_p(e-n)):t&&e<n&&(n=e-(yn-_p(n-e))),r[0]=e,r[1]=n}var Ci=function(){function r(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(t,e,i){i=i||0,i>0&&(this._ux=ki(i/Vf/t)||0,this._uy=ki(i/Vf/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(Ft.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var i=ki(t-this._xi),n=ki(e-this._yi),a=i>this._ux||n>this._uy;if(this.addData(Ft.L,t,e),this._ctx&&a&&this._ctx.lineTo(t,e),a)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=i*i+n*n;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,i,n,a,o){return this._drawPendingPt(),this.addData(Ft.C,t,e,i,n,a,o),this._ctx&&this._ctx.bezierCurveTo(t,e,i,n,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,i,n){return this._drawPendingPt(),this.addData(Ft.Q,t,e,i,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,n),this._xi=i,this._yi=n,this},r.prototype.arc=function(t,e,i,n,a,o){this._drawPendingPt(),hl[0]=n,hl[1]=a,a_(hl,o),n=hl[0],a=hl[1];var s=a-n;return this.addData(Ft.A,t,e,i,i,n,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=ma(a)*i+t,this._yi=_a(a)*i+e,this},r.prototype.arcTo=function(t,e,i,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},r.prototype.rect=function(t,e,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,i,n),this.addData(Ft.R,t,e,i,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ft.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&t.closePath(),this._xi=e,this._yi=i,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){var e=t.length;!(this.data&&this.data.length===e)&&mp&&(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},r.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,a=0;a<e;a++)i+=t[a].len();mp&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var a=0;a<e;a++)for(var o=t[a].data,s=0;s<o.length;s++)this.data[n++]=o[s];this._len=n},r.prototype.addData=function(t,e,i,n,a,o,s,l,u){if(this._saveData){var h=this.data;this._len+arguments.length>h.length&&(this._expandData(),h=this.data);for(var c=0;c<arguments.length;c++)h[this._len++]=arguments[c]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(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;e<this._len;e++)t[e]=this.data[e];this.data=t}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,mp&&this._len>11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){ni[0]=ni[1]=ai[0]=ai[1]=Number.MAX_VALUE,ln[0]=ln[1]=oi[0]=oi[1]=-Number.MAX_VALUE;var t=this.data,e=0,i=0,n=0,a=0,o;for(o=0;o<this._len;){var s=t[o++],l=o===1;switch(l&&(e=t[o],i=t[o+1],n=e,a=i),s){case Ft.M:e=n=t[o++],i=a=t[o++],ai[0]=n,ai[1]=a,oi[0]=n,oi[1]=a;break;case Ft.L:cS(e,i,t[o],t[o+1],ai,oi),e=t[o++],i=t[o++];break;case Ft.C:v3(e,i,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],ai,oi),e=t[o++],i=t[o++];break;case Ft.Q:d3(e,i,t[o++],t[o++],t[o],t[o+1],ai,oi),e=t[o++],i=t[o++];break;case Ft.A:var u=t[o++],h=t[o++],c=t[o++],f=t[o++],v=t[o++],d=t[o++]+v;o+=1;var p=!t[o++];l&&(n=ma(v)*c+u,a=_a(v)*f+h),p3(u,h,c,f,v,d,p,ai,oi),e=ma(d)*c+u,i=_a(d)*f+h;break;case Ft.R:n=e=t[o++],a=i=t[o++];var g=t[o++],y=t[o++];cS(n,a,n+g,a+y,ai,oi);break;case Ft.Z:e=n,i=a;break}Ui(ni,ni,ai),Yi(ln,ln,oi)}return o===0&&(ni[0]=ni[1]=ln[0]=ln[1]=0),new ft(ni[0],ni[1],ln[0]-ni[0],ln[1]-ni[1])},r.prototype._calculateLength=function(){var t=this.data,e=this._len,i=this._ux,n=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,h=0,c=0,f=0;f<e;){var v=t[f++],d=f===1;d&&(a=t[f],o=t[f+1],s=a,l=o);var p=-1;switch(v){case Ft.M:a=s=t[f++],o=l=t[f++];break;case Ft.L:{var g=t[f++],y=t[f++],m=g-a,_=y-o;(ki(m)>i||ki(_)>n||f===e-1)&&(p=Math.sqrt(m*m+_*_),a=g,o=y);break}case Ft.C:{var x=t[f++],b=t[f++],g=t[f++],y=t[f++],S=t[f++],w=t[f++];p=PF(a,o,x,b,g,y,S,w,10),a=S,o=w;break}case Ft.Q:{var x=t[f++],b=t[f++],g=t[f++],y=t[f++];p=RF(a,o,x,b,g,y,10),a=g,o=y;break}case Ft.A:var T=t[f++],M=t[f++],C=t[f++],D=t[f++],L=t[f++],I=t[f++],P=I+L;f+=1,d&&(s=ma(L)*C+T,l=_a(L)*D+M),p=yp(C,D)*gp(yn,Math.abs(I)),a=ma(P)*C+T,o=_a(P)*D+M;break;case Ft.R:{s=a=t[f++],l=o=t[f++];var k=t[f++],R=t[f++];p=k*2+R*2;break}case Ft.Z:{var m=s-a,_=l-o;p=Math.sqrt(m*m+_*_),a=s,o=l;break}}p>=0&&(u[c++]=p,h+=p)}return this._pathLen=h,h},r.prototype.rebuildPath=function(t,e){var i=this.data,n=this._ux,a=this._uy,o=this._len,s,l,u,h,c,f,v=e<1,d,p,g=0,y=0,m,_=0,x,b;if(!(v&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,m=e*p,!m)))t:for(var S=0;S<o;){var w=i[S++],T=S===1;switch(T&&(u=i[S],h=i[S+1],s=u,l=h),w!==Ft.L&&_>0&&(t.lineTo(x,b),_=0),w){case Ft.M:s=u=i[S++],l=h=i[S++],t.moveTo(u,h);break;case Ft.L:{c=i[S++],f=i[S++];var M=ki(c-u),C=ki(f-h);if(M>n||C>a){if(v){var D=d[y++];if(g+D>m){var L=(m-g)/D;t.lineTo(u*(1-L)+c*L,h*(1-L)+f*L);break t}g+=D}t.lineTo(c,f),u=c,h=f,_=0}else{var I=M*M+C*C;I>_&&(x=c,b=f,_=I)}break}case Ft.C:{var P=i[S++],k=i[S++],R=i[S++],N=i[S++],O=i[S++],B=i[S++];if(v){var D=d[y++];if(g+D>m){var L=(m-g)/D;$n(u,P,R,O,L,ga),$n(h,k,N,B,L,ya),t.bezierCurveTo(ga[1],ya[1],ga[2],ya[2],ga[3],ya[3]);break t}g+=D}t.bezierCurveTo(P,k,R,N,O,B),u=O,h=B;break}case Ft.Q:{var P=i[S++],k=i[S++],R=i[S++],N=i[S++];if(v){var D=d[y++];if(g+D>m){var L=(m-g)/D;Pu(u,P,R,L,ga),Pu(h,k,N,L,ya),t.quadraticCurveTo(ga[1],ya[1],ga[2],ya[2]);break t}g+=D}t.quadraticCurveTo(P,k,R,N),u=R,h=N;break}case Ft.A:var G=i[S++],H=i[S++],W=i[S++],q=i[S++],K=i[S++],nt=i[S++],Ct=i[S++],te=!i[S++],dt=W>q?W:q,rt=ki(W-q)>.001,gt=K+nt,J=!1;if(v){var D=d[y++];g+D>m&&(gt=K+nt*(m-g)/D,J=!0),g+=D}if(rt&&t.ellipse?t.ellipse(G,H,W,q,Ct,K,gt,te):t.arc(G,H,dt,K,gt,te),J)break t;T&&(s=ma(K)*W+G,l=_a(K)*q+H),u=ma(gt)*W+G,h=_a(gt)*q+H;break;case Ft.R:s=u=i[S],l=h=i[S+1],c=i[S++],f=i[S++];var st=i[S++],Ht=i[S++];if(v){var D=d[y++];if(g+D>m){var Et=m-g;t.moveTo(c,f),t.lineTo(c+gp(Et,st),f),Et-=st,Et>0&&t.lineTo(c+st,f+gp(Et,Ht)),Et-=Ht,Et>0&&t.lineTo(c+yp(st-Et,0),f+Ht),Et-=st,Et>0&&t.lineTo(c,f+yp(Ht-Et,0));break t}g+=D}t.rect(c,f,st,Ht);break;case Ft.Z:if(v){var D=d[y++];if(g+D>m){var L=(m-g)/D;t.lineTo(u*(1-L)+s*L,h*(1-L)+l*L);break t}g+=D}t.closePath(),u=s,h=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.CMD=Ft,r.initDefaultProps=function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),r}();function _n(r,t,e,i,n,a,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>t+s&&o>i+s||o<t-s&&o<i-s||a>r+s&&a>e+s||a<r-s&&a<e-s)return!1;if(r!==e)l=(t-i)/(r-e),u=(r*i-e*t)/(r-e);else return Math.abs(a-r)<=s/2;var h=l*a-o+u,c=h*h/(l*l+1);return c<=s/2*s/2}function g3(r,t,e,i,n,a,o,s,l,u,h){if(l===0)return!1;var c=l;if(h>t+c&&h>i+c&&h>a+c&&h>s+c||h<t-c&&h<i-c&&h<a-c&&h<s-c||u>r+c&&u>e+c&&u>n+c&&u>o+c||u<r-c&&u<e-c&&u<n-c&&u<o-c)return!1;var f=JL(r,t,e,i,n,a,o,s,u,h,null);return f<=c/2}function O2(r,t,e,i,n,a,o,s,l){if(o===0)return!1;var u=o;if(l>t+u&&l>i+u&&l>a+u||l<t-u&&l<i-u&&l<a-u||s>r+u&&s>e+u&&s>n+u||s<r-u&&s<e-u&&s<n-u)return!1;var h=t2(r,t,e,i,n,a,s,l,null);return h<=u/2}var dS=Math.PI*2;function vr(r){return r%=dS,r<0&&(r+=dS),r}var cl=Math.PI*2;function y3(r,t,e,i,n,a,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=t;var h=Math.sqrt(s*s+l*l);if(h-u>e||h+u<e)return!1;if(Math.abs(i-n)%cl<1e-4)return!0;if(a){var c=i;i=vr(n),n=vr(c)}else i=vr(i),n=vr(n);i>n&&(n+=cl);var f=Math.atan2(l,s);return f<0&&(f+=cl),f>=i&&f<=n||f+cl>=i&&f+cl<=n}function zi(r,t,e,i,n,a){if(a>t&&a>i||a<t&&a<i||i===t)return 0;var o=(a-t)/(i-t),s=i<t?1:-1;(o===1||o===0)&&(s=i<t?.5:-.5);var l=o*(e-r)+r;return l===n?1/0:l>n?s:0}var un=Ci.CMD,xa=Math.PI*2,m3=1e-4;function _3(r,t){return Math.abs(r-t)<m3}var Ye=[-1,-1,-1],Tr=[-1,-1];function x3(){var r=Tr[0];Tr[0]=Tr[1],Tr[1]=r}function b3(r,t,e,i,n,a,o,s,l,u){if(u>t&&u>i&&u>a&&u>s||u<t&&u<i&&u<a&&u<s)return 0;var h=Of(t,i,a,s,u,Ye);if(h===0)return 0;for(var c=0,f=-1,v=void 0,d=void 0,p=0;p<h;p++){var g=Ye[p],y=g===0||g===1?.5:1,m=ve(r,e,n,o,g);m<l||(f<0&&(f=KL(t,i,a,s,Tr),Tr[1]<Tr[0]&&f>1&&x3(),v=ve(t,i,a,s,Tr[0]),f>1&&(d=ve(t,i,a,s,Tr[1]))),f===2?g<Tr[0]?c+=v<t?y:-y:g<Tr[1]?c+=d<v?y:-y:c+=s<d?y:-y:g<Tr[0]?c+=v<t?y:-y:c+=s<v?y:-y)}return c}function S3(r,t,e,i,n,a,o,s){if(s>t&&s>i&&s>a||s<t&&s<i&&s<a)return 0;var l=kF(t,i,a,s,Ye);if(l===0)return 0;var u=QL(t,i,a);if(u>=0&&u<=1){for(var h=0,c=be(t,i,a,u),f=0;f<l;f++){var v=Ye[f]===0||Ye[f]===1?.5:1,d=be(r,e,n,Ye[f]);d<o||(Ye[f]<u?h+=c<t?v:-v:h+=a<c?v:-v)}return h}else{var v=Ye[0]===0||Ye[0]===1?.5:1,d=be(r,e,n,Ye[0]);return d<o?0:a<t?v:-v}}function w3(r,t,e,i,n,a,o,s){if(s-=t,s>e||s<-e)return 0;var l=Math.sqrt(e*e-s*s);Ye[0]=-l,Ye[1]=l;var u=Math.abs(i-n);if(u<1e-4)return 0;if(u>=xa-1e-4){i=0,n=xa;var h=a?1:-1;return o>=Ye[0]+r&&o<=Ye[1]+r?h:0}if(i>n){var c=i;i=n,n=c}i<0&&(i+=xa,n+=xa);for(var f=0,v=0;v<2;v++){var d=Ye[v];if(d+r>o){var p=Math.atan2(s,d),h=a?1:-1;p<0&&(p=xa+p),(p>=i&&p<=n||p+xa>=i&&p+xa<=n)&&(p>Math.PI/2&&p<Math.PI*1.5&&(h=-h),f+=h)}}return f}function N2(r,t,e,i,n){for(var a=r.data,o=r.len(),s=0,l=0,u=0,h=0,c=0,f,v,d=0;d<o;){var p=a[d++],g=d===1;switch(p===un.M&&d>1&&(e||(s+=zi(l,u,h,c,i,n))),g&&(l=a[d],u=a[d+1],h=l,c=u),p){case un.M:h=a[d++],c=a[d++],l=h,u=c;break;case un.L:if(e){if(_n(l,u,a[d],a[d+1],t,i,n))return!0}else s+=zi(l,u,a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case un.C:if(e){if(g3(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],t,i,n))return!0}else s+=b3(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case un.Q:if(e){if(O2(l,u,a[d++],a[d++],a[d],a[d+1],t,i,n))return!0}else s+=S3(l,u,a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case un.A:var y=a[d++],m=a[d++],_=a[d++],x=a[d++],b=a[d++],S=a[d++];d+=1;var w=!!(1-a[d++]);f=Math.cos(b)*_+y,v=Math.sin(b)*x+m,g?(h=f,c=v):s+=zi(l,u,f,v,i,n);var T=(i-y)*x/_+y;if(e){if(y3(y,m,x,b,b+S,w,t,T,n))return!0}else s+=w3(y,m,x,b,b+S,w,T,n);l=Math.cos(b+S)*_+y,u=Math.sin(b+S)*x+m;break;case un.R:h=l=a[d++],c=u=a[d++];var M=a[d++],C=a[d++];if(f=h+M,v=c+C,e){if(_n(h,c,f,c,t,i,n)||_n(f,c,f,v,t,i,n)||_n(f,v,h,v,t,i,n)||_n(h,v,h,c,t,i,n))return!0}else s+=zi(f,c,f,v,i,n),s+=zi(h,v,h,c,i,n);break;case un.Z:if(e){if(_n(l,u,h,c,t,i,n))return!0}else s+=zi(l,u,h,c,i,n);l=h,u=c;break}}return!e&&!_3(u,c)&&(s+=zi(l,u,h,c,i,n)||0),s!==0}function T3(r,t,e){return N2(r,0,!1,t,e)}function M3(r,t,e,i){return N2(r,t,!0,e,i)}var Gf=tt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},eo),C3={style:tt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},jv.style)},xp=Ti.concat(["invisible","culling","z","z2","zlevel","parent"]),_t=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var i=this.style;if(i.decal){var 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 a=n.style;for(var o in i)a[o]!==i[o]&&(a[o]=i[o]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var s=0;s<xp.length;++s)n[xp[s]]=this[xp[s]];n.__dirty|=hr}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(e){var i=xt(e);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var a=0;a<i.length;a++){var o=i[a],s=e[o];o==="style"?this.style?z(this.style,s):this.useStyle(s):o==="shape"?z(this.shape,s):r.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if(e!=="none"){if(Y(e)){var i=Eu(e,0);return i>.5?Xy:i>.2?hG:Zy}else if(e)return Zy}return Xy},t.prototype.getInsideTextStroke=function(e){var i=this.style.fill;if(Y(i)){var n=this.__zr,a=!!(n&&n.isDarkMode()),o=Eu(e,0)<$y;if(a===o)return i}},t.prototype.buildPath=function(e,i,n){},t.prototype.pathUpdated=function(){this.__dirty&=~ts},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Ci(!1)},t.prototype.hasStroke=function(){var e=this.style,i=e.stroke;return!(i==null||i==="none"||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,i=this.style,n=!e;if(n){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&ts)&&(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=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var h=this.strokeContainThreshold;u=Math.max(u,h??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,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect(),o=this.style;if(e=n[0],i=n[1],a.contain(e,i)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),M3(s,l/u,e,i)))return!0}if(this.hasFill())return T3(s,e,i)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=ts,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,i){e==="shape"?this.setShape(i):r.prototype.attrKV.call(this,e,i)},t.prototype.setShape=function(e,i){var n=this.shape;return n||(n=this.shape={}),typeof e=="string"?n[e]=i:z(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&ts)},t.prototype.createStyle=function(e){return uh(Gf,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.shape&&!i.shape&&(i.shape=z({},this.shape))},t.prototype._applyStateObj=function(e,i,n,a,o,s){r.prototype._applyStateObj.call(this,e,i,n,a,o,s);var l=!(i&&a),u;if(i&&i.shape?o?a?u=i.shape:(u=z({},n.shape),z(u,i.shape)):(u=z({},a?this.shape:n.shape),z(u,i.shape)):l&&(u=n.shape),u)if(o){this.shape=z({},this.shape);for(var h={},c=xt(u),f=0;f<c.length;f++){var v=c[f];typeof u[v]=="object"?this.shape[v]=u[v]:h[v]=u[v]}this._transitionState(e,{shape:h},s)}else this.shape=u,this.dirtyShape()},t.prototype._mergeStates=function(e){for(var i=r.prototype._mergeStates.call(this,e),n,a=0;a<e.length;a++){var o=e[a];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(i.shape=n),i},t.prototype.getAnimationStyleProps=function(){return C3},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var i=function(a){E(o,a);function o(s){var l=a.call(this,s)||this;return e.init&&e.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return it(e.style)},o.prototype.getDefaultShape=function(){return it(e.shape)},o}(t);for(var n in e)typeof e[n]=="function"&&(i.prototype[n]=e[n]);return i},t.initDefaultProps=function(){var e=t.prototype;e.type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=hr|Fl|ts}(),t}(kr),A3=tt({strokeFirst:!0,font:Yn,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Gf),Ms=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.hasStroke=function(){var e=this.style,i=e.stroke;return i!=null&&i!=="none"&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.createStyle=function(e){return uh(A3,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var i=e.text;i!=null?i+="":i="";var n=fh(i,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var a=e.lineWidth;n.x-=a/2,n.y-=a/2,n.width+=a,n.height+=a}this._rect=n}return this._rect},t.initDefaultProps=function(){var e=t.prototype;e.dirtyRectTolerance=10}(),t}(kr);Ms.prototype.type="tspan";var D3=tt({x:0,y:0},eo),L3={style:tt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},jv.style)};function I3(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var xe=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return uh(D3,e)},t.prototype._getSize=function(e){var i=this.style,n=i[e];if(n!=null)return n;var a=I3(i.image)?i.image:this.__image;if(!a)return 0;var o=e==="width"?"height":"width",s=i[o];return s==null?a[e]:a[e]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return L3},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new ft(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(kr);xe.prototype.type="image";function P3(r,t){var e=t.x,i=t.y,n=t.width,a=t.height,o=t.r,s,l,u,h;n<0&&(e=e+n,n=-n),a<0&&(i=i+a,a=-a),typeof o=="number"?s=l=u=h=o:o instanceof Array?o.length===1?s=l=u=h=o[0]:o.length===2?(s=u=o[0],l=h=o[1]):o.length===3?(s=o[0],l=h=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],h=o[3]):s=l=u=h=0;var c;s+l>n&&(c=s+l,s*=n/c,l*=n/c),u+h>n&&(c=u+h,u*=n/c,h*=n/c),l+u>a&&(c=l+u,l*=a/c,u*=a/c),s+h>a&&(c=s+h,s*=a/c,h*=a/c),r.moveTo(e+s,i),r.lineTo(e+n-l,i),l!==0&&r.arc(e+n-l,i+l,l,-Math.PI/2,0),r.lineTo(e+n,i+a-u),u!==0&&r.arc(e+n-u,i+a-u,u,0,Math.PI/2),r.lineTo(e+h,i+a),h!==0&&r.arc(e+h,i+a-h,h,Math.PI/2,Math.PI),r.lineTo(e,i+s),s!==0&&r.arc(e+s,i+s,s,Math.PI,Math.PI*1.5)}var os=Math.round;function B2(r,t,e){if(t){var i=t.x1,n=t.x2,a=t.y1,o=t.y2;r.x1=i,r.x2=n,r.y1=a,r.y2=o;var s=e&&e.lineWidth;return s&&(os(i*2)===os(n*2)&&(r.x1=r.x2=Ya(i,s,!0)),os(a*2)===os(o*2)&&(r.y1=r.y2=Ya(a,s,!0))),r}}function z2(r,t,e){if(t){var i=t.x,n=t.y,a=t.width,o=t.height;r.x=i,r.y=n,r.width=a,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=Ya(i,s,!0),r.y=Ya(n,s,!0),r.width=Math.max(Ya(i+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(Ya(n+o,s,!1)-r.y,o===0?0:1)),r}}function Ya(r,t,e){if(!t)return r;var i=os(r*2);return(i+os(t))%2===0?i/2:(i+(e?1:-1))/2}var k3=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),R3={},wt=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new k3},t.prototype.buildPath=function(e,i){var n,a,o,s;if(this.subPixelOptimize){var l=z2(R3,i,this.style);n=l.x,a=l.y,o=l.width,s=l.height,l.r=i.r,i=l}else n=i.x,a=i.y,o=i.width,s=i.height;i.r?P3(e,i):e.rect(n,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(_t);wt.prototype.type="rect";var pS={fill:"#000"},gS=2,E3={style:tt({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},jv.style)},St=function(r){E(t,r);function t(e){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=pS,i.attr(e),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var i=this._children[e];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},t.prototype.updateTransform=function(){var e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):r.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(e){var i=this.innerTransformable;return i?i.getLocalTransform(e):r.prototype.getLocalTransform.call(this,e)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,B3(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].__zr=e},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new ft(0,0,0,0),i=this._children,n=[],a=null,o=0;o<i.length;o++){var s=i[o],l=s.getBoundingRect(),u=s.getLocalTransform(n);u?(e.copy(l),e.applyTransform(u),a=a||e.clone(),a.union(e)):(a=a||l.clone(),a.union(l))}this._rect=a||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||pS},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,i){if(!i)return e;var n=i.rich,a=e.rich||n&&{};return z(e,i),n&&a?(this._mergeRich(a,n),e.rich=a):a&&(e.rich=a),e},t.prototype._mergeRich=function(e,i){for(var n=xt(i),a=0;a<n.length;a++){var o=n[a];e[o]=e[o]||{},z(e[o],i[o])}},t.prototype.getAnimationStyleProps=function(){return E3},t.prototype._getOrCreateChild=function(e){var i=this._children[this._childCursor];return(!i||!(i instanceof e))&&(i=new e),this._children[this._childCursor++]=i,i.__zr=this.__zr,i.parent=this,i},t.prototype._updatePlainTexts=function(){var e=this.style,i=e.font||Yn,n=e.padding,a=wS(e),o=n3(a,e),s=bp(e),l=!!e.backgroundColor,u=o.outerHeight,h=o.outerWidth,c=o.contentWidth,f=o.lines,v=o.lineHeight,d=this._defaultStyle;this.isTruncated=!!o.isTruncated;var p=e.x||0,g=e.y||0,y=e.align||d.align||"left",m=e.verticalAlign||d.verticalAlign||"top",_=p,x=es(g,o.contentHeight,m);if(s||n){var b=Hl(p,h,y),S=es(g,u,m);s&&this._renderBackground(e,e,b,S,h,u)}x+=v/2,n&&(_=SS(p,y,n),m==="top"?x+=n[0]:m==="bottom"&&(x-=n[2]));for(var w=0,T=!1,M=bS("fill"in e?e.fill:(T=!0,d.fill)),C=xS("stroke"in e?e.stroke:!l&&(!d.autoStroke||T)?(w=gS,d.stroke):null),D=e.textShadowBlur>0,L=e.width!=null&&(e.overflow==="truncate"||e.overflow==="break"||e.overflow==="breakAll"),I=o.calculatedLineHeight,P=0;P<f.length;P++){var k=this._getOrCreateChild(Ms),R=k.createStyle();k.useStyle(R),R.text=f[P],R.x=_,R.y=x,R.textAlign=y,R.textBaseline="middle",R.opacity=e.opacity,R.strokeFirst=!0,D&&(R.shadowBlur=e.textShadowBlur||0,R.shadowColor=e.textShadowColor||"transparent",R.shadowOffsetX=e.textShadowOffsetX||0,R.shadowOffsetY=e.textShadowOffsetY||0),R.stroke=C,R.fill=M,C&&(R.lineWidth=e.lineWidth||w,R.lineDash=e.lineDash,R.lineDashOffset=e.lineDashOffset||0),R.font=i,mS(R,e),x+=v,L&&k.setBoundingRect(new ft(Hl(R.x,c,R.textAlign),es(R.y,I,R.textBaseline),c,I))}},t.prototype._updateRichTexts=function(){var e=this.style,i=wS(e),n=s3(i,e),a=n.width,o=n.outerWidth,s=n.outerHeight,l=e.padding,u=e.x||0,h=e.y||0,c=this._defaultStyle,f=e.align||c.align,v=e.verticalAlign||c.verticalAlign;this.isTruncated=!!n.isTruncated;var d=Hl(u,o,f),p=es(h,s,v),g=d,y=p;l&&(g+=l[3],y+=l[0]);var m=g+a;bp(e)&&this._renderBackground(e,e,d,p,o,s);for(var _=!!e.backgroundColor,x=0;x<n.lines.length;x++){for(var b=n.lines[x],S=b.tokens,w=S.length,T=b.lineHeight,M=b.width,C=0,D=g,L=m,I=w-1,P=void 0;C<w&&(P=S[C],!P.align||P.align==="left");)this._placeToken(P,e,T,y,D,"left",_),M-=P.width,D+=P.width,C++;for(;I>=0&&(P=S[I],P.align==="right");)this._placeToken(P,e,T,y,L,"right",_),M-=P.width,L-=P.width,I--;for(D+=(a-(D-g)-(m-L)-M)/2;C<=I;)P=S[C],this._placeToken(P,e,T,y,D+P.width/2,"center",_),D+=P.width,C++;y+=T}},t.prototype._placeToken=function(e,i,n,a,o,s,l){var u=i.rich[e.styleName]||{};u.text=e.text;var h=e.verticalAlign,c=a+n/2;h==="top"?c=a+e.height/2:h==="bottom"&&(c=a+n-e.height/2);var f=!e.isLineHolder&&bp(u);f&&this._renderBackground(u,i,s==="right"?o-e.width:s==="center"?o-e.width/2:o,c-e.height/2,e.width,e.height);var v=!!u.backgroundColor,d=e.textPadding;d&&(o=SS(o,s,d),c-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(Ms),g=p.createStyle();p.useStyle(g);var y=this._defaultStyle,m=!1,_=0,x=bS("fill"in u?u.fill:"fill"in i?i.fill:(m=!0,y.fill)),b=xS("stroke"in u?u.stroke:"stroke"in i?i.stroke:!v&&!l&&(!y.autoStroke||m)?(_=gS,y.stroke):null),S=u.textShadowBlur>0||i.textShadowBlur>0;g.text=e.text,g.x=o,g.y=c,S&&(g.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,g.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||Yn,g.opacity=jr(u.opacity,i.opacity,1),mS(g,u),b&&(g.lineWidth=jr(u.lineWidth,i.lineWidth,_),g.lineDash=lt(u.lineDash,i.lineDash),g.lineDashOffset=i.lineDashOffset||0,g.stroke=b),x&&(g.fill=x);var w=e.contentWidth,T=e.contentHeight;p.setBoundingRect(new ft(Hl(g.x,w,g.textAlign),es(g.y,T,g.textBaseline),w,T))},t.prototype._renderBackground=function(e,i,n,a,o,s){var l=e.backgroundColor,u=e.borderWidth,h=e.borderColor,c=l&&l.image,f=l&&!c,v=e.borderRadius,d=this,p,g;if(f||e.lineHeight||u&&h){p=this._getOrCreateChild(wt),p.useStyle(p.createStyle()),p.style.fill=null;var y=p.shape;y.x=n,y.y=a,y.width=o,y.height=s,y.r=v,p.dirtyShape()}if(f){var m=p.style;m.fill=l||null,m.fillOpacity=lt(e.fillOpacity,1)}else if(c){g=this._getOrCreateChild(xe),g.onload=function(){d.dirtyStyle()};var _=g.style;_.image=l.image,_.x=n,_.y=a,_.width=o,_.height=s}if(u&&h){var m=p.style;m.lineWidth=u,m.stroke=h,m.strokeOpacity=lt(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 x=(p||g).style;x.shadowBlur=e.shadowBlur||0,x.shadowColor=e.shadowColor||"transparent",x.shadowOffsetX=e.shadowOffsetX||0,x.shadowOffsetY=e.shadowOffsetY||0,x.opacity=jr(e.opacity,i.opacity,1)},t.makeFont=function(e){var i="";return F2(e)&&(i=[e.fontStyle,e.fontWeight,V2(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),i&&Lr(i)||e.textFont||e.font},t}(kr),O3={left:!0,right:1,center:1},N3={top:1,bottom:1,middle:1},yS=["fontStyle","fontWeight","fontSize","fontFamily"];function V2(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?V0+"px":r+"px"}function mS(r,t){for(var e=0;e<yS.length;e++){var i=yS[e],n=t[i];n!=null&&(r[i]=n)}}function F2(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function B3(r){return _S(r),A(r.rich,_S),r}function _S(r){if(r){r.font=St.makeFont(r);var t=r.align;t==="middle"&&(t="center"),r.align=t==null||O3[t]?t:"left";var e=r.verticalAlign;e==="center"&&(e="middle"),r.verticalAlign=e==null||N3[e]?e:"top";var i=r.padding;i&&(r.padding=Fv(r.padding))}}function xS(r,t){return r==null||t<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function bS(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function SS(r,t,e){return t==="right"?r-e[1]:t==="center"?r+e[3]/2-e[1]/2:r+e[3]}function wS(r){var t=r.text;return t!=null&&(t+=""),t}function bp(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var ot=Tt(),im=function(r,t,e,i){if(i){var n=ot(i);n.dataIndex=e,n.dataType=t,n.seriesIndex=r,n.ssrType="chart",i.type==="group"&&i.traverse(function(a){var o=ot(a);o.seriesIndex=r,o.dataIndex=e,o.dataType=t,o.ssrType="chart"})}},TS=1,MS={},G2=Tt(),o_=Tt(),s_=0,dh=1,Kv=2,Ke=["emphasis","blur","select"],Bu=["normal","emphasis","blur","select"],Ns=10,z3=9,ro="highlight",lf="downplay",vu="select",uf="unselect",du="toggleSelect";function Oo(r){return r!=null&&r!=="none"}function Jv(r,t,e){r.onHoverStateChange&&(r.hoverState||0)!==e&&r.onHoverStateChange(t),r.hoverState=e}function H2(r){Jv(r,"emphasis",Kv)}function W2(r){r.hoverState===Kv&&Jv(r,"normal",s_)}function l_(r){Jv(r,"blur",dh)}function U2(r){r.hoverState===dh&&Jv(r,"normal",s_)}function V3(r){r.selected=!0}function F3(r){r.selected=!1}function CS(r,t,e){t(r,e)}function on(r,t,e){CS(r,t,e),r.isGroup&&r.traverse(function(i){CS(i,t,e)})}function Hf(r,t){switch(t){case"emphasis":r.hoverState=Kv;break;case"normal":r.hoverState=s_;break;case"blur":r.hoverState=dh;break;case"select":r.selected=!0}}function G3(r,t,e,i){for(var n=r.style,a={},o=0;o<t.length;o++){var s=t[o],l=n[s];a[s]=l??(i&&i[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(e)<0&&u.targetName==="style"&&u.saveTo(a,t)}return a}function H3(r,t,e,i){var n=e&&vt(e,"select")>=0,a=!1;if(r instanceof _t){var o=G2(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(Oo(s)||Oo(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(a=!0,i=z({},i),u=z({},u),u.fill=s):!Oo(u.fill)&&Oo(s)?(a=!0,i=z({},i),u=z({},u),u.fill=Bf(s)):!Oo(u.stroke)&&Oo(l)&&(a||(i=z({},i),u=z({},u)),u.stroke=Bf(l)),i.style=u}}if(i&&i.z2==null){a||(i=z({},i));var h=r.z2EmphasisLift;i.z2=r.z2+(h??Ns)}return i}function W3(r,t,e){if(e&&e.z2==null){e=z({},e);var i=r.z2SelectLift;e.z2=r.z2+(i??z3)}return e}function U3(r,t,e){var i=vt(r.currentStates,t)>=0,n=r.style.opacity,a=i?null:G3(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=z({},e),o=z({opacity:i?n:a.opacity*.1},o),e.style=o),e}function Sp(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return H3(this,r,t,e);if(r==="blur")return U3(this,r,e);if(r==="select")return W3(this,r,e)}return e}function po(r){r.stateProxy=Sp;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=Sp),e&&(e.stateProxy=Sp)}function AS(r,t){!Z2(r,t)&&!r.__highByOuter&&on(r,H2)}function DS(r,t){!Z2(r,t)&&!r.__highByOuter&&on(r,W2)}function Ki(r,t){r.__highByOuter|=1<<(t||0),on(r,H2)}function Ji(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&on(r,W2)}function Y2(r){on(r,l_)}function u_(r){on(r,U2)}function $2(r){on(r,V3)}function X2(r){on(r,F3)}function Z2(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function j2(r){var t=r.getModel(),e=[],i=[];t.eachComponent(function(n,a){var o=o_(a),s=n==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&i.push(l),o.isBlured&&(l.group.traverse(function(u){U2(u)}),s&&e.push(a)),o.isBlured=!1}),A(i,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(e,!1,t)})}function nm(r,t,e,i){var n=i.getModel();e=e||"coordinateSystem";function a(u,h){for(var c=0;c<h.length;c++){var f=u.getItemGraphicEl(h[c]);f&&u_(f)}}if(r!=null&&!(!t||t==="none")){var o=n.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];n.eachSeries(function(u){var h=o===u,c=u.coordinateSystem;c&&c.master&&(c=c.master);var f=c&&s?c===s:h;if(!(e==="series"&&!h||e==="coordinateSystem"&&!f||t==="series"&&h)){var v=i.getViewOfSeriesModel(u);if(v.group.traverse(function(g){g.__highByOuter&&h&&t==="self"||l_(g)}),Me(t))a(u.getData(),t);else if(et(t))for(var d=xt(t),p=0;p<d.length;p++)a(u.getData(d[p]),t[d[p]]);l.push(u),o_(u).isBlured=!0}}),n.eachComponent(function(u,h){if(u!=="series"){var c=i.getViewOfComponentModel(h);c&&c.toggleBlurSeries&&c.toggleBlurSeries(l,!0,n)}})}}function am(r,t,e){if(!(r==null||t==null)){var i=e.getModel().getComponent(r,t);if(i){o_(i).isBlured=!0;var n=e.getViewOfComponentModel(i);!n||!n.focusBlurEnabled||n.group.traverse(function(a){l_(a)})}}}function Y3(r,t,e){var i=r.seriesIndex,n=r.getData(t.dataType);if(n){var a=fo(n,t);a=(V(a)?a[0]:a)||0;var o=n.getItemGraphicEl(a);if(!o)for(var s=n.count(),l=0;!o&&l<s;)o=n.getItemGraphicEl(l++);if(o){var u=ot(o);nm(i,u.focus,u.blurScope,e)}else{var h=r.get(["emphasis","focus"]),c=r.get(["emphasis","blurScope"]);h!=null&&nm(i,h,c,e)}}}function h_(r,t,e,i){var n={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||t==null||e==null)return n;var a=i.getModel().getComponent(r,t);if(!a)return n;var o=i.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return n;for(var s=o.findHighDownDispatchers(e),l,u=0;u<s.length;u++)if(ot(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function $3(r,t,e){var i=ot(r),n=h_(i.componentMainType,i.componentIndex,i.componentHighDownName,e),a=n.dispatchers,o=n.focusSelf;a?(o&&am(i.componentMainType,i.componentIndex,e),A(a,function(s){return AS(s,t)})):(nm(i.seriesIndex,i.focus,i.blurScope,e),i.focus==="self"&&am(i.componentMainType,i.componentIndex,e),AS(r,t))}function X3(r,t,e){j2(e);var i=ot(r),n=h_(i.componentMainType,i.componentIndex,i.componentHighDownName,e).dispatchers;n?A(n,function(a){return DS(a,t)}):DS(r,t)}function Z3(r,t,e){if(sm(t)){var i=t.dataType,n=r.getData(i),a=fo(n,t);V(a)||(a=[a]),r[t.type===du?"toggleSelect":t.type===vu?"select":"unselect"](a,i)}}function LS(r){var t=r.getAllData();A(t,function(e){var i=e.data,n=e.type;i.eachItemGraphicEl(function(a,o){r.isSelected(o,n)?$2(a):X2(a)})})}function j3(r){var t=[];return r.eachSeries(function(e){var i=e.getAllData();A(i,function(n){n.data;var a=n.type,o=e.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:e.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function Bn(r,t,e){$a(r,!0),on(r,po),om(r,t,e)}function q3(r){$a(r,!1)}function Kt(r,t,e,i){i?q3(r):Bn(r,t,e)}function om(r,t,e){var i=ot(r);t!=null?(i.focus=t,i.blurScope=e):i.focus&&(i.focus=null)}var IS=["emphasis","blur","select"],K3={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Ce(r,t,e,i){e=e||"itemStyle";for(var n=0;n<IS.length;n++){var a=IS[n],o=t.getModel([a,e]),s=r.ensureState(a);s.style=i?i(o):o[K3[e]]()}}function $a(r,t){var e=t===!1,i=r;r.highDownSilentOnTouch&&(i.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!e||i.__highDownDispatcher)&&(i.__highByOuter=i.__highByOuter||0,i.__highDownDispatcher=!e)}function zu(r){return!!(r&&r.__highDownDispatcher)}function J3(r,t,e){var i=ot(r);i.componentMainType=t.mainType,i.componentIndex=t.componentIndex,i.componentHighDownName=e}function Q3(r){var t=MS[r];return t==null&&TS<=32&&(t=MS[r]=TS++),t}function sm(r){var t=r.type;return t===vu||t===uf||t===du}function PS(r){var t=r.type;return t===ro||t===lf}function tH(r){var t=G2(r);t.normalFill=r.style.fill,t.normalStroke=r.style.stroke;var e=r.states.select||{};t.selectFill=e.style&&e.style.fill||null,t.selectStroke=e.style&&e.style.stroke||null}var No=Ci.CMD,eH=[[],[],[]],kS=Math.sqrt,rH=Math.atan2;function q2(r,t){if(t){var e=r.data,i=r.len(),n,a,o,s,l,u,h=No.M,c=No.C,f=No.L,v=No.R,d=No.A,p=No.Q;for(o=0,s=0;o<i;){switch(n=e[o++],s=o,a=0,n){case h:a=1;break;case f:a=1;break;case c:a=3;break;case p:a=2;break;case d:var g=t[4],y=t[5],m=kS(t[0]*t[0]+t[1]*t[1]),_=kS(t[2]*t[2]+t[3]*t[3]),x=rH(-t[1]/_,t[0]/m);e[o]*=m,e[o++]+=g,e[o]*=_,e[o++]+=y,e[o++]*=m,e[o++]*=_,e[o++]+=x,e[o++]+=x,o+=2,s=o;break;case v:u[0]=e[o++],u[1]=e[o++],we(u,u,t),e[s++]=u[0],e[s++]=u[1],u[0]+=e[o++],u[1]+=e[o++],we(u,u,t),e[s++]=u[0],e[s++]=u[1]}for(l=0;l<a;l++){var b=eH[l];b[0]=e[o++],b[1]=e[o++],we(b,b,t),e[s++]=b[0],e[s++]=b[1]}}r.increaseVersion()}}var wp=Math.sqrt,ic=Math.sin,nc=Math.cos,fl=Math.PI;function RS(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function lm(r,t){return(r[0]*t[0]+r[1]*t[1])/(RS(r)*RS(t))}function ES(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(lm(r,t))}function OS(r,t,e,i,n,a,o,s,l,u,h){var c=l*(fl/180),f=nc(c)*(r-e)/2+ic(c)*(t-i)/2,v=-1*ic(c)*(r-e)/2+nc(c)*(t-i)/2,d=f*f/(o*o)+v*v/(s*s);d>1&&(o*=wp(d),s*=wp(d));var p=(n===a?-1:1)*wp((o*o*(s*s)-o*o*(v*v)-s*s*(f*f))/(o*o*(v*v)+s*s*(f*f)))||0,g=p*o*v/s,y=p*-s*f/o,m=(r+e)/2+nc(c)*g-ic(c)*y,_=(t+i)/2+ic(c)*g+nc(c)*y,x=ES([1,0],[(f-g)/o,(v-y)/s]),b=[(f-g)/o,(v-y)/s],S=[(-1*f-g)/o,(-1*v-y)/s],w=ES(b,S);if(lm(b,S)<=-1&&(w=fl),lm(b,S)>=1&&(w=0),w<0){var T=Math.round(w/fl*1e6)/1e6;w=fl*2+T%2*fl}h.addData(u,m,_,o,s,x,w,c,a)}var iH=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,nH=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function aH(r){var t=new Ci;if(!r)return t;var e=0,i=0,n=e,a=i,o,s=Ci.CMD,l=r.match(iH);if(!l)return t;for(var u=0;u<l.length;u++){for(var h=l[u],c=h.charAt(0),f=void 0,v=h.match(nH)||[],d=v.length,p=0;p<d;p++)v[p]=parseFloat(v[p]);for(var g=0;g<d;){var y=void 0,m=void 0,_=void 0,x=void 0,b=void 0,S=void 0,w=void 0,T=e,M=i,C=void 0,D=void 0;switch(c){case"l":e+=v[g++],i+=v[g++],f=s.L,t.addData(f,e,i);break;case"L":e=v[g++],i=v[g++],f=s.L,t.addData(f,e,i);break;case"m":e+=v[g++],i+=v[g++],f=s.M,t.addData(f,e,i),n=e,a=i,c="l";break;case"M":e=v[g++],i=v[g++],f=s.M,t.addData(f,e,i),n=e,a=i,c="L";break;case"h":e+=v[g++],f=s.L,t.addData(f,e,i);break;case"H":e=v[g++],f=s.L,t.addData(f,e,i);break;case"v":i+=v[g++],f=s.L,t.addData(f,e,i);break;case"V":i=v[g++],f=s.L,t.addData(f,e,i);break;case"C":f=s.C,t.addData(f,v[g++],v[g++],v[g++],v[g++],v[g++],v[g++]),e=v[g-2],i=v[g-1];break;case"c":f=s.C,t.addData(f,v[g++]+e,v[g++]+i,v[g++]+e,v[g++]+i,v[g++]+e,v[g++]+i),e+=v[g-2],i+=v[g-1];break;case"S":y=e,m=i,C=t.len(),D=t.data,o===s.C&&(y+=e-D[C-4],m+=i-D[C-3]),f=s.C,T=v[g++],M=v[g++],e=v[g++],i=v[g++],t.addData(f,y,m,T,M,e,i);break;case"s":y=e,m=i,C=t.len(),D=t.data,o===s.C&&(y+=e-D[C-4],m+=i-D[C-3]),f=s.C,T=e+v[g++],M=i+v[g++],e+=v[g++],i+=v[g++],t.addData(f,y,m,T,M,e,i);break;case"Q":T=v[g++],M=v[g++],e=v[g++],i=v[g++],f=s.Q,t.addData(f,T,M,e,i);break;case"q":T=v[g++]+e,M=v[g++]+i,e+=v[g++],i+=v[g++],f=s.Q,t.addData(f,T,M,e,i);break;case"T":y=e,m=i,C=t.len(),D=t.data,o===s.Q&&(y+=e-D[C-4],m+=i-D[C-3]),e=v[g++],i=v[g++],f=s.Q,t.addData(f,y,m,e,i);break;case"t":y=e,m=i,C=t.len(),D=t.data,o===s.Q&&(y+=e-D[C-4],m+=i-D[C-3]),e+=v[g++],i+=v[g++],f=s.Q,t.addData(f,y,m,e,i);break;case"A":_=v[g++],x=v[g++],b=v[g++],S=v[g++],w=v[g++],T=e,M=i,e=v[g++],i=v[g++],f=s.A,OS(T,M,e,i,S,w,_,x,b,f,t);break;case"a":_=v[g++],x=v[g++],b=v[g++],S=v[g++],w=v[g++],T=e,M=i,e+=v[g++],i+=v[g++],f=s.A,OS(T,M,e,i,S,w,_,x,b,f,t);break}}(c==="z"||c==="Z")&&(f=s.Z,t.addData(f),e=n,i=a),o=f}return t.toStatic(),t}var K2=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(_t);function J2(r){return r.setData!=null}function Q2(r,t){var e=aH(r),i=z({},t);return i.buildPath=function(n){if(J2(n)){n.setData(e.data);var a=n.getContext();a&&n.rebuildPath(a,1)}else{var a=n;e.rebuildPath(a,1)}},i.applyTransform=function(n){q2(e,n),this.dirtyShape()},i}function tI(r,t){return new K2(Q2(r,t))}function oH(r,t){var e=Q2(r,t),i=function(n){E(a,n);function a(o){var s=n.call(this,o)||this;return s.applyTransform=e.applyTransform,s.buildPath=e.buildPath,s}return a}(K2);return i}function sH(r,t){for(var e=[],i=r.length,n=0;n<i;n++){var a=r[n];e.push(a.getUpdatedPathProxy(!0))}var o=new _t(t);return o.createPathProxy(),o.buildPath=function(s){if(J2(s)){s.appendPath(e);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function c_(r,t){t=t||{};var e=new _t;return r.shape&&e.setShape(r.shape),e.setStyle(r.style),t.bakeTransform?q2(e.path,r.getComputedTransform()):t.toLocal?e.setLocalTransform(r.getComputedTransform()):e.copyTransform(r),e.buildPath=r.buildPath,e.applyTransform=e.applyTransform,e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e}var lH=function(){function r(){this.cx=0,this.cy=0,this.r=0}return r}(),Ai=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new lH},t.prototype.buildPath=function(e,i){e.moveTo(i.cx+i.r,i.cy),e.arc(i.cx,i.cy,i.r,0,Math.PI*2)},t}(_t);Ai.prototype.type="circle";var uH=function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r}(),ph=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new uH},t.prototype.buildPath=function(e,i){var n=.5522848,a=i.cx,o=i.cy,s=i.rx,l=i.ry,u=s*n,h=l*n;e.moveTo(a-s,o),e.bezierCurveTo(a-s,o-h,a-u,o-l,a,o-l),e.bezierCurveTo(a+u,o-l,a+s,o-h,a+s,o),e.bezierCurveTo(a+s,o+h,a+u,o+l,a,o+l),e.bezierCurveTo(a-u,o+l,a-s,o+h,a-s,o),e.closePath()},t}(_t);ph.prototype.type="ellipse";var eI=Math.PI,Tp=eI*2,ba=Math.sin,Bo=Math.cos,hH=Math.acos,De=Math.atan2,NS=Math.abs,pu=Math.sqrt,Wl=Math.max,si=Math.min,Fr=1e-4;function cH(r,t,e,i,n,a,o,s){var l=e-r,u=i-t,h=o-n,c=s-a,f=c*l-h*u;if(!(f*f<Fr))return f=(h*(t-a)-c*(r-n))/f,[r+f*l,t+f*u]}function ac(r,t,e,i,n,a,o){var s=r-e,l=t-i,u=(o?a:-a)/pu(s*s+l*l),h=u*l,c=-u*s,f=r+h,v=t+c,d=e+h,p=i+c,g=(f+d)/2,y=(v+p)/2,m=d-f,_=p-v,x=m*m+_*_,b=n-a,S=f*p-d*v,w=(_<0?-1:1)*pu(Wl(0,b*b*x-S*S)),T=(S*_-m*w)/x,M=(-S*m-_*w)/x,C=(S*_+m*w)/x,D=(-S*m+_*w)/x,L=T-g,I=M-y,P=C-g,k=D-y;return L*L+I*I>P*P+k*k&&(T=C,M=D),{cx:T,cy:M,x0:-h,y0:-c,x1:T*(n/b-1),y1:M*(n/b-1)}}function fH(r){var t;if(V(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 vH(r,t){var e,i=Wl(t.r,0),n=Wl(t.r0||0,0),a=i>0,o=n>0;if(!(!a&&!o)){if(a||(i=n,n=0),n>i){var s=i;i=n,n=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var h=t.cx,c=t.cy,f=!!t.clockwise,v=NS(u-l),d=v>Tp&&v%Tp;if(d>Fr&&(v=d),!(i>Fr))r.moveTo(h,c);else if(v>Tp-Fr)r.moveTo(h+i*Bo(l),c+i*ba(l)),r.arc(h,c,i,l,u,!f),n>Fr&&(r.moveTo(h+n*Bo(u),c+n*ba(u)),r.arc(h,c,n,u,l,f));else{var p=void 0,g=void 0,y=void 0,m=void 0,_=void 0,x=void 0,b=void 0,S=void 0,w=void 0,T=void 0,M=void 0,C=void 0,D=void 0,L=void 0,I=void 0,P=void 0,k=i*Bo(l),R=i*ba(l),N=n*Bo(u),O=n*ba(u),B=v>Fr;if(B){var G=t.cornerRadius;G&&(e=fH(G),p=e[0],g=e[1],y=e[2],m=e[3]);var H=NS(i-n)/2;if(_=si(H,y),x=si(H,m),b=si(H,p),S=si(H,g),M=w=Wl(_,x),C=T=Wl(b,S),(w>Fr||T>Fr)&&(D=i*Bo(u),L=i*ba(u),I=n*Bo(l),P=n*ba(l),v<eI)){var W=cH(k,R,I,P,D,L,N,O);if(W){var q=k-W[0],K=R-W[1],nt=D-W[0],Ct=L-W[1],te=1/ba(hH((q*nt+K*Ct)/(pu(q*q+K*K)*pu(nt*nt+Ct*Ct)))/2),dt=pu(W[0]*W[0]+W[1]*W[1]);M=si(w,(i-dt)/(te+1)),C=si(T,(n-dt)/(te-1))}}}if(!B)r.moveTo(h+k,c+R);else if(M>Fr){var rt=si(y,M),gt=si(m,M),J=ac(I,P,k,R,i,rt,f),st=ac(D,L,N,O,i,gt,f);r.moveTo(h+J.cx+J.x0,c+J.cy+J.y0),M<w&&rt===gt?r.arc(h+J.cx,c+J.cy,M,De(J.y0,J.x0),De(st.y0,st.x0),!f):(rt>0&&r.arc(h+J.cx,c+J.cy,rt,De(J.y0,J.x0),De(J.y1,J.x1),!f),r.arc(h,c,i,De(J.cy+J.y1,J.cx+J.x1),De(st.cy+st.y1,st.cx+st.x1),!f),gt>0&&r.arc(h+st.cx,c+st.cy,gt,De(st.y1,st.x1),De(st.y0,st.x0),!f))}else r.moveTo(h+k,c+R),r.arc(h,c,i,l,u,!f);if(!(n>Fr)||!B)r.lineTo(h+N,c+O);else if(C>Fr){var rt=si(p,C),gt=si(g,C),J=ac(N,O,D,L,n,-gt,f),st=ac(k,R,I,P,n,-rt,f);r.lineTo(h+J.cx+J.x0,c+J.cy+J.y0),C<T&&rt===gt?r.arc(h+J.cx,c+J.cy,C,De(J.y0,J.x0),De(st.y0,st.x0),!f):(gt>0&&r.arc(h+J.cx,c+J.cy,gt,De(J.y0,J.x0),De(J.y1,J.x1),!f),r.arc(h,c,n,De(J.cy+J.y1,J.cx+J.x1),De(st.cy+st.y1,st.cx+st.x1),f),rt>0&&r.arc(h+st.cx,c+st.cy,rt,De(st.y1,st.x1),De(st.y0,st.x0),!f))}else r.lineTo(h+N,c+O),r.arc(h,c,n,u,l,f)}r.closePath()}}}var dH=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}(),Fe=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new dH},t.prototype.buildPath=function(e,i){vH(e,i)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(_t);Fe.prototype.type="sector";var pH=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),Bs=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new pH},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.PI*2;e.moveTo(n+i.r,a),e.arc(n,a,i.r,0,o,!1),e.moveTo(n+i.r0,a),e.arc(n,a,i.r0,0,o,!0)},t}(_t);Bs.prototype.type="ring";function gH(r,t,e,i){var n=[],a=[],o=[],s=[],l,u,h,c;if(i){h=[1/0,1/0],c=[-1/0,-1/0];for(var f=0,v=r.length;f<v;f++)Ui(h,h,r[f]),Yi(c,c,r[f]);Ui(h,h,i[0]),Yi(c,c,i[1])}for(var f=0,v=r.length;f<v;f++){var d=r[f];if(e)l=r[f?f-1:v-1],u=r[(f+1)%v];else if(f===0||f===v-1){n.push(xi(r[f]));continue}else l=r[f-1],u=r[f+1];An(a,u,l),ou(a,a,t);var p=kf(d,l),g=kf(d,u),y=p+g;y!==0&&(p/=y,g/=y),ou(o,a,-p),ou(s,a,g);var m=ky([],d,o),_=ky([],d,s);i&&(Yi(m,m,h),Ui(m,m,c),Yi(_,_,h),Ui(_,_,c)),n.push(m),n.push(_)}return e&&n.push(n.shift()),n}function rI(r,t,e){var i=t.smooth,n=t.points;if(n&&n.length>=2){if(i){var a=gH(n,i,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=a[s*2],u=a[s*2+1],h=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;s<c;s++)r.lineTo(n[s][0],n[s][1])}e&&r.closePath()}}var yH=function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r}(),Ge=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new yH},t.prototype.buildPath=function(e,i){rI(e,i,!0)},t}(_t);Ge.prototype.type="polygon";var mH=function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r}(),We=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new mH},t.prototype.buildPath=function(e,i){rI(e,i,!1)},t}(_t);We.prototype.type="polyline";var _H={},xH=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}(),ce=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new xH},t.prototype.buildPath=function(e,i){var n,a,o,s;if(this.subPixelOptimize){var l=B2(_H,i,this.style);n=l.x1,a=l.y1,o=l.x2,s=l.y2}else n=i.x1,a=i.y1,o=i.x2,s=i.y2;var u=i.percent;u!==0&&(e.moveTo(n,a),u<1&&(o=n*(1-u)+o*u,s=a*(1-u)+s*u),e.lineTo(o,s))},t.prototype.pointAt=function(e){var i=this.shape;return[i.x1*(1-e)+i.x2*e,i.y1*(1-e)+i.y2*e]},t}(_t);ce.prototype.type="line";var tr=[],bH=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r}();function BS(r,t,e){var i=r.cpx2,n=r.cpy2;return i!=null||n!=null?[(e?U1:ve)(r.x1,r.cpx1,r.cpx2,r.x2,t),(e?U1:ve)(r.y1,r.cpy1,r.cpy2,r.y2,t)]:[(e?By:be)(r.x1,r.cpx1,r.x2,t),(e?By:be)(r.y1,r.cpy1,r.y2,t)]}var zs=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new bH},t.prototype.buildPath=function(e,i){var n=i.x1,a=i.y1,o=i.x2,s=i.y2,l=i.cpx1,u=i.cpy1,h=i.cpx2,c=i.cpy2,f=i.percent;f!==0&&(e.moveTo(n,a),h==null||c==null?(f<1&&(Pu(n,l,o,f,tr),l=tr[1],o=tr[2],Pu(a,u,s,f,tr),u=tr[1],s=tr[2]),e.quadraticCurveTo(l,u,o,s)):(f<1&&($n(n,l,h,o,f,tr),l=tr[1],h=tr[2],o=tr[3],$n(a,u,c,s,f,tr),u=tr[1],c=tr[2],s=tr[3]),e.bezierCurveTo(l,u,h,c,o,s)))},t.prototype.pointAt=function(e){return BS(this.shape,e,!1)},t.prototype.tangentAt=function(e){var i=BS(this.shape,e,!0);return xo(i,i)},t}(_t);zs.prototype.type="bezier-curve";var SH=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),gh=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new SH},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.max(i.r,0),s=i.startAngle,l=i.endAngle,u=i.clockwise,h=Math.cos(s),c=Math.sin(s);e.moveTo(h*o+n,c*o+a),e.arc(n,a,o,s,l,!u)},t}(_t);gh.prototype.type="arc";var Qv=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="compound",e}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,i=this.shapeChanged(),n=0;n<e.length;n++)i=i||e[n].shapeChanged();i&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],i=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(i[0],i[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,i){for(var n=i.paths||[],a=0;a<n.length;a++)n[a].buildPath(e,n[a].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],i=0;i<e.length;i++)e[i].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),_t.prototype.getBoundingRect.call(this)},t}(_t),iI=function(){function r(t){this.colorStops=t||[]}return r.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},r}(),Vs=function(r){E(t,r);function t(e,i,n,a,o,s){var l=r.call(this,o)||this;return l.x=e??0,l.y=i??0,l.x2=n??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return t}(iI),f_=function(r){E(t,r);function t(e,i,n,a,o){var s=r.call(this,a)||this;return s.x=e??.5,s.y=i??.5,s.r=n??.5,s.type="radial",s.global=o||!1,s}return t}(iI),Sa=[0,0],wa=[0,0],oc=new ct,sc=new ct,Wf=function(){function r(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new ct;for(var i=0;i<2;i++)this._axes[i]=new ct;t&&this.fromBoundingRect(t,e)}return r.prototype.fromBoundingRect=function(t,e){var i=this._corners,n=this._axes,a=t.x,o=t.y,s=a+t.width,l=o+t.height;if(i[0].set(a,o),i[1].set(s,o),i[2].set(s,l),i[3].set(a,l),e)for(var u=0;u<4;u++)i[u].transform(e);ct.sub(n[0],i[1],i[0]),ct.sub(n[1],i[3],i[0]),n[0].normalize(),n[1].normalize();for(var u=0;u<2;u++)this._origin[u]=n[u].dot(i[0])},r.prototype.intersect=function(t,e){var i=!0,n=!e;return oc.set(1/0,1/0),sc.set(0,0),!this._intersectCheckOneSide(this,t,oc,sc,n,1)&&(i=!1,n)||!this._intersectCheckOneSide(t,this,oc,sc,n,-1)&&(i=!1,n)||n||ct.copy(e,i?oc:sc),i},r.prototype._intersectCheckOneSide=function(t,e,i,n,a,o){for(var s=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,t._corners,Sa),this._getProjMinMaxOnAxis(l,e._corners,wa),Sa[1]<wa[0]||Sa[0]>wa[1]){if(s=!1,a)return s;var h=Math.abs(wa[0]-Sa[1]),c=Math.abs(Sa[0]-wa[1]);Math.min(h,c)>n.len()&&(h<c?ct.scale(n,u,-h*o):ct.scale(n,u,c*o))}else if(i){var h=Math.abs(wa[0]-Sa[1]),c=Math.abs(Sa[0]-wa[1]);Math.min(h,c)<i.len()&&(h<c?ct.scale(i,u,h*o):ct.scale(i,u,-c*o))}}return s},r.prototype._getProjMinMaxOnAxis=function(t,e,i){for(var n=this._axes[t],a=this._origin,o=e[0].dot(n)+a[t],s=o,l=o,u=1;u<e.length;u++){var h=e[u].dot(n)+a[t];s=Math.min(h,s),l=Math.max(h,l)}i[0]=s,i[1]=l},r}(),wH=[],nI=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return t.prototype.traverse=function(e,i){e.call(i,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,i){i?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,i){i=i||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],i)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var i=this._cursor;i<this._displayables.length;i++)e&&e(this._displayables[i]);for(var i=0;i<this._temporaryDisplayables.length;i++)e&&e(this._temporaryDisplayables[i])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var i=this._displayables[e];i.parent=this,i.update(),i.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var i=this._temporaryDisplayables[e];i.parent=this,i.update(),i.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new ft(1/0,1/0,-1/0,-1/0),i=0;i<this._displayables.length;i++){var n=this._displayables[i],a=n.getBoundingRect().clone();n.needLocalTransform()&&a.applyTransform(n.getLocalTransform(wH)),e.union(a)}this._rect=e}return this._rect},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect();if(a.contain(n[0],n[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(e,i))return!0}return!1},t}(kr),aI=Tt();function Fs(r,t,e,i,n){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,h=void 0,c=void 0;i?(u=lt(i.duration,200),h=lt(i.easing,"cubicOut"),c=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),h=t.getShallow(l?"animationEasingUpdate":"animationEasing"),c=t.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(h=a.easing),a.delay!=null&&(c=a.delay)),Q(c)&&(c=c(e,n)),Q(u)&&(u=u(e));var f={duration:u||0,delay:c,easing:h};return f}else return null}function v_(r,t,e,i,n,a,o){var s=!1,l;Q(n)?(o=a,a=n,n=null):et(n)&&(a=n.cb,o=n.during,s=n.isFrom,l=n.removeOpt,n=n.dataIndex);var u=r==="leave";u||t.stopAnimation("leave");var h=Fs(r,i,n,u?l||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(t,n):null);if(h&&h.duration>0){var c=h.duration,f=h.delay,v=h.easing,d={duration:c,delay:f||0,easing:v,done:a,force:!!a||!!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),a&&a()}function At(r,t,e,i,n,a){v_("update",r,t,e,i,n,a)}function $t(r,t,e,i,n,a){v_("enter",r,t,e,i,n,a)}function vs(r){if(!r.__zr)return!0;for(var t=0;t<r.animators.length;t++){var e=r.animators[t];if(e.scope==="leave")return!0}return!1}function Xn(r,t,e,i,n,a){vs(r)||v_("leave",r,t,e,i,n,a)}function zS(r,t,e,i){r.removeTextContent(),r.removeTextGuideLine(),Xn(r,{style:{opacity:0}},t,e,i)}function Vu(r,t,e){function i(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(n){n.isGroup||zS(n,t,e,i)}):zS(r,t,e,i)}function ri(r){aI(r).oldStyle=r.style}function TH(r){return aI(r).oldStyle}var Uf=Math.max,Yf=Math.min,um={};function oI(r){return _t.extend(r)}var MH=oH;function sI(r,t){return MH(r,t)}function Er(r,t){um[r]=t}function td(r){if(um.hasOwnProperty(r))return um[r]}function yh(r,t,e,i){var n=tI(r,t);return e&&(i==="center"&&(e=lI(e,n.getBoundingRect())),p_(n,e)),n}function d_(r,t,e){var i=new xe({style:{image:r,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(n){if(e==="center"){var a={width:n.width,height:n.height};i.setStyle(lI(t,a))}}});return i}function lI(r,t){var e=t.width/t.height,i=r.height*e,n;i<=r.width?n=r.height:(i=r.width,n=i/e);var a=r.x+r.width/2,o=r.y+r.height/2;return{x:a-i/2,y:o-n/2,width:i,height:n}}var cr=sH;function p_(r,t){if(r.applyTransform){var e=r.getBoundingRect(),i=e.calculateTransform(t);r.applyTransform(i)}}function Cs(r,t){return B2(r,r,{lineWidth:t}),r}function CH(r){return z2(r.shape,r.shape,r.style),r}var hf=Ya;function zn(r,t){for(var e=hh([]);r&&r!==t;)bi(e,r.getLocalTransform(),e),r=r.parent;return e}function Jr(r,t,e){return t&&!Me(t)&&(t=$i.getLocalTransform(t)),e&&(t=bo([],t)),we([],r,t)}function ed(r,t,e){var i=t[4]===0||t[5]===0||t[0]===0?1:Math.abs(2*t[4]/t[0]),n=t[4]===0||t[5]===0||t[2]===0?1:Math.abs(2*t[4]/t[2]),a=[r==="left"?-i:r==="right"?i:0,r==="top"?-n:r==="bottom"?n:0];return a=Jr(a,t,e),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function VS(r){return!r.isGroup}function AH(r){return r.shape!=null}function mh(r,t,e){if(!r||!t)return;function i(o){var s={};return o.traverse(function(l){VS(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return AH(o)&&(s.shape=z({},o.shape)),s}var a=i(r);t.traverse(function(o){if(VS(o)&&o.anid){var s=a[o.anid];if(s){var l=n(o);o.attr(n(s)),At(o,l,e,ot(o).dataIndex)}}})}function g_(r,t){return F(r,function(e){var i=e[0];i=Uf(i,t.x),i=Yf(i,t.x+t.width);var n=e[1];return n=Uf(n,t.y),n=Yf(n,t.y+t.height),[i,n]})}function uI(r,t){var e=Uf(r.x,t.x),i=Yf(r.x+r.width,t.x+t.width),n=Uf(r.y,t.y),a=Yf(r.y+r.height,t.y+t.height);if(i>=e&&a>=n)return{x:e,y:n,width:i-e,height:a-n}}function Gs(r,t,e){var i=z({rectHover:!0},t),n=i.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),tt(n,e),new xe(i)):yh(r.replace("path://",""),i,e,"center")}function Ul(r,t,e,i,n){for(var a=0,o=n[n.length-1];a<n.length;a++){var s=n[a];if(hI(r,t,e,i,s[0],s[1],o[0],o[1]))return!0;o=s}}function hI(r,t,e,i,n,a,o,s){var l=e-r,u=i-t,h=o-n,c=s-a,f=Mp(h,c,l,u);if(DH(f))return!1;var v=r-n,d=t-a,p=Mp(v,d,l,u)/f;if(p<0||p>1)return!1;var g=Mp(v,d,h,c)/f;return!(g<0||g>1)}function Mp(r,t,e,i){return r*i-e*t}function DH(r){return r<=1e-6&&r>=-1e-6}function So(r){var t=r.itemTooltipOption,e=r.componentModel,i=r.itemName,n=Y(t)?{formatter:t}:t,a=e.mainType,o=e.componentIndex,s={componentType:a,name:i,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&A(xt(l),function(h){X(s,h)||(s[h]=l[h],s.$vars.push(h))});var u=ot(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:i,option:tt({content:i,encodeHTMLContent:!0,formatterParams:s},n)}}function FS(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function ta(r,t){if(r)if(V(r))for(var e=0;e<r.length;e++)FS(r[e],t);else FS(r,t)}Er("circle",Ai);Er("ellipse",ph);Er("sector",Fe);Er("ring",Bs);Er("polygon",Ge);Er("polyline",We);Er("rect",wt);Er("line",ce);Er("bezierCurve",zs);Er("arc",gh);const wo=Object.freeze(Object.defineProperty({__proto__:null,Arc:gh,BezierCurve:zs,BoundingRect:ft,Circle:Ai,CompoundPath:Qv,Ellipse:ph,Group:at,Image:xe,IncrementalDisplayable:nI,Line:ce,LinearGradient:Vs,OrientedBoundingRect:Wf,Path:_t,Point:ct,Polygon:Ge,Polyline:We,RadialGradient:f_,Rect:wt,Ring:Bs,Sector:Fe,Text:St,applyTransform:Jr,clipPointsByRect:g_,clipRectByRect:uI,createIcon:Gs,extendPath:sI,extendShape:oI,getShapeClass:td,getTransform:zn,groupTransition:mh,initProps:$t,isElementRemoved:vs,lineLineIntersect:hI,linePolygonIntersect:Ul,makeImage:d_,makePath:yh,mergePath:cr,registerShape:Er,removeElement:Xn,removeElementWithFadeOut:Vu,resizePath:p_,setTooltipConfig:So,subPixelOptimize:hf,subPixelOptimizeLine:Cs,subPixelOptimizeRect:CH,transformDirection:ed,traverseElements:ta,updateProps:At},Symbol.toStringTag,{value:"Module"}));var rd={};function cI(r,t){for(var e=0;e<Ke.length;e++){var i=Ke[e],n=t[i],a=r.ensureState(i);a.style=a.style||{},a.style.text=n}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:t.normal}),r.useStates(o,!0)}function hm(r,t,e){var i=r.labelFetcher,n=r.labelDataIndex,a=r.labelDimIndex,o=t.normal,s;i&&(s=i.getFormattedLabel(n,"normal",null,a,o&&o.get("formatter"),e!=null?{interpolatedValue:e}:null)),s==null&&(s=Q(r.defaultText)?r.defaultText(n,r,e):r.defaultText);for(var l={normal:s},u=0;u<Ke.length;u++){var h=Ke[u],c=t[h];l[h]=lt(i?i.getFormattedLabel(n,h,null,a,c&&c.get("formatter")):null,s)}return l}function Ae(r,t,e,i){e=e||rd;for(var n=r instanceof St,a=!1,o=0;o<Bu.length;o++){var s=t[Bu[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=n?r:r.getTextContent();if(a){n||(l||(l=new St,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=hm(e,t),h=t.normal,c=!!h.getShallow("show"),f=Gt(h,i&&i.normal,e,!1,!n);f.text=u.normal,n||r.setTextConfig($f(h,e,!1));for(var o=0;o<Ke.length;o++){var v=Ke[o],s=t[v];if(s){var d=l.ensureState(v),p=!!lt(s.getShallow("show"),c);if(p!==c&&(d.ignore=!p),d.style=Gt(s,i&&i[v],e,!0,!n),d.style.text=u[v],!n){var g=r.ensureState(v);g.textConfig=$f(s,e,!0)}}}l.silent=!!h.getShallow("silent"),l.style.x!=null&&(f.x=l.style.x),l.style.y!=null&&(f.y=l.style.y),l.ignore=!c,l.useStyle(f),l.dirty(),e.enableTextSetter&&(Hs(l).setLabelText=function(y){var m=hm(e,t,y);cI(l,m)})}else l&&(l.ignore=!0);r.dirty()}function me(r,t){t=t||"label";for(var e={normal:r.getModel(t)},i=0;i<Ke.length;i++){var n=Ke[i];e[n]=r.getModel([n,t])}return e}function Gt(r,t,e,i,n){var a={};return LH(a,r,e,i,n),t&&z(a,t),a}function $f(r,t,e){t=t||{};var i={},n,a=r.getShallow("rotate"),o=lt(r.getShallow("distance"),e?null:5),s=r.getShallow("offset");return n=r.getShallow("position")||(e?null:"inside"),n==="outside"&&(n=t.defaultOutsidePosition||"top"),n!=null&&(i.position=n),s!=null&&(i.offset=s),a!=null&&(a*=Math.PI/180,i.rotation=a),o!=null&&(i.distance=o),i.outsideFill=r.get("color")==="inherit"?t.inheritColor||null:"auto",i}function LH(r,t,e,i,n){e=e||rd;var a=t.ecModel,o=a&&a.option.textStyle,s=IH(t),l;if(s){l={};for(var u in s)if(s.hasOwnProperty(u)){var h=t.getModel(["rich",u]);US(l[u]={},h,o,e,i,n,!1,!0)}}l&&(r.rich=l);var c=t.get("overflow");c&&(r.overflow=c);var f=t.get("minMargin");f!=null&&(r.margin=f),US(r,t,o,e,i,n,!0,!1)}function IH(r){for(var t;r&&r!==r.ecModel;){var e=(r.option||rd).rich;if(e){t=t||{};for(var i=xt(e),n=0;n<i.length;n++){var a=i[n];t[a]=1}}r=r.parentModel}return t}var GS=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],HS=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],WS=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function US(r,t,e,i,n,a,o,s){e=!n&&e||rd;var l=i&&i.inheritColor,u=t.getShallow("color"),h=t.getShallow("textBorderColor"),c=lt(t.getShallow("opacity"),e.opacity);(u==="inherit"||u==="auto")&&(l?u=l:u=null),(h==="inherit"||h==="auto")&&(l?h=l:h=null),a||(u=u||e.color,h=h||e.textBorderColor),u!=null&&(r.fill=u),h!=null&&(r.stroke=h);var f=lt(t.getShallow("textBorderWidth"),e.textBorderWidth);f!=null&&(r.lineWidth=f);var v=lt(t.getShallow("textBorderType"),e.textBorderType);v!=null&&(r.lineDash=v);var d=lt(t.getShallow("textBorderDashOffset"),e.textBorderDashOffset);d!=null&&(r.lineDashOffset=d),!n&&c==null&&!s&&(c=i&&i.defaultOpacity),c!=null&&(r.opacity=c),!n&&!a&&r.fill==null&&i.inheritColor&&(r.fill=i.inheritColor);for(var p=0;p<GS.length;p++){var g=GS[p],y=lt(t.getShallow(g),e[g]);y!=null&&(r[g]=y)}for(var p=0;p<HS.length;p++){var g=HS[p],y=t.getShallow(g);y!=null&&(r[g]=y)}if(r.verticalAlign==null){var m=t.getShallow("baseline");m!=null&&(r.verticalAlign=m)}if(!o||!i.disableBox){for(var p=0;p<WS.length;p++){var g=WS[p],y=t.getShallow(g);y!=null&&(r[g]=y)}var _=t.getShallow("borderType");_!=null&&(r.borderDash=_),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(r.borderColor=l)}}function y_(r,t){var e=t&&t.getModel("textStyle");return Lr([r.fontStyle||e&&e.getShallow("fontStyle")||"",r.fontWeight||e&&e.getShallow("fontWeight")||"",(r.fontSize||e&&e.getShallow("fontSize")||12)+"px",r.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "))}var Hs=Tt();function fI(r,t,e,i){if(r){var n=Hs(r);n.prevValue=n.value,n.value=e;var a=t.normal;n.valueAnimation=a.get("valueAnimation"),n.valueAnimation&&(n.precision=a.get("precision"),n.defaultInterpolatedText=i,n.statesModels=t)}}function vI(r,t,e,i,n){var a=Hs(r);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=lt(a.interpolatedValue,a.prevValue),l=a.value;function u(h){var c=D2(e,a.precision,s,l,h);a.interpolatedValue=h===1?null:c;var f=hm({labelDataIndex:t,labelFetcher:n,defaultText:o?o(c):c+""},a.statesModels,c);cI(r,f)}r.percent=0,(a.prevValue==null?$t:At)(r,{percent:1},i,t,null,u)}var PH=["textStyle","color"],Cp=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Ap=new St,kH=function(){function r(){}return r.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(PH):null)},r.prototype.getFont=function(){return y_({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<Cp.length;i++)e[Cp[i]]=this.getShallow(Cp[i]);return Ap.useStyle(e),Ap.update(),Ap.getBoundingRect()},r}(),dI=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],RH=vo(dI),EH=function(){function r(){}return r.prototype.getLineStyle=function(t){return RH(this,t)},r}(),pI=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],OH=vo(pI),NH=function(){function r(){}return r.prototype.getItemStyle=function(t,e){return OH(this,t,e)},r}(),Lt=function(){function r(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}return r.prototype.init=function(t,e,i){},r.prototype.mergeOption=function(t,e){ht(this.option,t,!0)},r.prototype.get=function(t,e){return t==null?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},r.prototype.getShallow=function(t,e){var i=this.option,n=i==null?i:i[t];if(n==null&&!e){var a=this.parentModel;a&&(n=a.getShallow(t))}return n},r.prototype.getModel=function(t,e){var i=t!=null,n=i?this.parsePath(t):null,a=i?this._doGet(n):this.option;return e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(n)),new r(a,e,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var t=this.constructor;return new t(it(this.option))},r.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},r.prototype.resolveParentPath=function(t){return t},r.prototype.isAnimationEnabled=function(){if(!mt.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(t,e){var i=this.option;if(!t)return i;for(var n=0;n<t.length&&!(t[n]&&(i=i&&typeof i=="object"?i[t[n]]:null,i==null));n++);return i==null&&e&&(i=e._doGet(this.resolveParentPath(t),e.parentModel)),i},r}();i_(Lt);jG(Lt);re(Lt,EH);re(Lt,NH);re(Lt,t3);re(Lt,kH);var BH=Math.round(Math.random()*10);function Ws(r){return[r||"",BH++].join("_")}function zH(r){var t={};r.registerSubTypeDefaulter=function(e,i){var n=gi(e);t[n.main]=i},r.determineSubType=function(e,i){var n=i.type;if(!n){var a=gi(e).main;r.hasSubTypes(e)&&t[a]&&(n=t[a](i))}return n}}function VH(r,t){r.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=e(o),h=u.graph,c=u.noEntryList,f={};for(A(a,function(m){f[m]=!0});c.length;){var v=c.pop(),d=h[v],p=!!f[v];p&&(s.call(l,v,d.originalDeps.slice()),delete f[v]),A(d.successor,p?y:g)}A(f,function(){var m="";throw new Error(m)});function g(m){h[m].entryCount--,h[m].entryCount===0&&c.push(m)}function y(m){f[m]=!0,g(m)}};function e(a){var o={},s=[];return A(a,function(l){var u=i(o,l),h=u.originalDeps=t(l),c=n(h,a);u.entryCount=c.length,u.entryCount===0&&s.push(l),A(c,function(f){vt(u.predecessor,f)<0&&u.predecessor.push(f);var v=i(o,f);vt(v.successor,f)<0&&v.successor.push(l)})}),{graph:o,noEntryList:s}}function i(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function n(a,o){var s=[];return A(a,function(l){vt(o,l)>=0&&s.push(l)}),s}}function ea(r,t){return ht(ht({},r,!0),t,!0)}const FH={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:". "}}}},GH={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 Xf="ZH",m_="EN",ds=m_,cf={},__={},gI=mt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||ds).toUpperCase();return r.indexOf(Xf)>-1?Xf:ds}():ds;function x_(r,t){r=r.toUpperCase(),__[r]=new Lt(t),cf[r]=t}function HH(r){if(Y(r)){var t=cf[r.toUpperCase()]||{};return r===Xf||r===m_?it(t):ht(it(t),it(cf[ds]),!1)}else return ht(it(r),it(cf[ds]),!1)}function cm(r){return __[r]}function WH(){return __[ds]}x_(m_,FH);x_(Xf,GH);var b_=1e3,S_=b_*60,gu=S_*60,Dr=gu*24,YS=Dr*365,Yl={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},lc="{yyyy}-{MM}-{dd}",$S={year:"{yyyy}",month:"{yyyy}-{MM}",day:lc,hour:lc+" "+Yl.hour,minute:lc+" "+Yl.minute,second:lc+" "+Yl.second,millisecond:Yl.none},Dp=["year","month","day","hour","minute","second","millisecond"],yI=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function $e(r,t){return r+="","0000".substr(0,t-r.length)+r}function ps(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 UH(r){return r===ps(r)}function YH(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function _h(r,t,e,i){var n=pr(r),a=n[w_(e)](),o=n[gs(e)]()+1,s=Math.floor((o-1)/3)+1,l=n[id(e)](),u=n["get"+(e?"UTC":"")+"Day"](),h=n[Fu(e)](),c=(h-1)%12+1,f=n[nd(e)](),v=n[ad(e)](),d=n[od(e)](),p=h>=12?"pm":"am",g=p.toUpperCase(),y=i instanceof Lt?i:cm(i||gI)||WH(),m=y.getModel("time"),_=m.get("month"),x=m.get("monthAbbr"),b=m.get("dayOfWeek"),S=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,$e(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,x[o-1]).replace(/{MM}/g,$e(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,$e(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,$e(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,$e(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,$e(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,$e(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,$e(d,3)).replace(/{S}/g,d+"")}function $H(r,t,e,i,n){var a=null;if(Y(e))a=e;else if(Q(e))a=e(r.value,t,{level:r.level});else{var o=z({},Yl);if(r.level>0)for(var s=0;s<Dp.length;++s)o[Dp[s]]="{primary|"+o[Dp[s]]+"}";var l=e?e.inherit===!1?e:tt(e,o):o,u=mI(r.value,n);if(l[u])a=l[u];else if(l.inherit){for(var h=yI.indexOf(u),s=h-1;s>=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(V(a)){var c=r.level==null?0:r.level>=0?r.level:a.length+r.level;c=Math.min(c,a.length-1),a=a[c]}}return _h(new Date(r.value),a,n,i)}function mI(r,t){var e=pr(r),i=e[gs(t)]()+1,n=e[id(t)](),a=e[Fu(t)](),o=e[nd(t)](),s=e[ad(t)](),l=e[od(t)](),u=l===0,h=u&&s===0,c=h&&o===0,f=c&&a===0,v=f&&n===1,d=v&&i===1;return d?"year":v?"month":f?"day":c?"hour":h?"minute":u?"second":"millisecond"}function XS(r,t,e){var i=Mt(r)?pr(r):r;switch(t=t||mI(r,e),t){case"year":return i[w_(e)]();case"half-year":return i[gs(e)]()>=6?1:0;case"quarter":return Math.floor((i[gs(e)]()+1)/4);case"month":return i[gs(e)]();case"day":return i[id(e)]();case"half-day":return i[Fu(e)]()/24;case"hour":return i[Fu(e)]();case"minute":return i[nd(e)]();case"second":return i[ad(e)]();case"millisecond":return i[od(e)]()}}function w_(r){return r?"getUTCFullYear":"getFullYear"}function gs(r){return r?"getUTCMonth":"getMonth"}function id(r){return r?"getUTCDate":"getDate"}function Fu(r){return r?"getUTCHours":"getHours"}function nd(r){return r?"getUTCMinutes":"getMinutes"}function ad(r){return r?"getUTCSeconds":"getSeconds"}function od(r){return r?"getUTCMilliseconds":"getMilliseconds"}function XH(r){return r?"setUTCFullYear":"setFullYear"}function _I(r){return r?"setUTCMonth":"setMonth"}function xI(r){return r?"setUTCDate":"setDate"}function bI(r){return r?"setUTCHours":"setHours"}function SI(r){return r?"setUTCMinutes":"setMinutes"}function wI(r){return r?"setUTCSeconds":"setSeconds"}function TI(r){return r?"setUTCMilliseconds":"setMilliseconds"}function ZH(r,t,e,i,n,a,o,s){var l=new St({style:{text:r,font:t,align:e,verticalAlign:i,padding:n,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function T_(r){if(!t_(r))return Y(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function M_(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,i){return i.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var To=Fv;function fm(r,t,e){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(h){return h&&Lr(h)?h:"-"}function a(h){return!!(h!=null&&!isNaN(h)&&isFinite(h))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?pr(r):r;if(isNaN(+l)){if(s)return"-"}else return _h(l,i,e)}if(t==="ordinal")return If(r)?n(r):Mt(r)&&a(r)?r+"":"-";var u=Mi(r);return a(u)?T_(u):If(r)?n(r):typeof r=="boolean"?r+"":"-"}var ZS=["a","b","c","d","e","f","g"],Lp=function(r,t){return"{"+r+(t??"")+"}"};function C_(r,t,e){V(t)||(t=[t]);var i=t.length;if(!i)return"";for(var n=t[0].$vars||[],a=0;a<n.length;a++){var o=ZS[a];r=r.replace(Lp(o),Lp(o,0))}for(var s=0;s<i;s++)for(var l=0;l<n.length;l++){var u=t[s][n[l]];r=r.replace(Lp(ZS[l],s),e?Oe(u):u)}return r}function jH(r,t,e){return A(t,function(i,n){r=r.replace("{"+n+"}",i)}),r}function MI(r,t){var e=Y(r)?{color:r,extraCssText:t}:r||{},i=e.color,n=e.type;t=e.extraCssText;var a=e.renderMode||"html";if(!i)return"";if(a==="html")return n==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Oe(i)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Oe(i)+";"+(t||"")+'"></span>';var o=e.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function qH(r,t,e){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd
|
||
yyyy`);var i=pr(t),n=e?"getUTC":"get",a=i[n+"FullYear"](),o=i[n+"Month"]()+1,s=i[n+"Date"](),l=i[n+"Hours"](),u=i[n+"Minutes"](),h=i[n+"Seconds"](),c=i[n+"Milliseconds"]();return r=r.replace("MM",$e(o,2)).replace("M",o).replace("yyyy",a).replace("yy",$e(a%100+"",2)).replace("dd",$e(s,2)).replace("d",s).replace("hh",$e(l,2)).replace("h",l).replace("mm",$e(u,2)).replace("m",u).replace("ss",$e(h,2)).replace("s",h).replace("SSS",$e(c,3)),r}function KH(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function go(r,t){return t=t||"transparent",Y(r)?r:et(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function Zf(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var ff=A,CI=["left","right","top","bottom","width","height"],Xa=[["width","left","right"],["height","top","bottom"]];function A_(r,t,e,i,n){var a=0,o=0;i==null&&(i=1/0),n==null&&(n=1/0);var s=0;t.eachChild(function(l,u){var h=l.getBoundingRect(),c=t.childAt(u+1),f=c&&c.getBoundingRect(),v,d;if(r==="horizontal"){var p=h.width+(f?-f.x+h.x:0);v=a+p,v>i||l.newline?(a=0,v=p,o+=s+e,s=h.height):s=Math.max(s,h.height)}else{var g=h.height+(f?-f.y+h.y:0);d=o+g,d>n||l.newline?(a+=s+e,o=0,d=g,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=v+e:o=d+e)})}var io=A_;ut(A_,"vertical");ut(A_,"horizontal");function JH(r,t,e){var i=t.width,n=t.height,a=U(r.left,i),o=U(r.top,n),s=U(r.right,i),l=U(r.bottom,n);return(isNaN(a)||isNaN(parseFloat(r.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=i),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=n),e=To(e||0),{width:Math.max(s-a-e[1]-e[3],0),height:Math.max(l-o-e[0]-e[2],0)}}function ue(r,t,e){e=To(e||0);var i=t.width,n=t.height,a=U(r.left,i),o=U(r.top,n),s=U(r.right,i),l=U(r.bottom,n),u=U(r.width,i),h=U(r.height,n),c=e[2]+e[0],f=e[1]+e[3],v=r.aspect;switch(isNaN(u)&&(u=i-s-f-a),isNaN(h)&&(h=n-l-c-o),v!=null&&(isNaN(u)&&isNaN(h)&&(v>i/n?u=i*.8:h=n*.8),isNaN(u)&&(u=v*h),isNaN(h)&&(h=u/v)),isNaN(a)&&(a=i-s-u-f),isNaN(o)&&(o=n-l-h-c),r.left||r.right){case"center":a=i/2-u/2-e[3];break;case"right":a=i-u-f;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-h/2-e[0];break;case"bottom":o=n-h-c;break}a=a||0,o=o||0,isNaN(u)&&(u=i-f-a-(s||0)),isNaN(h)&&(h=n-c-o-(l||0));var d=new ft(a+e[3],o+e[0],u,h);return d.margin=e,d}function sd(r,t,e,i,n,a){var o=!n||!n.hv||n.hv[0],s=!n||!n.hv||n.hv[1],l=n&&n.boundingMode||"all";if(a=a||r,a.x=r.x,a.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new ft(0,0,+t.width||0,+t.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var h=r.getLocalTransform();u=u.clone(),u.applyTransform(h)}var c=ue(tt({width:u.width,height:u.height},t),e,i),f=o?c.x-u.x:0,v=s?c.y-u.y:0;return l==="raw"?(a.x=f,a.y=v):(a.x+=f,a.y+=v),a===r&&r.markRedraw(),!0}function QH(r,t){return r[Xa[t][0]]!=null||r[Xa[t][1]]!=null&&r[Xa[t][2]]!=null}function Gu(r){var t=r.layoutMode||r.constructor.layoutMode;return et(t)?t:t?{type:t}:null}function Zn(r,t,e){var i=e&&e.ignoreSize;!V(i)&&(i=[i,i]);var n=o(Xa[0],0),a=o(Xa[1],1);u(Xa[0],r,n),u(Xa[1],r,a);function o(h,c){var f={},v=0,d={},p=0,g=2;if(ff(h,function(_){d[_]=r[_]}),ff(h,function(_){s(t,_)&&(f[_]=d[_]=t[_]),l(f,_)&&v++,l(d,_)&&p++}),i[c])return l(t,h[1])?d[h[2]]=null:l(t,h[2])&&(d[h[1]]=null),d;if(p===g||!v)return d;if(v>=g)return f;for(var y=0;y<h.length;y++){var m=h[y];if(!s(f,m)&&s(r,m)){f[m]=r[m];break}}return f}function s(h,c){return h.hasOwnProperty(c)}function l(h,c){return h[c]!=null&&h[c]!=="auto"}function u(h,c,f){ff(h,function(v){c[v]=f[v]})}}function Us(r){return AI({},r)}function AI(r,t){return t&&r&&ff(CI,function(e){t.hasOwnProperty(e)&&(r[e]=t[e])}),r}var tW=Tt(),yt=function(r){E(t,r);function t(e,i,n){var a=r.call(this,e,i,n)||this;return a.uid=Ws("ec_cpt_model"),a}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,i){var n=Gu(this),a=n?Us(e):{},o=i.getTheme();ht(e,o.get(this.mainType)),ht(e,this.getDefaultOption()),n&&Zn(e,a,n)},t.prototype.mergeOption=function(e,i){ht(this.option,e,!0);var n=Gu(this);n&&Zn(this.option,e,n)},t.prototype.optionUpdated=function(e,i){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!$G(e))return e.defaultOption;var i=tW(this);if(!i.defaultOption){for(var n=[],a=e;a;){var o=a.prototype.defaultOption;o&&n.push(o),a=a.superClass}for(var s={},l=n.length-1;l>=0;l--)s=ht(s,n[l],!0);i.defaultOption=s}return i.defaultOption},t.prototype.getReferringComponents=function(e,i){var n=e+"Index",a=e+"Id";return vh(this.ecModel,e,{index:this.get(n,!0),id:this.get(a,!0)},i)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(Lt);I2(yt,Lt);Xv(yt);zH(yt);VH(yt,eW);function eW(r){var t=[];return A(yt.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=F(t,function(e){return gi(e).main}),r!=="dataset"&&vt(t,"dataset")<=0&&t.unshift("dataset"),t}var DI="";typeof navigator<"u"&&(DI=navigator.platform||"");var zo="rgba(0, 0, 0, 0.2)";const rW={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:zo,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:zo,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:zo,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:zo,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:zo,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:zo,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:DI.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 LI=Z(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Or="original",He="arrayRows",Nr="objectRows",Di="keyedColumns",Vn="typedArray",II="unknown",Si="column",Ys="row",Te={Must:1,Might:2,Not:3},PI=Tt();function iW(r){PI(r).datasetMap=Z()}function kI(r,t,e){var i={},n=L_(t);if(!n||!r)return i;var a=[],o=[],s=t.ecModel,l=PI(s).datasetMap,u=n.uid+"_"+e.seriesLayoutBy,h,c;r=r.slice(),A(r,function(p,g){var y=et(p)?p:r[g]={name:p};y.type==="ordinal"&&h==null&&(h=g,c=d(y)),i[y.name]=[]});var f=l.get(u)||l.set(u,{categoryWayDim:c,valueWayDim:0});A(r,function(p,g){var y=p.name,m=d(p);if(h==null){var _=f.valueWayDim;v(i[y],_,m),v(o,_,m),f.valueWayDim+=m}else if(h===g)v(i[y],0,m),v(a,0,m);else{var _=f.categoryWayDim;v(i[y],_,m),v(o,_,m),f.categoryWayDim+=m}});function v(p,g,y){for(var m=0;m<y;m++)p.push(g+m)}function d(p){var g=p.dimsDef;return g?g.length:1}return a.length&&(i.itemName=a),o.length&&(i.seriesName=o),i}function D_(r,t,e){var i={},n=L_(r);if(!n)return i;var a=t.sourceFormat,o=t.dimensionsDefine,s;(a===Nr||a===Di)&&A(o,function(h,c){(et(h)?h.name:h)==="name"&&(s=c)});var l=function(){for(var h={},c={},f=[],v=0,d=Math.min(5,e);v<d;v++){var p=EI(t.data,a,t.seriesLayoutBy,o,t.startIndex,v);f.push(p);var g=p===Te.Not;if(g&&h.v==null&&v!==s&&(h.v=v),(h.n==null||h.n===h.v||!g&&f[h.n]===Te.Not)&&(h.n=v),y(h)&&f[h.n]!==Te.Not)return h;g||(p===Te.Might&&c.v==null&&v!==s&&(c.v=v),(c.n==null||c.n===c.v)&&(c.n=v))}function y(m){return m.v!=null&&m.n!=null}return y(h)?h:y(c)?c:null}();if(l){i.value=[l.v];var u=s??l.n;i.itemName=[u],i.seriesName=[u]}return i}function L_(r){var t=r.get("data",!0);if(!t)return vh(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},le).models[0]}function nW(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:vh(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},le).models}function RI(r,t){return EI(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,t)}function EI(r,t,e,i,n,a){var o,s=5;if(qe(r))return Te.Not;var l,u;if(i){var h=i[a];et(h)?(l=h.name,u=h.type):Y(h)&&(l=h)}if(u!=null)return u==="ordinal"?Te.Must:Te.Not;if(t===He){var c=r;if(e===Ys){for(var f=c[a],v=0;v<(f||[]).length&&v<s;v++)if((o=x(f[n+v]))!=null)return o}else for(var v=0;v<c.length&&v<s;v++){var d=c[n+v];if(d&&(o=x(d[a]))!=null)return o}}else if(t===Nr){var p=r;if(!l)return Te.Not;for(var v=0;v<p.length&&v<s;v++){var g=p[v];if(g&&(o=x(g[l]))!=null)return o}}else if(t===Di){var y=r;if(!l)return Te.Not;var f=y[l];if(!f||qe(f))return Te.Not;for(var v=0;v<f.length&&v<s;v++)if((o=x(f[v]))!=null)return o}else if(t===Or)for(var m=r,v=0;v<m.length&&v<s;v++){var g=m[v],_=Os(g);if(!V(_))return Te.Not;if((o=x(_[a]))!=null)return o}function x(b){var S=Y(b);if(b!=null&&Number.isFinite(Number(b))&&b!=="")return S?Te.Might:Te.Not;if(S&&b!=="-")return Te.Must}return Te.Not}var vm=Z();function aW(r,t){Ve(vm.get(r)==null&&t),vm.set(r,t)}function oW(r,t,e){var i=vm.get(t);if(!i)return e;var n=i(r);return n?e.concat(n):e}var jS=Tt(),sW=Tt(),I_=function(){function r(){}return r.prototype.getColorFromPalette=function(t,e,i){var n=Bt(this.get("color",!0)),a=this.get("colorLayer",!0);return OI(this,jS,n,a,t,e,i)},r.prototype.clearColorPalette=function(){uW(this,jS)},r}();function dm(r,t,e,i){var n=Bt(r.get(["aria","decal","decals"]));return OI(r,sW,n,null,t,e,i)}function lW(r,t){for(var e=r.length,i=0;i<e;i++)if(r[i].length>t)return r[i];return r[e-1]}function OI(r,t,e,i,n,a,o){a=a||r;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var h=o==null||!i?e:lW(i,o);if(h=h||e,!(!h||!h.length)){var c=h[l];return n&&(u[n]=c),s.paletteIdx=(l+1)%h.length,c}}function uW(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var uc,vl,qS,KS="\0_ec_inner",hW=1,P_=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,i,n,a,o,s){a=a||{},this.option=null,this._theme=new Lt(a),this._locale=new Lt(o),this._optionManager=s},t.prototype.setOption=function(e,i,n){var a=tw(i);this._optionManager.setOption(e,n,a),this._resetOption(null,a)},t.prototype.resetOption=function(e,i){return this._resetOption(e,tw(i))},t.prototype._resetOption=function(e,i){var n=!1,a=this._optionManager;if(!e||e==="recreate"){var o=a.mountOption(e==="recreate");!this.option||e==="recreate"?qS(this,o):(this.restoreData(),this._mergeOption(o,i)),n=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=a.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,i))}if(!e||e==="recreate"||e==="media"){var l=a.getMediaOption(this);l.length&&A(l,function(u){n=!0,this._mergeOption(u,i)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,i){var n=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=Z(),u=i&&i.replaceMergeMainTypeMap;iW(this),A(e,function(c,f){c!=null&&(yt.hasClass(f)?f&&(s.push(f),l.set(f,!0)):n[f]=n[f]==null?it(c):ht(n[f],c,!0))}),u&&u.each(function(c,f){yt.hasClass(f)&&!l.get(f)&&(s.push(f),l.set(f,!0))}),yt.topologicalTravel(s,yt.getAllClassMainTypes(),h,this);function h(c){var f=oW(this,c,Bt(e[c])),v=a.get(c),d=v?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll",p=M2(v,f,d);BG(p,c,yt),n[c]=null,a.set(c,null),o.set(c,0);var g=[],y=[],m=0,_;A(p,function(x,b){var S=x.existing,w=x.newOption;if(!w)S&&(S.mergeOption({},this),S.optionUpdated({},!1));else{var T=c==="series",M=yt.getClass(c,x.keyInfo.subType,!T);if(!M)return;if(c==="tooltip"){if(_)return;_=!0}if(S&&S.constructor===M)S.name=x.keyInfo.name,S.mergeOption(w,this),S.optionUpdated(w,!1);else{var C=z({componentIndex:b},x.keyInfo);S=new M(w,this,this,C),z(S,C),x.brandNew&&(S.__requireNewView=!0),S.init(w,this,this),S.optionUpdated(null,!0)}}S?(g.push(S.option),y.push(S),m++):(g.push(void 0),y.push(void 0))},this),n[c]=g,a.set(c,y),o.set(c,m),c==="series"&&uc(this)}this._seriesIndices||uc(this)},t.prototype.getOption=function(){var e=it(this.option);return A(e,function(i,n){if(yt.hasClass(n)){for(var a=Bt(i),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Nu(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,e[n]=a}}),delete e[KS],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,i){var n=this._componentsMap.get(e);if(n){var a=n[i||0];if(a)return a;if(i==null){for(var o=0;o<n.length;o++)if(n[o])return n[o]}}},t.prototype.queryComponents=function(e){var i=e.mainType;if(!i)return[];var n=e.index,a=e.id,o=e.name,s=this._componentsMap.get(i);if(!s||!s.length)return[];var l;return n!=null?(l=[],A(Bt(n),function(u){s[u]&&l.push(s[u])})):a!=null?l=JS("id",a,s):o!=null?l=JS("name",o,s):l=Dt(s,function(u){return!!u}),QS(l,e)},t.prototype.findComponents=function(e){var i=e.query,n=e.mainType,a=s(i),o=a?this.queryComponents(a):Dt(this._componentsMap.get(n),function(u){return!!u});return l(QS(o,e));function s(u){var h=n+"Index",c=n+"Id",f=n+"Name";return u&&(u[h]!=null||u[c]!=null||u[f]!=null)?{mainType:n,index:u[h],id:u[c],name:u[f]}:null}function l(u){return e.filter?Dt(u,e.filter):u}},t.prototype.eachComponent=function(e,i,n){var a=this._componentsMap;if(Q(e)){var o=i,s=e;a.each(function(c,f){for(var v=0;c&&v<c.length;v++){var d=c[v];d&&s.call(o,f,d,d.componentIndex)}})}else for(var l=Y(e)?a.get(e):et(e)?this.findComponents(e):null,u=0;l&&u<l.length;u++){var h=l[u];h&&i.call(n,h,h.componentIndex)}},t.prototype.getSeriesByName=function(e){var i=he(e,null);return Dt(this._componentsMap.get("series"),function(n){return!!n&&i!=null&&n.name===i})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return Dt(this._componentsMap.get("series"),function(i){return!!i&&i.subType===e})},t.prototype.getSeries=function(){return Dt(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,i){vl(this),A(this._seriesIndices,function(n){var a=this._componentsMap.get("series")[n];e.call(i,a,n)},this)},t.prototype.eachRawSeries=function(e,i){A(this._componentsMap.get("series"),function(n){n&&e.call(i,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,i,n){vl(this),A(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===e&&i.call(n,o,a)},this)},t.prototype.eachRawSeriesByType=function(e,i,n){return A(this.getSeriesByType(e),i,n)},t.prototype.isSeriesFiltered=function(e){return vl(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,i){vl(this);var n=[];A(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];e.call(i,o,a)&&n.push(a)},this),this._seriesIndices=n,this._seriesIndicesMap=Z(n)},t.prototype.restoreData=function(e){uc(this);var i=this._componentsMap,n=[];i.each(function(a,o){yt.hasClass(o)&&n.push(o)}),yt.topologicalTravel(n,yt.getAllClassMainTypes(),function(a){A(i.get(a),function(o){o&&(a!=="series"||!cW(o,e))&&o.restoreData()})})},t.internalField=function(){uc=function(e){var i=e._seriesIndices=[];A(e._componentsMap.get("series"),function(n){n&&i.push(n.componentIndex)}),e._seriesIndicesMap=Z(i)},vl=function(e){},qS=function(e,i){e.option={},e.option[KS]=hW,e._componentsMap=Z({series:[]}),e._componentsCount=Z();var n=i.aria;et(n)&&n.enabled==null&&(n.enabled=!0),fW(i,e._theme.option),ht(i,rW,!1),e._mergeOption(i,null)}}(),t}(Lt);function cW(r,t){if(t){var e=t.seriesIndex,i=t.seriesId,n=t.seriesName;return e!=null&&r.componentIndex!==e||i!=null&&r.id!==i||n!=null&&r.name!==n}}function fW(r,t){var e=r.color&&!r.colorLayer;A(t,function(i,n){n==="colorLayer"&&e||yt.hasClass(n)||(typeof i=="object"?r[n]=r[n]?ht(r[n],i,!1):it(i):r[n]==null&&(r[n]=i))})}function JS(r,t,e){if(V(t)){var i=Z();return A(t,function(a){if(a!=null){var o=he(a,null);o!=null&&i.set(a,!0)}}),Dt(e,function(a){return a&&i.get(a[r])})}else{var n=he(t,null);return Dt(e,function(a){return a&&n!=null&&a[r]===n})}}function QS(r,t){return t.hasOwnProperty("subType")?Dt(r,function(e){return e&&e.subType===t.subType}):r}function tw(r){var t=Z();return r&&A(Bt(r.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}re(P_,I_);var vW=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],NI=function(){function r(t){A(vW,function(e){this[e]=$(t[e],t)},this)}return r}(),Ip={},$s=function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(t,e){var i=[];A(Ip,function(n,a){var o=n.create(t,e);i=i.concat(o||[])}),this._coordinateSystems=i},r.prototype.update=function(t,e){A(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(t,e){Ip[t]=e},r.get=function(t){return Ip[t]},r}(),dW=/^(min|max)?(.+)$/,pW=function(){function r(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return r.prototype.setOption=function(t,e,i){t&&(A(Bt(t.series),function(o){o&&o.data&&qe(o.data)&&Lu(o.data)}),A(Bt(t.dataset),function(o){o&&o.source&&qe(o.source)&&Lu(o.source)})),t=it(t);var n=this._optionBackup,a=gW(t,e,!n);this._newBaseOption=a.baseOption,n?(a.timelineOptions.length&&(n.timelineOptions=a.timelineOptions),a.mediaList.length&&(n.mediaList=a.mediaList),a.mediaDefault&&(n.mediaDefault=a.mediaDefault)):this._optionBackup=a},r.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],it(t?e.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=it(i[n.getCurrentIndex()]))}return e},r.prototype.getMediaOption=function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!n.length&&!a)return s;for(var l=0,u=n.length;l<u;l++)yW(n[l].query,e,i)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!_W(o,this._currentMediaIndices)&&(s=F(o,function(h){return it(h===-1?a.option:n[h].option)})),this._currentMediaIndices=o,s},r}();function gW(r,t,e){var i=[],n,a,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,h=!!r.media,c=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((c||h)&&(r.options=r.media=null),a=r),h&&V(u)&&A(u,function(v){v&&v.option&&(v.query?i.push(v):n||(n=v))}),f(a),A(l,function(v){return f(v)}),A(i,function(v){return f(v.option)});function f(v){A(t,function(d){d(v,e)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:n,mediaList:i}}function yW(r,t,e){var i={width:t,height:e,aspectratio:t/e},n=!0;return A(r,function(a,o){var s=o.match(dW);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();mW(i[u],a,l)||(n=!1)}}),n}function mW(r,t,e){return e==="min"?r>=t:e==="max"?r<=t:r===t}function _W(r,t){return r.join(",")===t.join(",")}var zr=A,Hu=et,ew=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Pp(r){var t=r&&r.itemStyle;if(t)for(var e=0,i=ew.length;e<i;e++){var n=ew[e],a=t.normal,o=t.emphasis;a&&a[n]&&(r[n]=r[n]||{},r[n].normal?ht(r[n].normal,a[n]):r[n].normal=a[n],a[n]=null),o&&o[n]&&(r[n]=r[n]||{},r[n].emphasis?ht(r[n].emphasis,o[n]):r[n].emphasis=o[n],o[n]=null)}}function Re(r,t,e){if(r&&r[t]&&(r[t].normal||r[t].emphasis)){var i=r[t].normal,n=r[t].emphasis;i&&(e?(r[t].normal=r[t].emphasis=null,tt(r[t],i)):r[t]=i),n&&(r.emphasis=r.emphasis||{},r.emphasis[t]=n,n.focus&&(r.emphasis.focus=n.focus),n.blurScope&&(r.emphasis.blurScope=n.blurScope))}}function $l(r){Re(r,"itemStyle"),Re(r,"lineStyle"),Re(r,"areaStyle"),Re(r,"label"),Re(r,"labelLine"),Re(r,"upperLabel"),Re(r,"edgeLabel")}function oe(r,t){var e=Hu(r)&&r[t],i=Hu(e)&&e.textStyle;if(i)for(var n=0,a=sS.length;n<a;n++){var o=sS[n];i.hasOwnProperty(o)&&(e[o]=i[o])}}function wr(r){r&&($l(r),oe(r,"label"),r.emphasis&&oe(r.emphasis,"label"))}function xW(r){if(Hu(r)){Pp(r),$l(r),oe(r,"label"),oe(r,"upperLabel"),oe(r,"edgeLabel"),r.emphasis&&(oe(r.emphasis,"label"),oe(r.emphasis,"upperLabel"),oe(r.emphasis,"edgeLabel"));var t=r.markPoint;t&&(Pp(t),wr(t));var e=r.markLine;e&&(Pp(e),wr(e));var i=r.markArea;i&&wr(i);var n=r.data;if(r.type==="graph"){n=n||r.nodes;var a=r.links||r.edges;if(a&&!qe(a))for(var o=0;o<a.length;o++)wr(a[o]);A(r.categories,function(u){$l(u)})}if(n&&!qe(n))for(var o=0;o<n.length;o++)wr(n[o]);if(t=r.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)wr(s[o]);if(e=r.markLine,e&&e.data)for(var l=e.data,o=0;o<l.length;o++)V(l[o])?(wr(l[o][0]),wr(l[o][1])):wr(l[o]);r.type==="gauge"?(oe(r,"axisLabel"),oe(r,"title"),oe(r,"detail")):r.type==="treemap"?(Re(r.breadcrumb,"itemStyle"),A(r.levels,function(u){$l(u)})):r.type==="tree"&&$l(r.leaves)}}function Ri(r){return V(r)?r:r?[r]:[]}function rw(r){return(V(r)?r[0]:r)||{}}function bW(r,t){zr(Ri(r.series),function(i){Hu(i)&&xW(i)});var e=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&e.push("valueAxis","categoryAxis","logAxis","timeAxis"),zr(e,function(i){zr(Ri(r[i]),function(n){n&&(oe(n,"axisLabel"),oe(n.axisPointer,"label"))})}),zr(Ri(r.parallel),function(i){var n=i&&i.parallelAxisDefault;oe(n,"axisLabel"),oe(n&&n.axisPointer,"label")}),zr(Ri(r.calendar),function(i){Re(i,"itemStyle"),oe(i,"dayLabel"),oe(i,"monthLabel"),oe(i,"yearLabel")}),zr(Ri(r.radar),function(i){oe(i,"name"),i.name&&i.axisName==null&&(i.axisName=i.name,delete i.name),i.nameGap!=null&&i.axisNameGap==null&&(i.axisNameGap=i.nameGap,delete i.nameGap)}),zr(Ri(r.geo),function(i){Hu(i)&&(wr(i),zr(Ri(i.regions),function(n){wr(n)}))}),zr(Ri(r.timeline),function(i){wr(i),Re(i,"label"),Re(i,"itemStyle"),Re(i,"controlStyle",!0);var n=i.data;V(n)&&A(n,function(a){et(a)&&(Re(a,"label"),Re(a,"itemStyle"))})}),zr(Ri(r.toolbox),function(i){Re(i,"iconStyle"),zr(i.feature,function(n){Re(n,"iconStyle")})}),oe(rw(r.axisPointer),"label"),oe(rw(r.tooltip).axisPointer,"label")}function SW(r,t){for(var e=t.split(","),i=r,n=0;n<e.length&&(i=i&&i[e[n]],i!=null);n++);return i}function wW(r,t,e,i){for(var n=t.split(","),a=r,o,s=0;s<n.length-1;s++)o=n[s],a[o]==null&&(a[o]={}),a=a[o];a[n[s]]==null&&(a[n[s]]=e)}function iw(r){r&&A(TW,function(t){t[0]in r&&!(t[1]in r)&&(r[t[1]]=r[t[0]])})}var TW=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],MW=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],kp=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function dl(r){var t=r&&r.itemStyle;if(t)for(var e=0;e<kp.length;e++){var i=kp[e][1],n=kp[e][0];t[i]!=null&&(t[n]=t[i])}}function nw(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function aw(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function CW(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function BI(r,t){if(r)for(var e=0;e<r.length;e++)t(r[e]),r[e]&&BI(r[e].children,t)}function zI(r,t){bW(r,t),r.series=Bt(r.series),A(r.series,function(e){if(et(e)){var i=e.type;if(i==="line")e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(i==="pie"||i==="gauge"){e.clockWise!=null&&(e.clockwise=e.clockWise),nw(e.label);var n=e.data;if(n&&!qe(n))for(var a=0;a<n.length;a++)nw(n[a]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(i==="gauge"){var o=SW(e,"pointer.color");o!=null&&wW(e,"itemStyle.color",o)}else if(i==="bar"){dl(e),dl(e.backgroundStyle),dl(e.emphasis);var n=e.data;if(n&&!qe(n))for(var a=0;a<n.length;a++)typeof n[a]=="object"&&(dl(n[a]),dl(n[a]&&n[a].emphasis))}else if(i==="sunburst"){var s=e.highlightPolicy;s&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=s)),aw(e),BI(e.data,aw)}else i==="graph"||i==="sankey"?CW(e):i==="map"&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&tt(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),iw(e)}}),r.dataRange&&(r.visualMap=r.dataRange),A(MW,function(e){var i=r[e];i&&(V(i)||(i=[i]),A(i,function(n){iw(n)}))})}function AW(r){var t=Z();r.eachSeries(function(e){var i=e.get("stack");if(i){var n=t.get(i)||t.set(i,[]),a=e.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:e};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;n.length&&a.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(o)}}),t.each(DW)}function DW(r){A(r,function(t,e){var i=[],n=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,h,c){var f=o.get(t.stackedDimension,c);if(isNaN(f))return n;var v,d;s?d=o.getRawIndex(c):v=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,v)),d>=0){var m=y.data.getByRawIndex(y.stackResultDimension,d);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&f>=0&&m>0||l==="samesign"&&f<=0&&m<0){f=AG(f,m),p=m;break}}}return i[0]=f,i[1]=p,i})})}var ld=function(){function r(t){this.data=t.data||(t.sourceFormat===Di?{}:[]),this.sourceFormat=t.sourceFormat||II,this.seriesLayoutBy=t.seriesLayoutBy||Si,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var i=0;i<e.length;i++){var n=e[i];n.type==null&&RI(this,i)===Te.Must&&(n.type="ordinal")}}return r}();function k_(r){return r instanceof ld}function pm(r,t,e){e=e||VI(r);var i=t.seriesLayoutBy,n=IW(r,e,i,t.sourceHeader,t.dimensions),a=new ld({data:r,sourceFormat:e,seriesLayoutBy:i,dimensionsDefine:n.dimensionsDefine,startIndex:n.startIndex,dimensionsDetectedCount:n.dimensionsDetectedCount,metaRawOption:it(t)});return a}function R_(r){return new ld({data:r,sourceFormat:qe(r)?Vn:Or})}function LW(r){return new ld({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:it(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function VI(r){var t=II;if(qe(r))t=Vn;else if(V(r)){r.length===0&&(t=He);for(var e=0,i=r.length;e<i;e++){var n=r[e];if(n!=null){if(V(n)||qe(n)){t=He;break}else if(et(n)){t=Nr;break}}}}else if(et(r)){for(var a in r)if(X(r,a)&&Me(r[a])){t=Di;break}}return t}function IW(r,t,e,i,n){var a,o;if(!r)return{dimensionsDefine:ow(n),startIndex:o,dimensionsDetectedCount:a};if(t===He){var s=r;i==="auto"||i==null?sw(function(u){u!=null&&u!=="-"&&(Y(u)?o==null&&(o=1):o=0)},e,s,10):o=Mt(i)?i:i?1:0,!n&&o===1&&(n=[],sw(function(u,h){n[h]=u!=null?u+"":""},e,s,1/0)),a=n?n.length:e===Ys?s.length:s[0]?s[0].length:null}else if(t===Nr)n||(n=PW(r));else if(t===Di)n||(n=[],A(r,function(u,h){n.push(h)}));else if(t===Or){var l=Os(r[0]);a=V(l)&&l.length||1}return{startIndex:o,dimensionsDefine:ow(n),dimensionsDetectedCount:a}}function PW(r){for(var t=0,e;t<r.length&&!(e=r[t++]););if(e)return xt(e)}function ow(r){if(r){var t=Z();return F(r,function(e,i){e=et(e)?e:{name:e};var n={name:e.name,displayName:e.displayName,type:e.type};if(n.name==null)return n;n.name+="",n.displayName==null&&(n.displayName=n.name);var a=t.get(n.name);return a?n.name+="-"+a.count++:t.set(n.name,{count:1}),n})}}function sw(r,t,e,i){if(t===Ys)for(var n=0;n<e.length&&n<i;n++)r(e[n]?e[n][0]:null,n);else for(var a=e[0]||[],n=0;n<a.length&&n<i;n++)r(a[n],n)}function FI(r){var t=r.sourceFormat;return t===Nr||t===Di}var Ta,Ma,Ca,lw,uw,GI=function(){function r(t,e){var i=k_(t)?t:R_(t);this._source=i;var n=this._data=i.data;i.sourceFormat===Vn&&(this._offset=0,this._dimSize=e,this._data=n),uw(this,n,i)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(t,e){},r.prototype.appendData=function(t){},r.prototype.clean=function(){},r.protoInitialize=function(){var t=r.prototype;t.pure=!1,t.persistent=!0}(),r.internalField=function(){var t;uw=function(o,s,l){var u=l.sourceFormat,h=l.seriesLayoutBy,c=l.startIndex,f=l.dimensionsDefine,v=lw[E_(u,h)];if(z(o,v),u===Vn)o.getItem=e,o.count=n,o.fillStorage=i;else{var d=HI(u,h);o.getItem=$(d,null,s,c,f);var p=WI(u,h);o.count=$(p,null,s,c,f)}};var e=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,h=u*o,c=0;c<u;c++)s[c]=l[h+c];return s},i=function(o,s,l,u){for(var h=this._data,c=this._dimSize,f=0;f<c;f++){for(var v=u[f],d=v[0]==null?1/0:v[0],p=v[1]==null?-1/0:v[1],g=s-o,y=l[f],m=0;m<g;m++){var _=h[m*c+f];y[o+m]=_,_<d&&(d=_),_>p&&(p=_)}v[0]=d,v[1]=p}},n=function(){return this._data?this._data.length/this._dimSize:0};lw=(t={},t[He+"_"+Si]={pure:!0,appendData:a},t[He+"_"+Ys]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Nr]={pure:!0,appendData:a},t[Di]={pure:!0,appendData:function(o){var s=this._data;A(o,function(l,u){for(var h=s[u]||(s[u]=[]),c=0;c<(l||[]).length;c++)h.push(l[c])})}},t[Or]={appendData:a},t[Vn]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),r}(),hw=function(r,t,e,i){return r[i]},kW=(Ta={},Ta[He+"_"+Si]=function(r,t,e,i){return r[i+t]},Ta[He+"_"+Ys]=function(r,t,e,i,n){i+=t;for(var a=n||[],o=r,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[i]:null}return a},Ta[Nr]=hw,Ta[Di]=function(r,t,e,i,n){for(var a=n||[],o=0;o<e.length;o++){var s=e[o].name,l=r[s];a[o]=l?l[i]:null}return a},Ta[Or]=hw,Ta);function HI(r,t){var e=kW[E_(r,t)];return e}var cw=function(r,t,e){return r.length},RW=(Ma={},Ma[He+"_"+Si]=function(r,t,e){return Math.max(0,r.length-t)},Ma[He+"_"+Ys]=function(r,t,e){var i=r[0];return i?Math.max(0,i.length-t):0},Ma[Nr]=cw,Ma[Di]=function(r,t,e){var i=e[0].name,n=r[i];return n?n.length:0},Ma[Or]=cw,Ma);function WI(r,t){var e=RW[E_(r,t)];return e}var Rp=function(r,t,e){return r[t]},EW=(Ca={},Ca[He]=Rp,Ca[Nr]=function(r,t,e){return r[e]},Ca[Di]=Rp,Ca[Or]=function(r,t,e){var i=Os(r);return i instanceof Array?i[t]:i},Ca[Vn]=Rp,Ca);function UI(r){var t=EW[r];return t}function E_(r,t){return r===He?r+"_"+t:r}function As(r,t,e){if(r){var i=r.getRawDataItem(t);if(i!=null){var n=r.getStore(),a=n.getSource().sourceFormat;if(e!=null){var o=r.getDimensionIndex(e),s=n.getDimensionProperty(o);return UI(a)(i,o,s)}else{var l=i;return a===Or&&(l=Os(i)),l}}}}var OW=/\{@(.+?)\}/g,ud=function(){function r(){}return r.prototype.getDataParams=function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),a=i.getRawIndex(t),o=i.getName(t),s=i.getRawDataItem(t),l=i.getItemVisual(t,"style"),u=l&&l[i.getItemVisual(t,"drawType")||"fill"],h=l&&l.stroke,c=this.mainType,f=c==="series",v=i.userOutput&&i.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:o,dataIndex:a,data:s,dataType:e,value:n,color:u,borderColor:h,dimensionNames:v?v.fullDimensions:null,encode:v?v.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(t,e,i,n,a,o){e=e||"normal";var s=this.getData(i),l=this.getDataParams(t,i);if(o&&(l.value=o.interpolatedValue),n!=null&&V(l.value)&&(l.value=l.value[n]),!a){var u=s.getItemModel(t);a=u.get(e==="normal"?["label","formatter"]:[e,"label","formatter"])}if(Q(a))return l.status=e,l.dimensionIndex=n,a(l);if(Y(a)){var h=C_(a,l);return h.replace(OW,function(c,f){var v=f.length,d=f;d.charAt(0)==="["&&d.charAt(v-1)==="]"&&(d=+d.slice(1,v-1));var p=As(s,t,d);if(o&&V(o.interpolatedValue)){var g=s.getDimensionIndex(d);g>=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(t,e){return As(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,i){},r}();function fw(r){var t,e;return et(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function yu(r){return new NW(r)}var NW=function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,i=t&&t.skip;if(this._dirty&&e){var n=this.context;n.data=n.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var o=h(this._modBy),s=this._modDataCount||0,l=h(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function h(m){return!(m>=1)&&(m=1),m}var c;(this._dirty||a==="reset")&&(this._dirty=!1,c=this._doReset(i)),this._modBy=l,this._modDataCount=u;var f=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,d=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!i&&(c||v<d)){var p=this._progress;if(V(p))for(var g=0;g<p.length;g++)this._doProgress(p[g],v,d,l,u);else this._doProgress(p,v,d,l,u)}this._dueIndex=d;var y=this._settedOutputEnd!=null?this._settedOutputEnd:d;this._outputDueEnd=y}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(t,e,i,n,a){vw.reset(e,i,n,a),this._callingProgress=t,this._callingProgress({start:e,end:i,count:i-e,next:vw.next},this.context)},r.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var e,i;!t&&this._reset&&(e=this._reset(this.context),e&&e.progress&&(i=e.forceFirstProgress,e=e.progress),V(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),i},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},r}(),vw=function(){var r,t,e,i,n,a={reset:function(l,u,h,c){t=l,r=u,e=h,i=c,n=Math.ceil(i/e),a.next=e>1&&i>0?s:o}};return a;function o(){return t<r?t++:null}function s(){var l=t%n*e+Math.ceil(t/n),u=t>=r?null:l<i?l:t;return t++,u}}();function Fn(r,t){var e=t&&t.type;return e==="ordinal"?r:(e==="time"&&!Mt(r)&&r!=null&&r!=="-"&&(r=+pr(r)),r==null||r===""?NaN:Number(r))}var BW=Z({number:function(r){return parseFloat(r)},time:function(r){return+pr(r)},trim:function(r){return Y(r)?Lr(r):r}});function YI(r){return BW.get(r)}var $I={lt:function(r,t){return r<t},lte:function(r,t){return r<=t},gt:function(r,t){return r>t},gte:function(r,t){return r>=t}},zW=function(){function r(t,e){if(!Mt(e)){var i="";kt(i)}this._opFn=$I[t],this._rvalFloat=Mi(e)}return r.prototype.evaluate=function(t){return Mt(t)?this._opFn(t,this._rvalFloat):this._opFn(Mi(t),this._rvalFloat)},r}(),XI=function(){function r(t,e){var i=t==="desc";this._resultLT=i?1:-1,e==null&&(e=i?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var i=Mt(t)?t:Mi(t),n=Mt(e)?e:Mi(e),a=isNaN(i),o=isNaN(n);if(a&&(i=this._incomparable),o&&(n=this._incomparable),a&&o){var s=Y(t),l=Y(e);s&&(i=l?t:0),l&&(n=s?e:0)}return i<n?this._resultLT:i>n?-this._resultLT:0},r}(),VW=function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=Mi(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var i=typeof t;i!==this._rvalTypeof&&(i==="number"||this._rvalTypeof==="number")&&(e=Mi(t)===this._rvalFloat)}return this._isEQ?e:!e},r}();function FW(r,t){return r==="eq"||r==="ne"?new VW(r==="eq",t):X($I,r)?new zW(r,t):null}var GW=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 Fn(t,e)},r}();function HW(r,t){var e=new GW,i=r.data,n=e.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==Si&&kt(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 _="";X(l,y)&&kt(_),l[y]=m}});else for(var h=0;h<r.dimensionsDetectedCount;h++)s.push({index:h});var c=HI(n,Si);t.__isBuiltIn&&(e.getRawDataItem=function(p){return c(i,a,s,p)},e.getRawData=$(WW,null,r)),e.cloneRawData=$(UW,null,r);var f=WI(n,Si);e.count=$(f,null,i,a,s);var v=UI(n);e.retrieveValue=function(p,g){var y=c(i,a,s,p);return d(y,g)};var d=e.retrieveValueFromItem=function(p,g){if(p!=null){var y=s[g];if(y)return v(p,g,y.name)}};return e.getDimensionInfo=$(YW,null,s,l),e.cloneAllDimensionInfo=$($W,null,s),e}function WW(r){var t=r.sourceFormat;if(!O_(t)){var e="";kt(e)}return r.data}function UW(r){var t=r.sourceFormat,e=r.data;if(!O_(t)){var i="";kt(i)}if(t===He){for(var n=[],a=0,o=e.length;a<o;a++)n.push(e[a].slice());return n}else if(t===Nr){for(var n=[],a=0,o=e.length;a<o;a++)n.push(z({},e[a]));return n}}function YW(r,t,e){if(e!=null){if(Mt(e)||!isNaN(e)&&!X(t,e))return r[e];if(X(t,e))return t[e]}}function $W(r){return it(r)}var ZI=Z();function XW(r){r=it(r);var t=r.type,e="";t||kt(e);var i=t.split(":");i.length!==2&&kt(e);var n=!1;i[0]==="echarts"&&(t=i[1],n=!0),r.__isBuiltIn=n,ZI.set(t,r)}function ZW(r,t,e){var i=Bt(r),n=i.length,a="";n||kt(a);for(var o=0,s=n;o<s;o++){var l=i[o];t=jW(l,t),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function jW(r,t,e,i){var n="";t.length||kt(n),et(r)||kt(n);var a=r.type,o=ZI.get(a);o||kt(n);var s=F(t,function(u){return HW(u,o)}),l=Bt(o.transform({upstream:s[0],upstreamList:s,config:it(r.config)}));return F(l,function(u,h){var c="";et(u)||kt(c),u.data||kt(c);var f=VI(u.data);O_(f)||kt(c);var v,d=t[0];if(d&&h===0&&!u.dimensions){var p=d.startIndex;p&&(u.data=d.data.slice(0,p).concat(u.data)),v={seriesLayoutBy:Si,sourceHeader:p,dimensions:d.metaRawOption.dimensions}}else v={seriesLayoutBy:Si,sourceHeader:0,dimensions:u.dimensions};return pm(u.data,v,null)})}function O_(r){return r===He||r===Nr}var hd="undefined",qW=typeof Uint32Array===hd?Array:Uint32Array,KW=typeof Uint16Array===hd?Array:Uint16Array,jI=typeof Int32Array===hd?Array:Int32Array,dw=typeof Float64Array===hd?Array:Float64Array,qI={float:dw,int:jI,ordinal:Array,number:Array,time:dw},Ep;function Vo(r){return r>65535?qW:KW}function Fo(){return[1/0,-1/0]}function JW(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function pw(r,t,e,i,n){var a=qI[e||"float"];if(n){var o=r[t],s=o&&o.length;if(s!==i){for(var l=new a(i),u=0;u<s;u++)l[u]=o[u];r[t]=l}}else r[t]=new a(i)}var gm=function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Z()}return r.prototype.initData=function(t,e,i){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var n=t.getSource(),a=this.defaultDimValueGetter=Ep[n.sourceFormat];this._dimValueGetter=i||a,this._rawExtent=[],FI(n),this._dimensions=F(e,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,t.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(t,e){var i=this._calcDimNameToIdx,n=this._dimensions,a=i.get(t);if(a!=null){if(n[a].type===e)return a}else a=n.length;return n[a]={type:e},i.set(t,a),this._chunks[a]=new qI[e||"float"](this._rawCount),this._rawExtent[a]=Fo(),a},r.prototype.collectOrdinalMeta=function(t,e){var i=this._chunks[t],n=this._dimensions[t],a=this._rawExtent,o=n.ordinalOffset||0,s=i.length;o===0&&(a[t]=Fo());for(var l=a[t],u=o;u<s;u++){var h=i[u]=e.parseAndCollect(i[u]);isNaN(h)||(l[0]=Math.min(h,l[0]),l[1]=Math.max(h,l[1]))}n.ordinalMeta=e,n.ordinalOffset=s,n.type="ordinal"},r.prototype.getOrdinalMeta=function(t){var e=this._dimensions[t],i=e.ordinalMeta;return i},r.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},r.prototype.appendData=function(t){var e=this._provider,i=this.count();e.appendData(t);var n=e.count();return e.persistent||(n+=i),i<n&&this._initDataFromProvider(i,n,!0),[i,n]},r.prototype.appendValues=function(t,e){for(var i=this._chunks,n=this._dimensions,a=n.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e||0),u=0;u<a;u++){var h=n[u];pw(i,u,h.type,l,!0)}for(var c=[],f=s;f<l;f++)for(var v=f-s,d=0;d<a;d++){var h=n[d],p=Ep.arrayRows.call(this,t[v]||c,h.property,v,d);i[d][f]=p;var g=o[d];p<g[0]&&(g[0]=p),p>g[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,i){for(var n=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=F(o,function(m){return m.property}),h=0;h<s;h++){var c=o[h];l[h]||(l[h]=Fo()),pw(a,h,c.type,e,i)}if(n.fillStorage)n.fillStorage(t,e,a,l);else for(var f=[],v=t;v<e;v++){f=n.getItem(v,f);for(var d=0;d<s;d++){var p=a[d],g=this._dimValueGetter(f,u[d],v,d);p[v]=g;var y=l[d];g<y[0]&&(y[0]=g),g>y[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<this._count))return NaN;var i=this._chunks[t];return i?i[this.getRawIndex(e)]:NaN},r.prototype.getValues=function(t,e){var i=[],n=[];if(e==null){e=t,t=[];for(var a=0;a<this._dimensions.length;a++)n.push(a)}else n=t;for(var a=0,o=n.length;a<o;a++)i.push(this.get(n[a],e));return i},r.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var i=this._chunks[t];return i?i[e]:NaN},r.prototype.getSum=function(t){var e=this._chunks[t],i=0;if(e)for(var n=0,a=this.count();n<a;n++){var o=this.get(t,n);isNaN(o)||(i+=o)}return i},r.prototype.getMedian=function(t){var e=[];this.each([t],function(a){isNaN(a)||e.push(a)});var i=e.sort(function(a,o){return a-o}),n=this.count();return n===0?0:n%2===1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},r.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(i!=null&&i<this._count&&i===t)return t;for(var n=0,a=this._count-1;n<=a;){var o=(n+a)/2|0;if(e[o]<t)n=o+1;else if(e[o]>t)a=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(t,e,i){var n=this._chunks,a=n[t],o=[];if(!a)return o;i==null&&(i=1/0);for(var s=1/0,l=-1,u=0,h=0,c=this.count();h<c;h++){var f=this.getRawIndex(h),v=e-a[f],d=Math.abs(v);d<=i&&((d<s||d===s&&v>=0&&l<0)&&(s=d,l=v,u=0),v===l&&(o[u++]=h))}return o.length=u,o},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var a=0;a<n;a++)t[a]=e[a]}else t=new i(e.buffer,0,n)}else{var i=Vo(this._rawCount);t=new i(this.count());for(var a=0;a<t.length;a++)t[a]=a}return t},r.prototype.filter=function(t,e){if(!this._count)return this;for(var i=this.clone(),n=i.count(),a=Vo(i._rawCount),o=new a(n),s=[],l=t.length,u=0,h=t[0],c=i._chunks,f=0;f<n;f++){var v=void 0,d=i.getRawIndex(f);if(l===0)v=e(f);else if(l===1){var p=c[h][d];v=e(p,f)}else{for(var g=0;g<l;g++)s[g]=c[t[g]][d];s[g]=f,v=e.apply(null,s)}v&&(o[u++]=d)}return u<n&&(i._indices=o),i._count=u,i._extent=[],i._updateGetRawIdx(),i},r.prototype.selectRange=function(t){var e=this.clone(),i=e._count;if(!i)return this;var n=xt(t),a=n.length;if(!a)return this;var o=e.count(),s=Vo(e._rawCount),l=new s(o),u=0,h=n[0],c=t[h][0],f=t[h][1],v=e._chunks,d=!1;if(!e._indices){var p=0;if(a===1){for(var g=v[n[0]],y=0;y<i;y++){var m=g[y];(m>=c&&m<=f||isNaN(m))&&(l[u++]=p),p++}d=!0}else if(a===2){for(var g=v[n[0]],_=v[n[1]],x=t[n[1]][0],b=t[n[1]][1],y=0;y<i;y++){var m=g[y],S=_[y];(m>=c&&m<=f||isNaN(m))&&(S>=x&&S<=b||isNaN(S))&&(l[u++]=p),p++}d=!0}}if(!d)if(a===1)for(var y=0;y<o;y++){var w=e.getRawIndex(y),m=v[n[0]][w];(m>=c&&m<=f||isNaN(m))&&(l[u++]=w)}else for(var y=0;y<o;y++){for(var T=!0,w=e.getRawIndex(y),M=0;M<a;M++){var C=n[M],m=v[C][w];(m<t[C][0]||m>t[C][1])&&(T=!1)}T&&(l[u++]=e.getRawIndex(y))}return u<o&&(e._indices=l),e._count=u,e._extent=[],e._updateGetRawIdx(),e},r.prototype.map=function(t,e){var i=this.clone(t);return this._updateDims(i,t,e),i},r.prototype.modify=function(t,e){this._updateDims(this,t,e)},r.prototype._updateDims=function(t,e,i){for(var n=t._chunks,a=[],o=e.length,s=t.count(),l=[],u=t._rawExtent,h=0;h<e.length;h++)u[e[h]]=Fo();for(var c=0;c<s;c++){for(var f=t.getRawIndex(c),v=0;v<o;v++)l[v]=n[e[v]][f];l[o]=c;var d=i&&i.apply(null,l);if(d!=null){typeof d!="object"&&(a[0]=d,d=a);for(var h=0;h<d.length;h++){var p=e[h],g=d[h],y=u[p],m=n[p];m&&(m[f]=g),g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var i=this.clone([t],!0),n=i._chunks,a=n[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),h,c,f,v=new(Vo(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var d=1;d<o-1;d+=l){for(var p=Math.min(d+l,o-1),g=Math.min(d+l*2,o),y=(g+p)/2,m=0,_=p;_<g;_++){var x=this.getRawIndex(_),b=a[x];isNaN(b)||(m+=b)}m/=g-p;var S=d,w=Math.min(d+l,o),T=d-1,M=a[u];h=-1,f=S;for(var C=-1,D=0,_=S;_<w;_++){var x=this.getRawIndex(_),b=a[x];if(isNaN(b)){D++,C<0&&(C=x);continue}c=Math.abs((T-y)*(b-M)-(T-_)*(m-M)),c>h&&(h=c,f=x)}D>0&&D<w-S&&(v[s++]=Math.min(C,f),f=Math.max(C,f)),v[s++]=f,u=f}return v[s++]=this.getRawIndex(o-1),i._count=s,i._indices=v,i.getRawIndex=this._getRawIdx,i},r.prototype.minmaxDownSample=function(t,e){for(var i=this.clone([t],!0),n=i._chunks,a=Math.floor(1/e),o=n[t],s=this.count(),l=new(Vo(this._rawCount))(Math.ceil(s/a)*2),u=0,h=0;h<s;h+=a){var c=h,f=o[this.getRawIndex(c)],v=h,d=o[this.getRawIndex(v)],p=a;h+a>s&&(p=s-h);for(var g=0;g<p;g++){var y=this.getRawIndex(h+g),m=o[y];m<f&&(f=m,c=h+g),m>d&&(d=m,v=h+g)}var _=this.getRawIndex(c),x=this.getRawIndex(v);c<v?(l[u++]=_,l[u++]=x):(l[u++]=x,l[u++]=_)}return i._count=u,i._indices=l,i._updateGetRawIdx(),i},r.prototype.downSample=function(t,e,i,n){for(var a=this.clone([t],!0),o=a._chunks,s=[],l=Math.floor(1/e),u=o[t],h=this.count(),c=a._rawExtent[t]=Fo(),f=new(Vo(this._rawCount))(Math.ceil(h/l)),v=0,d=0;d<h;d+=l){l>h-d&&(l=h-d,s.length=l);for(var p=0;p<l;p++){var g=this.getRawIndex(d+p);s[p]=u[g]}var y=i(s),m=this.getRawIndex(Math.min(d+n(s,y)||0,h-1));u[m]=y,y<c[0]&&(c[0]=y),y>c[1]&&(c[1]=y),f[v++]=m}return a._count=v,a._indices=f,a._updateGetRawIdx(),a},r.prototype.each=function(t,e){if(this._count)for(var i=t.length,n=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(i){case 0:e(a);break;case 1:e(n[t[0]][s],a);break;case 2:e(n[t[0]][s],n[t[1]][s],a);break;default:for(var l=0,u=[];l<i;l++)u[l]=n[t[l]][s];u[l]=a,e.apply(null,u)}}},r.prototype.getDataExtent=function(t){var e=this._chunks[t],i=Fo();if(!e)return i;var n=this.count(),a=!this._indices,o;if(a)return this._rawExtent[t].slice();if(o=this._extent[t],o)return o.slice();o=i;for(var s=o[0],l=o[1],u=0;u<n;u++){var h=this.getRawIndex(u),c=e[h];c<s&&(s=c),c>l&&(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 i=[],n=this._chunks,a=0;a<n.length;a++)i.push(n[a][e]);return i},r.prototype.clone=function(t,e){var i=new r,n=this._chunks,a=t&&Pr(t,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<n.length;o++)i._chunks[o]=a[o]?JW(n[o]):n[o];else i._chunks=n;return this._copyCommonProps(i),e||(i._indices=this._cloneIndices()),i._updateGetRawIdx(),i},r.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=it(this._extent),t._rawExtent=it(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var i=this._indices.length;e=new t(i);for(var n=0;n<i;n++)e[n]=this._indices[n]}else e=new t(this._indices);return e}return null},r.prototype._getRawIdxIdentity=function(t){return t},r.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function t(e,i,n,a){return Fn(e[a],this._dimensions[a])}Ep={arrayRows:t,objectRows:function(e,i,n,a){return Fn(e[i],this._dimensions[a])},keyedColumns:t,original:function(e,i,n,a){var o=e&&(e.value==null?e:e.value);return Fn(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(e,i,n,a){return e[a]}}}(),r}(),KI=function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),i=!!e.length,n,a;if(hc(t)){var o=t,s=void 0,l=void 0,u=void 0;if(i){var h=e[0];h.prepareSource(),u=h.getSource(),s=u.data,l=u.sourceFormat,a=[h._getVersionSign()]}else s=o.get("data",!0),l=qe(s)?Vn:Or,a=[];var c=this._getSourceMetaRawOption()||{},f=u&&u.metaRawOption||{},v=lt(c.seriesLayoutBy,f.seriesLayoutBy)||null,d=lt(c.sourceHeader,f.sourceHeader),p=lt(c.dimensions,f.dimensions),g=v!==f.seriesLayoutBy||!!d!=!!f.sourceHeader||p;n=g?[pm(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:p},l)]:[]}else{var y=t;if(i){var m=this._applyTransform(e);n=m.sourceList,a=m.upstreamSignList}else{var _=y.get("source",!0);n=[pm(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(n,a)},r.prototype._applyTransform=function(t){var e=this._sourceHost,i=e.get("transform",!0),n=e.get("fromTransformResult",!0);if(n!=null){var a="";t.length!==1&&yw(a)}var o,s=[],l=[];return A(t,function(u){u.prepareSource();var h=u.getSource(n||0),c="";n!=null&&!h&&yw(c),s.push(h),l.push(u._getVersionSign())}),i?o=ZW(i,s,{datasetIndex:e.componentIndex}):n!=null&&(o=[LW(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var i=t[e];if(i._isDirty()||this._upstreamSignList[e]!==i._getVersionSign())return!0}},r.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var i=this._getUpstreamSourceManagers();return i[0]&&i[0].getSource(t)}return e},r.prototype.getSharedDataStore=function(t){var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},r.prototype._innerGetDataStore=function(t,e,i){var n=0,a=this._storeList,o=a[n];o||(o=a[n]={});var s=o[i];if(!s){var l=this._getUpstreamSourceManagers()[0];hc(this._sourceHost)&&l?s=l._innerGetDataStore(t,e,i):(s=new gm,s.initData(new GI(e,t.length),t)),o[i]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(hc(t)){var e=L_(t);return e?[e.getSourceManager()]:[]}else return F(nW(t),function(i){return i.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,e,i,n;if(hc(t))e=t.get("seriesLayoutBy",!0),i=t.get("sourceHeader",!0),n=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=t;e=a.get("seriesLayoutBy",!0),i=a.get("sourceHeader",!0),n=a.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:i,dimensions:n}},r}();function gw(r){var t=r.option.transform;t&&Lu(r.option.transform)}function hc(r){return r.mainType==="series"}function yw(r){throw new Error(r)}var QW="line-height:1";function JI(r){var t=r.lineHeight;return t==null?QW:"line-height:"+Oe(t+"")+"px"}function QI(r,t){var e=r.color||"#6e7079",i=r.fontSize||12,n=r.fontWeight||"400",a=r.color||"#464646",o=r.fontSize||14,s=r.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+Oe(i+"")+"px;color:"+Oe(e)+";font-weight:"+Oe(n+""),valueStyle:"font-size:"+Oe(o+"")+"px;color:"+Oe(a)+";font-weight:"+Oe(s+"")}:{nameStyle:{fontSize:i,fill:e,fontWeight:n},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var t4=[0,10,20,30],e4=["",`
|
||
`,`
|
||
|
||
`,`
|
||
|
||
|
||
`];function _e(r,t){return t.type=r,t}function ym(r){return r.type==="section"}function tP(r){return ym(r)?r4:i4}function eP(r){if(ym(r)){var t=0,e=r.blocks.length,i=e>1||e>0&&!r.noHeader;return A(r.blocks,function(n){var a=eP(n);a>=t&&(t=a+ +(i&&(!a||ym(n)&&!n.noHeader)))}),t}return 0}function r4(r,t,e,i){var n=t.noHeader,a=n4(eP(t)),o=[],s=t.blocks||[];Ve(!s||V(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(X(u,l)){var h=new XI(u[l],null);s.sort(function(p,g){return h.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}A(s,function(p,g){var y=t.valueFormatter,m=tP(p)(y?z(z({},r),{valueFormatter:y}):r,p,g>0?a.html:0,i);m!=null&&o.push(m)});var c=r.renderMode==="richText"?o.join(a.richText):mm(i,o.join(""),n?e:a.html);if(n)return c;var f=fm(t.header,"ordinal",r.useUTC),v=QI(i,r.renderMode).nameStyle,d=JI(i);return r.renderMode==="richText"?rP(r,f,v)+a.richText+c:mm(i,'<div style="'+v+";"+d+';">'+Oe(f)+"</div>"+c,e)}function i4(r,t,e,i){var n=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,h=t.valueFormatter||r.valueFormatter||function(x){return x=V(x)?x:[x],F(x,function(b,S){return fm(b,V(v)?v[S]:v,u)})};if(!(a&&o)){var c=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",n),f=a?"":fm(l,"ordinal",u),v=t.valueType,d=o?[]:h(t.value,t.dataIndex),p=!s||!a,g=!s&&a,y=QI(i,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":c)+(a?"":rP(r,f,m))+(o?"":s4(r,d,p,g,_)):mm(i,(s?"":c)+(a?"":a4(f,!s,m))+(o?"":o4(d,p,g,_)),e)}}function mw(r,t,e,i,n,a){if(r){var o=tP(r),s={useUTC:n,renderMode:e,orderMode:i,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function n4(r){return{html:t4[r],richText:e4[r]}}function mm(r,t,e){var i='<div style="clear:both"></div>',n="margin: "+e+"px 0 0",a=JI(r);return'<div style="'+n+";"+a+';">'+t+i+"</div>"}function a4(r,t,e){var i=t?"margin-left:2px":"";return'<span style="'+e+";"+i+'">'+Oe(r)+"</span>"}function o4(r,t,e,i){var n=e?"10px":"20px",a=t?"float:right;margin-left:"+n:"";return r=V(r)?r:[r],'<span style="'+a+";"+i+'">'+F(r,function(o){return Oe(o)}).join(" ")+"</span>"}function rP(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function s4(r,t,e,i,n){var a=[n],o=i?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(V(t)?t.join(" "):t,a)}function iP(r,t){var e=r.getData().getItemVisual(t,"style"),i=e[r.visualDrawType];return go(i)}function nP(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var Op=function(){function r(){this.richTextStyles={},this._nextStyleNameId=b2()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,i){var n=i==="richText"?this._generateStyleName():null,a=MI({color:e,type:t,renderMode:i,markerId:n});return Y(a)?a:(this.richTextStyles[n]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var i={};V(e)?A(e,function(a){return z(i,a)}):z(i,e);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+t+"}"},r}();function aP(r){var t=r.series,e=r.dataIndex,i=r.multipleSeries,n=t.getData(),a=n.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),l=V(s),u=iP(t,e),h,c,f,v;if(o>1||l&&!o){var d=l4(s,t,e,a,u);h=d.inlineValues,c=d.inlineValueTypes,f=d.blocks,v=d.inlineValues[0]}else if(o){var p=n.getDimensionInfo(a[0]);v=h=As(n,e,a[0]),c=p.type}else v=h=l?s[0]:s;var g=e_(t),y=g&&t.name||"",m=n.getName(e),_=i?y:m;return _e("section",{header:y,noHeader:i||!g,sortParam:v,blocks:[_e("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Lr(_),value:h,valueType:c,dataIndex:e})].concat(f||[])})}function l4(r,t,e,i,n){var a=t.getData(),o=Pr(r,function(c,f,v){var d=a.getDimensionInfo(v);return c=c||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];i.length?A(i,function(c){h(As(a,e,c),c)}):A(r,h);function h(c,f){var v=a.getDimensionInfo(f);!v||v.otherDims.tooltip===!1||(o?u.push(_e("nameValue",{markerType:"subItem",markerColor:n,name:v.displayName,value:c,valueType:v.type})):(s.push(c),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var hn=Tt();function cc(r,t){return r.getName(t)||r.getId(t)}var vf="__universalTransitionEnabled",zt=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=yu({count:h4,reset:c4}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var a=hn(this).sourceManager=new KI(this);a.prepareSource();var o=this.getInitialData(e,n);xw(o,this),this.dataTask.context.data=o,hn(this).dataBeforeProcessed=o,_w(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,i){var n=Gu(this),a=n?Us(e):{},o=this.subType;yt.hasClass(o)&&(o+="Series"),ht(e,i.getTheme().get(this.subType)),ht(e,this.getDefaultOption()),co(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Zn(e,a,n)},t.prototype.mergeOption=function(e,i){e=ht(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Gu(this);n&&Zn(this.option,e,n);var a=hn(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(e,i);xw(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,hn(this).dataBeforeProcessed=o,_w(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!qe(e))for(var i=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&co(e[n],"label",i)},t.prototype.getInitialData=function(e,i){},t.prototype.appendData=function(e){var i=this.getRawData();i.appendData(e.data)},t.prototype.getData=function(e){var i=_m(this);if(i){var n=i.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}else return hn(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var i=_m(this);if(i){var n=i.context;n.outputData=e,i!==this.dataTask&&(n.data=e)}hn(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return Z(e)},t.prototype.getSourceManager=function(){return hn(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return hn(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var e=this.get("colorBy");return e||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,i,n){return aP({series:this,dataIndex:e,multipleSeries:i})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(mt.node&&!(e&&e.ssr))return!1;var i=this.getShallow("animation");return i&&this.getData().count()>this.getShallow("animationThreshold")&&(i=!1),!!i},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,i,n){var a=this.ecModel,o=I_.prototype.getColorFromPalette.call(this,e,i,n);return o||(o=a.getColorFromPalette(e,i,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,i){this._innerSelect(this.getData(i),e)},t.prototype.unselect=function(e,i){var n=this.option.selectedMap;if(n){var a=this.option.selectedMode,o=this.getData(i);if(a==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<e.length;s++){var l=e[s],u=cc(o,l);n[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(e,i){for(var n=[],a=0;a<e.length;a++)n[0]=e[a],this.isSelected(e[a],i)?this.unselect(n,i):this.select(n,i)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,i=xt(e),n=[],a=0;a<i.length;a++){var o=e[i[a]];o>=0&&n.push(o)}return n},t.prototype.isSelected=function(e,i){var n=this.option.selectedMap;if(!n)return!1;var a=this.getData(i);return(n==="all"||n[cc(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[vf])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,i){var n,a,o=this.option,s=o.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){et(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,h=0;h<l;h++){var c=i[h],f=cc(e,c);u[f]=!0,this._selectedDataIndicesMap[f]=e.getRawIndex(c)}}else if(s==="single"||s===!0){var v=i[l-1],f=cc(e,v);o.selectedMap=(n={},n[f]=!0,n),this._selectedDataIndicesMap=(a={},a[f]=e.getRawIndex(v),a)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var i=[];e.hasItemOption&&e.each(function(n){var a=e.getRawDataItem(n);a&&a.selected&&i.push(n)}),i.length>0&&this._innerSelect(e,i)}},t.registerClass=function(e){return yt.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}(yt);re(zt,ud);re(zt,I_);I2(zt,yt);function _w(r){var t=r.name;e_(r)||(r.name=u4(r)||t)}function u4(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),i=[];return A(e,function(n){var a=t.getDimensionInfo(n);a.displayName&&i.push(a.displayName)}),i.join(" ")}function h4(r){return r.model.getRawData().count()}function c4(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),f4}function f4(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function xw(r,t){A(ws(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,ut(v4,t))})}function v4(r,t){var e=_m(r);return e&&e.setOutputEnd((t||this).count()),t}function _m(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var i=e.currentTask;if(i){var n=i.agentStubMap;n&&(i=n.get(r.uid))}return i}}var Yt=function(){function r(){this.group=new at,this.uid=Ws("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){},r.prototype.updateLayout=function(t,e,i,n){},r.prototype.updateVisual=function(t,e,i,n){},r.prototype.toggleBlurSeries=function(t,e,i){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();i_(Yt);Xv(Yt);function Xs(){var r=Tt();return function(t){var e=r(t),i=t.pipelineContext,n=!!e.large,a=!!e.progressiveRender,o=e.large=!!(i&&i.large),s=e.progressiveRender=!!(i&&i.progressiveRender);return(n!==o||a!==s)&&"reset"}}var oP=Tt(),d4=Xs(),Ot=function(){function r(){this.group=new at,this.uid=Ws("viewChart"),this.renderTask=yu({plan:p4,reset:g4}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.highlight=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&Sw(a,n,"emphasis")},r.prototype.downplay=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&Sw(a,n,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.updateLayout=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.eachRendered=function(t){ta(this.group,t)},r.markUpdateMethod=function(t,e){oP(t).updateMethod=e},r.protoInitialize=function(){var t=r.prototype;t.type="chart"}(),r}();function bw(r,t,e){r&&zu(r)&&(t==="emphasis"?Ki:Ji)(r,e)}function Sw(r,t,e){var i=fo(r,t),n=t&&t.highlightKey!=null?Q3(t.highlightKey):null;i!=null?A(Bt(i),function(a){bw(r.getItemGraphicEl(a),e,n)}):r.eachItemGraphicEl(function(a){bw(a,e,n)})}i_(Ot);Xv(Ot);function p4(r){return d4(r.model)}function g4(r){var t=r.model,e=r.ecModel,i=r.api,n=r.payload,a=t.pipelineContext.progressiveRender,o=r.view,s=n&&oP(n).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,i,n),y4[l]}var y4={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)}}},jf="\0__throttleOriginMethod",ww="\0__throttleRate",Tw="\0__throttleType";function cd(r,t,e){var i,n=0,a=0,o=null,s,l,u,h;t=t||0;function c(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var f=function(){for(var v=[],d=0;d<arguments.length;d++)v[d]=arguments[d];i=new Date().getTime(),l=this,u=v;var p=h||t,g=h||e;h=null,s=i-(g?n:a)-p,clearTimeout(o),g?o=setTimeout(c,p):s>=0?c():o=setTimeout(c,-s),n=i};return f.clear=function(){o&&(clearTimeout(o),o=null)},f.debounceNextCall=function(v){h=v},f}function Zs(r,t,e,i){var n=r[t];if(n){var a=n[jf]||n,o=n[Tw],s=n[ww];if(s!==e||o!==i){if(e==null||!i)return r[t]=a;n=r[t]=cd(a,e,i==="debounce"),n[jf]=a,n[Tw]=i,n[ww]=e}return n}}function Wu(r,t){var e=r[t];e&&e[jf]&&(e.clear&&e.clear(),r[t]=e[jf])}var Mw=Tt(),Cw={itemStyle:vo(pI,!0),lineStyle:vo(dI,!0)},m4={lineStyle:"stroke",itemStyle:"fill"};function sP(r,t){var e=r.visualStyleMapper||Cw[t];return e||(console.warn("Unknown style type '"+t+"'."),Cw.itemStyle)}function lP(r,t){var e=r.visualDrawType||m4[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var _4={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=r.getModel(i),a=sP(r,i),o=a(n),s=n.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=lP(r,i),u=o[l],h=Q(u)?u:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[l]||h||c){var f=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=f,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Q(o.fill)?f:o.fill,o.stroke=o.stroke==="auto"||Q(o.stroke)?f:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&h)return e.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var p=r.getDataParams(d),g=z({},o);g[l]=h(p),v.setItemVisual(d,"style",g)}}}},pl=new Lt,x4={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=sP(r,i),a=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[i]){pl.option=l[i];var u=n(pl),h=o.ensureUniqueItemVisual(s,"style");z(h,u),pl.option.decal&&(o.setItemVisual(s,"decal",pl.option.decal),pl.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},b4={performRawSeries:!0,overallReset:function(r){var t=Z();r.eachSeries(function(e){var i=e.getColorBy();if(!e.isColorBySeries()){var n=e.type+"-"+i,a=t.get(n);a||(a={},t.set(n,a)),Mw(e).scope=a}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var i=e.getRawData(),n={},a=e.getData(),o=Mw(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=lP(e,s);a.each(function(u){var h=a.getRawIndex(u);n[h]=u}),i.each(function(u){var h=n[u],c=a.getItemVisual(h,"colorFromPalette");if(c){var f=a.ensureUniqueItemVisual(h,"style"),v=i.getName(u)||u+"",d=i.count();f[l]=e.getColorFromPalette(v,o,d)}})}})}},fc=Math.PI;function S4(r,t){t=t||{},tt(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var e=new at,i=new wt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(i);var n=new St({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new wt({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(a);var o;return t.showSpinner&&(o=new gh({shape:{startAngle:-fc/2,endAngle:-fc/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:fc*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:fc*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),h=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:h}),a.setShape({x:u-l,y:h-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var uP=function(){function r(t,e,i,n){this._stageTaskMap=Z(),this.ecInstance=t,this.api=e,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(i){var n=i.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,a=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex,o=a?i.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 i=this._pipelineMap.get(t.uid),n=t.getData(),a=n.count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&a>=i.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,i=e._pipelineMap=Z();t.eachSeries(function(n){var a=n.getProgressive(),o=n.uid;i.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:a&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),e._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),i=this.api;A(this._allHandlers,function(n){var a=t.get(n.uid)||t.set(n.uid,{}),o="";Ve(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,a,e,i),n.overallReset&&this._createOverallStageTask(n,a,e,i)},this)},r.prototype.prepareView=function(t,e,i,n){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=i,o.api=n,a.__block=!t.incrementalPrepareRender,this._pipe(e,a)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,i){this._performStageTasks(this._visualHandlers,t,e,i)},r.prototype._performStageTasks=function(t,e,i,n){n=n||{};var a=!1,o=this;A(t,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var h=o._stageTaskMap.get(l.uid),c=h.seriesTaskMap,f=h.overallTask;if(f){var v,d=f.agentStubMap;d.each(function(g){s(n,g)&&(g.dirty(),v=!0)}),v&&f.dirty(),o.updatePayload(f,i);var p=o.getPerformArgs(f,n.block);d.each(function(g){g.perform(p)}),f.perform(p)&&(a=!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,i),g.perform(m)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(i){e=i.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,i,n){var a=this,o=e.seriesTaskMap,s=e.seriesTaskMap=Z(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?i.eachRawSeries(h):l?i.eachRawSeriesByType(l,h):u&&u(i,n).each(h);function h(c){var f=c.uid,v=s.set(f,o&&o.get(f)||yu({plan:A4,reset:D4,count:I4}));v.context={model:c,ecModel:i,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(c,v)}},r.prototype._createOverallStageTask=function(t,e,i,n){var a=this,o=e.overallTask=e.overallTask||yu({reset:w4});o.context={ecModel:i,api:n,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Z(),u=t.seriesType,h=t.getTargetSeries,c=!0,f=!1,v="";Ve(!t.createOnAllSeries,v),u?i.eachRawSeriesByType(u,d):h?h(i,n).each(d):(c=!1,A(i.getSeries(),d));function d(p){var g=p.uid,y=l.set(g,s&&s.get(g)||(f=!0,yu({reset:T4,onDirty:C4})));y.context={model:p,overallProgress:c},y.agent=o,y.__block=c,a._pipe(p,y)}f&&o.dirty()},r.prototype._pipe=function(t,e){var i=t.uid,n=this._pipelineMap.get(i);!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 Q(t)&&(t={overallReset:t,seriesType:P4(t)}),t.uid=Ws("stageHandler"),e&&(t.visualType=e),t},r}();function w4(r){r.overallReset(r.ecModel,r.api,r.payload)}function T4(r){return r.overallProgress&&M4}function M4(){this.agent.dirty(),this.getDownstream().dirty()}function C4(){this.agent&&this.agent.dirty()}function A4(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function D4(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Bt(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?F(t,function(e,i){return hP(i)}):L4}var L4=hP(0);function hP(r){return function(t,e){var i=e.data,n=e.resetDefines[r];if(n&&n.dataEach)for(var a=t.start;a<t.end;a++)n.dataEach(i,a);else n&&n.progress&&n.progress(t,i)}}function I4(r){return r.data.count()}function P4(r){qf=null;try{r(Uu,cP)}catch{}return qf}var Uu={},cP={},qf;fP(Uu,P_);fP(cP,NI);Uu.eachSeriesByType=Uu.eachRawSeriesByType=function(r){qf=r};Uu.eachComponent=function(r){r.mainType==="series"&&r.subType&&(qf=r.subType)};function fP(r,t){for(var e in t.prototype)r[e]=ee}var Aw=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const k4={color:Aw,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Aw]};var Ie="#B9B8CE",Dw="#100C2A",vc=function(){return{axisLine:{lineStyle:{color:Ie}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Lw=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],vP={darkMode:!0,color:Lw,backgroundColor:Dw,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Ie},pageTextStyle:{color:Ie}},textStyle:{color:Ie},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Ie}},dataZoom:{borderColor:"#71708A",textStyle:{color:Ie},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Ie}},timeline:{lineStyle:{color:Ie},label:{color:Ie},controlStyle:{color:Ie,borderColor:Ie}},calendar:{itemStyle:{color:Dw},dayLabel:{color:Ie},monthLabel:{color:Ie},yearLabel:{color:Ie}},timeAxis:vc(),logAxis:vc(),valueAxis:vc(),categoryAxis:vc(),line:{symbol:"circle"},graph:{color:Lw},gauge:{title:{color:Ie},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Ie},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};vP.categoryAxis.splitLine.show=!1;var R4=function(){function r(){}return r.prototype.normalizeQuery=function(t){var e={},i={},n={};if(Y(t)){var a=gi(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};A(t,function(l,u){for(var h=!1,c=0;c<o.length;c++){var f=o[c],v=u.lastIndexOf(f);if(v>0&&v===u.length-f.length){var d=u.slice(0,v);d!=="data"&&(e.mainType=d,e[f.toLowerCase()]=l,h=!0)}}s.hasOwnProperty(u)&&(i[u]=l,h=!0),h||(n[u]=l)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},r.prototype.filter=function(t,e){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,o,"mainType")&&h(l,o,"subType")&&h(l,o,"index","componentIndex")&&h(l,o,"name")&&h(l,o,"id")&&h(u,a,"name")&&h(u,a,"dataIndex")&&h(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,a));function h(c,f,v,d){return c[v]==null||f[d||v]===c[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),xm=["symbol","symbolSize","symbolRotate","symbolOffset"],Iw=xm.concat(["symbolKeepAspect"]),E4={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var i={},n={},a=!1,o=0;o<xm.length;o++){var s=xm[o],l=r.get(s);Q(l)?(a=!0,n[s]=l):i[s]=l}if(i.symbol=i.symbol||r.defaultSymbol,e.setVisual(z({legendIcon:r.legendIcon||i.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},i)),t.isSeriesFiltered(r))return;var u=xt(n);function h(c,f){for(var v=r.getRawValue(f),d=r.getDataParams(f),p=0;p<u.length;p++){var g=u[p];c.setItemVisual(f,g,n[g](v,d))}}return{dataEach:a?h:null}}},O4={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!r.hasSymbolVisual||t.isSeriesFiltered(r))return;var e=r.getData();function i(n,a){for(var o=n.getItemModel(a),s=0;s<Iw.length;s++){var l=Iw[s],u=o.getShallow(l,!0);u!=null&&n.setItemVisual(a,l,u)}}return{dataEach:e.hasItemOption?i:null}}};function N_(r,t,e){switch(e){case"color":var i=r.getItemVisual(t,"style");return i[r.getVisual("drawType")];case"opacity":return r.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(t,e)}}function xh(r,t){switch(t){case"color":var e=r.getVisual("style");return e[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(t)}}function dP(r,t,e,i){switch(e){case"color":var n=r.ensureUniqueItemVisual(t,"style");n[r.getVisual("drawType")]=i,r.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(t,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(t,e,i);break}}function pP(r,t){function e(i,n){var a=[];return i.eachComponent({mainType:"series",subType:r,query:n},function(o){a.push(o.seriesIndex)}),a}A([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(i){t(i[0],function(n,a,o){n=z({},n),o.dispatchAction(z(n,{type:i[1],seriesIndex:e(a,n)}))})})}function Go(r,t,e,i,n){var a=r+t;e.isSilent(a)||i.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=n.selected,h=0;h<u.length;h++)if(u[h].seriesIndex===s){var c=o.getData(),f=fo(c,n.fromActionPayload);e.trigger(a,{type:a,seriesId:o.id,name:V(f)?c.getName(f[0]):c.getName(f),selected:Y(l)?l:z({},l)})}})}function N4(r,t,e){r.on("selectchanged",function(i){var n=e.getModel();i.isFromClick?(Go("map","selectchanged",t,n,i),Go("pie","selectchanged",t,n,i)):i.fromAction==="select"?(Go("map","selected",t,n,i),Go("pie","selected",t,n,i)):i.fromAction==="unselect"&&(Go("map","unselected",t,n,i),Go("pie","unselected",t,n,i))})}function Za(r,t,e){for(var i;r&&!(t(r)&&(i=r,e));)r=r.__hostTarget||r.parent;return i}var B4=Math.round(Math.random()*9),z4=typeof Object.defineProperty=="function",V4=function(){function r(){this._id="__ec_inner_"+B4++}return r.prototype.get=function(t){return this._guard(t)[this._id]},r.prototype.set=function(t,e){var i=this._guard(t);return z4?Object.defineProperty(i,this._id,{value:e,enumerable:!1,configurable:!0}):i[this._id]=e,this},r.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},r.prototype.has=function(t){return!!this._guard(t)[this._id]},r.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},r}(),F4=_t.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,i=t.cy,n=t.width/2,a=t.height/2;r.moveTo(e,i-a),r.lineTo(e+n,i+a),r.lineTo(e-n,i+a),r.closePath()}}),G4=_t.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,i=t.cy,n=t.width/2,a=t.height/2;r.moveTo(e,i-a),r.lineTo(e+n,i),r.lineTo(e,i+a),r.lineTo(e-n,i),r.closePath()}}),H4=_t.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.x,i=t.y,n=t.width/5*3,a=Math.max(n,t.height),o=n/2,s=o*o/(a-o),l=i-a+o+s,u=Math.asin(s/o),h=Math.cos(u)*o,c=Math.sin(u),f=Math.cos(u),v=o*.6,d=o*.7;r.moveTo(e-h,l+s),r.arc(e,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(e+h-c*v,l+s+f*v,e,i-d,e,i),r.bezierCurveTo(e,i-d,e-h+c*v,l+s+f*v,e-h,l+s),r.closePath()}}),W4=_t.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.height,i=t.width,n=t.x,a=t.y,o=i/3*2;r.moveTo(n,a),r.lineTo(n+o,a+e),r.lineTo(n,a+e/4*3),r.lineTo(n-o,a+e),r.lineTo(n,a),r.closePath()}}),U4={line:ce,rect:wt,roundRect:wt,square:wt,circle:Ai,diamond:G4,pin:H4,arrow:W4,triangle:F4},Y4={line:function(r,t,e,i,n){n.x1=r,n.y1=t+i/2,n.x2=r+e,n.y2=t+i/2},rect:function(r,t,e,i,n){n.x=r,n.y=t,n.width=e,n.height=i},roundRect:function(r,t,e,i,n){n.x=r,n.y=t,n.width=e,n.height=i,n.r=Math.min(e,i)/4},square:function(r,t,e,i,n){var a=Math.min(e,i);n.x=r,n.y=t,n.width=a,n.height=a},circle:function(r,t,e,i,n){n.cx=r+e/2,n.cy=t+i/2,n.r=Math.min(e,i)/2},diamond:function(r,t,e,i,n){n.cx=r+e/2,n.cy=t+i/2,n.width=e,n.height=i},pin:function(r,t,e,i,n){n.x=r+e/2,n.y=t+i/2,n.width=e,n.height=i},arrow:function(r,t,e,i,n){n.x=r+e/2,n.y=t+i/2,n.width=e,n.height=i},triangle:function(r,t,e,i,n){n.cx=r+e/2,n.cy=t+i/2,n.width=e,n.height=i}},Kf={};A(U4,function(r,t){Kf[t]=new r});var $4=_t.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,t,e){var i=Ff(r,t,e),n=this.shape;return n&&n.symbolType==="pin"&&t.position==="inside"&&(i.y=e.y+e.height*.4),i},buildPath:function(r,t,e){var i=t.symbolType;if(i!=="none"){var n=Kf[i];n||(i="rect",n=Kf[i]),Y4[i](t.x,t.y,t.width,t.height,n.shape),n.buildPath(r,n.shape,e)}}});function X4(r,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=r,e.fill=t||"#fff",e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=r:e.fill=r,this.markRedraw()}}function ae(r,t,e,i,n,a,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=d_(r.slice(8),new ft(t,e,i,n),o?"center":"cover"):r.indexOf("path://")===0?l=yh(r.slice(7),{},new ft(t,e,i,n),o?"center":"cover"):l=new $4({shape:{symbolType:r,x:t,y:e,width:i,height:n}}),l.__isEmptyBrush=s,l.setColor=X4,a&&l.setColor(a),l}function js(r){return V(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function Mo(r,t){if(r!=null)return V(r)||(r=[r,r]),[U(r[0],t[0])||0,U(lt(r[1],r[0]),t[1])||0]}function ja(r){return isFinite(r)}function Z4(r,t,e){var i=t.x==null?0:t.x,n=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(i=i*e.width+e.x,n=n*e.width+e.x,a=a*e.height+e.y,o=o*e.height+e.y),i=ja(i)?i:0,n=ja(n)?n:1,a=ja(a)?a:0,o=ja(o)?o:0;var s=r.createLinearGradient(i,a,n,o);return s}function j4(r,t,e){var i=e.width,n=e.height,a=Math.min(i,n),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,l=t.r==null?.5:t.r;t.global||(o=o*i+e.x,s=s*n+e.y,l=l*a),o=ja(o)?o:.5,s=ja(s)?s:.5,l=l>=0&&ja(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function bm(r,t,e){for(var i=t.type==="radial"?j4(r,t,e):Z4(r,t,e),n=t.colorStops,a=0;a<n.length;a++)i.addColorStop(n[a].offset,n[a].color);return i}function q4(r,t){if(r===t||!r&&!t)return!1;if(!r||!t||r.length!==t.length)return!0;for(var e=0;e<r.length;e++)if(r[e]!==t[e])return!0;return!1}function dc(r){return parseInt(r,10)}function ss(r,t,e){var i=["width","height"][t],n=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(e[i]!=null&&e[i]!=="auto")return parseFloat(e[i]);var s=document.defaultView.getComputedStyle(r);return(r[n]||dc(s[i])||dc(r.style[i]))-(dc(s[a])||0)-(dc(s[o])||0)|0}function K4(r,t){return!r||r==="solid"||!(t>0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:Mt(r)?[r]:V(r)?r:null}function B_(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&K4(t.lineDash,t.lineWidth),i=t.lineDashOffset;if(e){var n=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(e=F(e,function(a){return a/n}),i/=n)}return[e,i]}var J4=new Ci(!0);function Jf(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function Pw(r){return typeof r=="string"&&r!=="none"}function Qf(r){var t=r.fill;return t!=null&&t!=="none"}function kw(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 Rw(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 Sm(r,t,e){var i=n_(t.image,t.__image,e);if(Zv(i)){var n=r.createPattern(i,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*au),a.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(a)}return n}}function Q4(r,t,e,i){var n,a=Jf(e),o=Qf(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var h=t.path||J4,c=t.__dirty;if(!i){var f=e.fill,v=e.stroke,d=o&&!!f.colorStops,p=a&&!!v.colorStops,g=o&&!!f.image,y=a&&!!v.image,m=void 0,_=void 0,x=void 0,b=void 0,S=void 0;(d||p)&&(S=t.getBoundingRect()),d&&(m=c?bm(r,f,S):t.__canvasFillGradient,t.__canvasFillGradient=m),p&&(_=c?bm(r,v,S):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(x=c||!t.__canvasFillPattern?Sm(r,f,t):t.__canvasFillPattern,t.__canvasFillPattern=x),y&&(b=c||!t.__canvasStrokePattern?Sm(r,v,t):t.__canvasStrokePattern,t.__canvasStrokePattern=x),d?r.fillStyle=m:g&&(x?r.fillStyle=x:o=!1),p?r.strokeStyle=_:y&&(b?r.strokeStyle=b:a=!1)}var w=t.getGlobalScale();h.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,M;r.setLineDash&&e.lineDash&&(n=B_(t),T=n[0],M=n[1]);var C=!0;(u||c&ts)&&(h.setDPR(r.dpr),l?h.setContext(null):(h.setContext(r),C=!1),h.reset(),t.buildPath(h,t.shape,i),h.toStatic(),t.pathUpdated()),C&&h.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=M),i||(e.strokeFirst?(a&&Rw(r,e),o&&kw(r,e)):(o&&kw(r,e),a&&Rw(r,e))),T&&r.setLineDash([])}function t6(r,t,e){var i=t.__image=n_(e.image,t.__image,t,t.onload);if(!(!i||!Zv(i))){var n=e.x||0,a=e.y||0,o=t.getWidth(),s=t.getHeight(),l=i.width/i.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=i.width,s=i.height),e.sWidth&&e.sHeight){var u=e.sx||0,h=e.sy||0;r.drawImage(i,u,h,e.sWidth,e.sHeight,n,a,o,s)}else if(e.sx&&e.sy){var u=e.sx,h=e.sy,c=o-u,f=s-h;r.drawImage(i,u,h,c,f,n,a,o,s)}else r.drawImage(i,n,a,o,s)}}function e6(r,t,e){var i,n=e.text;if(n!=null&&(n+=""),n){r.font=e.font||Yn,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var a=void 0,o=void 0;r.setLineDash&&e.lineDash&&(i=B_(t),a=i[0],o=i[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),e.strokeFirst?(Jf(e)&&r.strokeText(n,e.x,e.y),Qf(e)&&r.fillText(n,e.x,e.y)):(Qf(e)&&r.fillText(n,e.x,e.y),Jf(e)&&r.strokeText(n,e.x,e.y)),a&&r.setLineDash([])}}var Ew=["shadowBlur","shadowOffsetX","shadowOffsetY"],Ow=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function gP(r,t,e,i,n){var a=!1;if(!i&&(e=e||{},t===e))return!1;if(i||t.opacity!==e.opacity){ar(r,n),a=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?eo.opacity:o}(i||t.blend!==e.blend)&&(a||(ar(r,n),a=!0),r.globalCompositeOperation=t.blend||eo.blend);for(var s=0;s<Ew.length;s++){var l=Ew[s];(i||t[l]!==e[l])&&(a||(ar(r,n),a=!0),r[l]=r.dpr*(t[l]||0))}return(i||t.shadowColor!==e.shadowColor)&&(a||(ar(r,n),a=!0),r.shadowColor=t.shadowColor||eo.shadowColor),a}function Nw(r,t,e,i,n){var a=Yu(t,n.inHover),o=i?null:e&&Yu(e,n.inHover)||{};if(a===o)return!1;var s=gP(r,a,o,i,n);if((i||a.fill!==o.fill)&&(s||(ar(r,n),s=!0),Pw(a.fill)&&(r.fillStyle=a.fill)),(i||a.stroke!==o.stroke)&&(s||(ar(r,n),s=!0),Pw(a.stroke)&&(r.strokeStyle=a.stroke)),(i||a.opacity!==o.opacity)&&(s||(ar(r,n),s=!0),r.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);r.lineWidth!==u&&(s||(ar(r,n),s=!0),r.lineWidth=u)}for(var h=0;h<Ow.length;h++){var c=Ow[h],f=c[0];(i||a[f]!==o[f])&&(s||(ar(r,n),s=!0),r[f]=a[f]||c[1])}return s}function r6(r,t,e,i,n){return gP(r,Yu(t,n.inHover),e&&Yu(e,n.inHover),i,n)}function yP(r,t){var e=t.transform,i=r.dpr||1;e?r.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):r.setTransform(i,0,0,i,0,0)}function i6(r,t,e){for(var i=!1,n=0;n<r.length;n++){var a=r[n];i=i||a.isZeroArea(),yP(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}e.allClipped=i}function n6(r,t){return r&&t?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&&!t)}var Bw=1,zw=2,Vw=3,Fw=4;function a6(r){var t=Qf(r),e=Jf(r);return!(r.lineDash||!(+t^+e)||t&&typeof r.fill!="string"||e&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function ar(r,t){t.batchFill&&r.fill(),t.batchStroke&&r.stroke(),t.batchFill="",t.batchStroke=""}function Yu(r,t){return t&&r.__hoverStyle||r.style}function z_(r,t){qa(r,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function qa(r,t,e,i){var n=t.transform;if(!t.shouldBePainted(e.viewWidth,e.viewHeight,!1,!1)){t.__dirty&=~hr,t.__isRendered=!1;return}var a=t.__clipPaths,o=e.prevElClipPaths,s=!1,l=!1;if((!o||q4(a,o))&&(o&&o.length&&(ar(r,e),r.restore(),l=s=!0,e.prevElClipPaths=null,e.allClipped=!1,e.prevEl=null),a&&a.length&&(ar(r,e),r.save(),i6(a,r,e),s=!0),e.prevElClipPaths=a),e.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=e.prevEl;u||(l=s=!0);var h=t instanceof _t&&t.autoBatch&&a6(t.style);s||n6(n,u.transform)?(ar(r,e),yP(r,t)):h||ar(r,e);var c=Yu(t,e.inHover);t instanceof _t?(e.lastDrawType!==Bw&&(l=!0,e.lastDrawType=Bw),Nw(r,t,u,l,e),(!h||!e.batchFill&&!e.batchStroke)&&r.beginPath(),Q4(r,t,c,h),h&&(e.batchFill=c.fill||"",e.batchStroke=c.stroke||"")):t instanceof Ms?(e.lastDrawType!==Vw&&(l=!0,e.lastDrawType=Vw),Nw(r,t,u,l,e),e6(r,t,c)):t instanceof xe?(e.lastDrawType!==zw&&(l=!0,e.lastDrawType=zw),r6(r,t,u,l,e),t6(r,t,c)):t.getTemporalDisplayables&&(e.lastDrawType!==Fw&&(l=!0,e.lastDrawType=Fw),o6(r,t,e)),h&&i&&ar(r,e),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),e.prevEl=t,t.__dirty=0,t.__isRendered=!0}function o6(r,t,e){var i=t.getDisplayables(),n=t.getTemporalDisplayables();r.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:e.viewWidth,viewHeight:e.viewHeight,inHover:e.inHover},o,s;for(o=t.getCursor(),s=i.length;o<s;o++){var l=i[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),qa(r,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,h=n.length;u<h;u++){var l=n[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),qa(r,l,a,u===h-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,r.restore()}var Np=new V4,Gw=new ch(100),Hw=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Ds(r,t){if(r==="none")return null;var e=t.getDevicePixelRatio(),i=t.getZr(),n=i.painter.type==="svg";r.dirty&&Np.delete(r);var a=Np.get(r);if(a)return a;var o=tt(r,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=n?1:1/e,Np.set(r,s),r.dirty=!1,s;function l(u){for(var h=[e],c=!0,f=0;f<Hw.length;++f){var v=o[Hw[f]];if(v!=null&&!V(v)&&!Y(v)&&!Mt(v)&&typeof v!="boolean"){c=!1;break}h.push(v)}var d;if(c){d=h.join(",")+(n?"-svg":"");var p=Gw.get(d);p&&(n?u.svgElement=p:u.image=p)}var g=_P(o.dashArrayX),y=s6(o.dashArrayY),m=mP(o.symbol),_=l6(g),x=xP(y),b=!n&&Qr.createCanvas(),S=n&&{tag:"g",attrs:{},key:"dcl",children:[]},w=M(),T;b&&(b.width=w.width*e,b.height=w.height*e,T=b.getContext("2d")),C(),c&&Gw.put(d,b||S),u.image=b,u.svgElement=S,u.svgWidth=w.width,u.svgHeight=w.height;function M(){for(var D=1,L=0,I=_.length;L<I;++L)D=aS(D,_[L]);for(var P=1,L=0,I=m.length;L<I;++L)P=aS(P,m[L].length);D*=P;var k=x*_.length*m.length;return{width:Math.max(1,Math.min(D,o.maxTileWidth)),height:Math.max(1,Math.min(k,o.maxTileHeight))}}function C(){T&&(T.clearRect(0,0,b.width,b.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,b.width,b.height)));for(var D=0,L=0;L<y.length;++L)D+=y[L];if(D<=0)return;for(var I=-x,P=0,k=0,R=0;I<w.height;){if(P%2===0){for(var N=k/2%m.length,O=0,B=0,G=0;O<w.width*2;){for(var H=0,L=0;L<g[R].length;++L)H+=g[R][L];if(H<=0)break;if(B%2===0){var W=(1-o.symbolSize)*.5,q=O+g[R][B]*W,K=I+y[P]*W,nt=g[R][B]*o.symbolSize,Ct=y[P]*o.symbolSize,te=G/2%m[N].length;dt(q,K,nt,Ct,m[N][te])}O+=g[R][B],++G,++B,B===g[R].length&&(B=0)}++R,R===g.length&&(R=0)}I+=y[P],++k,++P,P===y.length&&(P=0)}function dt(rt,gt,J,st,Ht){var Et=n?1:e,Vt=ae(Ht,rt*Et,gt*Et,J*Et,st*Et,o.color,o.symbolKeepAspect);if(n){var Xt=i.painter.renderOneToVNode(Vt);Xt&&S.children.push(Xt)}else z_(T,Vt)}}}}function mP(r){if(!r||r.length===0)return[["rect"]];if(Y(r))return[[r]];for(var t=!0,e=0;e<r.length;++e)if(!Y(r[e])){t=!1;break}if(t)return mP([r]);for(var i=[],e=0;e<r.length;++e)Y(r[e])?i.push([r[e]]):i.push(r[e]);return i}function _P(r){if(!r||r.length===0)return[[0,0]];if(Mt(r)){var t=Math.ceil(r);return[[t,t]]}for(var e=!0,i=0;i<r.length;++i)if(!Mt(r[i])){e=!1;break}if(e)return _P([r]);for(var n=[],i=0;i<r.length;++i)if(Mt(r[i])){var t=Math.ceil(r[i]);n.push([t,t])}else{var t=F(r[i],function(s){return Math.ceil(s)});t.length%2===1?n.push(t.concat(t)):n.push(t)}return n}function s6(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(Mt(r)){var t=Math.ceil(r);return[t,t]}var e=F(r,function(i){return Math.ceil(i)});return r.length%2?e.concat(e):e}function l6(r){return F(r,function(t){return xP(t)})}function xP(r){for(var t=0,e=0;e<r.length;++e)t+=r[e];return r.length%2===1?t*2:t}function u6(r,t){r.eachRawSeries(function(e){if(!r.isSeriesFiltered(e)){var i=e.getData();i.hasItemVisual()&&i.each(function(o){var s=i.getItemVisual(o,"decal");if(s){var l=i.ensureUniqueItemVisual(o,"style");l.decal=Ds(s,t)}});var n=i.getVisual("decal");if(n){var a=i.getVisual("style");a.decal=Ds(n,t)}}})}var Hr=new Rr,bP={};function h6(r,t){bP[r]=t}function SP(r){return bP[r]}var c6="5.6.0",f6={zrender:"5.6.1"},v6=1,d6=800,p6=900,g6=1e3,y6=2e3,m6=5e3,wP=1e3,_6=1100,V_=2e3,TP=3e3,x6=4e3,fd=4500,b6=4600,S6=5e3,w6=6e3,MP=7e3,CP={PROCESSOR:{FILTER:g6,SERIES_FILTER:d6,STATISTIC:m6},VISUAL:{LAYOUT:wP,PROGRESSIVE_LAYOUT:_6,GLOBAL:V_,CHART:TP,POST_CHART_LAYOUT:b6,COMPONENT:x6,BRUSH:S6,CHART_ITEM:fd,ARIA:w6,DECAL:MP}},Le="__flagInMainProcess",er="__pendingUpdate",Bp="__needsUpdateStatus",Ww=/^[a-zA-Z0-9_]+$/,zp="__connectUpdateStatus",Uw=0,T6=1,M6=2;function AP(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.isDisposed()){this.id;return}return LP(this,r,t)}}function DP(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return LP(this,r,t)}}function LP(r,t,e){return e[0]=e[0]&&e[0].toLowerCase(),Rr.prototype[t].apply(r,e)}var IP=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(Rr),PP=IP.prototype;PP.on=DP("on");PP.off=DP("off");var Ho,Vp,pc,cn,Fp,Gp,Hp,gl,yl,Yw,$w,Wp,Xw,gc,Zw,kP,yr,jw,tv=function(r){E(t,r);function t(e,i,n){var a=r.call(this,new R4)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],n=n||{},Y(i)&&(i=RP[i]),a._dom=e;var o="canvas",s="auto",l=!1;n.ssr&&g2(function(f){var v=ot(f),d=v.dataIndex;if(d!=null){var p=Z();return p.set("series_index",v.seriesIndex),p.set("data_index",d),v.ssrType&&p.set("ssr_type",v.ssrType),p}});var u=a._zr=jy(e,{renderer:n.renderer||o,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:lt(n.useDirtyRect,l),useCoarsePointer:lt(n.useCoarsePointer,s),pointerSize:n.pointerSize});a._ssr=n.ssr,a._throttledZrFlush=cd($(u.flush,u),17),i=it(i),i&&zI(i,!0),a._theme=i,a._locale=HH(n.locale||gI),a._coordSysMgr=new $s;var h=a._api=Zw(a);function c(f,v){return f.__prio-v.__prio}return ef(rv,c),ef(wm,c),a._scheduler=new uP(a,h,wm,rv),a._messageCenter=new IP,a._initEvents(),a.resize=$(a.resize,a),u.animation.on("frame",a._onframe,a),Yw(u,a),$w(u,a),Lu(a),a}return t.prototype._onframe=function(){if(!this._disposed){jw(this);var e=this._scheduler;if(this[er]){var i=this[er].silent;this[Le]=!0;try{Ho(this),cn.update.call(this,null,this[er].updateParams)}catch(l){throw this[Le]=!1,this[er]=null,l}this._zr.flush(),this[Le]=!1,this[er]=null,gl.call(this,i),yl.call(this,i)}else if(e.unfinished){var n=v6,a=this._model,o=this._api;e.unfinished=!1;do{var s=+new Date;e.performSeriesTasks(a),e.performDataProcessorTasks(a),Gp(this,a),e.performVisualTasks(a),gc(this,this._model,o,"remain",{}),n-=+new Date-s}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,i,n){if(!this[Le]){if(this._disposed){this.id;return}var a,o,s;if(et(i)&&(n=i.lazyUpdate,a=i.silent,o=i.replaceMerge,s=i.transition,i=i.notMerge),this[Le]=!0,!this._model||i){var l=new pW(this._api),u=this._theme,h=this._model=new P_;h.scheduler=this._scheduler,h.ssr=this._ssr,h.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},Tm);var c={seriesTransition:s,optionChanged:!0};if(n)this[er]={silent:a,updateParams:c},this[Le]=!1,this.getZr().wakeUp();else{try{Ho(this),cn.update.call(this,null,c)}catch(f){throw this[er]=null,this[Le]=!1,f}this._ssr||this._zr.flush(),this[er]=null,this[Le]=!1,gl.call(this,a),yl.call(this,a)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||mt.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var i=this._zr.painter;return i.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(mt.svgSupported){var e=this._zr,i=e.storage.getDisplayList();return A(i,function(n){n.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var i=e.excludeComponents,n=this._model,a=[],o=this;A(i,function(l){n.eachComponent({mainType:l},function(u){var h=o._componentsMap[u.__viewId];h.group.ignore||(a.push(h),h.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return A(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var i=e.type==="svg",n=this.group,a=Math.min,o=Math.max,s=1/0;if(iv[n]){var l=s,u=s,h=-s,c=-s,f=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();A(no,function(_,x){if(_.group===n){var b=i?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(it(e)),S=_.getDom().getBoundingClientRect();l=a(S.left,l),u=a(S.top,u),h=o(S.right,h),c=o(S.bottom,c),f.push({dom:b,left:S.left,top:S.top})}}),l*=v,u*=v,h*=v,c*=v;var d=h-l,p=c-u,g=Qr.createCanvas(),y=jy(g,{renderer:i?"svg":"canvas"});if(y.resize({width:d,height:p}),i){var m="";return A(f,function(_){var x=_.left-l,b=_.top-u;m+='<g transform="translate('+x+","+b+')">'+_.dom+"</g>"}),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return e.connectedBackgroundColor&&y.add(new wt({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),A(f,function(_){var x=new xe({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});y.add(x)}),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,i){return Fp(this,"convertToPixel",e,i)},t.prototype.convertFromPixel=function(e,i){return Fp(this,"convertFromPixel",e,i)},t.prototype.containPixel=function(e,i){if(this._disposed){this.id;return}var n=this._model,a,o=fu(n,e);return A(o,function(s,l){l.indexOf("Models")>=0&&A(s,function(u){var h=u.coordinateSystem;if(h&&h.containPoint)a=a||!!h.containPoint(i);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(a=a||c.containPoint(i,u))}},this)},this),!!a},t.prototype.getVisual=function(e,i){var n=this._model,a=fu(n,e,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?N_(s,l,i):xh(s,i)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;A(C6,function(i){var n=function(a){var o=e.getModel(),s=a.target,l,u=i==="globalout";if(u?l={}:s&&Za(s,function(d){var p=ot(d);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return l=g&&g.getDataParams(p.dataIndex,p.dataType,s)||{},!0}else if(p.eventData)return l=z({},p.eventData),!0},!0),l){var h=l.componentType,c=l.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",c=l.seriesIndex);var f=h&&c!=null&&o.getComponent(h,c),v=f&&e[f.mainType==="series"?"_chartsMap":"_componentsMap"][f.__viewId];l.event=a,l.type=i,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:f,view:v},e.trigger(i,l)}};n.zrEventfulCallAtLast=!0,e._zr.on(i,n,e)}),A(mu,function(i,n){e._messageCenter.on(n,function(a){this.trigger(n,a)},e)}),A(["selectchanged"],function(i){e._messageCenter.on(i,function(n){this.trigger(i,n)},e)}),N4(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&A2(this.getDom(),G_,"");var i=this,n=i._api,a=i._model;A(i._componentsViews,function(o){o.dispose(a,n)}),A(i._chartsViews,function(o){o.dispose(a,n)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete no[i.id]},t.prototype.resize=function(e){if(!this[Le]){if(this._disposed){this.id;return}this._zr.resize(e);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var n=i.resetOption("media"),a=e&&e.silent;this[er]&&(a==null&&(a=this[er].silent),n=!0,this[er]=null),this[Le]=!0;try{n&&Ho(this),cn.update.call(this,{type:"resize",animation:z({duration:0},e&&e.animation)})}catch(o){throw this[Le]=!1,o}this[Le]=!1,gl.call(this,a),yl.call(this,a)}}},t.prototype.showLoading=function(e,i){if(this._disposed){this.id;return}if(et(e)&&(i=e,e=""),e=e||"default",this.hideLoading(),!!Mm[e]){var n=Mm[e](this._api,i),a=this._zr;this._loadingFX=n,a.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 i=z({},e);return i.type=mu[e.type],i},t.prototype.dispatchAction=function(e,i){if(this._disposed){this.id;return}if(et(i)||(i={silent:!!i}),!!ev[e.type]&&this._model){if(this[Le]){this._pendingActions.push(e);return}var n=i.silent;Hp.call(this,e,n);var a=i.flush;a?this._zr.flush():a!==!1&&mt.browser.weChat&&this._throttledZrFlush(),gl.call(this,n),yl.call(this,n)}},t.prototype.updateLabelLayout=function(){Hr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var i=e.seriesIndex,n=this.getModel(),a=n.getSeriesByIndex(i);a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){Ho=function(c){var f=c._scheduler;f.restorePipelines(c._model),f.prepareStageTasks(),Vp(c,!0),Vp(c,!1),f.plan()},Vp=function(c,f){for(var v=c._model,d=c._scheduler,p=f?c._componentsViews:c._chartsViews,g=f?c._componentsMap:c._chartsMap,y=c._zr,m=c._api,_=0;_<p.length;_++)p[_].__alive=!1;f?v.eachComponent(function(S,w){S!=="series"&&x(w)}):v.eachSeries(x);function x(S){var w=S.__requireNewView;S.__requireNewView=!1;var T="_ec_"+S.id+"_"+S.type,M=!w&&g[T];if(!M){var C=gi(S.type),D=f?Yt.getClass(C.main,C.sub):Ot.getClass(C.sub);M=new D,M.init(v,m),g[T]=M,p.push(M),y.add(M.group)}S.__viewId=M.__id=T,M.__alive=!0,M.__model=S,M.group.__ecComponentInfo={mainType:S.mainType,index:S.componentIndex},!f&&d.prepareView(M,S,v,m)}for(var _=0;_<p.length;){var b=p[_];b.__alive?_++:(!f&&b.renderTask.dispose(),y.remove(b.group),b.dispose(v,m),p.splice(_,1),g[b.__id]===b&&delete g[b.__id],b.__id=b.group.__ecComponentInfo=null)}},pc=function(c,f,v,d,p){var g=c._model;if(g.setUpdatePayload(v),!d){A([].concat(c._componentsViews).concat(c._chartsViews),b);return}var y={};y[d+"Id"]=v[d+"Id"],y[d+"Index"]=v[d+"Index"],y[d+"Name"]=v[d+"Name"];var m={mainType:d,query:y};p&&(m.subType=p);var _=v.excludeSeriesId,x;_!=null&&(x=Z(),A(Bt(_),function(S){var w=he(S,null);w!=null&&x.set(w,!0)})),g&&g.eachComponent(m,function(S){var w=x&&x.get(S.id)!=null;if(!w)if(PS(v))if(S instanceof zt)v.type===ro&&!v.notBlur&&!S.get(["emphasis","disabled"])&&Y3(S,v,c._api);else{var T=h_(S.mainType,S.componentIndex,v.name,c._api),M=T.focusSelf,C=T.dispatchers;v.type===ro&&M&&!v.notBlur&&am(S.mainType,S.componentIndex,c._api),C&&A(C,function(D){v.type===ro?Ki(D):Ji(D)})}else sm(v)&&S instanceof zt&&(Z3(S,v,c._api),LS(S),yr(c))},c),g&&g.eachComponent(m,function(S){var w=x&&x.get(S.id)!=null;w||b(c[d==="series"?"_chartsMap":"_componentsMap"][S.__viewId])},c);function b(S){S&&S.__alive&&S[f]&&S[f](S.__model,g,c._api,v)}},cn={prepareAndUpdate:function(c){Ho(this),cn.update.call(this,c,{optionChanged:c.newOption!=null})},update:function(c,f){var v=this._model,d=this._api,p=this._zr,g=this._coordSysMgr,y=this._scheduler;if(v){v.setUpdatePayload(c),y.restoreData(v,c),y.performSeriesTasks(v),g.create(v,d),y.performDataProcessorTasks(v,c),Gp(this,v),g.update(v,d),e(v),y.performVisualTasks(v,c),Wp(this,v,d,c,f);var m=v.get("backgroundColor")||"transparent",_=v.get("darkMode");p.setBackgroundColor(m),_!=null&&_!=="auto"&&p.setDarkMode(_),Hr.trigger("afterupdate",v,d)}},updateTransform:function(c){var f=this,v=this._model,d=this._api;if(v){v.setUpdatePayload(c);var p=[];v.eachComponent(function(y,m){if(y!=="series"){var _=f.getViewOfComponentModel(m);if(_&&_.__alive)if(_.updateTransform){var x=_.updateTransform(m,v,d,c);x&&x.update&&p.push(_)}else p.push(_)}});var g=Z();v.eachSeries(function(y){var m=f._chartsMap[y.__viewId];if(m.updateTransform){var _=m.updateTransform(y,v,d,c);_&&_.update&&g.set(y.uid,1)}else g.set(y.uid,1)}),e(v),this._scheduler.performVisualTasks(v,c,{setDirty:!0,dirtyMap:g}),gc(this,v,d,c,{},g),Hr.trigger("afterupdate",v,d)}},updateView:function(c){var f=this._model;f&&(f.setUpdatePayload(c),Ot.markUpdateMethod(c,"updateView"),e(f),this._scheduler.performVisualTasks(f,c,{setDirty:!0}),Wp(this,f,this._api,c,{}),Hr.trigger("afterupdate",f,this._api))},updateVisual:function(c){var f=this,v=this._model;v&&(v.setUpdatePayload(c),v.eachSeries(function(d){d.getData().clearAllVisual()}),Ot.markUpdateMethod(c,"updateVisual"),e(v),this._scheduler.performVisualTasks(v,c,{visualType:"visual",setDirty:!0}),v.eachComponent(function(d,p){if(d!=="series"){var g=f.getViewOfComponentModel(p);g&&g.__alive&&g.updateVisual(p,v,f._api,c)}}),v.eachSeries(function(d){var p=f._chartsMap[d.__viewId];p.updateVisual(d,v,f._api,c)}),Hr.trigger("afterupdate",v,this._api))},updateLayout:function(c){cn.update.call(this,c)}},Fp=function(c,f,v,d){if(c._disposed){c.id;return}for(var p=c._model,g=c._coordSysMgr.getCoordinateSystems(),y,m=fu(p,v),_=0;_<g.length;_++){var x=g[_];if(x[f]&&(y=x[f](p,m,d))!=null)return y}},Gp=function(c,f){var v=c._chartsMap,d=c._scheduler;f.eachSeries(function(p){d.updateStreamModes(p,v[p.__viewId])})},Hp=function(c,f){var v=this,d=this.getModel(),p=c.type,g=c.escapeConnect,y=ev[p],m=y.actionInfo,_=(m.update||"update").split(":"),x=_.pop(),b=_[0]!=null&&gi(_[0]);this[Le]=!0;var S=[c],w=!1;c.batch&&(w=!0,S=F(c.batch,function(P){return P=tt(z({},P),c),P.batch=null,P}));var T=[],M,C=sm(c),D=PS(c);if(D&&j2(this._api),A(S,function(P){if(M=y.action(P,v._model,v._api),M=M||z({},P),M.type=m.event||M.type,T.push(M),D){var k=r_(c),R=k.queryOptionMap,N=k.mainTypeSpecified,O=N?R.keys()[0]:"series";pc(v,x,P,O),yr(v)}else C?(pc(v,x,P,"series"),yr(v)):b&&pc(v,x,P,b.main,b.sub)}),x!=="none"&&!D&&!C&&!b)try{this[er]?(Ho(this),cn.update.call(this,c),this[er]=null):cn[x].call(this,c)}catch(P){throw this[Le]=!1,P}if(w?M={type:m.event||p,escapeConnect:g,batch:T}:M=T[0],this[Le]=!1,!f){var L=this._messageCenter;if(L.trigger(M.type,M),C){var I={type:"selectchanged",escapeConnect:g,selected:j3(d),isFromClick:c.isFromClick||!1,fromAction:c.type,fromActionPayload:c};L.trigger(I.type,I)}}},gl=function(c){for(var f=this._pendingActions;f.length;){var v=f.shift();Hp.call(this,v,c)}},yl=function(c){!c&&this.trigger("updated")},Yw=function(c,f){c.on("rendered",function(v){f.trigger("rendered",v),c.animation.isFinished()&&!f[er]&&!f._scheduler.unfinished&&!f._pendingActions.length&&f.trigger("finished")})},$w=function(c,f){c.on("mouseover",function(v){var d=v.target,p=Za(d,zu);p&&($3(p,v,f._api),yr(f))}).on("mouseout",function(v){var d=v.target,p=Za(d,zu);p&&(X3(p,v,f._api),yr(f))}).on("click",function(v){var d=v.target,p=Za(d,function(m){return ot(m).dataIndex!=null},!0);if(p){var g=p.selected?"unselect":"select",y=ot(p);f._api.dispatchAction({type:g,dataType:y.dataType,dataIndexInside:y.dataIndex,seriesIndex:y.seriesIndex,isFromClick:!0})}})};function e(c){c.clearColorPalette(),c.eachSeries(function(f){f.clearColorPalette()})}function i(c){var f=[],v=[],d=!1;if(c.eachComponent(function(m,_){var x=_.get("zlevel")||0,b=_.get("z")||0,S=_.getZLevelKey();d=d||!!S,(m==="series"?v:f).push({zlevel:x,z:b,idx:_.componentIndex,type:m,key:S})}),d){var p=f.concat(v),g,y;ef(p,function(m,_){return m.zlevel===_.zlevel?m.z-_.z:m.zlevel-_.zlevel}),A(p,function(m){var _=c.getComponent(m.type,m.idx),x=m.zlevel,b=m.key;g!=null&&(x=Math.max(g,x)),b?(x===g&&b!==y&&x++,y=b):y&&(x===g&&x++,y=""),g=x,_.setZLevel(x)})}}Wp=function(c,f,v,d,p){i(f),Xw(c,f,v,d,p),A(c._chartsViews,function(g){g.__alive=!1}),gc(c,f,v,d,p),A(c._chartsViews,function(g){g.__alive||g.remove(f,v)})},Xw=function(c,f,v,d,p,g){A(g||c._componentsViews,function(y){var m=y.__model;u(m,y),y.render(m,f,v,d),s(m,y),h(m,y)})},gc=function(c,f,v,d,p,g){var y=c._scheduler;p=z(p||{},{updatedSeries:f.getSeries()}),Hr.trigger("series:beforeupdate",f,v,p);var m=!1;f.eachSeries(function(_){var x=c._chartsMap[_.__viewId];x.__alive=!0;var b=x.renderTask;y.updatePayload(b,d),u(_,x),g&&g.get(_.uid)&&b.dirty(),b.perform(y.getPerformArgs(b))&&(m=!0),x.group.silent=!!_.get("silent"),o(_,x),LS(_)}),y.unfinished=m||y.unfinished,Hr.trigger("series:layoutlabels",f,v,p),Hr.trigger("series:transition",f,v,p),f.eachSeries(function(_){var x=c._chartsMap[_.__viewId];s(_,x),h(_,x)}),a(c,f),Hr.trigger("series:afterupdate",f,v,p)},yr=function(c){c[Bp]=!0,c.getZr().wakeUp()},jw=function(c){c[Bp]&&(c.getZr().storage.traverse(function(f){vs(f)||n(f)}),c[Bp]=!1)};function n(c){for(var f=[],v=c.currentStates,d=0;d<v.length;d++){var p=v[d];p==="emphasis"||p==="blur"||p==="select"||f.push(p)}c.selected&&c.states.select&&f.push("select"),c.hoverState===Kv&&c.states.emphasis?f.push("emphasis"):c.hoverState===dh&&c.states.blur&&f.push("blur"),c.useStates(f)}function a(c,f){var v=c._zr,d=v.storage,p=0;d.traverse(function(g){g.isGroup||p++}),p>f.get("hoverLayerThreshold")&&!mt.node&&!mt.worker&&f.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 o(c,f){var v=c.get("blendMode")||null;f.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function s(c,f){if(!c.preventAutoZ){var v=c.get("z")||0,d=c.get("zlevel")||0;f.eachRendered(function(p){return l(p,v,d,-1/0),!0})}}function l(c,f,v,d){var p=c.getTextContent(),g=c.getTextGuideLine(),y=c.isGroup;if(y)for(var m=c.childrenRef(),_=0;_<m.length;_++)d=Math.max(l(m[_],f,v,d),d);else c.z=f,c.zlevel=v,d=Math.max(c.z2,d);if(p&&(p.z=f,p.zlevel=v,isFinite(d)&&(p.z2=d+2)),g){var x=c.textGuideLineConfig;g.z=f,g.zlevel=v,isFinite(d)&&(g.z2=d+(x&&x.showAbove?1:-1))}return d}function u(c,f){f.eachRendered(function(v){if(!vs(v)){var d=v.getTextContent(),p=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function h(c,f){var v=c.getModel("stateAnimation"),d=c.isAnimationEnabled(),p=v.get("duration"),g=p>0?{duration:p,delay:v.get("delay"),easing:v.get("easing")}:null;f.eachRendered(function(y){if(y.states&&y.states.emphasis){if(vs(y))return;if(y instanceof _t&&tH(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=g;var _=y.getTextContent(),x=y.getTextGuideLine();_&&(_.stateTransition=g),x&&(x.stateTransition=g)}y.__dirty&&n(y)}})}Zw=function(c){return new(function(f){E(v,f);function v(){return f!==null&&f.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return c._model.getComponent(p.mainType,p.index);d=d.parent}},v.prototype.enterEmphasis=function(d,p){Ki(d,p),yr(c)},v.prototype.leaveEmphasis=function(d,p){Ji(d,p),yr(c)},v.prototype.enterBlur=function(d){Y2(d),yr(c)},v.prototype.leaveBlur=function(d){u_(d),yr(c)},v.prototype.enterSelect=function(d){$2(d),yr(c)},v.prototype.leaveSelect=function(d){X2(d),yr(c)},v.prototype.getModel=function(){return c.getModel()},v.prototype.getViewOfComponentModel=function(d){return c.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return c.getViewOfSeriesModel(d)},v}(NI))(c)},kP=function(c){function f(v,d){for(var p=0;p<v.length;p++){var g=v[p];g[zp]=d}}A(mu,function(v,d){c._messageCenter.on(d,function(p){if(iv[c.group]&&c[zp]!==Uw){if(p&&p.escapeConnect)return;var g=c.makeActionFromEvent(p),y=[];A(no,function(m){m!==c&&m.group===c.group&&y.push(m)}),f(y,Uw),A(y,function(m){m[zp]!==T6&&m.dispatchAction(g)}),f(y,M6)}})})}}(),t}(Rr),F_=tv.prototype;F_.on=AP("on");F_.off=AP("off");F_.one=function(r,t,e){var i=this;function n(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t&&t.apply&&t.apply(this,a),i.off(r,n)}this.on.call(this,r,n,e)};var C6=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var ev={},mu={},wm=[],Tm=[],rv=[],RP={},Mm={},no={},iv={},A6=+new Date-0,D6=+new Date-0,G_="_echarts_instance_";function L6(r,t,e){var i=!(e&&e.ssr);if(i){var n=H_(r);if(n)return n}var a=new tv(r,t,e);return a.id="ec_"+A6++,no[a.id]=a,i&&A2(r,G_,a.id),kP(a),Hr.trigger("afterinit",a),a}function I6(r){if(V(r)){var t=r;r=null,A(t,function(e){e.group!=null&&(r=e.group)}),r=r||"g_"+D6++,A(t,function(e){e.group=r})}return iv[r]=!0,r}function EP(r){iv[r]=!1}var P6=EP;function k6(r){Y(r)?r=no[r]:r instanceof tv||(r=H_(r)),r instanceof tv&&!r.isDisposed()&&r.dispose()}function H_(r){return no[HG(r,G_)]}function R6(r){return no[r]}function W_(r,t){RP[r]=t}function U_(r){vt(Tm,r)<0&&Tm.push(r)}function Y_(r,t){$_(wm,r,t,y6)}function OP(r){vd("afterinit",r)}function NP(r){vd("afterupdate",r)}function vd(r,t){Hr.on(r,t)}function ii(r,t,e){Q(t)&&(e=t,t="");var i=et(r)?r.type:[r,r={event:t}][0];r.event=(r.event||i).toLowerCase(),t=r.event,!mu[t]&&(Ve(Ww.test(i)&&Ww.test(t)),ev[i]||(ev[i]={action:e,actionInfo:r}),mu[t]=i)}function BP(r,t){$s.register(r,t)}function E6(r){var t=$s.get(r);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()}function zP(r,t){$_(rv,r,t,wP,"layout")}function ra(r,t){$_(rv,r,t,TP,"visual")}var qw=[];function $_(r,t,e,i,n){if((Q(t)||et(t))&&(e=t,t=i),!(vt(qw,e)>=0)){qw.push(e);var a=uP.wrapStageHandler(e,n);a.__prio=t,a.__raw=e,r.push(a)}}function X_(r,t){Mm[r]=t}function O6(r){kL({createCanvas:r})}function VP(r,t,e){var i=SP("registerMap");i&&i(r,t,e)}function N6(r){var t=SP("getMap");return t&&t(r)}var FP=XW;ra(V_,_4);ra(fd,x4);ra(fd,b4);ra(V_,E4);ra(fd,O4);ra(MP,u6);U_(zI);Y_(p6,AW);X_("default",S4);ii({type:ro,event:ro,update:ro},ee);ii({type:lf,event:lf,update:lf},ee);ii({type:vu,event:vu,update:vu},ee);ii({type:uf,event:uf,update:uf},ee);ii({type:du,event:du,update:du},ee);W_("light",k4);W_("dark",vP);var B6={},Kw=[],z6={registerPreprocessor:U_,registerProcessor:Y_,registerPostInit:OP,registerPostUpdate:NP,registerUpdateLifecycle:vd,registerAction:ii,registerCoordinateSystem:BP,registerLayout:zP,registerVisual:ra,registerTransform:FP,registerLoading:X_,registerMap:VP,registerImpl:h6,PRIORITY:CP,ComponentModel:yt,ComponentView:Yt,SeriesModel:zt,ChartView:Ot,registerComponentModel:function(r){yt.registerClass(r)},registerComponentView:function(r){Yt.registerClass(r)},registerSeriesModel:function(r){zt.registerClass(r)},registerChartView:function(r){Ot.registerClass(r)},registerSubTypeDefaulter:function(r,t){yt.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){d2(r,t)}};function pt(r){if(V(r)){A(r,function(t){pt(t)});return}vt(Kw,r)>=0||(Kw.push(r),Q(r)&&(r={install:r}),r.install(z6))}function ml(r){return r==null?0:r.length||1}function Jw(r){return r}var Qi=function(){function r(t,e,i,n,a,o){this._old=t,this._new=e,this._oldKeyGetter=i||Jw,this._newKeyGetter=n||Jw,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,i={},n=new Array(t.length),a=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,i,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=n[o],l=i[s],u=ml(l);if(u>1){var h=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(h,o)}else u===1?(i[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,i)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,i={},n={},a=[],o=[];this._initIndexMap(t,i,a,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=i[l],h=n[l],c=ml(u),f=ml(h);if(c>1&&f===1)this._updateManyToOne&&this._updateManyToOne(h,u),n[l]=null;else if(c===1&&f>1)this._updateOneToMany&&this._updateOneToMany(h,u),n[l]=null;else if(c===1&&f===1)this._update&&this._update(h,u),n[l]=null;else if(c>1&&f>1)this._updateManyToMany&&this._updateManyToMany(h,u),n[l]=null;else if(c>1)for(var v=0;v<c;v++)this._remove&&this._remove(u[v]);else this._remove&&this._remove(u)}this._performRestAdd(o,n)},r.prototype._performRestAdd=function(t,e){for(var i=0;i<t.length;i++){var n=t[i],a=e[n],o=ml(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);e[n]=null}},r.prototype._initIndexMap=function(t,e,i,n){for(var a=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[n](t[o],o);if(a||(i[o]=s),!!e){var l=e[s],u=ml(l);u===0?(e[s]=o,a&&i.push(s)):u===1?e[s]=[l,o]:l.push(o)}}},r}(),V6=function(){function r(t,e){this._encode=t,this._schema=e}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r}();function F6(r,t){var e={},i=e.encode={},n=Z(),a=[],o=[],s={};A(r.dimensions,function(f){var v=r.getDimensionInfo(f),d=v.coordDim;if(d){var p=v.coordDimIndex;Up(i,d)[p]=f,v.isExtraCoord||(n.set(d,1),G6(v.type)&&(a[0]=f),Up(s,d)[p]=r.getDimensionIndex(v.name)),v.defaultTooltip&&o.push(f)}LI.each(function(g,y){var m=Up(i,y),_=v.otherDims[y];_!=null&&_!==!1&&(m[_]=v.name)})});var l=[],u={};n.each(function(f,v){var d=i[v];u[v]=d[0],l=l.concat(d)}),e.dataDimsOnCoord=l,e.dataDimIndicesOnCoord=F(l,function(f){return r.getDimensionInfo(f).storeDimIndex}),e.encodeFirstDimNotExtra=u;var h=i.label;h&&h.length&&(a=h.slice());var c=i.tooltip;return c&&c.length?o=c.slice():o.length||(o=a.slice()),i.defaultedLabel=a,i.defaultedTooltip=o,e.userOutput=new V6(s,t),e}function Up(r,t){return r.hasOwnProperty(t)||(r[t]=[]),r[t]}function nv(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function G6(r){return!(r==="ordinal"||r==="time")}var df=function(){function r(t){this.otherDims={},t!=null&&z(this,t)}return r}(),H6=Tt(),W6={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},GP=function(){function r(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=UP(this.source)))},r.prototype.getSourceDimensionIndex=function(t){return lt(this._dimNameMap.get(t),-1)},r.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},r.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=FI(this.source),i=!YP(t),n="",a=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,h=void 0,c=this.dimensions[s];if(c&&c.storeDimIndex===o)l=e?c.name:null,u=c.type,h=c.ordinalMeta,s++;else{var f=this.getSourceDimension(o);f&&(l=e?f.name:null,u=f.type)}a.push({property:l,type:u,ordinalMeta:h}),e&&l!=null&&(!c||!c.isCalculationCoord)&&(n+=i?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),n+="$",n+=W6[u]||"f",h&&(n+=h.uid),n+="$"}var v=this.source,d=[v.seriesLayoutBy,v.startIndex,n].join("$$");return{dimensions:a,hash:d}},r.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,i=0;e<this._fullDimCount;e++){var n=void 0,a=this.dimensions[i];if(a&&a.storeDimIndex===e)a.isCalculationCoord||(n=a.name),i++;else{var o=this.getSourceDimension(e);o&&(n=o.name)}t.push(n)}return t},r.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r}();function HP(r){return r instanceof GP}function WP(r){for(var t=Z(),e=0;e<(r||[]).length;e++){var i=r[e],n=et(i)?i.name:i;n!=null&&t.get(n)==null&&t.set(n,e)}return t}function UP(r){var t=H6(r);return t.dimNameMap||(t.dimNameMap=WP(r.dimensionsDefine))}function YP(r){return r>30}var _l=et,fn=F,U6=typeof Int32Array>"u"?Array:Int32Array,Y6="e\0\0",Qw=-1,$6=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],X6=["_approximateExtent"],tT,yc,xl,bl,Yp,Sl,$p,Be=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 i,n=!1;HP(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,i=t),i=i||["x","y"];for(var a={},o=[],s={},l=!1,u={},h=0;h<i.length;h++){var c=i[h],f=Y(c)?new df({name:c}):c instanceof df?c:new df(c),v=f.name;f.type=f.type||"float",f.coordDim||(f.coordDim=v,f.coordDimIndex=0);var d=f.otherDims=f.otherDims||{};o.push(v),a[v]=f,u[v]!=null&&(l=!0),f.createInvertedIndices&&(s[v]=[]),d.itemName===0&&(this._nameDimIdx=h),d.itemId===0&&(this._idDimIdx=h),n&&(f.storeDimIndex=h)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted){var p=this._dimIdxToName=Z();A(o,function(g){p.set(a[g].storeDimIndex,g)})}}return r.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(e==null)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var i=this._dimIdxToName.get(e);if(i!=null)return i;var n=this._schema.getSourceDimension(e);if(n)return n.name},r.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(e!=null)return e;if(t==null)return-1;var i=this._getDimInfo(t);return i?i.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},r.prototype._recognizeDimIndex=function(t){if(Mt(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},r.prototype._getStoreDimIndex=function(t){var e=this.getDimensionIndex(t);return e},r.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},r.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(i){return e.hasOwnProperty(i)?e[i]:void 0}:function(i){return e[i]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(t,e){var i=this._dimSummary;if(e==null)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return n?n[e]:null},r.prototype.mapDimensionsAll=function(t){var e=this._dimSummary,i=e.encode[t];return(i||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(t,e,i){var n=this,a;if(t instanceof gm&&(a=t),!a){var o=this.dimensions,s=k_(t)||Me(t)?new GI(t,o.length):t;a=new gm;var l=fn(o,function(u){return{type:n._dimInfos[u].type,property:u}});a.initData(s,l,i)}this._store=a,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=F6(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},r.prototype.appendValues=function(t,e){var i=this._store.appendValues(t,e&&e.length),n=i.start,a=i.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var s=n;s<a;s++){var l=s-n;this._nameList[s]=e[l],o&&$p(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,i=0;i<e.length;i++){var n=this._dimInfos[e[i]];n.ordinalMeta&&t.collectOrdinalMeta(n.storeDimIndex,n.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==Vn&&!t.fillStorage},r.prototype._doInit=function(t,e){if(!(t>=e)){var i=this._store,n=i.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===Or;if(l&&!n.pure)for(var u=[],h=t;h<e;h++){var c=n.getItem(h,u);if(!this.hasItemOption&&LG(c)&&(this.hasItemOption=!0),c){var f=c.name;a[h]==null&&f!=null&&(a[h]=he(f,null));var v=c.id;o[h]==null&&v!=null&&(o[h]=he(v,null))}}if(this._shouldMakeIdFromName())for(var h=t;h<e;h++)$p(this,h);tT(this)}},r.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},r.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},r.prototype.setCalculationInfo=function(t,e){_l(t)?z(this._calculationInfo,t):this._calculationInfo[t]=e},r.prototype.getName=function(t){var e=this.getRawIndex(t),i=this._nameList[e];return i==null&&this._nameDimIdx!=null&&(i=xl(this,this._nameDimIdx,e)),i==null&&(i=""),i},r.prototype._getCategory=function(t,e){var i=this._store.get(t,e),n=this._store.getOrdinalMeta(t);return n?n.categories[i]:i},r.prototype.getId=function(t){return yc(this,this.getRawIndex(t))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(t,e){var i=this._store,n=this._dimInfos[t];if(n)return i.get(n.storeDimIndex,e)},r.prototype.getByRawIndex=function(t,e){var i=this._store,n=this._dimInfos[t];if(n)return i.getByRawIndex(n.storeDimIndex,e)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},r.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},r.prototype.getValues=function(t,e){var i=this,n=this._store;return V(t)?n.getValues(fn(t,function(a){return i._getStoreDimIndex(a)}),e):n.getValues(t)},r.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,i=0,n=e.length;i<n;i++)if(isNaN(this._store.get(e[i],t)))return!1;return!0},r.prototype.indexOfName=function(t){for(var e=0,i=this._store.count();e<i;e++)if(this.getName(e)===t)return e;return-1},r.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},r.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},r.prototype.rawIndexOf=function(t,e){var i=t&&this._invertedIndicesMap[t],n=i&&i[e];return n==null||isNaN(n)?Qw:n},r.prototype.indicesOfNearest=function(t,e,i){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,i)},r.prototype.each=function(t,e,i){Q(t)&&(i=e,e=t,t=[]);var n=i||this,a=fn(bl(t),this._getStoreDimIndex,this);this._store.each(a,n?$(e,n):e)},r.prototype.filterSelf=function(t,e,i){Q(t)&&(i=e,e=t,t=[]);var n=i||this,a=fn(bl(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,n?$(e,n):e),this},r.prototype.selectRange=function(t){var e=this,i={},n=xt(t);return A(n,function(a){var o=e._getStoreDimIndex(a);i[o]=t[a]}),this._store=this._store.selectRange(i),this},r.prototype.mapArray=function(t,e,i){Q(t)&&(i=e,e=t,t=[]),i=i||this;var n=[];return this.each(t,function(){n.push(e&&e.apply(this,arguments))},i),n},r.prototype.map=function(t,e,i,n){var a=i||n||this,o=fn(bl(t),this._getStoreDimIndex,this),s=Sl(this);return s._store=this._store.map(o,a?$(e,a):e),s},r.prototype.modify=function(t,e,i,n){var a=i||n||this,o=fn(bl(t),this._getStoreDimIndex,this);this._store.modify(o,a?$(e,a):e)},r.prototype.downSample=function(t,e,i,n){var a=Sl(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),e,i,n),a},r.prototype.minmaxDownSample=function(t,e){var i=Sl(this);return i._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),e),i},r.prototype.lttbDownSample=function(t,e){var i=Sl(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),i},r.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},r.prototype.getItemModel=function(t){var e=this.hostModel,i=this.getRawDataItem(t);return new Lt(i,e,e&&e.ecModel)},r.prototype.diff=function(t){var e=this;return new Qi(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(i){return yc(t,i)},function(i){return yc(e,i)})},r.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},r.prototype.setVisual=function(t,e){this._visual=this._visual||{},_l(t)?z(this._visual,t):this._visual[t]=e},r.prototype.getItemVisual=function(t,e){var i=this._itemVisuals[t],n=i&&i[e];return n??this.getVisual(e)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(t,e){var i=this._itemVisuals,n=i[t];n||(n=i[t]={});var a=n[e];return a==null&&(a=this.getVisual(e),V(a)?a=a.slice():_l(a)&&(a=z({},a)),n[e]=a),a},r.prototype.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,_l(e)?z(n,e):n[e]=i},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){_l(t)?z(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?z(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var i=this.hostModel&&this.hostModel.seriesIndex;im(i,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(i,n){i&&t&&t.call(e,i,n)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:fn(this.dimensions,this._getDimInfo,this),this.hostModel)),Yp(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var i=this[t];Q(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=i.apply(this,arguments);return e.apply(this,[n].concat(Vv(arguments)))})},r.internalField=function(){tT=function(t){var e=t._invertedIndicesMap;A(e,function(i,n){var a=t._dimInfos[n],o=a.ordinalMeta,s=t._store;if(o){i=e[n]=new U6(o.categories.length);for(var l=0;l<i.length;l++)i[l]=Qw;for(var l=0;l<s.count();l++)i[s.get(a.storeDimIndex,l)]=l}})},xl=function(t,e,i){return he(t._getCategory(e,i),null)},yc=function(t,e){var i=t._idList[e];return i==null&&t._idDimIdx!=null&&(i=xl(t,t._idDimIdx,e)),i==null&&(i=Y6+e),i},bl=function(t){return V(t)||(t=t!=null?[t]:[]),t},Sl=function(t){var e=new r(t._schema?t._schema:fn(t.dimensions,t._getDimInfo,t),t.hostModel);return Yp(e,t),e},Yp=function(t,e){A($6.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,A(X6,function(i){t[i]=it(e[i])}),t._calculationInfo=z({},e._calculationInfo)},$p=function(t,e){var i=t._nameList,n=t._idList,a=t._nameDimIdx,o=t._idDimIdx,s=i[e],l=n[e];if(s==null&&a!=null&&(i[e]=s=xl(t,a,e)),l==null&&o!=null&&(n[e]=l=xl(t,o,e)),l==null&&s!=null){var u=t._nameRepeatCount,h=u[s]=(u[s]||0)+1;l=s,h>1&&(l+="__ec__"+h),n[e]=l}}}(),r}();function Z6(r,t){return qs(r,t).dimensions}function qs(r,t){k_(r)||(r=R_(r)),t=t||{};var e=t.coordDimensions||[],i=t.dimensionsDefine||r.dimensionsDefine||[],n=Z(),a=[],o=q6(r,e,i,t.dimensionsCount),s=t.canOmitUnusedDimensions&&YP(o),l=i===r.dimensionsDefine,u=l?UP(r):WP(i),h=t.encodeDefine;!h&&t.encodeDefaulter&&(h=t.encodeDefaulter(r,o));for(var c=Z(h),f=new jI(o),v=0;v<f.length;v++)f[v]=-1;function d(M){var C=f[M];if(C<0){var D=i[M],L=et(D)?D:{name:D},I=new df,P=L.name;P!=null&&u.get(P)!=null&&(I.name=I.displayName=P),L.type!=null&&(I.type=L.type),L.displayName!=null&&(I.displayName=L.displayName);var k=a.length;return f[M]=k,I.storeDimIndex=M,a.push(I),I}return a[C]}if(!s)for(var v=0;v<o;v++)d(v);c.each(function(M,C){var D=Bt(M).slice();if(D.length===1&&!Y(D[0])&&D[0]<0){c.set(C,!1);return}var L=c.set(C,[]);A(D,function(I,P){var k=Y(I)?u.get(I):I;k!=null&&k<o&&(L[P]=k,g(d(k),C,P))})});var p=0;A(e,function(M){var C,D,L,I;if(Y(M))C=M,I={};else{I=M,C=I.name;var P=I.ordinalMeta;I.ordinalMeta=null,I=z({},I),I.ordinalMeta=P,D=I.dimsDef,L=I.otherDims,I.name=I.coordDim=I.coordDimIndex=I.dimsDef=I.otherDims=null}var k=c.get(C);if(k!==!1){if(k=Bt(k),!k.length)for(var R=0;R<(D&&D.length||1);R++){for(;p<o&&d(p).coordDim!=null;)p++;p<o&&k.push(p++)}A(k,function(N,O){var B=d(N);if(l&&I.type!=null&&(B.type=I.type),g(tt(B,I),C,O),B.name==null&&D){var G=D[O];!et(G)&&(G={name:G}),B.name=B.displayName=G.name,B.defaultTooltip=G.defaultTooltip}L&&tt(B.otherDims,L)})}});function g(M,C,D){LI.get(C)!=null?M.otherDims[C]=D:(M.coordDim=C,M.coordDimIndex=D,n.set(C,!0))}var y=t.generateCoord,m=t.generateCoordCount,_=m!=null;m=y?m||1:0;var x=y||"value";function b(M){M.name==null&&(M.name=M.coordDim)}if(s)A(a,function(M){b(M)}),a.sort(function(M,C){return M.storeDimIndex-C.storeDimIndex});else for(var S=0;S<o;S++){var w=d(S),T=w.coordDim;T==null&&(w.coordDim=K6(x,n,_),w.coordDimIndex=0,(!y||m<=0)&&(w.isExtraCoord=!0),m--),b(w),w.type==null&&(RI(r,S)===Te.Must||w.isExtraCoord&&(w.otherDims.itemName!=null||w.otherDims.seriesName!=null))&&(w.type="ordinal")}return j6(a),new GP({source:r,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function j6(r){for(var t=Z(),e=0;e<r.length;e++){var i=r[e],n=i.name,a=t.get(n)||0;a>0&&(i.name=n+(a-1)),a++,t.set(n,a)}}function q6(r,t,e,i){var n=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,i||0);return A(t,function(a){var o;et(a)&&(o=a.dimsDef)&&(n=Math.max(n,o.length))}),n}function K6(r,t,e){if(e||t.hasKey(r)){for(var i=0;t.hasKey(r+i);)i++;r+=i}return t.set(r,!0),r}var J6=function(){function r(t){this.coordSysDims=[],this.axisMap=Z(),this.categoryAxisMap=Z(),this.coordSysName=t}return r}();function Q6(r){var t=r.get("coordinateSystem"),e=new J6(t),i=tU[t];if(i)return i(r,e,e.axisMap,e.categoryAxisMap),e}var tU={cartesian2d:function(r,t,e,i){var n=r.getReferringComponents("xAxis",le).models[0],a=r.getReferringComponents("yAxis",le).models[0];t.coordSysDims=["x","y"],e.set("x",n),e.set("y",a),Wo(n)&&(i.set("x",n),t.firstCategoryDimIndex=0),Wo(a)&&(i.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,i){var n=r.getReferringComponents("singleAxis",le).models[0];t.coordSysDims=["single"],e.set("single",n),Wo(n)&&(i.set("single",n),t.firstCategoryDimIndex=0)},polar:function(r,t,e,i){var n=r.getReferringComponents("polar",le).models[0],a=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",a),e.set("angle",o),Wo(a)&&(i.set("radius",a),t.firstCategoryDimIndex=0),Wo(o)&&(i.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,i){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,i){var n=r.ecModel,a=n.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();A(a.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),h=o[l];e.set(h,u),Wo(u)&&(i.set(h,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function Wo(r){return r.get("type")==="category"}function $P(r,t,e){e=e||{};var i=e.byIndex,n=e.stackedCoordDimension,a,o,s;eU(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,h,c,f;if(A(a,function(m,_){Y(m)&&(a[_]=m={name:m}),l&&!m.isExtraCoord&&(!i&&!u&&m.ordinalMeta&&(u=m),!h&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(h=m))}),h&&!i&&!u&&(i=!0),h){c="__\0ecstackresult_"+r.id,f="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=h.coordDim,d=h.type,p=0;A(a,function(m){m.coordDim===v&&p++});var g={name:c,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(f,d),y.storeDimIndex=s.ensureCalculationDimension(c,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(a.push(g),a.push(y))}return{stackedDimension:h&&h.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:f,stackResultDimension:c}}function eU(r){return!HP(r.schema)}function tn(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function Z_(r,t){return tn(r,t)?r.getCalculationInfo("stackResultDimension"):t}function rU(r,t){var e=r.get("coordinateSystem"),i=$s.get(e),n;return t&&t.coordSysDims&&(n=F(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=nv(l)}return o})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function iU(r,t,e){var i,n;return e&&A(r,function(a,o){var s=a.coordDim,l=e.categoryAxisMap.get(s);l&&(i==null&&(i=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(n=!0)}),!n&&i!=null&&(r[i].otherDims.itemName=0),i}function Li(r,t,e){e=e||{};var i=t.getSourceManager(),n,a=!1;r?(a=!0,n=R_(r)):(n=i.getSource(),a=n.sourceFormat===Or);var o=Q6(t),s=rU(t,o),l=e.useEncodeDefaulter,u=Q(l)?l:l?ut(kI,s,t):null,h={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},c=qs(n,h),f=iU(c.dimensions,e.createInvertedIndices,o),v=a?null:i.getSharedDataStore(c),d=$P(t,{schema:c,store:v}),p=new Be(c,t);p.setCalculationInfo(d);var g=f!=null&&nU(n)?function(y,m,_,x){return x===f?_:this.defaultDimValueGetter(y,m,_,x)}:null;return p.hasItemOption=!1,p.initData(a?n:v,null,g),p}function nU(r){if(r.sourceFormat===Or){var t=aU(r.data||[]);return!V(Os(t))}}function aU(r){for(var t=0;t<r.length&&r[t]==null;)t++;return r[t]}var Ii=function(){function r(t){this._setting=t||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r}();Xv(Ii);var oU=0,Cm=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++oU}return r.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&F(i,sU);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,i=this._needCollect;if(!Y(t)&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=this._getOrCreateMap();return e=n.get(t),e==null&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=Z(this.categories))},r}();function sU(r){return et(r)&&r.value!=null?r.value:r+""}function Am(r){return r.type==="interval"||r.type==="log"}function lU(r,t,e,i){var n={},a=r[1]-r[0],o=n.interval=Q0(a/t,!0);e!=null&&o<e&&(o=n.interval=e),i!=null&&o>i&&(o=n.interval=i);var s=n.intervalPrecision=XP(o),l=n.niceTickExtent=[Qt(Math.ceil(r[0]/o)*o,s),Qt(Math.floor(r[1]/o)*o,s)];return uU(l,r),n}function Xp(r){var t=Math.pow(10,$v(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Qt(e*t)}function XP(r){return $r(r)+2}function eT(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function uU(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),eT(r,0,t),eT(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function dd(r,t){return r>=t[0]&&r<=t[1]}function pd(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function gd(r,t){return r*(t[1]-t[0])+t[0]}var yd=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;i.type="ordinal";var n=i.getSetting("ordinalMeta");return n||(n=new Cm({})),V(n)&&(n=new Cm({categories:F(n,function(a){return et(a)?a.value:a})})),i._ordinalMeta=n,i._extent=i.getSetting("extent")||[0,n.categories.length-1],i}return t.prototype.parse=function(e){return e==null?NaN:Y(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),dd(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),pd(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(gd(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],i=this._extent,n=i[0];n<=i[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,i.length);o<l;++o){var u=i[o];n[o]=u,a[u]=o}for(var h=0;o<s;++o){for(;a[h]!=null;)h++;n.push(h),a[h]=o}},t.prototype._getTickNumber=function(e){var i=this._ticksByOrdinalNumber;return i&&e>=0&&e<i.length?i[e]:e},t.prototype.getRawOrdinalNumber=function(e){var i=this._ordinalNumbersByTick;return i&&e>=0&&e<i.length?i[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var i=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[i];return n==null?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,i){this.unionExtent(e.getApproximateExtent(i))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Ii);Ii.registerClass(yd);var Aa=Qt,en=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return dd(e,this._extent)},t.prototype.normalize=function(e){return pd(e,this._extent)},t.prototype.scale=function(e){return gd(e,this._extent)},t.prototype.setExtent=function(e,i){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(i)||(n[1]=parseFloat(i))},t.prototype.unionExtent=function(e){var i=this._extent;e[0]<i[0]&&(i[0]=e[0]),e[1]>i[1]&&(i[1]=e[1]),this.setExtent(i[0],i[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=XP(e)},t.prototype.getTicks=function(e){var i=this._interval,n=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!i)return s;var l=1e4;n[0]<a[0]&&(e?s.push({value:Aa(a[0]-i,o)}):s.push({value:n[0]}));for(var u=a[0];u<=a[1]&&(s.push({value:u}),u=Aa(u+i,o),u!==s[s.length-1].value);)if(s.length>l)return[];var h=s.length?s[s.length-1].value:a[1];return n[1]>h&&(e?s.push({value:Aa(h+i,o)}):s.push({value:n[1]})),s},t.prototype.getMinorTicks=function(e){for(var i=this.getTicks(!0),n=[],a=this.getExtent(),o=1;o<i.length;o++){for(var s=i[o],l=i[o-1],u=0,h=[],c=s.value-l.value,f=c/e;u<e-1;){var v=Aa(l.value+(u+1)*f);v>a[0]&&v<a[1]&&h.push(v),u++}n.push(h)}return n},t.prototype.getLabel=function(e,i){if(e==null)return"";var n=i&&i.precision;n==null?n=$r(e.value)||0:n==="auto"&&(n=this._intervalPrecision);var a=Aa(e.value,n,!0);return T_(a)},t.prototype.calcNiceTicks=function(e,i,n){e=e||5;var a=this._extent,o=a[1]-a[0];if(isFinite(o)){o<0&&(o=-o,a.reverse());var s=lU(a,e,i,n);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var i=this._extent;if(i[0]===i[1])if(i[0]!==0){var n=Math.abs(i[0]);e.fixMax||(i[1]+=n/2),i[0]-=n/2}else i[1]=1;var a=i[1]-i[0];isFinite(a)||(i[0]=0,i[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var o=this._interval;e.fixMin||(i[0]=Aa(Math.floor(i[0]/o)*o)),e.fixMax||(i[1]=Aa(Math.ceil(i[1]/o)*o))},t.prototype.setNiceExtent=function(e,i){this._niceExtent=[e,i]},t.type="interval",t}(Ii);Ii.registerClass(en);var ZP=typeof Float32Array<"u",hU=ZP?Float32Array:Array;function yi(r){return V(r)?ZP?new Float32Array(r):r:new hU(r)}var Dm="__ec_stack_";function jP(r){return r.get("stack")||Dm+r.seriesIndex}function j_(r){return r.dim+r.index}function cU(r){var t=[],e=r.axis,i="axis0";if(e.type==="category"){for(var n=e.getBandWidth(),a=0;a<r.count;a++)t.push(tt({bandWidth:n,axisKey:i,stackId:Dm+a},r));for(var o=JP(t),s=[],a=0;a<r.count;a++){var l=o[i][Dm+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function qP(r,t){var e=[];return t.eachSeriesByType(r,function(i){ek(i)&&e.push(i)}),e}function fU(r){var t={};A(r,function(l){var u=l.coordinateSystem,h=u.getBaseAxis();if(!(h.type!=="time"&&h.type!=="value"))for(var c=l.getData(),f=h.dim+"_"+h.index,v=c.getDimensionIndex(c.mapDimension(h.dim)),d=c.getStore(),p=0,g=d.count();p<g;++p){var y=d.get(v,p);t[f]?t[f].push(y):t[f]=[y]}});var e={};for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];if(n){n.sort(function(l,u){return l-u});for(var a=null,o=1;o<n.length;++o){var s=n[o]-n[o-1];s>0&&(a=a===null?s:Math.min(a,s))}e[i]=a}}return e}function KP(r){var t=fU(r),e=[];return A(r,function(i){var n=i.coordinateSystem,a=n.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],h=Math.abs(o[1]-o[0]),c=a.scale.getExtent(),f=Math.abs(c[1]-c[0]);s=u?h/f*u:h}else{var v=i.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=U(i.get("barWidth"),s),p=U(i.get("barMaxWidth"),s),g=U(i.get("barMinWidth")||(rk(i)?.5:1),s),y=i.get("barGap"),m=i.get("barCategoryGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:j_(a),stackId:jP(i)})}),JP(e)}function JP(r){var t={};A(r,function(i,n){var a=i.axisKey,o=i.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[a]=s;var u=i.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var h=i.barWidth;h&&!l[u].width&&(l[u].width=h,h=Math.min(s.remainedWidth,h),s.remainedWidth-=h);var c=i.barMaxWidth;c&&(l[u].maxWidth=c);var f=i.barMinWidth;f&&(l[u].minWidth=f);var v=i.barGap;v!=null&&(s.gap=v);var d=i.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return A(t,function(i,n){e[n]={};var a=i.stacks,o=i.bandWidth,s=i.categoryGap;if(s==null){var l=xt(a).length;s=Math.max(35-l*4,15)+"%"}var u=U(s,o),h=U(i.gap,1),c=i.remainedWidth,f=i.autoWidthCount,v=(c-u)/(f+(f-1)*h);v=Math.max(v,0),A(a,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var x=y.width;m&&(x=Math.min(x,m)),_&&(x=Math.max(x,_)),y.width=x,c-=x+h*x,f--}else{var x=v;m&&m<x&&(x=Math.min(m,c)),_&&_>x&&(x=_),x!==v&&(y.width=x,c-=x+h*x,f--)}}),v=(c-u)/(f+(f-1)*h),v=Math.max(v,0);var d=0,p;A(a,function(y,m){y.width||(y.width=v),p=y,d+=y.width*(1+h)}),p&&(d-=p.width*h);var g=-d/2;A(a,function(y,m){e[n][m]=e[n][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+h)})}),e}function vU(r,t,e){if(r&&t){var i=r[j_(t)];return i}}function QP(r,t){var e=qP(r,t),i=KP(e);A(e,function(n){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=jP(n),u=i[j_(s)][l],h=u.offset,c=u.width;a.setLayout({bandWidth:u.bandWidth,offset:h,size:c})})}function tk(r){return{seriesType:r,plan:Xs(),reset:function(t){if(ek(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),a=i.getOtherAxis(n),o=e.getDimensionIndex(e.mapDimension(a.dim)),s=e.getDimensionIndex(e.mapDimension(n.dim)),l=t.get("showBackground",!0),u=e.mapDimension(a.dim),h=e.getCalculationInfo("stackResultDimension"),c=tn(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),f=a.isHorizontal(),v=dU(n,a),d=rk(t),p=t.get("barMinHeight")||0,g=h&&e.getDimensionIndex(h),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,x){for(var b=_.count,S=d&&yi(b*3),w=d&&l&&yi(b*3),T=d&&yi(b),M=i.master.getRect(),C=f?M.width:M.height,D,L=x.getStore(),I=0;(D=_.next())!=null;){var P=L.get(c?g:o,D),k=L.get(s,D),R=v,N=void 0;c&&(N=+P-L.get(o,D));var O=void 0,B=void 0,G=void 0,H=void 0;if(f){var W=i.dataToPoint([P,k]);if(c){var q=i.dataToPoint([N,k]);R=q[0]}O=R,B=W[1]+m,G=W[0]-R,H=y,Math.abs(G)<p&&(G=(G<0?-1:1)*p)}else{var W=i.dataToPoint([k,P]);if(c){var q=i.dataToPoint([k,N]);R=q[1]}O=W[0]+m,B=R,G=y,H=W[1]-R,Math.abs(H)<p&&(H=(H<=0?-1:1)*p)}d?(S[I]=O,S[I+1]=B,S[I+2]=f?G:H,w&&(w[I]=f?M.x:O,w[I+1]=f?B:M.y,w[I+2]=C),T[D]=D):x.setItemLayout(D,{x:O,y:B,width:G,height:H}),I+=3}d&&x.setLayout({largePoints:S,largeDataIndices:T,largeBackgroundPoints:w,valueAxisHorizontal:f})}}}}}}function ek(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function rk(r){return r.pipelineContext&&r.pipelineContext.large}function dU(r,t){var e=t.model.get("startValue");return e||(e=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?e>0?e:1:e))}var pU=function(r,t,e,i){for(;e<i;){var n=e+i>>>1;r[n][1]<t?e=n+1:i=n}return e},q_=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="time",i}return t.prototype.getLabel=function(e){var i=this.getSetting("useUTC");return _h(e.value,$S[YH(ps(this._minLevelUnit))]||$S.second,i,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,i,n){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return $H(e,i,n,o,a)},t.prototype.getTicks=function(){var e=this._interval,i=this._extent,n=[];if(!e)return n;n.push({value:i[0],level:0});var a=this.getSetting("useUTC"),o=SU(this._minLevelUnit,this._approxInterval,a,i);return n=n.concat(o),n.push({value:i[1],level:0}),n},t.prototype.calcNiceExtent=function(e){var i=this._extent;if(i[0]===i[1]&&(i[0]-=Dr,i[1]+=Dr),i[1]===-1/0&&i[0]===1/0){var n=new Date;i[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),i[0]=i[1]-Dr}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,i,n){e=e||10;var a=this._extent,o=a[1]-a[0];this._approxInterval=o/e,i!=null&&this._approxInterval<i&&(this._approxInterval=i),n!=null&&this._approxInterval>n&&(this._approxInterval=n);var s=mc.length,l=Math.min(pU(mc,this._approxInterval,0,s),s-1);this._interval=mc[l][1],this._minLevelUnit=mc[Math.max(l-1,0)][0]},t.prototype.parse=function(e){return Mt(e)?e:+pr(e)},t.prototype.contain=function(e){return dd(this.parse(e),this._extent)},t.prototype.normalize=function(e){return pd(this.parse(e),this._extent)},t.prototype.scale=function(e){return gd(e,this._extent)},t.type="time",t}(en),mc=[["second",b_],["minute",S_],["hour",gu],["quarter-day",gu*6],["half-day",gu*12],["day",Dr*1.2],["half-week",Dr*3.5],["week",Dr*7],["month",Dr*31],["quarter",Dr*95],["half-year",YS/2],["year",YS]];function gU(r,t,e,i){var n=pr(t),a=pr(e),o=function(d){return XS(n,d,i)===XS(a,d,i)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},h=function(){return u()&&o("hour")},c=function(){return h()&&o("minute")},f=function(){return c()&&o("second")},v=function(){return f()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return h();case"minute":return c();case"second":return f();case"millisecond":return v()}}function yU(r,t){return r/=Dr,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function mU(r){var t=30*Dr;return r/=t,r>6?6:r>3?3:r>2?2:1}function _U(r){return r/=gu,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function rT(r,t){return r/=t?S_:b_,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function xU(r){return Q0(r,!0)}function bU(r,t,e){var i=new Date(r);switch(ps(t)){case"year":case"month":i[_I(e)](0);case"day":i[xI(e)](1);case"hour":i[bI(e)](0);case"minute":i[SI(e)](0);case"second":i[wI(e)](0),i[TI(e)](0)}return i.getTime()}function SU(r,t,e,i){var n=1e4,a=yI,o=0;function s(C,D,L,I,P,k,R){for(var N=new Date(D),O=D,B=N[I]();O<L&&O<=i[1];)R.push({value:O}),B+=C,N[P](B),O=N.getTime();R.push({value:O,notAdd:!0})}function l(C,D,L){var I=[],P=!D.length;if(!gU(ps(C),i[0],i[1],e)){P&&(D=[{value:bU(new Date(i[0]),C,e)},{value:i[1]}]);for(var k=0;k<D.length-1;k++){var R=D[k].value,N=D[k+1].value;if(R!==N){var O=void 0,B=void 0,G=void 0,H=!1;switch(C){case"year":O=Math.max(1,Math.round(t/Dr/365)),B=w_(e),G=XH(e);break;case"half-year":case"quarter":case"month":O=mU(t),B=gs(e),G=_I(e);break;case"week":case"half-week":case"day":O=yU(t),B=id(e),G=xI(e),H=!0;break;case"half-day":case"quarter-day":case"hour":O=_U(t),B=Fu(e),G=bI(e);break;case"minute":O=rT(t,!0),B=nd(e),G=SI(e);break;case"second":O=rT(t,!1),B=ad(e),G=wI(e);break;case"millisecond":O=xU(t),B=od(e),G=TI(e);break}s(O,R,N,B,G,H,I),C==="year"&&L.length>1&&k===0&&L.unshift({value:L[0].value-O})}}for(var k=0;k<I.length;k++)L.push(I[k]);return I}}for(var u=[],h=[],c=0,f=0,v=0;v<a.length&&o++<n;++v){var d=ps(a[v]);if(UH(a[v])){l(a[v],u[u.length-1]||[],h);var p=a[v+1]?ps(a[v+1]):null;if(d!==p){if(h.length){f=c,h.sort(function(C,D){return C.value-D.value});for(var g=[],y=0;y<h.length;++y){var m=h[y].value;(y===0||h[y-1].value!==m)&&(g.push(h[y]),m>=i[0]&&m<=i[1]&&c++)}var _=(i[1]-i[0])/t;if(c>_*1.5&&f>_/1.5||(u.push(g),c>_||r===a[v]))break}h=[]}}}for(var x=Dt(F(u,function(C){return Dt(C,function(D){return D.value>=i[0]&&D.value<=i[1]&&!D.notAdd})}),function(C){return C.length>0}),b=[],S=x.length-1,v=0;v<x.length;++v)for(var w=x[v],T=0;T<w.length;++T)b.push({value:w[T].value,level:S-v});b.sort(function(C,D){return C.value-D.value});for(var M=[],v=0;v<b.length;++v)(v===0||b[v].value!==b[v-1].value)&&M.push(b[v]);return M}Ii.registerClass(q_);var iT=Ii.prototype,_u=en.prototype,wU=Qt,TU=Math.floor,MU=Math.ceil,_c=Math.pow,Vr=Math.log,K_=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new en,e._interval=0,e}return t.prototype.getTicks=function(e){var i=this._originalScale,n=this._extent,a=i.getExtent(),o=_u.getTicks.call(this,e);return F(o,function(s){var l=s.value,u=Qt(_c(this.base,l));return u=l===n[0]&&this._fixMin?xc(u,a[0]):u,u=l===n[1]&&this._fixMax?xc(u,a[1]):u,{value:u}},this)},t.prototype.setExtent=function(e,i){var n=Vr(this.base);e=Vr(Math.max(0,e))/n,i=Vr(Math.max(0,i))/n,_u.setExtent.call(this,e,i)},t.prototype.getExtent=function(){var e=this.base,i=iT.getExtent.call(this);i[0]=_c(e,i[0]),i[1]=_c(e,i[1]);var n=this._originalScale,a=n.getExtent();return this._fixMin&&(i[0]=xc(i[0],a[0])),this._fixMax&&(i[1]=xc(i[1],a[1])),i},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var i=this.base;e[0]=Vr(e[0])/Vr(i),e[1]=Vr(e[1])/Vr(i),iT.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,i){this.unionExtent(e.getApproximateExtent(i))},t.prototype.calcNiceTicks=function(e){e=e||10;var i=this._extent,n=i[1]-i[0];if(!(n===1/0||n<=0)){var a=x2(n),o=e/n*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Qt(MU(i[0]/a)*a),Qt(TU(i[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){_u.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=Vr(e)/Vr(this.base),dd(e,this._extent)},t.prototype.normalize=function(e){return e=Vr(e)/Vr(this.base),pd(e,this._extent)},t.prototype.scale=function(e){return e=gd(e,this._extent),_c(this.base,e)},t.type="log",t}(Ii),ik=K_.prototype;ik.getMinorTicks=_u.getMinorTicks;ik.getLabel=_u.getLabel;function xc(r,t){return wU(r,$r(t))}Ii.registerClass(K_);var CU=function(){function r(t,e,i){this._prepareParams(t,e,i)}return r.prototype._prepareParams=function(t,e,i){i[1]<i[0]&&(i=[NaN,NaN]),this._dataMin=i[0],this._dataMax=i[1];var n=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&e.getNeedCrossZero&&e.getNeedCrossZero();var a=e.get("min",!0);a==null&&(a=e.get("startValue",!0));var o=this._modelMinRaw=a;Q(o)?this._modelMinNum=bc(t,o({min:i[0],max:i[1]})):o!=="dataMin"&&(this._modelMinNum=bc(t,o));var s=this._modelMaxRaw=e.get("max",!0);if(Q(s)?this._modelMaxNum=bc(t,s({min:i[0],max:i[1]})):s!=="dataMax"&&(this._modelMaxNum=bc(t,s)),n)this._axisDataLen=e.getCategories().length;else{var l=e.get("boundaryGap"),u=V(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[ei(u[0],1),ei(u[1],1)]}},r.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,i=this._dataMax,n=this._axisDataLen,a=this._boundaryGapInner,o=t?null:i-e||Math.abs(e),s=this._modelMinRaw==="dataMin"?e:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?i:this._modelMaxNum,u=s!=null,h=l!=null;s==null&&(s=t?n?0:NaN:e-a[0]*o),l==null&&(l=t?n?n-1:NaN:i+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var c=Ss(s)||Ss(l)||t&&!n;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!h&&(l=0));var f=this._determinedMin,v=this._determinedMax;return f!=null&&(s=f,u=!0),v!=null&&(l=v,h=!0),{min:s,max:l,minFixed:u,maxFixed:h,isBlank:c}},r.prototype.modifyDataMinMax=function(t,e){this[DU[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var i=AU[t];this[i]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),AU={min:"_determinedMin",max:"_determinedMax"},DU={min:"_dataMin",max:"_dataMax"};function nk(r,t,e){var i=r.rawExtentInfo;return i||(i=new CU(r,t,e),r.rawExtentInfo=i,i)}function bc(r,t){return t==null?null:Ss(t)?NaN:r.parse(t)}function ak(r,t){var e=r.type,i=nk(r,t,r.getExtent()).calculate();r.setBlank(i.isBlank);var n=i.min,a=i.max,o=t.ecModel;if(o&&e==="time"){var s=qP("bar",o),l=!1;if(A(s,function(c){l=l||c.getBaseAxis()===t.axis}),l){var u=KP(s),h=LU(n,a,t,u);n=h.min,a=h.max}}return{extent:[n,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function LU(r,t,e,i){var n=e.axis.getExtent(),a=Math.abs(n[1]-n[0]),o=vU(i,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;A(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;A(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=t-r,c=1-(s+l)/a,f=h/c-h;return t+=f*(l/u),r-=f*(s/u),{min:r,max:t}}function yo(r,t){var e=t,i=ak(r,e),n=i.extent,a=e.get("splitNumber");r instanceof K_&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:a,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function bh(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new yd({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new q_({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Ii.getClass(t)||en)}}function IU(r){var t=r.scale.getExtent(),e=t[0],i=t[1];return!(e>0&&i>0||e<0&&i<0)}function Ks(r){var t=r.getLabelModel().get("formatter"),e=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(i){return function(n,a){return r.scale.getFormattedLabel(n,a,i)}}(t):Y(t)?function(i){return function(n){var a=r.scale.getLabel(n),o=i.replace("{value}",a??"");return o}}(t):Q(t)?function(i){return function(n,a){return e!=null&&(a=n.value-e),i(J_(r,n),a,n.level!=null?{level:n.level}:null)}}(t):function(i){return r.scale.getLabel(i)}}function J_(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function PU(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var i,n,a=e.getExtent();e instanceof yd?n=e.count():(i=e.getTicks(),n=i.length);var o=r.getLabelModel(),s=Ks(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var h=0;h<n;h+=u){var c=i?i[h]:{value:a[0]+h},f=s(c,h),v=o.getTextRect(f),d=kU(v,o.get("rotate")||0);l?l.union(d):l=d}return l}}function kU(r,t){var e=t*Math.PI/180,i=r.width,n=r.height,a=i*Math.abs(Math.cos(e))+Math.abs(n*Math.sin(e)),o=i*Math.abs(Math.sin(e))+Math.abs(n*Math.cos(e)),s=new ft(r.x,r.y,a,o);return s}function Q_(r){var t=r.get("interval");return t??"auto"}function ok(r){return r.type==="category"&&Q_(r.getLabelModel())===0}function av(r,t){var e={};return A(r.mapDimensionsAll(t),function(i){e[Z_(r,i)]=!0}),xt(e)}function RU(r,t,e){t&&A(av(t,e),function(i){var n=t.getApproximateExtent(i);n[0]<r[0]&&(r[0]=n[0]),n[1]>r[1]&&(r[1]=n[1])})}var Js=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}();function EU(r){return Li(null,r)}var OU={isDimensionStacked:tn,enableDataStack:$P,getStackedDimension:Z_};function NU(r,t){var e=t;t instanceof Lt||(e=new Lt(t));var i=bh(e);return i.setExtent(r[0],r[1]),yo(i,e),i}function BU(r){re(r,Js)}function zU(r,t){return t=t||{},Gt(r,null,null,t.state!=="normal")}const VU=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:Z6,createList:EU,createScale:NU,createSymbol:ae,createTextStyle:zU,dataStack:OU,enableHoverEmphasis:Bn,getECData:ot,getLayoutRect:ue,mixinAxisModelCommonMethods:BU},Symbol.toStringTag,{value:"Module"}));var FU=1e-8;function nT(r,t){return Math.abs(r-t)<FU}function Fa(r,t,e){var i=0,n=r[0];if(!n)return!1;for(var a=1;a<r.length;a++){var o=r[a];i+=zi(n[0],n[1],o[0],o[1],t,e),n=o}var s=r[0];return(!nT(n[0],s[0])||!nT(n[1],s[1]))&&(i+=zi(n[0],n[1],s[0],s[1],t,e)),i!==0}var GU=[];function Zp(r,t){for(var e=0;e<r.length;e++)we(r[e],r[e],t)}function aT(r,t,e,i){for(var n=0;n<r.length;n++){var a=r[n];i&&(a=i.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(Ui(t,t,a),Yi(e,e,a))}}function HU(r){for(var t=0,e=0,i=0,n=r.length,a=r[n-1][0],o=r[n-1][1],s=0;s<n;s++){var l=r[s][0],u=r[s][1],h=a*u-l*o;t+=h,e+=(a+l)*h,i+=(o+u)*h,a=l,o=u}return t?[e/t/3,i/t/3,t]:[r[0][0]||0,r[0][1]||0]}var sk=function(){function r(t){this.name=t}return r.prototype.setCenter=function(t){this._center=t},r.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},r}(),oT=function(){function r(t,e){this.type="polygon",this.exterior=t,this.interiors=e}return r}(),sT=function(){function r(t){this.type="linestring",this.points=t}return r}(),lk=function(r){E(t,r);function t(e,i,n){var a=r.call(this,e)||this;return a.type="geoJSON",a.geometries=i,a._center=n&&[n[0],n[1]],a}return t.prototype.calcCenter=function(){for(var e=this.geometries,i,n=0,a=0;a<e.length;a++){var o=e[a],s=o.exterior,l=s&&s.length;l>n&&(i=o,n=l)}if(i)return HU(i.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var i=this._rect;if(i&&!e)return i;var n=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return A(o,function(s){s.type==="polygon"?aT(s.exterior,n,a,e):A(s.points,function(l){aT(l,n,a,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])||(n[0]=n[1]=a[0]=a[1]=0),i=new ft(n[0],n[1],a[0]-n[0],a[1]-n[1]),e||(this._rect=i),i},t.prototype.contain=function(e){var i=this.getBoundingRect(),n=this.geometries;if(!i.contain(e[0],e[1]))return!1;t:for(var a=0,o=n.length;a<o;a++){var s=n[a];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(Fa(l,e[0],e[1])){for(var h=0;h<(u?u.length:0);h++)if(Fa(u[h],e[0],e[1]))continue t;return!0}}}return!1},t.prototype.transformTo=function(e,i,n,a){var o=this.getBoundingRect(),s=o.width/o.height;n?a||(a=n/s):n=s*a;for(var l=new ft(e,i,n,a),u=o.calculateTransform(l),h=this.geometries,c=0;c<h.length;c++){var f=h[c];f.type==="polygon"?(Zp(f.exterior,u),A(f.interiors,function(v){Zp(v,u)})):A(f.points,function(v){Zp(v,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},t.prototype.cloneShallow=function(e){e==null&&(e=this.name);var i=new t(e,this.geometries,this._center);return i._rect=this._rect,i.transformTo=null,i},t}(sk),WU=function(r){E(t,r);function t(e,i){var n=r.call(this,e)||this;return n.type="geoSVG",n._elOnlyForCalculate=i,n}return t.prototype.calcCenter=function(){for(var e=this._elOnlyForCalculate,i=e.getBoundingRect(),n=[i.x+i.width/2,i.y+i.height/2],a=hh(GU),o=e;o&&!o.isGeoSVGGraphicRoot;)bi(a,o.getLocalTransform(),a),o=o.parent;return bo(a,a),we(n,n,a),n},t}(sk);function UU(r){if(!r.UTF8Encoding)return r;var t=r,e=t.UTF8Scale;e==null&&(e=1024);var i=t.features;return A(i,function(n){var a=n.geometry,o=a.encodeOffsets,s=a.coordinates;if(o)switch(a.type){case"LineString":a.coordinates=uk(s,o,e);break;case"Polygon":jp(s,o,e);break;case"MultiLineString":jp(s,o,e);break;case"MultiPolygon":A(s,function(l,u){return jp(l,o[u],e)})}}),t.UTF8Encoding=!1,t}function jp(r,t,e){for(var i=0;i<r.length;i++)r[i]=uk(r[i],t[i],e)}function uk(r,t,e){for(var i=[],n=t[0],a=t[1],o=0;o<r.length;o+=2){var s=r.charCodeAt(o)-64,l=r.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=a,n=s,a=l,i.push([s/e,l/e])}return i}function Lm(r,t){return r=UU(r),F(Dt(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var i=e.properties,n=e.geometry,a=[];switch(n.type){case"Polygon":var o=n.coordinates;a.push(new oT(o[0],o.slice(1)));break;case"MultiPolygon":A(n.coordinates,function(l){l[0]&&a.push(new oT(l[0],l.slice(1)))});break;case"LineString":a.push(new sT([n.coordinates]));break;case"MultiLineString":a.push(new sT(n.coordinates))}var s=new lk(i[t||"name"],a,i.cp);return s.properties=i,s})}const YU=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:Ky,asc:fr,getPercentWithPrecision:CG,getPixelPrecision:K0,getPrecision:$r,getPrecisionSafe:m2,isNumeric:t_,isRadianAroundZero:Ts,linearMap:Pt,nice:Q0,numericToNumber:Mi,parseDate:pr,quantile:sf,quantity:x2,quantityExponent:$v,reformIntervals:Jy,remRadian:J0,round:Qt},Symbol.toStringTag,{value:"Module"})),$U=Object.freeze(Object.defineProperty({__proto__:null,format:_h,parse:pr},Symbol.toStringTag,{value:"Module"})),XU=Object.freeze(Object.defineProperty({__proto__:null,Arc:gh,BezierCurve:zs,BoundingRect:ft,Circle:Ai,CompoundPath:Qv,Ellipse:ph,Group:at,Image:xe,IncrementalDisplayable:nI,Line:ce,LinearGradient:Vs,Polygon:Ge,Polyline:We,RadialGradient:f_,Rect:wt,Ring:Bs,Sector:Fe,Text:St,clipPointsByRect:g_,clipRectByRect:uI,createIcon:Gs,extendPath:sI,extendShape:oI,getShapeClass:td,getTransform:zn,initProps:$t,makeImage:d_,makePath:yh,mergePath:cr,registerShape:Er,resizePath:p_,updateProps:At},Symbol.toStringTag,{value:"Module"})),ZU=Object.freeze(Object.defineProperty({__proto__:null,addCommas:T_,capitalFirst:KH,encodeHTML:Oe,formatTime:qH,formatTpl:C_,getTextRect:ZH,getTooltipMarker:MI,normalizeCssArray:To,toCamelCase:M_,truncateText:r3},Symbol.toStringTag,{value:"Module"})),jU=Object.freeze(Object.defineProperty({__proto__:null,bind:$,clone:it,curry:ut,defaults:tt,each:A,extend:z,filter:Dt,indexOf:vt,inherits:W0,isArray:V,isFunction:Q,isObject:et,isString:Y,map:F,merge:ht,reduce:Pr},Symbol.toStringTag,{value:"Module"}));var $u=Tt();function hk(r,t){var e=F(t,function(i){return r.scale.parse(i)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function qU(r){var t=r.getLabelModel().get("customValues");if(t){var e=Ks(r),i=r.scale.getExtent(),n=hk(r,t),a=Dt(n,function(o){return o>=i[0]&&o<=i[1]});return{labels:F(a,function(o){var s={value:o};return{formattedLabel:e(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?JU(r):tY(r)}function KU(r,t){var e=r.getTickModel().get("customValues");if(e){var i=r.scale.getExtent(),n=hk(r,e);return{ticks:Dt(n,function(a){return a>=i[0]&&a<=i[1]})}}return r.type==="category"?QU(r,t):{ticks:F(r.scale.getTicks(),function(a){return a.value})}}function JU(r){var t=r.getLabelModel(),e=ck(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function ck(r,t){var e=fk(r,"labels"),i=Q_(t),n=vk(e,i);if(n)return n;var a,o;return Q(i)?a=gk(r,i):(o=i==="auto"?eY(r):i,a=pk(r,o)),dk(e,i,{labels:a,labelCategoryInterval:o})}function QU(r,t){var e=fk(r,"ticks"),i=Q_(t),n=vk(e,i);if(n)return n;var a,o;if((!t.get("show")||r.scale.isBlank())&&(a=[]),Q(i))a=gk(r,i,!0);else if(i==="auto"){var s=ck(r,r.getLabelModel());o=s.labelCategoryInterval,a=F(s.labels,function(l){return l.tickValue})}else o=i,a=pk(r,o,!0);return dk(e,i,{ticks:a,tickCategoryInterval:o})}function tY(r){var t=r.scale.getTicks(),e=Ks(r);return{labels:F(t,function(i,n){return{level:i.level,formattedLabel:e(i,n),rawLabel:r.scale.getLabel(i),tickValue:i.value}})}}function fk(r,t){return $u(r)[t]||($u(r)[t]=[])}function vk(r,t){for(var e=0;e<r.length;e++)if(r[e].key===t)return r[e].value}function dk(r,t,e){return r.push({key:t,value:e}),e}function eY(r){var t=$u(r).autoInterval;return t??($u(r).autoInterval=r.calculateCategoryInterval())}function rY(r){var t=iY(r),e=Ks(r),i=(t.axisRotate-t.labelRotate)/180*Math.PI,n=r.scale,a=n.getExtent(),o=n.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),f=0,v=0;l<=a[1];l+=s){var d=0,p=0,g=fh(e({value:l}),t.font,"center","top");d=g.width*1.3,p=g.height*1.3,f=Math.max(f,d,7),v=Math.max(v,p,7)}var y=f/h,m=v/c;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),x=$u(r.model),b=r.getExtent(),S=x.lastAutoInterval,w=x.lastTickCount;return S!=null&&w!=null&&Math.abs(S-_)<=1&&Math.abs(w-o)<=1&&S>_&&x.axisExtent0===b[0]&&x.axisExtent1===b[1]?_=S:(x.lastTickCount=o,x.lastAutoInterval=_,x.axisExtent0=b[0],x.axisExtent1=b[1]),_}function iY(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 pk(r,t,e){var i=Ks(r),n=r.scale,a=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],h=n.count();u!==0&&l>1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=ok(r),f=o.get("showMinLabel")||c,v=o.get("showMaxLabel")||c;f&&u!==a[0]&&p(a[0]);for(var d=u;d<=a[1];d+=l)p(d);v&&d-l!==a[1]&&p(a[1]);function p(g){var y={value:g};s.push(e?g:{formattedLabel:i(y),rawLabel:n.getLabel(y),tickValue:g})}return s}function gk(r,t,e){var i=r.scale,n=Ks(r),a=[];return A(i.getTicks(),function(o){var s=i.getLabel(o),l=o.value;t(o.value,s)&&a.push(e?l:{formattedLabel:n(o),rawLabel:s,tickValue:l})}),a}var lT=[0,1],Br=function(){function r(t,e,i){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=i||[0,0]}return r.prototype.contain=function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return K0(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var i=this._extent;i[0]=t,i[1]=e},r.prototype.dataToCoord=function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&n.type==="ordinal"&&(i=i.slice(),uT(i,n.count())),Pt(t,lT,i,e)},r.prototype.coordToData=function(t,e){var i=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(i=i.slice(),uT(i,n.count()));var a=Pt(t,i,lT,e);return this.scale.scale(a)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=KU(this,e),n=i.ticks,a=F(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return nY(this,a,o,t.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var i=this.scale.getMinorTicks(e),n=F(i,function(a){return F(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(){return qU(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);i===0&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},r.prototype.calculateCategoryInterval=function(){return rY(this)},r}();function uT(r,t){var e=r[1]-r[0],i=t,n=e/i/2;r[0]+=n,r[1]-=n}function nY(r,t,e,i){var n=t.length;if(!r.onBand||e||!n)return;var a=r.getExtent(),o,s;if(n===1)t[0].coord=a[0],o=t[1]={coord:a[1],tickValue:t[0].tickValue};else{var l=t[n-1].tickValue-t[0].tickValue,u=(t[n-1].coord-t[0].coord)/l;A(t,function(v){v.coord-=u/2});var h=r.scale.getExtent();s=1+h[1]-t[n-1].tickValue,o={coord:t[n-1].coord+u*s,tickValue:h[1]+1},t.push(o)}var c=a[0]>a[1];f(t[0].coord,a[0])&&(i?t[0].coord=a[0]:t.shift()),i&&f(a[0],t[0].coord)&&t.unshift({coord:a[0]}),f(a[1],o.coord)&&(i?o.coord=a[1]:t.pop()),i&&f(o.coord,a[1])&&t.push({coord:a[1]});function f(v,d){return v=Qt(v),d=Qt(d),c?v>d:v<d}}function aY(r){var t=yt.extend(r);return yt.registerClass(t),t}function oY(r){var t=Yt.extend(r);return Yt.registerClass(t),t}function sY(r){var t=zt.extend(r);return zt.registerClass(t),t}function lY(r){var t=Ot.extend(r);return Ot.registerClass(t),t}var wl=Math.PI*2,Da=Ci.CMD,uY=["top","right","bottom","left"];function hY(r,t,e,i,n){var a=e.width,o=e.height;switch(r){case"top":i.set(e.x+a/2,e.y-t),n.set(0,-1);break;case"bottom":i.set(e.x+a/2,e.y+o+t),n.set(0,1);break;case"left":i.set(e.x-t,e.y+o/2),n.set(-1,0);break;case"right":i.set(e.x+a+t,e.y+o/2),n.set(1,0);break}}function cY(r,t,e,i,n,a,o,s,l){o-=r,s-=t;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var h=o*e+r,c=s*e+t;if(Math.abs(i-n)%wl<1e-4)return l[0]=h,l[1]=c,u-e;if(a){var f=i;i=vr(n),n=vr(f)}else i=vr(i),n=vr(n);i>n&&(n+=wl);var v=Math.atan2(s,o);if(v<0&&(v+=wl),v>=i&&v<=n||v+wl>=i&&v+wl<=n)return l[0]=h,l[1]=c,u-e;var d=e*Math.cos(i)+r,p=e*Math.sin(i)+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 ov(r,t,e,i,n,a,o,s){var l=n-r,u=a-t,h=e-r,c=i-t,f=Math.sqrt(h*h+c*c);h/=f,c/=f;var v=l*h+u*c,d=v/f;s&&(d=Math.min(Math.max(d,0),1)),d*=f;var p=o[0]=r+d*h,g=o[1]=t+d*c;return Math.sqrt((p-n)*(p-n)+(g-a)*(g-a))}function yk(r,t,e,i,n,a,o){e<0&&(r=r+e,e=-e),i<0&&(t=t+i,i=-i);var s=r+e,l=t+i,u=o[0]=Math.min(Math.max(n,r),s),h=o[1]=Math.min(Math.max(a,t),l);return Math.sqrt((u-n)*(u-n)+(h-a)*(h-a))}var Ur=[];function fY(r,t,e){var i=yk(t.x,t.y,t.width,t.height,r.x,r.y,Ur);return e.set(Ur[0],Ur[1]),i}function vY(r,t,e){for(var i=0,n=0,a=0,o=0,s,l,u=1/0,h=t.data,c=r.x,f=r.y,v=0;v<h.length;){var d=h[v++];v===1&&(i=h[v],n=h[v+1],a=i,o=n);var p=u;switch(d){case Da.M:a=h[v++],o=h[v++],i=a,n=o;break;case Da.L:p=ov(i,n,h[v],h[v+1],c,f,Ur,!0),i=h[v++],n=h[v++];break;case Da.C:p=JL(i,n,h[v++],h[v++],h[v++],h[v++],h[v],h[v+1],c,f,Ur),i=h[v++],n=h[v++];break;case Da.Q:p=t2(i,n,h[v++],h[v++],h[v],h[v+1],c,f,Ur),i=h[v++],n=h[v++];break;case Da.A:var g=h[v++],y=h[v++],m=h[v++],_=h[v++],x=h[v++],b=h[v++];v+=1;var S=!!(1-h[v++]);s=Math.cos(x)*m+g,l=Math.sin(x)*_+y,v<=1&&(a=s,o=l);var w=(c-g)*_/m+g;p=cY(g,y,_,x,x+b,S,w,f,Ur),i=Math.cos(x+b)*m+g,n=Math.sin(x+b)*_+y;break;case Da.R:a=i=h[v++],o=n=h[v++];var T=h[v++],M=h[v++];p=yk(a,o,T,M,c,f,Ur);break;case Da.Z:p=ov(i,n,a,o,c,f,Ur,!0),i=a,n=o;break}p<u&&(u=p,e.set(Ur[0],Ur[1]))}return u}var Xr=new ct,Ut=new ct,ie=new ct,mi=new ct,pi=new ct;function hT(r,t){if(r){var e=r.getTextGuideLine(),i=r.getTextContent();if(i&&e){var n=r.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=n.candidates||uY,s=i.getBoundingRect().clone();s.applyTransform(i.getComputedTransform());var l=1/0,u=n.anchor,h=r.getComputedTransform(),c=h&&bo([],h),f=t.get("length2")||0;u&&ie.copy(u);for(var v=0;v<o.length;v++){var d=o[v];hY(d,0,s,Xr,mi),ct.scaleAndAdd(Ut,Xr,mi,f),Ut.transform(c);var p=r.getBoundingRect(),g=u?u.distance(Ut):r instanceof _t?vY(Ut,r.path,ie):fY(Ut,p,ie);g<l&&(l=g,Ut.transform(h),ie.transform(h),ie.toArray(a[0]),Ut.toArray(a[1]),Xr.toArray(a[2]))}mk(a,t.get("minTurnAngle")),e.setShape({points:a})}}}var sv=[],Xe=new ct;function mk(r,t){if(t<=180&&t>0){t=t/180*Math.PI,Xr.fromArray(r[0]),Ut.fromArray(r[1]),ie.fromArray(r[2]),ct.sub(mi,Xr,Ut),ct.sub(pi,ie,Ut);var e=mi.len(),i=pi.len();if(!(e<.001||i<.001)){mi.scale(1/e),pi.scale(1/i);var n=mi.dot(pi),a=Math.cos(t);if(a<n){var o=ov(Ut.x,Ut.y,ie.x,ie.y,Xr.x,Xr.y,sv,!1);Xe.fromArray(sv),Xe.scaleAndAdd(pi,o/Math.tan(Math.PI-t));var s=ie.x!==Ut.x?(Xe.x-Ut.x)/(ie.x-Ut.x):(Xe.y-Ut.y)/(ie.y-Ut.y);if(isNaN(s))return;s<0?ct.copy(Xe,Ut):s>1&&ct.copy(Xe,ie),Xe.toArray(r[1])}}}}function dY(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,Xr.fromArray(r[0]),Ut.fromArray(r[1]),ie.fromArray(r[2]),ct.sub(mi,Ut,Xr),ct.sub(pi,ie,Ut);var i=mi.len(),n=pi.len();if(!(i<.001||n<.001)){mi.scale(1/i),pi.scale(1/n);var a=mi.dot(t),o=Math.cos(e);if(a<o){var s=ov(Ut.x,Ut.y,ie.x,ie.y,Xr.x,Xr.y,sv,!1);Xe.fromArray(sv);var l=Math.PI/2,u=Math.acos(pi.dot(t)),h=l+u-e;if(h>=l)ct.copy(Xe,ie);else{Xe.scaleAndAdd(pi,s/Math.tan(Math.PI/2-h));var c=ie.x!==Ut.x?(Xe.x-Ut.x)/(ie.x-Ut.x):(Xe.y-Ut.y)/(ie.y-Ut.y);if(isNaN(c))return;c<0?ct.copy(Xe,Ut):c>1&&ct.copy(Xe,ie)}Xe.toArray(r[1])}}}}function qp(r,t,e,i){var n=e==="normal",a=n?r:r.ensureState(e);a.ignore=t;var o=i.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=i.getModel("lineStyle").getLineStyle();n?r.useStyle(s):a.style=s}function pY(r,t){var e=t.smooth,i=t.points;if(i)if(r.moveTo(i[0][0],i[0][1]),e>0&&i.length>=3){var n=Wi(i[0],i[1]),a=Wi(i[1],i[2]);if(!n||!a){r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]);return}var o=Math.min(n,a)*e,s=su([],i[1],i[0],o/n),l=su([],i[1],i[2],o/a),u=su([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h<i.length;h++)r.lineTo(i[h][0],i[h][1])}function tx(r,t,e){var i=r.getTextGuideLine(),n=r.getTextContent();if(!n){i&&r.removeTextGuideLine();return}for(var a=t.normal,o=a.get("show"),s=n.ignore,l=0;l<Bu.length;l++){var u=Bu[l],h=t[u],c=u==="normal";if(h){var f=h.get("show"),v=c?s:lt(n.states[u]&&n.states[u].ignore,s);if(v||!lt(f,o)){var d=c?i:i&&i.states[u];d&&(d.ignore=!0),i&&qp(i,!0,u,h);continue}i||(i=new We,r.setTextGuideLine(i),!c&&(s||!o)&&qp(i,!0,"normal",t.normal),r.stateProxy&&(i.stateProxy=r.stateProxy)),qp(i,!1,u,h)}}if(i){tt(i.style,e),i.style.fill=null;var p=a.get("showAbove"),g=r.textGuideLineConfig=r.textGuideLineConfig||{};g.showAbove=p||!1,i.buildPath=pY}}function ex(r,t){t=t||"labelLine";for(var e={normal:r.getModel(t)},i=0;i<Ke.length;i++){var n=Ke[i];e[n]=r.getModel([n,t])}return e}function _k(r){for(var t=[],e=0;e<r.length;e++){var i=r[e];if(!i.defaultAttr.ignore){var n=i.label,a=n.getComputedTransform(),o=n.getBoundingRect(),s=!a||a[1]<1e-5&&a[2]<1e-5,l=n.style.margin||0,u=o.clone();u.applyTransform(a),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var h=s?new Wf(o,a):null;t.push({label:n,labelLine:i.labelLine,rect:u,localRect:o,obb:h,priority:i.priority,defaultAttr:i.defaultAttr,layoutOption:i.computedLayoutOption,axisAligned:s,transform:a})}}return t}function xk(r,t,e,i,n,a){var o=r.length;if(o<2)return;r.sort(function(S,w){return S.rect[t]-w.rect[t]});for(var s=0,l,u=!1,h=0;h<o;h++){var c=r[h],f=c.rect;l=f[t]-s,l<0&&(f[t]-=l,c.label[t]-=l,u=!0),s=f[t]+f[e]}var v=r[0],d=r[o-1],p,g;y(),p<0&&x(-p,.8),g<0&&x(g,.8),y(),m(p,g,1),m(g,p,-1),y(),p<0&&b(-p),g<0&&b(g);function y(){p=v.rect[t]-i,g=n-d.rect[t]-d.rect[e]}function m(S,w,T){if(S<0){var M=Math.min(w,-S);if(M>0){_(M*T,0,o);var C=M+S;C<0&&x(-C*T,1)}else x(-S*T,1)}}function _(S,w,T){S!==0&&(u=!0);for(var M=w;M<T;M++){var C=r[M],D=C.rect;D[t]+=S,C.label[t]+=S}}function x(S,w){for(var T=[],M=0,C=1;C<o;C++){var D=r[C-1].rect,L=Math.max(r[C].rect[t]-D[t]-D[e],0);T.push(L),M+=L}if(M){var I=Math.min(Math.abs(S)/M,w);if(S>0)for(var C=0;C<o-1;C++){var P=T[C]*I;_(P,0,C+1)}else for(var C=o-1;C>0;C--){var P=T[C-1]*I;_(-P,C,o)}}}function b(S){var w=S<0?-1:1;S=Math.abs(S);for(var T=Math.ceil(S/(o-1)),M=0;M<o-1;M++)if(w>0?_(T,0,M+1):_(-T,o-M-1,o),S-=T,S<=0)return}return u}function gY(r,t,e,i){return xk(r,"x","width",t,e)}function bk(r,t,e,i){return xk(r,"y","height",t,e)}function Sk(r){var t=[];r.sort(function(p,g){return g.priority-p.priority});var e=new ft(0,0,0,0);function i(p){if(!p.ignore){var g=p.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}p.ignore=!0}for(var n=0;n<r.length;n++){var a=r[n],o=a.axisAligned,s=a.localRect,l=a.transform,u=a.label,h=a.labelLine;e.copy(a.rect),e.width-=.1,e.height-=.1,e.x+=.05,e.y+=.05;for(var c=a.obb,f=!1,v=0;v<t.length;v++){var d=t[v];if(e.intersect(d.rect)){if(o&&d.axisAligned){f=!0;break}if(d.obb||(d.obb=new Wf(d.localRect,d.transform)),c||(c=new Wf(s,l)),c.intersect(d.obb)){f=!0;break}}}f?(i(u),h&&i(h)):(u.attr("ignore",a.defaultAttr.ignore),h&&h.attr("ignore",a.defaultAttr.labelGuideIgnore),t.push(a))}}function yY(r){if(r){for(var t=[],e=0;e<r.length;e++)t.push(r[e].slice());return t}}function mY(r,t){var e=r.label,i=t&&t.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:e.style.align,verticalAlign:e.style.verticalAlign,labelLinePoints:yY(i&&i.shape.points)}}var cT=["align","verticalAlign","width","height","fontSize"],Ue=new $i,Kp=Tt(),_Y=Tt();function Sc(r,t,e){for(var i=0;i<e.length;i++){var n=e[i];t[n]!=null&&(r[n]=t[n])}}var wc=["x","y","rotation"],xY=function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(t,e,i,n,a){var o=n.style,s=n.__hostTarget,l=s.textConfig||{},u=n.getComputedTransform(),h=n.getBoundingRect().plain();ft.applyTransform(h,h,u),u?Ue.setLocalTransform(u):(Ue.x=Ue.y=Ue.rotation=Ue.originX=Ue.originY=0,Ue.scaleX=Ue.scaleY=1),Ue.rotation=vr(Ue.rotation);var c=n.__hostTarget,f;if(c){f=c.getBoundingRect().plain();var v=c.getComputedTransform();ft.applyTransform(f,f,v)}var d=f&&c.getTextGuideLine();this._labelList.push({label:n,labelLine:d,seriesModel:i,dataIndex:t,dataType:e,layoutOption:a,computedLayoutOption:null,rect:h,hostRect:f,priority:f?f.width*f.height:0,defaultAttr:{ignore:n.ignore,labelGuideIgnore:d&&d.ignore,x:Ue.x,y:Ue.y,scaleX:Ue.scaleX,scaleY:Ue.scaleY,rotation:Ue.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:n.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var i=t.__model,n=i.get("labelLayout");(Q(n)||xt(n).length)&&t.group.traverse(function(a){if(a.ignore)return!0;var o=a.getTextContent(),s=ot(a);o&&!o.disableLabelLayout&&e._addLabel(s.dataIndex,s.dataType,i,o,n)})},r.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),i=t.getHeight();function n(_,x){return function(){hT(_,x)}}for(var a=0;a<this._labelList.length;a++){var o=this._labelList[a],s=o.label,l=s.__hostTarget,u=o.defaultAttr,h=void 0;Q(o.layoutOption)?h=o.layoutOption(mY(o,l)):h=o.layoutOption,h=h||{},o.computedLayoutOption=h;var c=Math.PI/180;l&&l.setTextConfig({local:!1,position:h.x!=null||h.y!=null?null:u.attachedPos,rotation:h.rotate!=null?h.rotate*c:u.attachedRot,offset:[h.dx||0,h.dy||0]});var f=!1;if(h.x!=null?(s.x=U(h.x,e),s.setStyle("x",0),f=!0):(s.x=u.x,s.setStyle("x",u.style.x)),h.y!=null?(s.y=U(h.y,i),s.setStyle("y",0),f=!0):(s.y=u.y,s.setStyle("y",u.style.y)),h.labelLinePoints){var v=l.getTextGuideLine();v&&(v.setShape({points:h.labelLinePoints}),f=!1)}var d=Kp(s);d.needsUpdateLabelLine=f,s.rotation=h.rotate!=null?h.rotate*c:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var p=0;p<cT.length;p++){var g=cT[p];s.setStyle(g,h[g]!=null?h[g]:u.style[g])}if(h.draggable){if(s.draggable=!0,s.cursor="move",l){var y=o.seriesModel;if(o.dataIndex!=null){var m=o.seriesModel.getData(o.dataType);y=m.getItemModel(o.dataIndex)}s.on("drag",n(l,y.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(t){var e=t.getWidth(),i=t.getHeight(),n=_k(this._labelList),a=Dt(n,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=Dt(n,function(l){return l.layoutOption.moveOverlap==="shiftY"});gY(a,0,e),bk(o,0,i);var s=Dt(n,function(l){return l.layoutOption.hideOverlap});Sk(s)},r.prototype.processLabelsOverall=function(){var t=this;A(this._chartViewList,function(e){var i=e.__model,n=e.ignoreLabelLineUpdate,a=i.isAnimationEnabled();e.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!n,l=o.getTextContent();!s&&l&&(s=Kp(l).needsUpdateLabelLine),s&&t._updateLabelLine(o,i),a&&t._animateLabels(o,i)})})},r.prototype._updateLabelLine=function(t,e){var i=t.getTextContent(),n=ot(t),a=n.dataIndex;if(i&&a!=null){var o=e.getData(n.dataType),s=o.getItemModel(a),l={},u=o.getItemVisual(a,"style");if(u){var h=o.getVisual("drawType");l.stroke=u[h]}var c=s.getModel("labelLine");tx(t,ex(s),l),hT(t,c)}},r.prototype._animateLabels=function(t,e){var i=t.getTextContent(),n=t.getTextGuideLine();if(i&&(t.forceLabelAnimation||!i.ignore&&!i.invisible&&!t.disableLabelAnimation&&!vs(t))){var a=Kp(i),o=a.oldLayout,s=ot(t),l=s.dataIndex,u={x:i.x,y:i.y,rotation:i.rotation},h=e.getData(s.dataType);if(o){i.attr(o);var f=t.prevStates;f&&(vt(f,"select")>=0&&i.attr(a.oldLayoutSelect),vt(f,"emphasis")>=0&&i.attr(a.oldLayoutEmphasis)),At(i,u,e,l)}else if(i.attr(u),!Hs(i).valueAnimation){var c=lt(i.style.opacity,1);i.style.opacity=0,$t(i,{style:{opacity:c}},e,l)}if(a.oldLayout=u,i.states.select){var v=a.oldLayoutSelect={};Sc(v,u,wc),Sc(v,i.states.select,wc)}if(i.states.emphasis){var d=a.oldLayoutEmphasis={};Sc(d,u,wc),Sc(d,i.states.emphasis,wc)}vI(i,l,h,e,e)}if(n&&!n.ignore&&!n.invisible){var a=_Y(n),o=a.oldLayout,p={points:n.shape.points};o?(n.attr({shape:o}),At(n,{shape:p},e)):(n.setShape(p),n.style.strokePercent=0,$t(n,{style:{strokePercent:1}},e)),a.oldLayout=p}},r}(),Jp=Tt();function bY(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,i){var n=Jp(e).labelManager;n||(n=Jp(e).labelManager=new xY),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,i){var n=Jp(e).labelManager;i.updatedSeries.forEach(function(a){n.addLabelsOfSeries(e.getViewOfSeriesModel(a))}),n.updateLayoutConfig(e),n.layout(e),n.processLabelsOverall()})}var Qp=Math.sin,tg=Math.cos,wk=Math.PI,La=Math.PI*2,SY=180/wk,Tk=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,i,n,a,o){this._add("C",t,e,i,n,a,o)},r.prototype.quadraticCurveTo=function(t,e,i,n){this._add("Q",t,e,i,n)},r.prototype.arc=function(t,e,i,n,a,o){this.ellipse(t,e,i,i,0,n,a,o)},r.prototype.ellipse=function(t,e,i,n,a,o,s,l){var u=s-o,h=!l,c=Math.abs(u),f=In(c-La)||(h?u>=La:-u>=La),v=u>0?u%La:u%La+La,d=!1;f?d=!0:In(c)?d=!1:d=v>=wk==!!h;var p=t+i*tg(o),g=e+n*Qp(o);this._start&&this._add("M",p,g);var y=Math.round(a*SY);if(f){var m=1/this._p,_=(h?1:-1)*(La-m);this._add("A",i,n,y,1,+h,t+i*tg(o+_),e+n*Qp(o+_)),m>.01&&this._add("A",i,n,y,0,+h,p,g)}else{var x=t+i*tg(s),b=e+n*Qp(s);this._add("A",i,n,y,+d,+h,x,b)}},r.prototype.rect=function(t,e,i,n){this._add("M",t,e),this._add("l",i,0),this._add("l",0,n),this._add("l",-i,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(t,e,i,n,a,o,s,l,u){for(var h=[],c=this._p,f=1;f<arguments.length;f++){var v=arguments[f];if(isNaN(v)){this._invalid=!0;return}h.push(Math.round(v*c)/c)}this._d.push(t+h.join(" ")),this._start=t==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r}(),rx="none",wY=Math.round;function TY(r){var t=r.fill;return t!=null&&t!==rx}function MY(r){var t=r.stroke;return t!=null&&t!==rx}var Im=["lineCap","miterLimit","lineJoin"],CY=F(Im,function(r){return"stroke-"+r.toLowerCase()});function AY(r,t,e,i){var n=t.opacity==null?1:t.opacity;if(e instanceof xe){r("opacity",n);return}if(TY(t)){var a=Ou(t.fill);r("fill",a.color);var o=t.fillOpacity!=null?t.fillOpacity*a.opacity*n:a.opacity*n;o<1&&r("fill-opacity",o)}else r("fill",rx);if(MY(t)){var s=Ou(t.stroke);r("stroke",s.color);var l=t.strokeNoScale?e.getLineScale():1,u=l?(t.lineWidth||0)/l:0,h=t.strokeOpacity!=null?t.strokeOpacity*s.opacity*n:s.opacity*n,c=t.strokeFirst;if(u!==1&&r("stroke-width",u),c&&r("paint-order",c?"stroke":"fill"),h<1&&r("stroke-opacity",h),t.lineDash){var f=B_(e),v=f[0],d=f[1];v&&(d=wY(d||0),r("stroke-dasharray",v.join(",")),(d||i)&&r("stroke-dashoffset",d))}for(var p=0;p<Im.length;p++){var g=Im[p];if(t[g]!==Gf[g]){var y=t[g]||Gf[g];y&&r(CY[p],y)}}}}var Mk="http://www.w3.org/2000/svg",Ck="http://www.w3.org/1999/xlink",DY="http://www.w3.org/2000/xmlns/",LY="http://www.w3.org/XML/1998/namespace",fT="ecmeta_";function Ak(r){return document.createElementNS(Mk,r)}function ge(r,t,e,i,n){return{tag:r,attrs:e||{},children:i,text:n,key:t}}function IY(r,t){var e=[];if(t)for(var i in t){var n=t[i],a=i;n!==!1&&(n!==!0&&n!=null&&(a+='="'+n+'"'),e.push(a))}return"<"+r+" "+e.join(" ")+">"}function PY(r){return"</"+r+">"}function ix(r,t){t=t||{};var e=t.newline?`
|
||
`:"";function i(n){var a=n.children,o=n.tag,s=n.attrs,l=n.text;return IY(o,s)+(o!=="style"?Oe(l):l||"")+(a?""+e+F(a,function(u){return i(u)}).join(e)+e:"")+PY(o)}return i(r)}function kY(r,t,e){e=e||{};var i=e.newline?`
|
||
`:"",n=" {"+i,a=i+"}",o=F(xt(r),function(l){return l+n+F(xt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(i)+a}).join(i),s=F(xt(t),function(l){return"@keyframes "+l+n+F(xt(t[l]),function(u){return u+n+F(xt(t[l][u]),function(h){var c=t[l][u][h];return h==="d"&&(c='path("'+c+'")'),h+":"+c+";"}).join(i)+a}).join(i)+a}).join(i);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(i)}function Pm(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function vT(r,t,e,i){return ge("svg","root",{width:r,height:t,xmlns:Mk,"xmlns:xlink":Ck,version:"1.1",baseProfile:"full",viewBox:i?"0 0 "+r+" "+t:!1},e)}var RY=0;function Dk(){return RY++}var dT={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Ea="transform-origin";function EY(r,t,e){var i=z({},r.shape);z(i,t),r.buildPath(e,i);var n=new Tk;return n.reset(s2(r)),e.rebuildPath(n,1),n.generateStr(),n.getStr()}function OY(r,t){var e=t.originX,i=t.originY;(e||i)&&(r[Ea]=e+"px "+i+"px")}var NY={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Lk(r,t){var e=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[e]=r,e}function BY(r,t,e){var i=r.shape.paths,n={},a,o;if(A(i,function(l){var u=Pm(e.zrId);u.animation=!0,md(l,{},u,!0);var h=u.cssAnims,c=u.cssNodes,f=xt(h),v=f.length;if(v){o=f[v-1];var d=h[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&&(a=m)}}}),!!a){t.d=!1;var s=Lk(n,e);return a.replace(o,s)}}function pT(r){return Y(r)?dT[r]?"cubic-bezier("+dT[r]+")":X0(r)?r:"":""}function md(r,t,e,i){var n=r.animators,a=n.length,o=[];if(r instanceof Qv){var s=BY(r,t,e);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var h=n[u],c=[h.getMaxTime()/1e3+"s"],f=pT(h.getClip().easing),v=h.getDelay();f?c.push(f):c.push("linear"),v&&c.push(v/1e3+"s"),h.getLoop()&&c.push("infinite");var d=c.join(" ");l[d]=l[d]||[d,[]],l[d][1].push(h)}function p(m){var _=m[1],x=_.length,b={},S={},w={},T="animation-timing-function";function M(dt,rt,gt){for(var J=dt.getTracks(),st=dt.getMaxTime(),Ht=0;Ht<J.length;Ht++){var Et=J[Ht];if(Et.needsAnimate()){var Vt=Et.keyframes,Xt=Et.propName;if(gt&&(Xt=gt(Xt)),Xt)for(var fe=0;fe<Vt.length;fe++){var sr=Vt[fe],Je=Math.round(sr.time/st*100)+"%",ia=pT(sr.easing),sn=sr.rawValue;(Y(sn)||Mt(sn))&&(rt[Je]=rt[Je]||{},rt[Je][Xt]=sr.rawValue,ia&&(rt[Je][T]=ia))}}}}for(var C=0;C<x;C++){var D=_[C],L=D.targetName;L?L==="shape"&&M(D,S):!i&&M(D,b)}for(var I in b){var P={};f2(P,r),z(P,b[I]);var k=l2(P),R=b[I][T];w[I]=k?{transform:k}:{},OY(w[I],P),R&&(w[I][T]=R)}var N,O=!0;for(var I in S){w[I]=w[I]||{};var B=!N,R=S[I][T];B&&(N=new Ci);var G=N.len();N.reset(),w[I].d=EY(r,S[I],N);var H=N.len();if(!B&&G!==H){O=!1;break}R&&(w[I][T]=R)}if(!O)for(var I in w)delete w[I].d;if(!i)for(var C=0;C<x;C++){var D=_[C],L=D.targetName;L==="style"&&M(D,w,function(J){return NY[J]})}for(var W=xt(w),q=!0,K,C=1;C<W.length;C++){var nt=W[C-1],Ct=W[C];if(w[nt][Ea]!==w[Ct][Ea]){q=!1;break}K=w[nt][Ea]}if(q&&K){for(var I in w)w[I][Ea]&&delete w[I][Ea];t[Ea]=K}if(Dt(W,function(dt){return xt(w[dt]).length>0}).length){var te=Lk(w,e);return te+" "+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-"+Dk();e.cssNodes["."+y]={animation:o.join(",")},t.class=y}}function zY(r,t,e){if(!r.ignore)if(r.isSilent()){var i={"pointer-events":"none"};gT(i,t,e)}else{var n=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},a=n.fill;if(!a){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&&(a=Bf(l))}var u=n.lineWidth;if(u){var h=!n.strokeNoScale&&r.transform?r.transform[0]:1;u=u/h}var i={cursor:"pointer"};a&&(i.fill=a),n.stroke&&(i.stroke=n.stroke),u&&(i["stroke-width"]=u),gT(i,t,e)}}function gT(r,t,e,i){var n=JSON.stringify(r),a=e.cssStyleCache[n];a||(a=e.zrId+"-cls-"+Dk(),e.cssStyleCache[n]=a,e.cssNodes["."+a+":hover"]=r),t.class=t.class?t.class+" "+a:a}var Xu=Math.round;function Ik(r){return r&&Y(r.src)}function Pk(r){return r&&Q(r.toDataURL)}function nx(r,t,e,i){AY(function(n,a){var o=n==="fill"||n==="stroke";o&&o2(a)?Rk(t,r,n,i):o&&j0(a)?Ek(e,r,n,i):r[n]=a,o&&i.ssr&&a==="none"&&(r["pointer-events"]="visible")},t,e,!1),YY(e,r,i)}function ax(r,t){var e=p2(t);e&&(e.each(function(i,n){i!=null&&(r[(fT+n).toLowerCase()]=i+"")}),t.isSilent()&&(r[fT+"silent"]="true"))}function yT(r){return In(r[0]-1)&&In(r[1])&&In(r[2])&&In(r[3]-1)}function VY(r){return In(r[4])&&In(r[5])}function ox(r,t,e){if(t&&!(VY(t)&&yT(t))){var i=1e4;r.transform=yT(t)?"translate("+Xu(t[4]*i)/i+" "+Xu(t[5]*i)/i+")":UF(t)}}function mT(r,t,e){for(var i=r.points,n=[],a=0;a<i.length;a++)n.push(Xu(i[a][0]*e)/e),n.push(Xu(i[a][1]*e)/e);t.points=n.join(" ")}function _T(r){return!r.smooth}function FY(r){var t=F(r,function(e){return typeof e=="string"?[e,e]:e});return function(e,i,n){for(var a=0;a<t.length;a++){var o=t[a],s=e[o[0]];s!=null&&(i[o[1]]=Xu(s*n)/n)}}}var GY={circle:[FY(["cx","cy","r"])],polyline:[mT,_T],polygon:[mT,_T]};function HY(r){for(var t=r.animators,e=0;e<t.length;e++)if(t[e].targetName==="shape")return!0;return!1}function kk(r,t){var e=r.style,i=r.shape,n=GY[r.type],a={},o=t.animation,s="path",l=r.style.strokePercent,u=t.compress&&s2(r)||4;if(n&&!t.willUpdate&&!(n[1]&&!n[1](i))&&!(o&&HY(r))&&!(l<1)){s=r.type;var h=Math.pow(10,u);n[0](i,a,h)}else{var c=!r.path||r.shapeChanged();r.path||r.createPathProxy();var f=r.path;c&&(f.beginPath(),r.buildPath(f,r.shape),r.pathUpdated());var v=f.getVersion(),d=r,p=d.__svgPathBuilder;(d.__svgPathVersion!==v||!p||l!==d.__svgPathStrokePercent)&&(p||(p=d.__svgPathBuilder=new Tk),p.reset(u),f.rebuildPath(p,l),p.generateStr(),d.__svgPathVersion=v,d.__svgPathStrokePercent=l),a.d=p.getStr()}return ox(a,r.transform),nx(a,e,r,t),ax(a,r),t.animation&&md(r,a,t),t.emphasis&&zY(r,a,t),ge(s,r.id+"",a)}function WY(r,t){var e=r.style,i=e.image;if(i&&!Y(i)&&(Ik(i)?i=i.src:Pk(i)&&(i=i.toDataURL())),!!i){var n=e.x||0,a=e.y||0,o=e.width,s=e.height,l={href:i,width:o,height:s};return n&&(l.x=n),a&&(l.y=a),ox(l,r.transform),nx(l,e,r,t),ax(l,r),t.animation&&md(r,l,t),ge("image",r.id+"",l)}}function UY(r,t){var e=r.style,i=e.text;if(i!=null&&(i+=""),!(!i||isNaN(e.x)||isNaN(e.y))){var n=e.font||Yn,a=e.x||0,o=$F(e.y||0,Uv(n),e.textBaseline),s=YF[e.textAlign]||e.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(F2(e)){var u="",h=e.fontStyle,c=V2(e.fontSize);if(!parseFloat(c))return;var f=e.fontFamily||PL,v=e.fontWeight;u+="font-size:"+c+";font-family:"+f+";",h&&h!=="normal"&&(u+="font-style:"+h+";"),v&&v!=="normal"&&(u+="font-weight:"+v+";"),l.style=u}else l.style="font: "+n;return i.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),o&&(l.y=o),ox(l,r.transform),nx(l,e,r,t),ax(l,r),t.animation&&md(r,l,t),ge("text",r.id+"",l,void 0,i)}}function xT(r,t){if(r instanceof _t)return kk(r,t);if(r instanceof xe)return WY(r,t);if(r instanceof Ms)return UY(r,t)}function YY(r,t,e){var i=r.style;if(XF(i)){var n=ZF(r),a=e.shadowCache,o=a[n];if(!o){var s=r.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var h=i.shadowOffsetX||0,c=i.shadowOffsetY||0,f=i.shadowBlur,v=Ou(i.shadowColor),d=v.opacity,p=v.color,g=f/2/l,y=f/2/u,m=g+" "+y;o=e.zrId+"-s"+e.shadowIdx++,e.defs[o]=ge("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[ge("feDropShadow","",{dx:h/l,dy:c/u,stdDeviation:m,"flood-color":p,"flood-opacity":d})]),a[n]=o}t.filter=Wv(o)}}function Rk(r,t,e,i){var n=r[e],a,o={gradientUnits:n.global?"userSpaceOnUse":"objectBoundingBox"};if(n2(n))a="linearGradient",o.x1=n.x,o.y1=n.y,o.x2=n.x2,o.y2=n.y2;else if(a2(n))a="radialGradient",o.cx=lt(n.x,.5),o.cy=lt(n.y,.5),o.r=lt(n.r,.5);else return;for(var s=n.colorStops,l=[],u=0,h=s.length;u<h;++u){var c=Fy(s[u].offset)*100+"%",f=s[u].color,v=Ou(f),d=v.color,p=v.opacity,g={offset:c};g["stop-color"]=d,p<1&&(g["stop-opacity"]=p),l.push(ge("stop",u+"",g))}var y=ge(a,"",o,l),m=ix(y),_=i.gradientCache,x=_[m];x||(x=i.zrId+"-g"+i.gradientIdx++,_[m]=x,o.id=x,i.defs[x]=ge(a,x,o,l)),t[e]=Wv(x)}function Ek(r,t,e,i){var n=r.style[e],a=r.getBoundingRect(),o={},s=n.repeat,l=s==="no-repeat",u=s==="repeat-x",h=s==="repeat-y",c;if(i2(n)){var f=n.imageWidth,v=n.imageHeight,d=void 0,p=n.image;if(Y(p)?d=p:Ik(p)?d=p.src:Pk(p)&&(d=p.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Ve(f,g),Ve(v,g)}else if(f==null||v==null){var y=function(C,D){if(C){var L=C.elm,I=f||D.width,P=v||D.height;C.tag==="pattern"&&(u?(P=1,I/=a.width):h&&(I=1,P/=a.height)),C.attrs.width=I,C.attrs.height=P,L&&(L.setAttribute("width",I),L.setAttribute("height",P))}},m=n_(d,null,r,function(C){l||y(S,C),y(c,C)});m&&m.width&&m.height&&(f=f||m.width,v=v||m.height)}c=ge("image","img",{href:d,width:f,height:v}),o.width=f,o.height=v}else n.svgElement&&(c=it(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(c){var _,x;l?_=x=1:u?(x=1,_=o.width/a.width):h?(_=1,x=o.height/a.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),x!=null&&!isNaN(x)&&(o.height=x);var b=l2(n);b&&(o.patternTransform=b);var S=ge("pattern","",o,[c]),w=ix(S),T=i.patternCache,M=T[w];M||(M=i.zrId+"-p"+i.patternIdx++,T[w]=M,o.id=M,S=i.defs[M]=ge("pattern",M,o,[c])),t[e]=Wv(M)}}function $Y(r,t,e){var i=e.clipPathCache,n=e.defs,a=i[r.id];if(!a){a=e.zrId+"-c"+e.clipPathIdx++;var o={id:a};i[r.id]=a,n[a]=ge("clipPath",a,o,[kk(r,e)])}t["clip-path"]=Wv(a)}function bT(r){return document.createTextNode(r)}function Ga(r,t,e){r.insertBefore(t,e)}function ST(r,t){r.removeChild(t)}function wT(r,t){r.appendChild(t)}function Ok(r){return r.parentNode}function Nk(r){return r.nextSibling}function eg(r,t){r.textContent=t}var TT=58,XY=120,ZY=ge("","");function km(r){return r===void 0}function vi(r){return r!==void 0}function jY(r,t,e){for(var i={},n=t;n<=e;++n){var a=r[n].key;a!==void 0&&(i[a]=n)}return i}function Xl(r,t){var e=r.key===t.key,i=r.tag===t.tag;return i&&e}function Zu(r){var t,e=r.children,i=r.tag;if(vi(i)){var n=r.elm=Ak(i);if(sx(ZY,r),V(e))for(t=0;t<e.length;++t){var a=e[t];a!=null&&wT(n,Zu(a))}else vi(r.text)&&!et(r.text)&&wT(n,bT(r.text))}else r.elm=bT(r.text);return r.elm}function Bk(r,t,e,i,n){for(;i<=n;++i){var a=e[i];a!=null&&Ga(r,Zu(a),t)}}function lv(r,t,e,i){for(;e<=i;++e){var n=t[e];if(n!=null)if(vi(n.tag)){var a=Ok(n.elm);ST(a,n.elm)}else ST(r,n.elm)}}function sx(r,t){var e,i=t.elm,n=r&&r.attrs||{},a=t.attrs||{};if(n!==a){for(e in a){var o=a[e],s=n[e];s!==o&&(o===!0?i.setAttribute(e,""):o===!1?i.removeAttribute(e):e==="style"?i.style.cssText=o:e.charCodeAt(0)!==XY?i.setAttribute(e,o):e==="xmlns:xlink"||e==="xmlns"?i.setAttributeNS(DY,e,o):e.charCodeAt(3)===TT?i.setAttributeNS(LY,e,o):e.charCodeAt(5)===TT?i.setAttributeNS(Ck,e,o):i.setAttribute(e,o))}for(e in n)e in a||i.removeAttribute(e)}}function qY(r,t,e){for(var i=0,n=0,a=t.length-1,o=t[0],s=t[a],l=e.length-1,u=e[0],h=e[l],c,f,v,d;i<=a&&n<=l;)o==null?o=t[++i]:s==null?s=t[--a]:u==null?u=e[++n]:h==null?h=e[--l]:Xl(o,u)?(rs(o,u),o=t[++i],u=e[++n]):Xl(s,h)?(rs(s,h),s=t[--a],h=e[--l]):Xl(o,h)?(rs(o,h),Ga(r,o.elm,Nk(s.elm)),o=t[++i],h=e[--l]):Xl(s,u)?(rs(s,u),Ga(r,s.elm,o.elm),s=t[--a],u=e[++n]):(km(c)&&(c=jY(t,i,a)),f=c[u.key],km(f)?Ga(r,Zu(u),o.elm):(v=t[f],v.tag!==u.tag?Ga(r,Zu(u),o.elm):(rs(v,u),t[f]=void 0,Ga(r,v.elm,o.elm))),u=e[++n]);(i<=a||n<=l)&&(i>a?(d=e[l+1]==null?null:e[l+1].elm,Bk(r,d,e,n,l)):lv(r,t,i,a))}function rs(r,t){var e=t.elm=r.elm,i=r.children,n=t.children;r!==t&&(sx(r,t),km(t.text)?vi(i)&&vi(n)?i!==n&&qY(e,i,n):vi(n)?(vi(r.text)&&eg(e,""),Bk(e,null,n,0,n.length-1)):vi(i)?lv(e,i,0,i.length-1):vi(r.text)&&eg(e,""):r.text!==t.text&&(vi(i)&&lv(e,i,0,i.length-1),eg(e,t.text)))}function KY(r,t){if(Xl(r,t))rs(r,t);else{var e=r.elm,i=Ok(e);Zu(t),i!==null&&(Ga(i,t.elm,Nk(e)),lv(i,[r],0,0))}return t}var JY=0,QY=function(){function r(t,e,i){if(this.type="svg",this.refreshHover=MT(),this.configLayer=MT(),this.storage=e,this._opts=i=z({},i),this.root=t,this._id="zr"+JY++,this._oldVNode=vT(i.width,i.height),t&&!i.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=Ak("svg");sx(null,this._oldVNode),n.appendChild(a),t.appendChild(n)}this.resize(i.width,i.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",KY(this._oldVNode,t),this._oldVNode=t}},r.prototype.renderOneToVNode=function(t){return xT(t,Pm(this._id))},r.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),i=this._width,n=this._height,a=Pm(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress,a.emphasis=t.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=t8(i,n,this._backgroundColor,a);s&&o.push(s);var l=t.compress?null:this._mainVNode=ge("g","main",{},[]);this._paintList(e,a,l?l.children:o),l&&o.push(l);var u=F(xt(a.defs),function(f){return a.defs[f]});if(u.length&&o.push(ge("defs","defs",{},u)),t.animation){var h=kY(a.cssNodes,a.cssAnims,{newline:!0});if(h){var c=ge("style","stl",{},[],h);o.push(c)}}return vT(i,n,o,t.useViewBox)},r.prototype.renderToString=function(t){return t=t||{},ix(this.renderToVNode({animation:lt(t.cssAnimation,!0),emphasis:lt(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:lt(t.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(t,e,i){for(var n=t.length,a=[],o=0,s,l,u=0,h=0;h<n;h++){var c=t[h];if(!c.invisible){var f=c.__clipPaths,v=f&&f.length||0,d=l&&l.length||0,p=void 0;for(p=Math.max(v-1,d-1);p>=0&&!(f&&l&&f[p]===l[p]);p--);for(var g=d-1;g>p;g--)o--,s=a[o-1];for(var y=p+1;y<v;y++){var m={};$Y(f[y],m,e);var _=ge("g","clip-g-"+u++,m,[]);(s?s.children:i).push(_),a[o++]=_,s=_}l=f;var x=xT(c,e);x&&(s?s.children:i).push(x)}}},r.prototype.resize=function(t,e){var i=this._opts,n=this.root,a=this._viewport;if(t!=null&&(i.width=t),e!=null&&(i.height=e),n&&a&&(a.style.display="none",t=ss(n,0,i),e=ss(n,1,i),a.style.display=""),this._width!==t||this._height!==e){if(this._width=t,this._height=e,a){var o=a.style;o.width=t+"px",o.height=e+"px"}if(j0(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",t),s.setAttribute("height",e));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",t),l.setAttribute("height",e))}}},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},r.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},r.prototype.toDataURL=function(t){var e=this.renderToString(),i="data:image/svg+xml;";return t?(e=qF(e),e&&i+"base64,"+e):i+"charset=UTF-8,"+encodeURIComponent(e)},r}();function MT(r){return function(){}}function t8(r,t,e,i){var n;if(e&&e!=="none")if(n=ge("rect","bg",{width:r,height:t,x:"0",y:"0"}),o2(e))Rk({fill:e},n.attrs,"fill",i);else if(j0(e))Ek({style:{fill:e},dirty:ee,getBoundingRect:function(){return{width:r,height:t}}},n.attrs,"fill",i);else{var a=Ou(e),o=a.color,s=a.opacity;n.attrs.fill=o,s<1&&(n.attrs["fill-opacity"]=s)}return n}function e8(r){r.registerPainter("svg",QY)}function CT(r,t,e){var i=Qr.createCanvas(),n=t.getWidth(),a=t.getHeight(),o=i.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=n+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",r)),i.width=n*e,i.height=a*e,i}var rg=function(r){E(t,r);function t(e,i,n){var a=r.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;n=n||Vf,typeof e=="string"?o=CT(e,i,n):et(e)&&(o=e,e=o.id),a.id=e,a.dom=o;var s=o.style;return s&&(U0(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=i,a.dpr=n,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=CT("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,i,n,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new ft(0,0,0,0);function h(m){if(!(!m.isFinite()||m.isZero()))if(o.length===0){var _=new ft(0,0,0,0);_.copy(m),o.push(_)}else{for(var x=!1,b=1/0,S=0,w=0;w<o.length;++w){var T=o[w];if(T.intersect(m)){var M=new ft(0,0,0,0);M.copy(T),M.union(m),o[w]=M,x=!0;break}else if(l){u.copy(m),u.union(T);var C=m.width*m.height,D=T.width*T.height,L=u.width*u.height,I=L-C-D;I<b&&(b=I,S=w)}}if(l&&(o[S].union(m),x=!0),!x){var _=new ft(0,0,0,0);_.copy(m),o.push(_)}l||(l=o.length>=s)}}for(var c=this.__startIndex;c<this.__endIndex;++c){var f=e[c];if(f){var v=f.shouldBePainted(n,a,!0,!0),d=f.__isRendered&&(f.__dirty&hr||!v)?f.getPrevPaintRect():null;d&&h(d);var p=v&&(f.__dirty&hr||!f.__isRendered)?f.getPaintRect():null;p&&h(p)}}for(var c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var f=i[c],v=f&&f.shouldBePainted(n,a,!0,!0);if(f&&(!v||!f.__zr)&&f.__isRendered){var d=f.getPrevPaintRect();d&&h(d)}}var g;do{g=!1;for(var c=0;c<o.length;){if(o[c].isZero()){o.splice(c,1);continue}for(var y=c+1;y<o.length;)o[c].intersect(o[y])?(g=!0,o[c].union(o[y]),o.splice(y,1)):y++;c++}}while(g);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,i){var n=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=e+"px",o.height=i+"px"),a.width=e*n,a.height=i*n,s&&(s.width=e*n,s.height=i*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,i,n){var a=this.dom,o=this.ctx,s=a.width,l=a.height;i=i||this.clearColor;var u=this.motionBlur&&!e,h=this.lastFrameAlpha,c=this.dpr,f=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/c,l/c));var v=this.domBack;function d(p,g,y,m){if(o.clearRect(p,g,y,m),i&&i!=="transparent"){var _=void 0;if(lh(i)){var x=i.global||i.__width===y&&i.__height===m;_=x&&i.__canvasGradient||bm(o,i,{x:0,y:0,width:y,height:m}),i.__canvasGradient=_,i.__width=y,i.__height=m}else NL(i)&&(i.scaleX=i.scaleX||c,i.scaleY=i.scaleY||c,_=Sm(o,i,{dirty:function(){f.setUnpainted(),f.painter.refresh()}}));o.save(),o.fillStyle=_||i,o.fillRect(p,g,y,m),o.restore()}u&&(o.save(),o.globalAlpha=h,o.drawImage(v,p,g,y,m),o.restore())}!n||u?d(0,0,s,l):n.length&&A(n,function(p){d(p.x*c,p.y*c,p.width*c,p.height*c)})},t}(Rr),AT=1e5,Ia=314159,Tc=.01,r8=.001;function i8(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function n8(r,t){var e=document.createElement("div");return e.style.cssText=["position:relative","width:"+r+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",e}var a8=function(){function r(t,e,i,n){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=i=z({},i||{}),this.dpr=i.devicePixelRatio||Vf,this._singleCanvas=a,this.root=t;var o=t.style;o&&(U0(t),t.innerHTML=""),this.storage=e;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var h=t,c=h.width,f=h.height;i.width!=null&&(c=i.width),i.height!=null&&(f=i.height),this.dpr=i.devicePixelRatio||1,h.width=c*this.dpr,h.height=f*this.dpr,this._width=c,this._height=f;var v=new rg(h,this,this.dpr);v.__builtin__=!0,v.initContext(),l[Ia]=v,v.zlevel=Ia,s.push(Ia),this._domRoot=t}else{this._width=ss(t,0,i),this._height=ss(t,1,i);var u=this._domRoot=n8(this._width,this._height);t.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),i=this._prevDisplayList,n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,i,t,this._redrawId);for(var a=0;a<n.length;a++){var o=n[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=a===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(t){var e=t.length,i=this._hoverlayer;if(i&&i.clear(),!!e){for(var n={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<e;o++){var s=t[o];s.__inHover&&(i||(i=this._hoverlayer=this.getLayer(AT)),a||(a=i.ctx,a.save()),qa(a,s,n,o===e-1))}a&&a.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(AT)},r.prototype.paintOne=function(t,e){z_(t,e)},r.prototype._paintList=function(t,e,i,n){if(this._redrawId===n){i=i||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,e,i),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;Rf(function(){l._paintList(t,e,i,n)})}}},r.prototype._compositeManually=function(){var t=this.getLayer(Ia).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer(function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)})},r.prototype._doPaintList=function(t,e,i){for(var n=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||i)&&a.push(u)}for(var h=!0,c=!1,f=function(p){var g=a[p],y=g.ctx,m=o&&g.createRepaintRects(t,e,v._width,v._height),_=i?g.__startIndex:g.__drawIndex,x=!i&&g.incremental&&Date.now,b=x&&Date.now(),S=g.zlevel===v._zlevelList[0]?v._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,S,m);else if(_===g.__startIndex){var w=t[_];(!w.incremental||!w.notClear||i)&&g.clear(!1,S,m)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=g.__startIndex);var T,M=function(I){var P={inHover:!1,allClipped:!1,prevEl:null,viewWidth:n._width,viewHeight:n._height};for(T=_;T<g.__endIndex;T++){var k=t[T];if(k.__inHover&&(c=!0),n._doPaintEl(k,g,o,I,P,T===g.__endIndex-1),x){var R=Date.now()-b;if(R>15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var C=v.dpr,D=0;D<m.length;++D){var L=m[D];y.save(),y.beginPath(),y.rect(L.x*C,L.y*C,L.width*C,L.height*C),y.clip(),M(L),y.restore()}else y.save(),M(),y.restore();g.__drawIndex=T,g.__drawIndex<g.__endIndex&&(h=!1)},v=this,d=0;d<a.length;d++)f(d);return mt.wxa&&A(this._layers,function(p){p&&p.ctx&&p.ctx.draw&&p.ctx.draw()}),{finished:h,needsRefreshHover:c}},r.prototype._doPaintEl=function(t,e,i,n,a,o){var s=e.ctx;if(i){var l=t.getPaintRect();(!n||l&&l.intersect(n))&&(qa(s,t,a,o),t.setPrevPaintRect(l))}else qa(s,t,a,o)},r.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Ia);var i=this._layers[t];return i||(i=new rg("zr_"+t,this,this.dpr),i.zlevel=t,i.__builtin__=!0,this._layerConfig[t]?ht(i,this._layerConfig[t],!0):this._layerConfig[t-Tc]&&ht(i,this._layerConfig[t-Tc],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},r.prototype.insertLayer=function(t,e){var i=this._layers,n=this._zlevelList,a=n.length,o=this._domRoot,s=null,l=-1;if(!i[t]&&i8(e)){if(a>0&&t>n[0]){for(l=0;l<a-1&&!(n[l]<t&&n[l+1]>t);l++);s=i[n[l]]}if(n.splice(l+1,0,t),i[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 i=this._zlevelList,n=0;n<i.length;n++){var a=i[n];t.call(e,this._layers[a],a)}},r.prototype.eachBuiltinLayer=function(t,e){for(var i=this._zlevelList,n=0;n<i.length;n++){var a=i[n],o=this._layers[a];o.__builtin__&&t.call(e,o,a)}},r.prototype.eachOtherLayer=function(t,e){for(var i=this._zlevelList,n=0;n<i.length;n++){var a=i[n],o=this._layers[a];o.__builtin__||t.call(e,o,a)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(c,f){c.__dirty=c.__used=!1});function e(c){a&&(a.__endIndex!==c&&(a.__dirty=!0),a.__endIndex=c)}if(this._singleCanvas)for(var i=1;i<t.length;i++){var n=t[i];if(n.zlevel!==t[i-1].zlevel||n.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,l;for(l=0;l<t.length;l++){var n=t[l],u=n.zlevel,h=void 0;s!==u&&(s=u,o=0),n.incremental?(h=this.getLayer(u+r8,this._needsManuallyCompositing),h.incremental=!0,o=1):h=this.getLayer(u+(o>0?Tc:0),this._needsManuallyCompositing),h.__builtin__||Bv("ZLevel "+u+" has been used by unkown layer "+h.id),h!==a&&(h.__used=!0,h.__startIndex!==l&&(h.__dirty=!0),h.__startIndex=l,h.incremental?h.__drawIndex=-1:h.__drawIndex=l,e(l),a=h),n.__dirty&hr&&!n.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(c,f){!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 i=this._layerConfig;i[t]?ht(i[t],e,!0):i[t]=e;for(var n=0;n<this._zlevelList.length;n++){var a=this._zlevelList[n];if(a===t||a===t+Tc){var o=this._layers[a];ht(o,i[t],!0)}}}},r.prototype.delLayer=function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(vt(i,t),1))},r.prototype.resize=function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts,a=this.root;if(t!=null&&(n.width=t),e!=null&&(n.height=e),t=ss(a,0,n),e=ss(a,1,n),i.style.display="",this._width!==t||e!==this._height){i.style.width=t+"px",i.style.height=e+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this.getLayer(Ia).resize(t,e)}return this},r.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[Ia].dom;var e=new rg("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var i=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,a=e.dom.height;this.eachLayer(function(c){c.__builtin__?i.drawImage(c.dom,0,0,n,a):c.renderToCanvas&&(i.save(),c.renderToCanvas(i),i.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var h=s[l];qa(i,h,o,l===u-1)}return e.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r}();function o8(r){r.registerPainter("canvas",a8)}var s8=function(r){E(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){return Li(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var i=new at,n=ae("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);i.add(n),n.setStyle(e.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=e.itemHeight*.8,u=ae(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);i.add(u),u.setStyle(e.itemStyle);var h=e.iconRotate==="inherit"?o:e.iconRotate||0;return u.rotation=h*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),i},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(zt);function Ls(r,t){var e=r.mapDimensionsAll("defaultedLabel"),i=e.length;if(i===1){var n=As(r,t,e[0]);return n!=null?n+"":null}else if(i){for(var a=[],o=0;o<e.length;o++)a.push(As(r,t,e[o]));return a.join(" ")}}function zk(r,t){var e=r.mapDimensionsAll("defaultedLabel");if(!V(t))return t+"";for(var i=[],n=0;n<e.length;n++){var a=r.getDimensionIndex(e[n]);a>=0&&i.push(t[a])}return i.join(" ")}var Sh=function(r){E(t,r);function t(e,i,n,a){var o=r.call(this)||this;return o.updateData(e,i,n,a),o}return t.prototype._createSymbol=function(e,i,n,a,o){this.removeAll();var s=ae(e,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=l8,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Ki(this.childAt(0))},t.prototype.downplay=function(){Ji(this.childAt(0))},t.prototype.setZ=function(e,i){var n=this.childAt(0);n.zlevel=e,n.z=i},t.prototype.setDraggable=function(e,i){var n=this.childAt(0);n.draggable=e,n.cursor=!i&&e?"move":n.cursor},t.prototype.updateData=function(e,i,n,a){this.silent=!1;var o=e.getItemVisual(i,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,i),u=o!==this._symbolType,h=a&&a.disableAnimation;if(u){var c=e.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,e,i,l,c)}else{var f=this.childAt(0);f.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};h?f.attr(v):At(f,v,s,i),ri(f)}if(this._updateCommon(e,i,l,n,a),u){var f=this.childAt(0);if(!h){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,$t(f,v,s,i)}}h&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,i,n,a,o){var s=this.childAt(0),l=e.hostModel,u,h,c,f,v,d,p,g,y;if(a&&(u=a.emphasisItemStyle,h=a.blurItemStyle,c=a.selectItemStyle,f=a.focus,v=a.blurScope,p=a.labelStatesModels,g=a.hoverScale,y=a.cursorStyle,d=a.emphasisDisabled),!a||e.hasItemOption){var m=a&&a.itemModel?a.itemModel:e.getItemModel(i),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),c=m.getModel(["select","itemStyle"]).getItemStyle(),h=m.getModel(["blur","itemStyle"]).getItemStyle(),f=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),p=me(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var x=e.getItemVisual(i,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var b=Mo(e.getItemVisual(i,"symbolOffset"),n);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var S=e.getItemVisual(i,"style"),w=S.fill;if(s instanceof xe){var T=s.style;s.useStyle(z({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},S))}else s.__isEmptyBrush?s.useStyle(z({},S)):s.useStyle(S),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var M=e.getItemVisual(i,"liftZ"),C=this._z2;M!=null?C==null&&(this._z2=s.z2,s.z2+=M):C!=null&&(s.z2=C,this._z2=null);var D=o&&o.useNameLabel;Ae(s,p,{labelFetcher:l,labelDataIndex:i,defaultText:L,inheritColor:w,defaultOpacity:S.opacity});function L(k){return D?e.getName(k):Ls(e,k)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=h;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;I.scaleX=this._sizeX*P,I.scaleY=this._sizeY*P,this.setSymbolScale(1),Kt(this,f,v,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,i,n){var a=this.childAt(0),o=ot(this).dataIndex,s=n&&n.animation;if(this.silent=a.silent=!0,n&&n.fadeLabel){var l=a.getTextContent();l&&Xn(l,{style:{opacity:0}},i,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Xn(a,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,i){return js(e.getItemVisual(i,"symbolSize"))},t}(at);function l8(r,t){this.parent.drift(r,t)}function ig(r,t,e,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i.isIgnore&&i.isIgnore(e))&&!(i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function DT(r){return r!=null&&!et(r)&&(r={isIgnore:r}),r||{}}function LT(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:me(t),cursorStyle:t.get("cursor")}}var wh=function(){function r(t){this.group=new at,this._SymbolCtor=t||Sh}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=DT(e);var i=this.group,n=t.hostModel,a=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=LT(t),u={disableAnimation:s},h=e.getSymbolPoint||function(c){return t.getItemLayout(c)};a||i.removeAll(),t.diff(a).add(function(c){var f=h(c);if(ig(t,f,c,e)){var v=new o(t,c,l,u);v.setPosition(f),t.setItemGraphicEl(c,v),i.add(v)}}).update(function(c,f){var v=a.getItemGraphicEl(f),d=h(c);if(!ig(t,d,c,e)){i.remove(v);return}var p=t.getItemVisual(c,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==p)i.remove(v),v=new o(t,c,l,u),v.setPosition(d);else{v.updateData(t,c,l,u);var y={x:d[0],y:d[1]};s?v.attr(y):At(v,y,n)}i.add(v),t.setItemGraphicEl(c,v)}).remove(function(c){var f=a.getItemGraphicEl(c);f&&f.fadeOut(function(){i.remove(f)},n)}).execute(),this._getSymbolPoint=h,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(i,n){var a=t._getSymbolPoint(n);i.setPosition(a),i.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=LT(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,i){this._progressiveEls=[],i=DT(i);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var o=e.getItemLayout(a);if(ig(e,o,a,i)){var s=new this._SymbolCtor(e,a,this._seriesScope);s.traverse(n),s.setPosition(o),this.group.add(s),e.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(t){ta(this._progressiveEls||this.group,t)},r.prototype.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl(function(n){n.fadeOut(function(){e.remove(n)},i.hostModel)}):e.removeAll()},r}();function Vk(r,t,e){var i=r.getBaseAxis(),n=r.getOtherAxis(i),a=u8(n,e),o=i.dim,s=n.dim,l=t.mapDimension(s),u=t.mapDimension(o),h=s==="x"||s==="radius"?1:0,c=F(r.dimensions,function(d){return t.mapDimension(d)}),f=!1,v=t.getCalculationInfo("stackResultDimension");return tn(t,c[0])&&(f=!0,c[0]=v),tn(t,c[1])&&(f=!0,c[1]=v),{dataDimsForPoint:c,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function u8(r,t){var e=0,i=r.scale.getExtent();return t==="start"?e=i[0]:t==="end"?e=i[1]:Mt(t)&&!isNaN(t)?e=t:i[0]>0?e=i[0]:i[1]<0&&(e=i[1]),e}function Fk(r,t,e,i){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),i)),isNaN(n)&&(n=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=e.get(r.baseDim,i),o[1-a]=n,t.dataToPoint(o)}function h8(r,t){var e=[];return t.diff(r).add(function(i){e.push({cmd:"+",idx:i})}).update(function(i,n){e.push({cmd:"=",idx:n,idx1:i})}).remove(function(i){e.push({cmd:"-",idx:i})}).execute(),e}function c8(r,t,e,i,n,a,o,s){for(var l=h8(r,t),u=[],h=[],c=[],f=[],v=[],d=[],p=[],g=Vk(n,t,o),y=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_<l.length;_++){var x=l[_],b=!0,S=void 0,w=void 0;switch(x.cmd){case"=":S=x.idx*2,w=x.idx1*2;var T=y[S],M=y[S+1],C=m[w],D=m[w+1];(isNaN(T)||isNaN(M))&&(T=C,M=D),u.push(T,M),h.push(C,D),c.push(e[S],e[S+1]),f.push(i[w],i[w+1]),p.push(t.getRawIndex(x.idx1));break;case"+":var L=x.idx,I=g.dataDimsForPoint,P=n.dataToPoint([t.get(I[0],L),t.get(I[1],L)]);w=L*2,u.push(P[0],P[1]),h.push(m[w],m[w+1]);var k=Fk(g,n,t,L);c.push(k[0],k[1]),f.push(i[w],i[w+1]),p.push(t.getRawIndex(L));break;case"-":b=!1}b&&(v.push(x),d.push(d.length))}d.sort(function(nt,Ct){return p[nt]-p[Ct]});for(var R=u.length,N=yi(R),O=yi(R),B=yi(R),G=yi(R),H=[],_=0;_<d.length;_++){var W=d[_],q=_*2,K=W*2;N[q]=u[K],N[q+1]=u[K+1],O[q]=h[K],O[q+1]=h[K+1],B[q]=c[K],B[q+1]=c[K+1],G[q]=f[K],G[q+1]=f[K+1],H[_]=v[W]}return{current:N,next:O,stackedOnCurrent:B,stackedOnNext:G,status:H}}var vn=Math.min,dn=Math.max;function ao(r,t){return isNaN(r)||isNaN(t)}function Rm(r,t,e,i,n,a,o,s,l){for(var u,h,c,f,v,d,p=e,g=0;g<i;g++){var y=t[p*2],m=t[p*2+1];if(p>=n||p<0)break;if(ao(y,m)){if(l){p+=a;continue}break}if(p===e)r[a>0?"moveTo":"lineTo"](y,m),c=y,f=m;else{var _=y-u,x=m-h;if(_*_+x*x<.5){p+=a;continue}if(o>0){for(var b=p+a,S=t[b*2],w=t[b*2+1];S===y&&w===m&&g<i;)g++,b+=a,p+=a,S=t[b*2],w=t[b*2+1],y=t[p*2],m=t[p*2+1],_=y-u,x=m-h;var T=g+1;if(l)for(;ao(S,w)&&T<i;)T++,b+=a,S=t[b*2],w=t[b*2+1];var M=.5,C=0,D=0,L=void 0,I=void 0;if(T>=i||ao(S,w))v=y,d=m;else{C=S-u,D=w-h;var P=y-u,k=S-y,R=m-h,N=w-m,O=void 0,B=void 0;if(s==="x"){O=Math.abs(P),B=Math.abs(k);var G=C>0?1:-1;v=y-G*O*o,d=m,L=y+G*B*o,I=m}else if(s==="y"){O=Math.abs(R),B=Math.abs(N);var H=D>0?1:-1;v=y,d=m-H*O*o,L=y,I=m+H*B*o}else O=Math.sqrt(P*P+R*R),B=Math.sqrt(k*k+N*N),M=B/(B+O),v=y-C*o*(1-M),d=m-D*o*(1-M),L=y+C*o*M,I=m+D*o*M,L=vn(L,dn(S,y)),I=vn(I,dn(w,m)),L=dn(L,vn(S,y)),I=dn(I,vn(w,m)),C=L-y,D=I-m,v=y-C*O/B,d=m-D*O/B,v=vn(v,dn(u,y)),d=vn(d,dn(h,m)),v=dn(v,vn(u,y)),d=dn(d,vn(h,m)),C=y-v,D=m-d,L=y+C*B/O,I=m+D*B/O}r.bezierCurveTo(c,f,v,d,y,m),c=L,f=I}else r.lineTo(y,m)}u=y,h=m,p+=a}return g}var Gk=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),f8=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polyline",i}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Gk},t.prototype.buildPath=function(e,i){var n=i.points,a=0,o=n.length/2;if(i.connectNulls){for(;o>0&&ao(n[o*2-2],n[o*2-1]);o--);for(;a<o&&ao(n[a*2],n[a*2+1]);a++);}for(;a<o;)a+=Rm(e,n,a,o,o,1,i.smooth,i.smoothMonotone,i.connectNulls)+1},t.prototype.getPointOn=function(e,i){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path,a=n.data,o=Ci.CMD,s,l,u=i==="x",h=[],c=0;c<a.length;){var f=a[c++],v=void 0,d=void 0,p=void 0,g=void 0,y=void 0,m=void 0,_=void 0;switch(f){case o.M:s=a[c++],l=a[c++];break;case o.L:if(v=a[c++],d=a[c++],_=u?(e-s)/(v-s):(e-l)/(d-l),_<=1&&_>=0){var x=u?(d-l)*_+l:(v-s)*_+s;return u?[e,x]:[x,e]}s=v,l=d;break;case o.C:v=a[c++],d=a[c++],p=a[c++],g=a[c++],y=a[c++],m=a[c++];var b=u?Of(s,v,p,y,e,h):Of(l,d,g,m,e,h);if(b>0)for(var S=0;S<b;S++){var w=h[S];if(w<=1&&w>=0){var x=u?ve(l,d,g,m,w):ve(s,v,p,y,w);return u?[e,x]:[x,e]}}s=y,l=m;break}}},t}(_t),v8=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(Gk),Hk=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polygon",i}return t.prototype.getDefaultShape=function(){return new v8},t.prototype.buildPath=function(e,i){var n=i.points,a=i.stackedOnPoints,o=0,s=n.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&ao(n[s*2-2],n[s*2-1]);s--);for(;o<s&&ao(n[o*2],n[o*2+1]);o++);}for(;o<s;){var u=Rm(e,n,o,s,s,1,i.smooth,l,i.connectNulls);Rm(e,a,o+u-1,u,s,-1,i.stackedOnSmooth,l,i.connectNulls),o+=u+1,e.closePath()}},t}(_t);function Wk(r,t,e,i,n){var a=r.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,h=e.get(["lineStyle","width"])||0;o-=h/2,s-=h/2,l+=h,u+=h,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var c=new wt({shape:{x:o,y:s,width:l,height:u}});if(t){var f=r.getBaseAxis(),v=f.isHorizontal(),d=f.inverse;v?(d&&(c.shape.x+=l),c.shape.width=0):(d||(c.shape.y+=u),c.shape.height=0);var p=Q(n)?function(g){n(g,c)}:null;$t(c,{shape:{width:l,height:u,x:o,y:s}},e,null,i,p)}return c}function Uk(r,t,e){var i=r.getArea(),n=Qt(i.r0,1),a=Qt(i.r,1),o=new Fe({shape:{cx:Qt(r.cx,1),cy:Qt(r.cy,1),r0:n,r:a,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});if(t){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=i.startAngle:o.shape.r=n,$t(o,{shape:{endAngle:i.endAngle,r:a}},e)}return o}function Th(r,t,e,i,n){if(r){if(r.type==="polar")return Uk(r,t,e);if(r.type==="cartesian2d")return Wk(r,t,e,i,n)}else return null;return null}function Co(r,t){return r.type===t}function IT(r,t){if(r.length===t.length){for(var e=0;e<r.length;e++)if(r[e]!==t[e])return;return!0}}function PT(r){for(var t=1/0,e=1/0,i=-1/0,n=-1/0,a=0;a<r.length;){var o=r[a++],s=r[a++];isNaN(o)||(t=Math.min(o,t),i=Math.max(o,i)),isNaN(s)||(e=Math.min(s,e),n=Math.max(s,n))}return[[t,e],[i,n]]}function kT(r,t){var e=PT(r),i=e[0],n=e[1],a=PT(t),o=a[0],s=a[1];return Math.max(Math.abs(i[0]-o[0]),Math.abs(i[1]-o[1]),Math.abs(n[0]-s[0]),Math.abs(n[1]-s[1]))}function RT(r){return Mt(r)?r:r?.5:0}function d8(r,t,e){if(!e.valueDim)return[];for(var i=t.count(),n=yi(i*2),a=0;a<i;a++){var o=Fk(e,r,t,a);n[a*2]=o[0],n[a*2+1]=o[1]}return n}function pn(r,t,e,i,n){var a=e.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],h=[],c=[],f=[];if(n){for(l=0;l<r.length;l+=2){var v=t||r;!isNaN(v[l])&&!isNaN(v[l+1])&&f.push(r[l],r[l+1])}r=f}for(l=0;l<r.length-2;l+=2)switch(c[0]=r[l+2],c[1]=r[l+3],h[0]=r[l],h[1]=r[l+1],s.push(h[0],h[1]),i){case"end":u[o]=c[o],u[1-o]=h[1-o],s.push(u[0],u[1]);break;case"middle":var d=(h[o]+c[o])/2,p=[];u[o]=p[o]=d,u[1-o]=h[1-o],p[1-o]=c[1-o],s.push(u[0],u[1]),s.push(p[0],p[1]);break;default:u[o]=h[o],u[1-o]=c[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function p8(r,t){var e=[],i=r.length,n,a;function o(h,c,f){var v=h.coord,d=(f-v)/(c.coord-v),p=Z0(d,[h.color,c.color]);return{coord:f,color:p}}for(var s=0;s<i;s++){var l=r[s],u=l.coord;if(u<0)n=l;else if(u>t){a?e.push(o(a,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),a=l}return e}function g8(r,t,e){var i=r.getVisual("visualMeta");if(!(!i||!i.length||!r.count())&&t.type==="cartesian2d"){for(var n,a,o=i.length-1;o>=0;o--){var s=r.getDimensionInfo(i[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){a=i[o];break}}if(a){var l=t.getAxis(n),u=F(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),h=u.length,c=a.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var f=p8(u,n==="x"?e.getWidth():e.getHeight()),v=f.length;if(!v&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var d=10,p=f[0].coord-d,g=f[v-1].coord+d,y=g-p;if(y<.001)return"transparent";A(f,function(_){_.offset=(_.coord-p)/y}),f.push({offset:v?f[v-1].offset:.5,color:c[1]||"transparent"}),f.unshift({offset:v?f[0].offset:.5,color:c[0]||"transparent"});var m=new Vs(0,0,0,0,f,!0);return m[n]=p,m[n+"2"]=g,m}}}function y8(r,t,e){var i=r.get("showAllSymbol"),n=i==="auto";if(!(i&&!n)){var a=e.getAxesByScale("ordinal")[0];if(a&&!(n&&m8(a,t))){var o=t.mapDimension(a.dim),s={};return A(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function m8(r,t){var e=r.getExtent(),i=Math.abs(e[1]-e[0])/r.scale.count();isNaN(i)&&(i=0);for(var n=t.count(),a=Math.max(1,Math.round(n/5)),o=0;o<n;o+=a)if(Sh.getSymbolSize(t,o)[r.isHorizontal()?1:0]*1.5>i)return!1;return!0}function _8(r,t){return isNaN(r)||isNaN(t)}function x8(r){for(var t=r.length/2;t>0&&_8(r[t*2-2],r[t*2-1]);t--);return t-1}function ET(r,t){return[r[t*2],r[t*2+1]]}function b8(r,t,e){for(var i=r.length/2,n=e==="x"?0:1,a,o,s=0,l=-1,u=0;u<i;u++)if(o=r[u*2+n],!(isNaN(o)||isNaN(r[u*2+1-n]))){if(u===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function Yk(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t<Ke.length;t++)if(r.get([Ke[t],"endLabel","show"]))return!0;return!1}function ng(r,t,e,i){if(Co(t,"cartesian2d")){var n=i.getModel("endLabel"),a=n.get("valueAnimation"),o=i.getData(),s={lastFrameIndex:0},l=Yk(i)?function(v,d){r._endLabelOnDuring(v,d,o,s,a,n,t)}:null,u=t.getBaseAxis().isHorizontal(),h=Wk(t,e,i,function(){var v=r._endLabel;v&&e&&s.originalX!=null&&v.attr({x:s.originalX,y:s.originalY})},l);if(!i.get("clip",!0)){var c=h.shape,f=Math.max(c.width,c.height);u?(c.y-=f,c.height+=f*2):(c.x-=f,c.width+=f*2)}return l&&l(1,h),h}else return Uk(t,e,i)}function S8(r,t){var e=t.getBaseAxis(),i=e.isHorizontal(),n=e.inverse,a=i?n?"right":"left":"center",o=i?"middle":n?"top":"bottom";return{normal:{align:r.get("align")||a,verticalAlign:r.get("verticalAlign")||o}}}var w8=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(){var e=new at,i=new wh;this.group.add(i.group),this._symbolDraw=i,this._lineGroup=e,this._changePolyState=$(this._changePolyState,this)},t.prototype.render=function(e,i,n){var a=e.coordinateSystem,o=this.group,s=e.getData(),l=e.getModel("lineStyle"),u=e.getModel("areaStyle"),h=s.getLayout("points")||[],c=a.type==="polar",f=this._coordSys,v=this._symbolDraw,d=this._polyline,p=this._polygon,g=this._lineGroup,y=!i.ssr&&e.get("animation"),m=!u.isEmpty(),_=u.get("origin"),x=Vk(a,s,_),b=m&&d8(a,s,x),S=e.get("showSymbol"),w=e.get("connectNulls"),T=S&&!c&&y8(e,s,a),M=this._data;M&&M.eachItemGraphicEl(function(nt,Ct){nt.__temp&&(o.remove(nt),M.setItemGraphicEl(Ct,null))}),S||v.remove(),o.add(g);var C=c?!1:e.get("step"),D;a&&a.getArea&&e.get("clip",!0)&&(D=a.getArea(),D.width!=null?(D.x-=.1,D.y-=.1,D.width+=.2,D.height+=.2):D.r0&&(D.r0-=.5,D.r+=.5)),this._clipShapeForSymbol=D;var L=g8(s,a,n)||s.getVisual("style")[s.getVisual("drawType")];if(!(d&&f.type===a.type&&C===this._step))S&&v.updateData(s,{isIgnore:T,clipShape:D,disableAnimation:!0,getSymbolPoint:function(nt){return[h[nt*2],h[nt*2+1]]}}),y&&this._initSymbolLabelAnimation(s,a,D),C&&(b&&(b=pn(b,h,a,C,w)),h=pn(h,null,a,C,w)),d=this._newPolyline(h),m?p=this._newPolygon(h,b):p&&(g.remove(p),p=this._polygon=null),c||this._initOrUpdateEndLabel(e,a,go(L)),g.setClipPath(ng(this,a,!0,e));else{m&&!p?p=this._newPolygon(h,b):p&&!m&&(g.remove(p),p=this._polygon=null),c||this._initOrUpdateEndLabel(e,a,go(L));var I=g.getClipPath();if(I){var P=ng(this,a,!1,e);$t(I,{shape:P.shape},e)}else g.setClipPath(ng(this,a,!0,e));S&&v.updateData(s,{isIgnore:T,clipShape:D,disableAnimation:!0,getSymbolPoint:function(nt){return[h[nt*2],h[nt*2+1]]}}),(!IT(this._stackedOnPoints,b)||!IT(this._points,h))&&(y?this._doUpdateAnimation(s,b,a,n,C,_,w):(C&&(b&&(b=pn(b,h,a,C,w)),h=pn(h,null,a,C,w)),d.setShape({points:h}),p&&p.setShape({points:h,stackedOnPoints:b})))}var k=e.getModel("emphasis"),R=k.get("focus"),N=k.get("blurScope"),O=k.get("disabled");if(d.useStyle(tt(l.getLineStyle(),{fill:"none",stroke:L,lineJoin:"bevel"})),Ce(d,e,"lineStyle"),d.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var B=d.getState("emphasis").style;B.lineWidth=+d.style.lineWidth+1}ot(d).seriesIndex=e.seriesIndex,Kt(d,R,N,O);var G=RT(e.get("smooth")),H=e.get("smoothMonotone");if(d.setShape({smooth:G,smoothMonotone:H,connectNulls:w}),p){var W=s.getCalculationInfo("stackedOnSeries"),q=0;p.useStyle(tt(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),W&&(q=RT(W.get("smooth"))),p.setShape({smooth:G,stackedOnSmooth:q,smoothMonotone:H,connectNulls:w}),Ce(p,e,"areaStyle"),ot(p).seriesIndex=e.seriesIndex,Kt(p,R,N,O)}var K=this._changePolyState;s.eachItemGraphicEl(function(nt){nt&&(nt.onHoverStateChange=K)}),this._polyline.onHoverStateChange=K,this._data=s,this._coordSys=a,this._stackedOnPoints=b,this._points=h,this._step=C,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,d),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,i){ot(i).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,i,n,a){var o=e.getData(),s=fo(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var h=l[s*2],c=l[s*2+1];if(isNaN(h)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(h,c))return;var f=e.get("zlevel")||0,v=e.get("z")||0;u=new Sh(o,s),u.x=h,u.y=c,u.setZ(f,v);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=f,d.z=v,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Ot.prototype.highlight.call(this,e,i,n,a)},t.prototype.downplay=function(e,i,n,a){var o=e.getData(),s=fo(o,a);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 Ot.prototype.downplay.call(this,e,i,n,a)},t.prototype._changePolyState=function(e){var i=this._polygon;Hf(this._polyline,e),i&&Hf(i,e)},t.prototype._newPolyline=function(e){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new f8({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},t.prototype._newPolygon=function(e,i){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Hk({shape:{points:e,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,i,n){var a,o,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):i.type==="polar"&&(a=s.dim==="angle",o=!0);var u=e.hostModel,h=u.get("animationDuration");Q(h)&&(h=h(null));var c=u.get("animationDelay")||0,f=Q(c)?c(null):c;e.eachItemGraphicEl(function(v,d){var p=v;if(p){var g=[v.x,v.y],y=void 0,m=void 0,_=void 0;if(n)if(o){var x=n,b=i.pointToCoord(g);a?(y=x.startAngle,m=x.endAngle,_=-b[1]/180*Math.PI):(y=x.r0,m=x.r,_=b[0])}else{var S=n;a?(y=S.x,m=S.x+S.width,_=v.x):(y=S.y+S.height,m=S.y,_=v.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=Q(c)?c(d):h*w+f,M=p.getSymbolPath(),C=M.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),C&&C.animateFrom({style:{opacity:0}},{duration:300,delay:T}),M.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,i,n){var a=e.getModel("endLabel");if(Yk(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 St({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var h=x8(l);h>=0&&(Ae(s,me(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:h,defaultText:function(c,f,v){return v!=null?zk(o,v):Ls(o,c)},enableTextSetter:!0},S8(a,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,i,n,a,o,s,l){var u=this._endLabel,h=this._polyline;if(u){e<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var c=n.getLayout("points"),f=n.hostModel,v=f.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=i.shape,x=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,b=(y?p:0)*(m?-1:1),S=(y?0:-p)*(m?-1:1),w=y?"x":"y",T=b8(c,x,w),M=T.range,C=M[1]-M[0],D=void 0;if(C>=1){if(C>1&&!v){var L=ET(c,M[0]);u.attr({x:L[0]+b,y:L[1]+S}),o&&(D=f.getRawValue(M[0]))}else{var L=h.getPointOn(x,w);L&&u.attr({x:L[0]+b,y:L[1]+S});var I=f.getRawValue(M[0]),P=f.getRawValue(M[1]);o&&(D=D2(n,d,I,P,T.t))}a.lastFrameIndex=M[0]}else{var k=e===1||a.lastFrameIndex>0?M[0]:0,L=ET(c,k);o&&(D=f.getRawValue(k)),u.attr({x:L[0]+b,y:L[1]+S})}if(o){var R=Hs(u);typeof R.setLabelText=="function"&&R.setLabelText(D)}}},t.prototype._doUpdateAnimation=function(e,i,n,a,o,s,l){var u=this._polyline,h=this._polygon,c=e.hostModel,f=c8(this._data,e,this._stackedOnPoints,i,this._coordSys,n,this._valueOrigin),v=f.current,d=f.stackedOnCurrent,p=f.next,g=f.stackedOnNext;if(o&&(d=pn(f.stackedOnCurrent,f.current,n,o,l),v=pn(f.current,null,n,o,l),g=pn(f.stackedOnNext,f.next,n,o,l),p=pn(f.next,null,n,o,l)),kT(v,p)>3e3||h&&kT(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),h&&(h.stopAnimation(),h.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=f.current,u.shape.points=v;var y={shape:{points:p}};f.current!==v&&(y.shape.__points=f.next),u.stopAnimation(),At(u,y,c),h&&(h.setShape({points:v,stackedOnPoints:d}),h.stopAnimation(),At(h,{shape:{stackedOnPoints:g}},c),u.shape.points!==h.shape.points&&(h.shape.points=u.shape.points));for(var m=[],_=f.status,x=0;x<_.length;x++){var b=_[x].cmd;if(b==="="){var S=e.getItemGraphicEl(_[x].idx1);S&&m.push({el:S,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){h&&h.dirtyShape();for(var w=u.shape.__points,T=0;T<m.length;T++){var M=m[T].el,C=m[T].ptIdx*2;M.x=w[C],M.y=w[C+1],M.markRedraw()}})},t.prototype.remove=function(e){var i=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(a,o){a.__temp&&(i.remove(a),n.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(Ot);function Mh(r,t){return{seriesType:r,plan:Xs(),reset:function(e){var i=e.getData(),n=e.coordinateSystem,a=e.pipelineContext,o=t||a.large;if(n){var s=F(n.dimensions,function(v){return i.mapDimension(v)}).slice(0,2),l=s.length,u=i.getCalculationInfo("stackResultDimension");tn(i,s[0])&&(s[0]=u),tn(i,s[1])&&(s[1]=u);var h=i.getStore(),c=i.getDimensionIndex(s[0]),f=i.getDimensionIndex(s[1]);return l&&{progress:function(v,d){for(var p=v.end-v.start,g=o&&yi(p*l),y=[],m=[],_=v.start,x=0;_<v.end;_++){var b=void 0;if(l===1){var S=h.get(c,_);b=n.dataToPoint(S,null,m)}else y[0]=h.get(c,_),y[1]=h.get(f,_),b=n.dataToPoint(y,null,m);o?(g[x++]=b[0],g[x++]=b[1]):d.setItemLayout(_,b.slice())}o&&d.setLayout("points",g)}}}}}}var T8={average:function(r){for(var t=0,e=0,i=0;i<r.length;i++)isNaN(r[i])||(t+=r[i],e++);return e===0?NaN:t/e},sum:function(r){for(var t=0,e=0;e<r.length;e++)t+=r[e]||0;return t},max:function(r){for(var t=-1/0,e=0;e<r.length;e++)r[e]>t&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e<r.length;e++)r[e]<t&&(t=r[e]);return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},M8=function(r){return Math.round(r.length/2)};function $k(r){return{seriesType:r,reset:function(t,e,i){var n=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,s=n.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),h=l.getExtent(),c=i.getDevicePixelRatio(),f=Math.abs(h[1]-h[0])*(c||1),v=Math.round(s/f);if(isFinite(v)&&v>1){a==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/v)):a==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/v));var d=void 0;Y(a)?d=T8[a]:Q(a)&&(d=a),d&&t.setData(n.downSample(n.mapDimension(u.dim),1/v,d,M8))}}}}}function C8(r){r.registerChartView(w8),r.registerSeriesModel(s8),r.registerLayout(Mh("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),i=t.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",i)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,$k("line"))}var ju=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,i){return Li(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,i,n){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(e),s=a.dataToPoint(o);if(n)A(a.getAxes(),function(f,v){if(f.type==="category"&&i!=null){var d=f.getTicksCoords(),p=f.getTickModel().get("alignWithLabel"),g=o[v],y=i[v]==="x1"||i[v]==="y1";if(y&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[v]=f.toGlobalCoord(f.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,x=1,b=0;b<d.length;b++){var S=d[b].coord,w=b===d.length-1?d[b-1].tickValue+x:d[b].tickValue;if(w===g){_=S;break}else if(w<g)m=S;else if(m!=null&&w>g){_=(S+m)/2;break}b===1&&(x=w-d[0].tickValue)}_==null&&(m?m&&(_=d[d.length-1].coord):_=d[0].coord),s[v]=f.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),h=l.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;s[c]+=u+h/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(zt);zt.registerClass(ju);var A8=function(r){E(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 Li(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),i=this.get("largeThreshold");return i>e&&(e=i),e},t.prototype.brushSelector=function(e,i,n){return n.rect(i.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=ea(ju.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(ju),D8=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}(),uv=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="sausage",i}return t.prototype.getDefaultShape=function(){return new D8},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=(s-o)*.5,u=o+l,h=i.startAngle,c=i.endAngle,f=i.clockwise,v=Math.PI*2,d=f?c-h<v:h-c<v;d||(h=c-(f?v:-v));var p=Math.cos(h),g=Math.sin(h),y=Math.cos(c),m=Math.sin(c);d?(e.moveTo(p*o+n,g*o+a),e.arc(p*u+n,g*u+a,l,-Math.PI+h,h,!f)):e.moveTo(p*s+n,g*s+a),e.arc(n,a,s,h,c,!f),e.arc(y*u+n,m*u+a,l,c-Math.PI*2,c-Math.PI,!f),o!==0&&e.arc(n,a,o,c,h,f)},t}(_t);function L8(r,t){t=t||{};var e=t.isRoundCap;return function(i,n,a){var o=n.position;if(!o||o instanceof Array)return Ff(i,n,a);var s=r(o),l=n.distance!=null?n.distance:5,u=this.shape,h=u.cx,c=u.cy,f=u.r,v=u.r0,d=(f+v)/2,p=u.startAngle,g=u.endAngle,y=(p+g)/2,m=e?Math.abs(f-v)/2:0,_=Math.cos,x=Math.sin,b=h+f*_(p),S=c+f*x(p),w="left",T="top";switch(s){case"startArc":b=h+(v-l)*_(y),S=c+(v-l)*x(y),w="center",T="top";break;case"insideStartArc":b=h+(v+l)*_(y),S=c+(v+l)*x(y),w="center",T="bottom";break;case"startAngle":b=h+d*_(p)+Mc(p,l+m,!1),S=c+d*x(p)+Cc(p,l+m,!1),w="right",T="middle";break;case"insideStartAngle":b=h+d*_(p)+Mc(p,-l+m,!1),S=c+d*x(p)+Cc(p,-l+m,!1),w="left",T="middle";break;case"middle":b=h+d*_(y),S=c+d*x(y),w="center",T="middle";break;case"endArc":b=h+(f+l)*_(y),S=c+(f+l)*x(y),w="center",T="bottom";break;case"insideEndArc":b=h+(f-l)*_(y),S=c+(f-l)*x(y),w="center",T="top";break;case"endAngle":b=h+d*_(g)+Mc(g,l+m,!0),S=c+d*x(g)+Cc(g,l+m,!0),w="left",T="middle";break;case"insideEndAngle":b=h+d*_(g)+Mc(g,-l+m,!0),S=c+d*x(g)+Cc(g,-l+m,!0),w="right",T="middle";break;default:return Ff(i,n,a)}return i=i||{},i.x=b,i.y=S,i.align=w,i.verticalAlign=T,i}}function I8(r,t,e,i){if(Mt(i)){r.setTextConfig({rotation:i});return}else if(V(t)){r.setTextConfig({rotation:0});return}var n=r.shape,a=n.clockwise?n.startAngle:n.endAngle,o=n.clockwise?n.endAngle:n.startAngle,s=(a+o)/2,l,u=e(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.setTextConfig({rotation:0});return}var h=Math.PI*1.5-l;u==="middle"&&h>Math.PI/2&&h<Math.PI*1.5&&(h-=Math.PI),r.setTextConfig({rotation:h})}function Mc(r,t,e){return t*Math.sin(r)*(e?-1:1)}function Cc(r,t,e){return t*Math.cos(r)*(e?1:-1)}function Ka(r,t,e){var i=r.get("borderRadius");if(i==null)return e?{cornerRadius:0}:null;V(i)||(i=[i,i,i,i]);var n=Math.abs(t.r||0-t.r0||0);return{cornerRadius:F(i,function(a){return ei(a,n)})}}var ag=Math.max,og=Math.min;function P8(r,t){var e=r.getArea&&r.getArea();if(Co(r,"cartesian2d")){var i=r.getBaseAxis();if(i.type!=="category"||!i.onBand){var n=t.getLayout("bandWidth");i.isHorizontal()?(e.x-=n,e.width+=n*2):(e.y-=n,e.height+=n*2)}}return e}var k8=function(r){E(t,r);function t(){var e=r.call(this)||this;return e.type=t.type,e._isFirstFrame=!0,e}return t.prototype.render=function(e,i,n,a){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var o=e.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,i,n):this._renderNormal(e,i,n,a))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,i){this._progressiveEls=[],this._incrementalRenderLarge(e,i)},t.prototype.eachRendered=function(e){ta(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var i=e.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},t.prototype._renderNormal=function(e,i,n,a){var o=this.group,s=e.getData(),l=this._data,u=e.coordinateSystem,h=u.getBaseAxis(),c;u.type==="cartesian2d"?c=h.isHorizontal():u.type==="polar"&&(c=h.dim==="angle");var f=e.isAnimationEnabled()?e:null,v=R8(e,u);v&&this._enableRealtimeSort(v,s,n);var d=e.get("clip",!0)||v,p=P8(u,s);o.removeClipPath();var g=e.get("roundCap",!0),y=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),_=m.get("borderRadius")||0,x=[],b=this._backgroundEls,S=a&&a.isInitSort,w=a&&a.type==="changeAxisOrder";function T(D){var L=Ac[u.type](s,D),I=F8(u,c,L);return I.useStyle(m.getItemStyle()),u.type==="cartesian2d"?I.setShape("r",_):I.setShape("cornerRadius",_),x[D]=I,I}s.diff(l).add(function(D){var L=s.getItemModel(D),I=Ac[u.type](s,D,L);if(y&&T(D),!(!s.hasValue(D)||!VT[u.type](I))){var P=!1;d&&(P=OT[u.type](p,I));var k=NT[u.type](e,s,D,I,c,f,h.model,!1,g);v&&(k.forceLabelAnimation=!0),FT(k,s,D,L,I,e,c,u.type==="polar"),S?k.attr({shape:I}):v?BT(v,f,k,I,D,c,!1,!1):$t(k,{shape:I},e,D),s.setItemGraphicEl(D,k),o.add(k),k.ignore=P}}).update(function(D,L){var I=s.getItemModel(D),P=Ac[u.type](s,D,I);if(y){var k=void 0;b.length===0?k=T(L):(k=b[L],k.useStyle(m.getItemStyle()),u.type==="cartesian2d"?k.setShape("r",_):k.setShape("cornerRadius",_),x[D]=k);var R=Ac[u.type](s,D),N=Zk(c,R,u);At(k,{shape:N},f,D)}var O=l.getItemGraphicEl(L);if(!s.hasValue(D)||!VT[u.type](P)){o.remove(O);return}var B=!1;if(d&&(B=OT[u.type](p,P),B&&o.remove(O)),O?ri(O):O=NT[u.type](e,s,D,P,c,f,h.model,!!O,g),v&&(O.forceLabelAnimation=!0),w){var G=O.getTextContent();if(G){var H=Hs(G);H.prevValue!=null&&(H.prevValue=H.value)}}else FT(O,s,D,I,P,e,c,u.type==="polar");S?O.attr({shape:P}):v?BT(v,f,O,P,D,c,!0,w):At(O,{shape:P},e,D,null),s.setItemGraphicEl(D,O),O.ignore=B,o.add(O)}).remove(function(D){var L=l.getItemGraphicEl(D);L&&Vu(L,e,D)}).execute();var M=this._backgroundGroup||(this._backgroundGroup=new at);M.removeAll();for(var C=0;C<x.length;++C)M.add(x[C]);o.add(M),this._backgroundEls=x,this._data=s},t.prototype._renderLarge=function(e,i,n){this._clear(),HT(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,i){this._removeBackground(),HT(i,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var i=e.get("clip",!0)&&Th(e.coordinateSystem,!1,e),n=this.group;i?n.setClipPath(i):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,i,n){var a=this;if(i.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(i,e,n),this._isFirstFrame=!1;else{var s=function(l){var u=i.getItemGraphicEl(l),h=u&&u.shape;return h&&Math.abs(o.isHorizontal()?h.height:h.width)||0};this._onRendered=function(){a._updateSortWithinSameData(i,s,o,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,i,n){var a=[];return e.each(e.mapDimension(i.dim),function(o,s){var l=n(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:F(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,i,n){for(var a=n.scale,o=e.mapDimension(n.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var h=e.rawIndexOf(o,a.getRawOrdinalNumber(l)),c=h<0?Number.MIN_VALUE:i(e.indexOfRawIndex(h));if(c>s)return!0;s=c}return!1},t.prototype._isOrderDifferentInView=function(e,i){for(var n=i.scale,a=n.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,i,n,a){if(this._isOrderChangedWithinSameData(e,i,n)){var o=this._dataSort(e,n,i);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,i,n){var a=i.baseAxis,o=this._dataSort(e,a,function(s){return e.get(e.mapDimension(i.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(e,i){this._clear(this._model),this._removeOnRenderedListener(i)},t.prototype.dispose=function(e,i){this._removeOnRenderedListener(i)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var i=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(a){Vu(a,e,ot(a).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Ot),OT={cartesian2d:function(r,t){var e=t.width<0?-1:1,i=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var n=r.x+r.width,a=r.y+r.height,o=ag(t.x,r.x),s=og(t.x+t.width,n),l=ag(t.y,r.y),u=og(t.y+t.height,a),h=s<o,c=u<l;return t.x=h&&o>n?s:o,t.y=c&&l>a?u:l,t.width=h?0:s-o,t.height=c?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),h||c},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}var n=og(t.r,r.r),a=ag(t.r0,r.r0);t.r=n,t.r0=a;var o=n-a<0;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}return o}},NT={cartesian2d:function(r,t,e,i,n,a,o,s,l){var u=new wt({shape:z({},i),z2:1});if(u.__dataIndex=e,u.name="item",a){var h=u.shape,c=n?"height":"width";h[c]=0}return u},polar:function(r,t,e,i,n,a,o,s,l){var u=!n&&l?uv:Fe,h=new u({shape:i,z2:1});h.name="item";var c=Xk(n);if(h.calculateTextPosition=L8(c,{isRoundCap:u===uv}),a){var f=h.shape,v=n?"r":"endAngle",d={};f[v]=n?i.r0:i.startAngle,d[v]=i[v],(s?At:$t)(h,{shape:d},a)}return h}};function R8(r,t){var e=r.get("realtimeSort",!0),i=t.getBaseAxis();if(e&&i.type==="category"&&t.type==="cartesian2d")return{baseAxis:i,otherAxis:t.getOtherAxis(i)}}function BT(r,t,e,i,n,a,o,s){var l,u;a?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(o?At:$t)(e,{shape:l},t,n,null);var h=t?r.baseAxis.model:null;(o?At:$t)(e,{shape:u},h,n)}function zT(r,t){for(var e=0;e<t.length;e++)if(!isFinite(r[t[e]]))return!0;return!1}var E8=["x","y","width","height"],O8=["cx","cy","r","startAngle","endAngle"],VT={cartesian2d:function(r){return!zT(r,E8)},polar:function(r){return!zT(r,O8)}},Ac={cartesian2d:function(r,t,e){var i=r.getItemLayout(t),n=e?B8(e,i):0,a=i.width>0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*n/2,y:i.y+o*n/2,width:i.width-a*n,height:i.height-o*n}},polar:function(r,t,e){var i=r.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function N8(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function Xk(r){return function(t){var e=t?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+e;default:return i}}}(r)}function FT(r,t,e,i,n,a,o,s){var l=t.getItemVisual(e,"style");if(s){if(!a.get("roundCap")){var h=r.shape,c=Ka(i.getModel("itemStyle"),h,!0);z(h,c),r.setShape(h)}}else{var u=i.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var f=i.getShallow("cursor");f&&r.attr("cursor",f);var v=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=me(i);Ae(r,d,{labelFetcher:a,labelDataIndex:e,defaultText:Ls(a.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var p=r.getTextContent();if(s&&p){var g=i.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,I8(r,g==="outside"?v:g,Xk(o),i.get(["label","rotate"]))}fI(p,d,a.getRawValue(e),function(m){return zk(t,m)});var y=i.getModel(["emphasis"]);Kt(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),Ce(r,i),N8(n)&&(r.style.fill="none",r.style.stroke="none",A(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function B8(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var i=r.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(i,n,a)}var z8=function(){function r(){}return r}(),GT=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="largeBar",i}return t.prototype.getDefaultShape=function(){return new z8},t.prototype.buildPath=function(e,i){for(var n=i.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,h=0;h<n.length;h+=3)l[a]=u,l[o]=n[h+2],s[a]=n[h+a],s[o]=n[h+o],e.rect(s[0],s[1],l[0],l[1])},t}(_t);function HT(r,t,e,i){var n=r.getData(),a=n.getLayout("valueAxisHorizontal")?1:0,o=n.getLayout("largeDataIndices"),s=n.getLayout("size"),l=r.getModel("backgroundStyle"),u=n.getLayout("largeBackgroundPoints");if(u){var h=new GT({shape:{points:u},incremental:!!i,silent:!0,z2:0});h.baseDimIdx=a,h.largeDataIndices=o,h.barWidth=s,h.useStyle(l.getItemStyle()),t.add(h),e&&e.push(h)}var c=new GT({shape:{points:n.getLayout("largePoints")},incremental:!!i,ignoreCoarsePointer:!0,z2:1});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,t.add(c),c.useStyle(n.getVisual("style")),c.style.stroke=null,ot(c).seriesIndex=r.seriesIndex,r.get("silent")||(c.on("mousedown",WT),c.on("mousemove",WT)),e&&e.push(c)}var WT=cd(function(r){var t=this,e=V8(t,r.offsetX,r.offsetY);ot(t).dataIndex=e>=0?e:null},30,!1);function V8(r,t,e){for(var i=r.baseDimIdx,n=1-i,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,h=0,c=a.length/3;h<c;h++){var f=h*3;if(l[i]=u,l[n]=a[f+2],s[i]=a[f+i],s[n]=a[f+n],l[n]<0&&(s[n]+=l[n],l[n]=-l[n]),t>=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[h]}return-1}function Zk(r,t,e){if(Co(e,"cartesian2d")){var i=t,n=e.getArea();return{x:r?i.x:n.x,y:r?n.y:i.y,width:r?i.width:n.width,height:r?n.height:i.height}}else{var n=e.getArea(),a=t;return{cx:n.cx,cy:n.cy,r0:r?n.r0:a.r0,r:r?n.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function F8(r,t,e){var i=r.type==="polar"?Fe:wt;return new i({shape:Zk(t,e,r),silent:!0,z2:0})}function G8(r){r.registerChartView(k8),r.registerSeriesModel(A8),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ut(QP,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,tk("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,$k("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})})}var UT=Math.PI*2,Dc=Math.PI/180;function jk(r,t){return ue(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function qk(r,t){var e=jk(r,t),i=r.get("center"),n=r.get("radius");V(n)||(n=[0,n]);var a=U(e.width,t.getWidth()),o=U(e.height,t.getHeight()),s=Math.min(a,o),l=U(n[0],s/2),u=U(n[1],s/2),h,c,f=r.coordinateSystem;if(f){var v=f.dataToPoint(i);h=v[0]||0,c=v[1]||0}else V(i)||(i=[i,i]),h=U(i[0],a)+e.x,c=U(i[1],o)+e.y;return{cx:h,cy:c,r0:l,r:u}}function H8(r,t,e){t.eachSeriesByType(r,function(i){var n=i.getData(),a=n.mapDimension("value"),o=jk(i,e),s=qk(i,e),l=s.cx,u=s.cy,h=s.r,c=s.r0,f=-i.get("startAngle")*Dc,v=i.get("endAngle"),d=i.get("padAngle")*Dc;v=v==="auto"?f-UT:-v*Dc;var p=i.get("minAngle")*Dc,g=p+d,y=0;n.each(a,function(N){!isNaN(N)&&y++});var m=n.getSum(a),_=Math.PI/(m||y)*2,x=i.get("clockwise"),b=i.get("roseType"),S=i.get("stillShowZeroSum"),w=n.getDataExtent(a);w[0]=0;var T=x?1:-1,M=[f,v],C=T*d/2;a_(M,!x),f=M[0],v=M[1];var D=Kk(i);D.startAngle=f,D.endAngle=v,D.clockwise=x;var L=Math.abs(v-f),I=L,P=0,k=f;if(n.setLayout({viewRect:o,r:h}),n.each(a,function(N,O){var B;if(isNaN(N)){n.setItemLayout(O,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:l,cy:u,r0:c,r:b?NaN:h});return}b!=="area"?B=m===0&&S?_:N*_:B=L/y,B<g?(B=g,I-=g):P+=N;var G=k+T*B,H=0,W=0;d>B?(H=k+T*B/2,W=H):(H=k+C,W=G-C),n.setItemLayout(O,{angle:B,startAngle:H,endAngle:W,clockwise:x,cx:l,cy:u,r0:c,r:b?Pt(N,w,[c,h]):h}),k=G}),I<UT&&y)if(I<=.001){var R=L/y;n.each(a,function(N,O){if(!isNaN(N)){var B=n.getItemLayout(O);B.angle=R;var G=0,H=0;R<d?(G=f+T*(O+1/2)*R,H=G):(G=f+T*O*R+C,H=f+T*(O+1)*R-C),B.startAngle=G,B.endAngle=H}})}else _=I/P,k=f,n.each(a,function(N,O){if(!isNaN(N)){var B=n.getItemLayout(O),G=B.angle===g?g:N*_,H=0,W=0;G<d?(H=k+T*G/2,W=H):(H=k+C,W=k+T*G-C),B.startAngle=H,B.endAngle=W,k+=T*G}})})}var Kk=Tt();function Ch(r){return{seriesType:r,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(!(!i||!i.length)){var n=t.getData();n.filterSelf(function(a){for(var o=n.getName(a),s=0;s<i.length;s++)if(!i[s].isSelected(o))return!1;return!0})}}}}var W8=Math.PI/180;function YT(r,t,e,i,n,a,o,s,l,u){if(r.length<2)return;function h(p){for(var g=p.rB,y=g*g,m=0;m<p.list.length;m++){var _=p.list[m],x=Math.abs(_.label.y-e),b=i+_.len,S=b*b,w=Math.sqrt(Math.abs((1-x*x/y)*S)),T=t+(w+_.len2)*n,M=T-_.label.x,C=_.targetTextWidth-M*n;Jk(_,C,!0),_.label.x=T}}function c(p){for(var g={list:[],maxY:0},y={list:[],maxY:0},m=0;m<p.length;m++)if(p[m].labelAlignTo==="none"){var _=p[m],x=_.label.y>e?y:g,b=Math.abs(_.label.y-e);if(b>=x.maxY){var S=_.label.x-t-_.len2*n,w=i+_.len,T=Math.abs(S)<w?Math.sqrt(b*b/(1-S*S/w/w)):w;x.rB=T,x.maxY=b}x.list.push(_)}h(g),h(y)}for(var f=r.length,v=0;v<f;v++)if(r[v].position==="outer"&&r[v].labelAlignTo==="labelLine"){var d=r[v].label.x-u;r[v].linePoints[1][0]+=d,r[v].label.x=u}bk(r,l,l+o)&&c(r)}function U8(r,t,e,i,n,a,o,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,f=0;f<r.length;f++){var v=r[f].label;sg(r[f])||(v.x<t?(h=Math.min(h,v.x),l.push(r[f])):(c=Math.max(c,v.x),u.push(r[f])))}for(var f=0;f<r.length;f++){var d=r[f];if(!sg(d)&&d.linePoints){if(d.labelStyleWidth!=null)continue;var v=d.label,p=d.linePoints,g=void 0;d.labelAlignTo==="edge"?v.x<t?g=p[2][0]-d.labelDistance-o-d.edgeDistance:g=o+n-d.edgeDistance-p[2][0]-d.labelDistance:d.labelAlignTo==="labelLine"?v.x<t?g=h-o-d.bleedMargin:g=o+n-c-d.bleedMargin:v.x<t?g=v.x-o-d.bleedMargin:g=o+n-v.x-d.bleedMargin,d.targetTextWidth=g,Jk(d,g)}}YT(u,t,e,i,1,n,a,o,s,c),YT(l,t,e,i,-1,n,a,o,s,h);for(var f=0;f<r.length;f++){var d=r[f];if(!sg(d)&&d.linePoints){var v=d.label,p=d.linePoints,y=d.labelAlignTo==="edge",m=v.style.padding,_=m?m[1]+m[3]:0,x=v.style.backgroundColor?0:_,b=d.rect.width+x,S=p[1][0]-p[2][0];y?v.x<t?p[2][0]=o+d.edgeDistance+b+d.labelDistance:p[2][0]=o+n-d.edgeDistance-b-d.labelDistance:(v.x<t?p[2][0]=v.x+d.labelDistance:p[2][0]=v.x-d.labelDistance,p[1][0]=p[2][0]+S),p[1][1]=p[2][1]=v.y}}}function Jk(r,t,e){if(e===void 0&&(e=!1),r.labelStyleWidth==null){var i=r.label,n=i.style,a=r.rect,o=n.backgroundColor,s=n.padding,l=s?s[1]+s[3]:0,u=n.overflow,h=a.width+(o?0:l);if(t<h||e){var c=a.height;if(u&&u.match("break")){i.setStyle("backgroundColor",null),i.setStyle("width",t-l);var f=i.getBoundingRect();i.setStyle("width",Math.ceil(f.width)),i.setStyle("backgroundColor",o)}else{var v=t-l,d=t<h?v:e?v>r.unconstrainedWidth?null:v:null;i.setStyle("width",d)}var p=i.getBoundingRect();a.width=p.width;var g=(i.style.margin||0)+2.1;a.height=p.height+g,a.y-=(a.height-c)/2}}}function sg(r){return r.position==="center"}function Y8(r){var t=r.getData(),e=[],i,n,a=!1,o=(r.get("minShowLabelAngle")||0)*W8,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,h=s.x,c=s.y,f=s.height;function v(S){S.ignore=!0}function d(S){if(!S.ignore)return!0;for(var w in S.states)if(S.states[w].ignore===!1)return!0;return!1}t.each(function(S){var w=t.getItemGraphicEl(S),T=w.shape,M=w.getTextContent(),C=w.getTextGuideLine(),D=t.getItemModel(S),L=D.getModel("label"),I=L.get("position")||D.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),k=L.get("alignTo"),R=U(L.get("edgeDistance"),u),N=L.get("bleedMargin"),O=D.getModel("labelLine"),B=O.get("length");B=U(B,u);var G=O.get("length2");if(G=U(G,u),Math.abs(T.endAngle-T.startAngle)<o){A(M.states,v),M.ignore=!0,C&&(A(C.states,v),C.ignore=!0);return}if(d(M)){var H=(T.startAngle+T.endAngle)/2,W=Math.cos(H),q=Math.sin(H),K,nt,Ct,te;i=T.cx,n=T.cy;var dt=I==="inside"||I==="inner";if(I==="center")K=T.cx,nt=T.cy,te="center";else{var rt=(dt?(T.r+T.r0)/2*W:T.r*W)+i,gt=(dt?(T.r+T.r0)/2*q:T.r*q)+n;if(K=rt+W*3,nt=gt+q*3,!dt){var J=rt+W*(B+l-T.r),st=gt+q*(B+l-T.r),Ht=J+(W<0?-1:1)*G,Et=st;k==="edge"?K=W<0?h+R:h+u-R:K=Ht+(W<0?-P:P),nt=Et,Ct=[[rt,gt],[J,st],[Ht,Et]]}te=dt?"center":k==="edge"?W>0?"right":"left":W>0?"left":"right"}var Vt=Math.PI,Xt=0,fe=L.get("rotate");if(Mt(fe))Xt=fe*(Vt/180);else if(I==="center")Xt=0;else if(fe==="radial"||fe===!0){var sr=W<0?-H+Vt:-H;Xt=sr}else if(fe==="tangential"&&I!=="outside"&&I!=="outer"){var Je=Math.atan2(W,q);Je<0&&(Je=Vt*2+Je);var ia=q>0;ia&&(Je=Vt+Je),Xt=Je-Vt}if(a=!!Xt,M.x=K,M.y=nt,M.rotation=Xt,M.setStyle({verticalAlign:"middle"}),dt){M.setStyle({align:te});var Ld=M.states.select;Ld&&(Ld.x+=M.x,Ld.y+=M.y)}else{var sn=M.getBoundingRect().clone();sn.applyTransform(M.getComputedTransform());var lb=(M.style.margin||0)+2.1;sn.y-=lb/2,sn.height+=lb,e.push({label:M,labelLine:C,position:I,len:B,len2:G,minTurnAngle:O.get("minTurnAngle"),maxSurfaceAngle:O.get("maxSurfaceAngle"),surfaceNormal:new ct(W,q),linePoints:Ct,textAlign:te,labelDistance:P,labelAlignTo:k,edgeDistance:R,bleedMargin:N,rect:sn,unconstrainedWidth:sn.width,labelStyleWidth:M.style.width})}w.setTextConfig({inside:dt})}}),!a&&r.get("avoidLabelOverlap")&&U8(e,i,n,l,u,f,h,c);for(var p=0;p<e.length;p++){var g=e[p],y=g.label,m=g.labelLine,_=isNaN(y.x)||isNaN(y.y);if(y){y.setStyle({align:g.textAlign}),_&&(A(y.states,v),y.ignore=!0);var x=y.states.select;x&&(x.x+=y.x,x.y+=y.y)}if(m){var b=g.linePoints;_||!b?(A(m.states,v),m.ignore=!0):(mk(b,g.minTurnAngle),dY(b,g.surfaceNormal,g.maxSurfaceAngle),m.setShape({points:b}),y.__hostTarget.textGuideLineConfig={anchor:new ct(b[0][0],b[0][1])})}}}var $8=function(r){E(t,r);function t(e,i,n){var a=r.call(this)||this;a.z2=2;var o=new St;return a.setTextContent(o),a.updateData(e,i,n,!0),a}return t.prototype.updateData=function(e,i,n,a){var o=this,s=e.hostModel,l=e.getItemModel(i),u=l.getModel("emphasis"),h=e.getItemLayout(i),c=z(Ka(l.getModel("itemStyle"),h,!0),h);if(isNaN(c.startAngle)){o.setShape(c);return}if(a){o.setShape(c);var f=s.getShallow("animationType");s.ecModel.ssr?($t(o,{scaleX:0,scaleY:0},s,{dataIndex:i,isFrom:!0}),o.originX=c.cx,o.originY=c.cy):f==="scale"?(o.shape.r=h.r0,$t(o,{shape:{r:h.r}},s,i)):n!=null?(o.setShape({startAngle:n,endAngle:n}),$t(o,{shape:{startAngle:h.startAngle,endAngle:h.endAngle}},s,i)):(o.shape.endAngle=h.startAngle,At(o,{shape:{endAngle:h.endAngle}},s,i))}else ri(o),At(o,{shape:c},s,i);o.useStyle(e.getItemVisual(i,"style")),Ce(o,l);var v=(h.startAngle+h.endAngle)/2,d=s.get("selectedOffset"),p=Math.cos(v)*d,g=Math.sin(v)*d,y=l.getShallow("cursor");y&&o.attr("cursor",y),this._updateLabel(s,e,i),o.ensureState("emphasis").shape=z({r:h.r+(u.get("scale")&&u.get("scaleSize")||0)},Ka(u.getModel("itemStyle"),h)),z(o.ensureState("select"),{x:p,y:g,shape:Ka(l.getModel(["select","itemStyle"]),h)}),z(o.ensureState("blur"),{shape:Ka(l.getModel(["blur","itemStyle"]),h)});var m=o.getTextGuideLine(),_=o.getTextContent();m&&z(m.ensureState("select"),{x:p,y:g}),z(_.ensureState("select"),{x:p,y:g}),Kt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,i,n){var a=this,o=i.getItemModel(n),s=o.getModel("labelLine"),l=i.getItemVisual(n,"style"),u=l&&l.fill,h=l&&l.opacity;Ae(a,me(o),{labelFetcher:i.hostModel,labelDataIndex:n,inheritColor:u,defaultOpacity:h,defaultText:e.getFormattedLabel(n,"normal")||i.getName(n)});var c=a.getTextContent();a.setTextConfig({position:null,rotation:null}),c.attr({z2:10});var f=e.get(["label","position"]);if(f!=="outside"&&f!=="outer")a.removeTextGuideLine();else{var v=this.getTextGuideLine();v||(v=new We,this.setTextGuideLine(v)),tx(this,ex(o),{stroke:u,opacity:jr(s.get(["lineStyle","opacity"]),h,1)})}},t}(Fe),X8=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,i,n,a){var o=e.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var h=o.getItemLayout(0),c=1;isNaN(h&&h.startAngle)&&c<o.count();++c)h=o.getItemLayout(c);h&&(u=h.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&e.get("showEmptyCircle")){var f=Kk(e),v=new Fe({shape:z(qk(e,n),f)});v.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=v,l.add(v)}o.diff(s).add(function(d){var p=new $8(o,d,u);o.setItemGraphicEl(d,p),l.add(p)}).update(function(d,p){var g=s.getItemGraphicEl(p);g.updateData(o,d,u),g.off("click"),l.add(g),o.setItemGraphicEl(d,g)}).remove(function(d){var p=s.getItemGraphicEl(d);Vu(p,e,d)}).execute(),Y8(e),e.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,i){var n=i.getData(),a=n.getItemLayout(0);if(a){var o=e[0]-a.cx,s=e[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="pie",t}(Ot);function Qs(r,t,e){t=V(t)&&{coordDimensions:t}||z({encodeDefine:r.getEncode()},t);var i=r.getSource(),n=qs(i,t).dimensions,a=new Be(n,r);return a.initData(i,e),a}var Ah=function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var i=this._getDataWithEncodedVisual();return i.getItemVisual(t,e)},r}(),Z8=Tt(),j8=function(r){E(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 Ah($(this.getData,this),$(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Qs(this,{coordDimensions:["value"],encodeDefaulter:ut(D_,this)})},t.prototype.getDataParams=function(e){var i=this.getData(),n=Z8(i),a=n.seats;if(!a){var o=[];i.each(i.mapDimension("value"),function(l){o.push(l)}),a=n.seats=_2(o,i.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=a[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){co(e,"labelLine",["show"]);var i=e.labelLine,n=e.emphasis.labelLine;i.show=i.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,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(zt);function q8(r){return{seriesType:r,reset:function(t,e){var i=t.getData();i.filterSelf(function(n){var a=i.mapDimension("value"),o=i.get(a,n);return!(Mt(o)&&!isNaN(o)&&o<0)})}}}function K8(r){r.registerChartView(X8),r.registerSeriesModel(j8),pP("pie",r.registerAction),r.registerLayout(ut(H8,"pie")),r.registerProcessor(Ch("pie")),r.registerProcessor(q8("pie"))}var J8=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,i){return Li(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,i,n){return n.point(i.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(zt),Qk=4,Q8=function(){function r(){}return r}(),t$=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i._off=0,i.hoverDataIdx=-1,i}return t.prototype.getDefaultShape=function(){return new Q8},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,i){var n=i.points,a=i.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&a[0]<Qk,h=this.softClipShape,c;if(u){this._ctx=l;return}for(this._ctx=null,c=this._off;c<n.length;){var f=n[c++],v=n[c++];isNaN(f)||isNaN(v)||h&&!h.contain(f,v)||(s.x=f-a[0]/2,s.y=v-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(e,s,!0))}this.incremental&&(this._off=c,this.notClear=!0)},t.prototype.afterBrush=function(){var e=this.shape,i=e.points,n=e.size,a=this._ctx,o=this.softClipShape,s;if(a){for(s=this._off;s<i.length;){var l=i[s++],u=i[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-n[0]/2,u-n[1]/2,n[0],n[1])}this.incremental&&(this._off=s,this.notClear=!0)}},t.prototype.findDataIndex=function(e,i){for(var n=this.shape,a=n.points,o=n.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=a.length/2-1;u>=0;u--){var h=u*2,c=a[h]-s/2,f=a[h+1]-l/2;if(e>=c&&i>=f&&e<=c+s&&i<=f+l)return u}return-1},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect();if(e=n[0],i=n[1],a.contain(e,i)){var o=this.hoverDataIdx=this.findDataIndex(e,i);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var i=this.shape,n=i.points,a=i.size,o=a[0],s=a[1],l=1/0,u=1/0,h=-1/0,c=-1/0,f=0;f<n.length;){var v=n[f++],d=n[f++];l=Math.min(v,l),h=Math.max(v,h),u=Math.min(d,u),c=Math.max(d,c)}e=this._rect=new ft(l-o/2,u-s/2,h-l+o,c-u+s)}return e},t}(_t),e$=function(){function r(){this.group=new at}return r.prototype.updateData=function(t,e){this._clear();var i=this._create();i.setShape({points:t.getLayout("points")}),this._setCommon(i,t,e)},r.prototype.updateLayout=function(t){var e=t.getLayout("points");this.group.eachChild(function(i){if(i.startIndex!=null){var n=(i.endIndex-i.startIndex)*2,a=i.startIndex*4*2;e=new Float32Array(e.buffer,a,n)}i.setShape("points",e),i.reset()})},r.prototype.incrementalPrepareUpdate=function(t){this._clear()},r.prototype.incrementalUpdate=function(t,e,i){var n=this._newAdded[0],a=e.getLayout("points"),o=n&&n.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),n.endIndex=t.end,n.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,e,i)}},r.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},r.prototype._create=function(){var t=new t$({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},r.prototype._setCommon=function(t,e,i){var n=e.hostModel;i=i||{};var a=e.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=i.clipShape||null,t.symbolProxy=ae(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<Qk;t.useStyle(n.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("style"),l=s&&s.fill;l&&t.setColor(l);var u=ot(t);u.seriesIndex=n.seriesIndex,t.on("mousemove",function(h){u.dataIndex=null;var c=t.hoverDataIdx;c>=0&&(u.dataIndex=c+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),r$=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=e.getData(),o=this._updateSymbolDraw(a,e);o.updateData(a,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,i,n){var a=e.getData(),o=this._updateSymbolDraw(a,e);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(e,i,n){this._symbolDraw.incrementalUpdate(e,i.getData(),{clipShape:this._getClipShape(i)}),this._finished=e.end===i.getData().count()},t.prototype.updateTransform=function(e,i,n){var a=e.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=Mh("").reset(e,i,n);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var i=e.coordinateSystem;return i&&i.getArea&&i.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,i){var n=this._symbolDraw,a=i.pipelineContext,o=a.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new e$:new wh,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,i){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(Ot),i$=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(yt),Em=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",le).models[0]},t.type="cartesian2dAxis",t}(yt);re(Em,Js);var tR={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},n$=ht({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},tR),lx=ht({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},tR),a$=ht({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},lx),o$=tt({logBase:10},lx);const eR={category:n$,value:lx,time:a$,log:o$};var s$={value:1,category:1,time:1,log:1};function Is(r,t,e,i){A(s$,function(n,a){var o=ht(ht({},eR[a],!0),i,!0),s=function(l){E(u,l);function u(){var h=l!==null&&l.apply(this,arguments)||this;return h.type=t+"Axis."+a,h}return u.prototype.mergeDefaultAndTheme=function(h,c){var f=Gu(this),v=f?Us(h):{},d=c.getTheme();ht(h,d.get(a+"Axis")),ht(h,this.getDefaultOption()),h.type=$T(h),f&&Zn(h,v,f)},u.prototype.optionUpdated=function(){var h=this.option;h.type==="category"&&(this.__ordinalMeta=Cm.createByAxisModel(this))},u.prototype.getCategories=function(h){var c=this.option;if(c.type==="category")return h?c.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=t+"Axis."+a,u.defaultOption=o,u}(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",$T)}function $T(r){return r.type||(r.data?"category":"value")}var l$=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 F(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Dt(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}(),Om=["x","y"];function XT(r){return r.type==="interval"||r.type==="time"}var u$=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=Om,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!XT(e)||!XT(i))){var n=e.getExtent(),a=i.getExtent(),o=this.dataToPoint([n[0],a[0]]),s=this.dataToPoint([n[1],a[1]]),l=n[1]-n[0],u=a[1]-a[0];if(!(!l||!u)){var h=(s[0]-o[0])/l,c=(s[1]-o[1])/u,f=o[0]-n[0]*h,v=o[1]-a[0]*c,d=this._transform=[h,0,0,c,f,v];this._invTransform=bo([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var i=this.getAxis("x"),n=this.getAxis("y");return i.contain(i.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,i){var n=this.dataToPoint(e),a=this.dataToPoint(i),o=this.getArea(),s=new ft(n[0],n[1],a[0]-n[0],a[1]-n[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,i,n){n=n||[];var a=e[0],o=e[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return we(n,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(a,i)),n[1]=l.toGlobalCoord(l.dataToCoord(o,i)),n},t.prototype.clampData=function(e,i){var n=this.getAxis("x").scale,a=this.getAxis("y").scale,o=n.getExtent(),s=a.getExtent(),l=n.parse(e[0]),u=a.parse(e[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),i[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),i},t.prototype.pointToData=function(e,i){var n=[];if(this._invTransform)return we(n,e,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return n[0]=a.coordToData(a.toLocalCoord(e[0]),i),n[1]=o.coordToData(o.toLocalCoord(e[1]),i),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var i=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(i[0],i[1])-e,o=Math.min(n[0],n[1])-e,s=Math.max(i[0],i[1])-a+e,l=Math.max(n[0],n[1])-o+e;return new ft(a,o,s,l)},t}(l$),h$=function(r){E(t,r);function t(e,i,n,a,o){var s=r.call(this,e,i,n)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),e&&i[0]>i[1]&&i.reverse(),i},t.prototype.pointToData=function(e,i){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),i)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Br);function Nm(r,t,e){e=e||{};var i=r.coordinateSystem,n=t.axis,a={},o=n.getAxesOnZeroOf()[0],s=n.position,l=o?"onZero":s,u=n.dim,h=i.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],f={left:0,right:1,top:0,bottom:1,onZero:2},v=t.get("offset")||0,d=u==="x"?[c[2]-v,c[3]+v]:[c[0]-v,c[1]+v];if(o){var p=o.toGlobalCoord(o.dataToCoord(0));d[f.onZero]=Math.max(Math.min(p,d[1]),d[0])}a.position=[u==="y"?d[f[l]]:c[0],u==="x"?d[f[l]]:c[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=g[s],a.labelOffset=o?d[f[s]]-d[f.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),pe(e.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=t.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-y:y,a.z2=1,a}function ZT(r){return r.get("coordinateSystem")==="cartesian2d"}function jT(r){var t={xAxisModel:null,yAxisModel:null};return A(t,function(e,i){var n=i.replace(/Model$/,""),a=r.getReferringComponents(n,le).models[0];t[i]=a}),t}var lg=Math.log;function rR(r,t,e){var i=en.prototype,n=i.getTicks.call(e),a=i.getTicks.call(e,!0),o=n.length-1,s=i.getInterval.call(e),l=ak(r,t),u=l.extent,h=l.fixMin,c=l.fixMax;if(r.type==="log"){var f=lg(r.base);u=[lg(u[0])/f,lg(u[1])/f]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:h,fixMax:c});var v=i.getExtent.call(r);h&&(u[0]=v[0]),c&&(u[1]=v[1]);var d=i.getInterval.call(r),p=u[0],g=u[1];if(h&&c)d=(g-p)/o;else if(h)for(g=u[0]+d*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)d=Xp(d),g=u[0]+d*o;else if(c)for(p=u[1]-d*o;p>u[0]&&isFinite(p)&&isFinite(u[0]);)d=Xp(d),p=u[1]-d*o;else{var y=r.getTicks().length-1;y>o&&(d=Xp(d));var m=d*o;g=Math.ceil(u[1]/d)*d,p=Qt(g-m),p<0&&u[0]>=0?(p=0,g=Qt(m)):g>0&&u[1]<=0&&(g=0,p=-Qt(m))}var _=(n[0].value-a[0].value)/s,x=(n[o].value-a[o].value)/s;i.setExtent.call(r,p+d*_,g+d*x),i.setInterval.call(r,d),(_||x)&&i.setNiceExtent.call(r,p+d,g-d)}var c$=function(){function r(t,e,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Om,this._initCartesian(t,e,i),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model);function n(o){var s,l=xt(o),u=l.length;if(u){for(var h=[],c=u-1;c>=0;c--){var f=+l[c],v=o[f],d=v.model,p=v.scale;Am(p)&&d.get("alignTicks")&&d.get("interval")==null?h.push(v):(yo(p,d),Am(p)&&(s=v))}h.length&&(s||(s=h.pop(),yo(s.scale,s.model)),A(h,function(g){rR(g.scale,g.model,s.scale)}))}}n(i.x),n(i.y);var a={};A(i.x,function(o){qT(i,"y",o,a)}),A(i.y,function(o){qT(i,"x",o,a)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,i){var n=t.getBoxLayoutParams(),a=!i&&t.get("containLabel"),o=ue(n,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(A(s,function(u){if(!u.model.get(["axisLabel","inside"])){var h=PU(u);if(h){var c=u.isHorizontal()?"height":"width",f=u.model.get(["axisLabel","margin"]);o[c]-=h[c]+f,u.position==="top"?o.y+=h.height+f:u.position==="left"&&(o.x+=h.width+f)}}}),l()),A(this._coordsList,function(u){u.calcAffineTransform()});function l(){A(s,function(u){var h=u.isHorizontal(),c=h?[0,o.width]:[0,o.height],f=u.inverse?1:0;u.setExtent(c[f],c[1-f]),f$(u,h?o.x:o.y)})}},r.prototype.getAxis=function(t,e){var i=this._axesMap[t];if(i!=null)return i[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var i="x"+t+"y"+e;return this._coordsMap[i]}et(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,a=this._coordsList;n<a.length;n++)if(a[n].getAxis("x").index===t||a[n].getAxis("y").index===e)return a[n]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(t,e,i){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},r.prototype.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},r.prototype._findConvertTarget=function(t){var e=t.seriesModel,i=t.xAxisModel||e&&e.getReferringComponents("xAxis",le).models[0],n=t.yAxisModel||e&&e.getReferringComponents("yAxis",le).models[0],a=t.gridModel,o=this._coordsList,s,l;if(e)s=e.coordinateSystem,vt(o,s)<0&&(s=null);else if(i&&n)s=this.getCartesian(i.componentIndex,n.componentIndex);else if(i)l=this.getAxis("x",i.componentIndex);else if(n)l=this.getAxis("y",n.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},r.prototype._initCartesian=function(t,e,i){var n=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(e.eachComponent("xAxis",u("x"),this),e.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,A(s.x,function(h,c){A(s.y,function(f,v){var d="x"+c+"y"+v,p=new u$(d);p.master=n,p.model=t,n._coordsMap[d]=p,n._coordsList.push(p),p.addAxis(h),p.addAxis(f)})});function u(h){return function(c,f){if(ug(c,t)){var v=c.get("position");h==="x"?v!=="top"&&v!=="bottom"&&(v=o.bottom?"top":"bottom"):v!=="left"&&v!=="right"&&(v=o.left?"right":"left"),o[v]=!0;var d=new h$(h,bh(c),[0,0],c.get("type"),v),p=d.type==="category";d.onBand=p&&c.get("boundaryGap"),d.inverse=c.get("inverse"),c.axis=d,d.model=c,d.grid=a,d.index=f,a._axesList.push(d),s[h][f]=d,l[h]++}}}},r.prototype._updateScale=function(t,e){A(this._axesList,function(n){if(n.scale.setExtent(1/0,-1/0),n.type==="category"){var a=n.model.get("categorySortInfo");n.scale.setSortInfo(a)}}),t.eachSeries(function(n){if(ZT(n)){var a=jT(n),o=a.xAxisModel,s=a.yAxisModel;if(!ug(o,e)||!ug(s,e))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=n.getData(),h=l.getAxis("x"),c=l.getAxis("y");i(u,h),i(u,c)}},this);function i(n,a){A(av(n,a.dim),function(o){a.scale.unionExtentFromData(n,o)})}},r.prototype.getTooltipAxes=function(t){var e=[],i=[];return A(this.getCartesians(),function(n){var a=t!=null&&t!=="auto"?n.getAxis(t):n.getBaseAxis(),o=n.getOtherAxis(a);vt(e,a)<0&&e.push(a),vt(i,o)<0&&i.push(o)}),{baseAxes:e,otherAxes:i}},r.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,a){var o=new r(n,t,e);o.name="grid_"+a,o.resize(n,e,!0),n.coordinateSystem=o,i.push(o)}),t.eachSeries(function(n){if(ZT(n)){var a=jT(n),o=a.xAxisModel,s=a.yAxisModel,l=o.getCoordSysModel(),u=l.coordinateSystem;n.coordinateSystem=u.getCartesian(o.componentIndex,s.componentIndex)}}),i},r.dimensions=Om,r}();function ug(r,t){return r.getCoordSysModel()===t}function qT(r,t,e,i){e.getAxesOnZeroOf=function(){return a?[a]:[]};var n=r[t],a,o=e.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)KT(n[l])&&(a=n[l]);else for(var u in n)if(n.hasOwnProperty(u)&&KT(n[u])&&!i[h(n[u])]){a=n[u];break}a&&(i[h(a)]=!0);function h(c){return c.dim+"_"+c.index}}function KT(r){return r&&r.type!=="category"&&r.type!=="time"&&IU(r)}function f$(r,t){var e=r.getExtent(),i=e[0]+e[1];r.toGlobalCoord=r.dim==="x"?function(n){return n+t}:function(n){return i-n+t},r.toLocalCoord=r.dim==="x"?function(n){return n-t}:function(n){return i-n+t}}var Pn=Math.PI,je=function(){function r(t,e){this.group=new at,this.opt=e,this.axisModel=t,tt(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var i=new at({x:e.position[0],y:e.position[1],rotation:e.rotation});i.updateTransform(),this._transformGroup=i}return r.prototype.hasBuilder=function(t){return!!JT[t]},r.prototype.add=function(t){JT[t](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(t,e,i){var n=J0(e-t),a,o;return Ts(n)?(o=i>0?"top":"bottom",a="center"):Ts(n-Pn)?(o=i>0?"bottom":"top",a="center"):(o="middle",n>0&&n<Pn?a=i>0?"right":"left":a=i>0?"left":"right"),{rotation:n,textAlign:a,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}(),JT={axisLine:function(r,t,e,i){var n=t.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var a=t.axis.getExtent(),o=i.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(we(s,s,o),we(l,l,o));var h=z({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new ce({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:h,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Cs(c.shape,c.style.lineWidth),c.anid="line",e.add(c);var f=t.get(["axisLine","symbol"]);if(f!=null){var v=t.get(["axisLine","symbolSize"]);Y(f)&&(f=[f,f]),(Y(v)||Mt(v))&&(v=[v,v]);var d=Mo(t.get(["axisLine","symbolOffset"])||0,v),p=v[0],g=v[1];A([{rotate:r.rotation+Math.PI/2,offset:d[0],r:0},{rotate:r.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,m){if(f[m]!=="none"&&f[m]!=null){var _=ae(f[m],-p/2,-g/2,p,g,h.stroke,!0),x=y.r+y.offset,b=u?l:s;_.attr({rotation:y.rotate,x:b[0]+x*Math.cos(r.rotation),y:b[1]-x*Math.sin(r.rotation),silent:!0,z2:11}),e.add(_)}})}}},axisTickLabel:function(r,t,e,i){var n=p$(e,i,t,r),a=y$(e,i,t,r);if(d$(t,a,n),g$(e,i,t,r.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=_k(F(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));Sk(o)}},axisName:function(r,t,e,i){var n=pe(r.axisName,t.get("name"));if(n){var a=t.get("nameLocation"),o=r.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),h=u[0]>u[1]?-1:1,c=[a==="start"?u[0]-h*l:a==="end"?u[1]+h*l:(u[0]+u[1])/2,tM(a)?r.labelOffset+o*l:0],f,v=t.get("nameRotate");v!=null&&(v=v*Pn/180);var d;tM(a)?f=je.innerTextLayout(r.rotation,v??r.rotation,o):(f=v$(r.rotation,a,v||0,u),d=r.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(f.rotation)),!isFinite(d)&&(d=null)));var p=s.getFont(),g=t.get("nameTruncate",!0)||{},y=g.ellipsis,m=pe(r.nameTruncateMaxWidth,g.maxWidth,d),_=new St({x:c[0],y:c[1],rotation:f.rotation,silent:je.isLabelSilent(t),style:Gt(s,{text:n,font:p,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||f.textAlign,verticalAlign:s.get("verticalAlign")||f.textVerticalAlign}),z2:1});if(So({el:_,componentModel:t,itemName:n}),_.__fullText=n,_.anid="name",t.get("triggerEvent")){var x=je.makeAxisEventDataBase(t);x.targetType="axisName",x.name=n,ot(_).eventData=x}i.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function v$(r,t,e,i){var n=J0(e-r),a,o,s=i[0]>i[1],l=t==="start"&&!s||t!=="start"&&s;return Ts(n-Pn/2)?(o=l?"bottom":"top",a="center"):Ts(n-Pn*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",n<Pn*1.5&&n>Pn/2?a=l?"left":"right":a=l?"right":"left"),{rotation:n,textAlign:a,textVerticalAlign:o}}function d$(r,t,e){if(!ok(r.axis)){var i=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);t=t||[],e=e||[];var a=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=e[0],h=e[1],c=e[e.length-1],f=e[e.length-2];i===!1?(mr(a),mr(u)):QT(a,o)&&(i?(mr(o),mr(h)):(mr(a),mr(u))),n===!1?(mr(s),mr(c)):QT(l,s)&&(n?(mr(l),mr(f)):(mr(s),mr(c)))}}function mr(r){r&&(r.ignore=!0)}function QT(r,t){var e=r&&r.getBoundingRect().clone(),i=t&&t.getBoundingRect().clone();if(!(!e||!i)){var n=hh([]);return Qn(n,n,-r.rotation),e.applyTransform(bi([],n,r.getLocalTransform())),i.applyTransform(bi([],n,t.getLocalTransform())),e.intersect(i)}}function tM(r){return r==="middle"||r==="center"}function iR(r,t,e,i,n){for(var a=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=e,t&&(we(o,o,t),we(s,s,t));var h=new ce({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});Cs(h.shape,h.style.lineWidth),h.anid=n+"_"+r[l].tickValue,a.push(h)}return a}function p$(r,t,e,i){var n=e.axis,a=e.getModel("axisTick"),o=a.get("show");if(o==="auto"&&i.handleAutoShown&&(o=i.handleAutoShown("axisTick")),!(!o||n.scale.isBlank())){for(var s=a.getModel("lineStyle"),l=i.tickDirection*a.get("length"),u=n.getTicksCoords(),h=iR(u,t.transform,l,tt(s.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<h.length;c++)r.add(h[c]);return h}}function g$(r,t,e,i){var n=e.axis,a=e.getModel("minorTick");if(!(!a.get("show")||n.scale.isBlank())){var o=n.getMinorTicksCoords();if(o.length)for(var s=a.getModel("lineStyle"),l=i*a.get("length"),u=tt(s.getLineStyle(),tt(e.getModel("axisTick").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})),h=0;h<o.length;h++)for(var c=iR(o[h],t.transform,l,u,"minorticks_"+h),f=0;f<c.length;f++)r.add(c[f])}}function y$(r,t,e,i){var n=e.axis,a=pe(i.axisLabelShow,e.get(["axisLabel","show"]));if(!(!a||n.scale.isBlank())){var o=e.getModel("axisLabel"),s=o.get("margin"),l=n.getViewLabels(),u=(pe(i.labelRotate,o.get("rotate"))||0)*Pn/180,h=je.innerTextLayout(i.rotation,u,i.labelDirection),c=e.getCategories&&e.getCategories(!0),f=[],v=je.isLabelSilent(e),d=e.get("triggerEvent");return A(l,function(p,g){var y=n.scale.type==="ordinal"?n.scale.getRawOrdinalNumber(p.tickValue):p.tickValue,m=p.formattedLabel,_=p.rawLabel,x=o;if(c&&c[y]){var b=c[y];et(b)&&b.textStyle&&(x=new Lt(b.textStyle,o,e.ecModel))}var S=x.getTextColor()||e.get(["axisLine","lineStyle","color"]),w=n.dataToCoord(y),T=x.getShallow("align",!0)||h.textAlign,M=lt(x.getShallow("alignMinLabel",!0),T),C=lt(x.getShallow("alignMaxLabel",!0),T),D=x.getShallow("verticalAlign",!0)||x.getShallow("baseline",!0)||h.textVerticalAlign,L=lt(x.getShallow("verticalAlignMinLabel",!0),D),I=lt(x.getShallow("verticalAlignMaxLabel",!0),D),P=new St({x:w,y:i.labelOffset+i.labelDirection*s,rotation:h.rotation,silent:v,z2:10+(p.level||0),style:Gt(x,{text:m,align:g===0?M:g===l.length-1?C:T,verticalAlign:g===0?L:g===l.length-1?I:D,fill:Q(S)?S(n.type==="category"?_:n.type==="value"?y+"":y,g):S})});if(P.anid="label_"+y,So({el:P,componentModel:e,itemName:m,formatterParamsExtra:{isTruncated:function(){return P.isTruncated},value:_,tickIndex:g}}),d){var k=je.makeAxisEventDataBase(e);k.targetType="axisLabel",k.value=_,k.tickIndex=g,n.type==="category"&&(k.dataIndex=y),ot(P).eventData=k}t.add(P),P.updateTransform(),f.push(P),r.add(P),P.decomposeTransform()}),f}}function m$(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return _$(e,r,t),e.seriesInvolved&&b$(e,r),e}function _$(r,t,e){var i=t.getComponent("tooltip"),n=t.getComponent("axisPointer"),a=n.get("link",!0)||[],o=[];A(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=qu(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var h=s.model,c=h.getModel("tooltip",i);if(A(s.getAxes(),ut(p,!1,null)),s.getTooltipAxes&&i&&c.get("show")){var f=c.get("trigger")==="axis",v=c.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(c.get(["axisPointer","axis"]));(f||v)&&A(d.baseAxes,ut(p,v?"cross":!0,f)),v&&A(d.otherAxes,ut(p,"cross",!1))}function p(g,y,m){var _=m.model.getModel("axisPointer",n),x=_.get("show");if(!(!x||x==="auto"&&!g&&!Bm(_))){y==null&&(y=_.get("triggerTooltip")),_=g?x$(m,c,n,t,g,y):_;var b=_.get("snap"),S=_.get("triggerEmphasis"),w=qu(m.model),T=y||b||m.type==="category",M=r.axesInfo[w]={key:w,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,triggerEmphasis:S,involveSeries:T,snap:b,useHandle:Bm(_),seriesModels:[],linkGroup:null};u[w]=M,r.seriesInvolved=r.seriesInvolved||T;var C=S$(a,m);if(C!=null){var D=o[C]||(o[C]={axesInfo:{}});D.axesInfo[w]=M,D.mapper=a[C].mapper,M.linkGroup=D}}}})}function x$(r,t,e,i,n,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};A(s,function(f){l[f]=it(o.get(f))}),l.snap=r.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var h=o.get(["label","show"]);if(u.show=h??!0,!a){var c=l.lineStyle=o.get("crossStyle");c&&tt(u,c.textStyle)}}return r.model.getModel("axisPointer",new Lt(l,e,i))}function b$(r,t){t.eachSeries(function(e){var i=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),a=e.get(["tooltip","show"],!0);!i||n==="none"||n===!1||n==="item"||a===!1||e.get(["axisPointer","show"],!0)===!1||A(r.coordSysAxesInfo[qu(i.model)],function(o){var s=o.axis;i.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function S$(r,t){for(var e=t.model,i=t.dim,n=0;n<r.length;n++){var a=r[n]||{};if(hg(a[i+"AxisId"],e.id)||hg(a[i+"AxisIndex"],e.componentIndex)||hg(a[i+"AxisName"],e.name))return n}}function hg(r,t){return r==="all"||V(r)&&vt(r,t)>=0||r===t}function w$(r){var t=ux(r);if(t){var e=t.axisPointerModel,i=t.axis.scale,n=e.option,a=e.get("status"),o=e.get("value");o!=null&&(o=i.parse(o));var s=Bm(e);a==null&&(n.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),n.value=o,s&&(n.status=t.axis.scale.isBlank()?"hide":"show")}}function ux(r){var t=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[qu(r)]}function T$(r){var t=ux(r);return t&&t.axisPointerModel}function Bm(r){return!!r.get(["handle","show"])}function qu(r){return r.type+"||"+r.id}var eM={},Ao=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n,a){this.axisPointerClass&&w$(e),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,n,!0)},t.prototype.updateAxisPointer=function(e,i,n,a){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,i){var n=this._axisPointer;n&&n.remove(i)},t.prototype.dispose=function(e,i){this._disposeAxisPointer(i),r.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,i,n){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=T$(e);o?(this._axisPointer||(this._axisPointer=new a)).render(e,o,i,n):this._disposeAxisPointer(i)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,i){eM[e]=i},t.getAxisPointerClass=function(e){return e&&eM[e]},t.type="axis",t}(Yt),zm=Tt();function nR(r,t,e,i){var n=e.axis;if(!n.scale.isBlank()){var a=e.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=i.coordinateSystem.getRect(),u=n.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var h=s.length,c=zm(r).splitAreaColors,f=Z(),v=0;if(c)for(var d=0;d<u.length;d++){var p=c.get(u[d].tickValue);if(p!=null){v=(p+(h-1)*d)%h;break}}var g=n.toGlobalCoord(u[0].coord),y=o.getAreaStyle();s=V(s)?s:[s];for(var d=1;d<u.length;d++){var m=n.toGlobalCoord(u[d].coord),_=void 0,x=void 0,b=void 0,S=void 0;n.isHorizontal()?(_=g,x=l.y,b=m-_,S=l.height,g=_+b):(_=l.x,x=g,b=l.width,S=m-x,g=x+S);var w=u[d-1].tickValue;w!=null&&f.set(w,v),t.add(new wt({anid:w!=null?"area_"+w:null,shape:{x:_,y:x,width:b,height:S},style:tt({fill:s[v]},y),autoBatch:!0,silent:!0})),v=(v+1)%h}zm(r).splitAreaColors=f}}}function aR(r){zm(r).splitAreaColors=null}var M$=["axisLine","axisTickLabel","axisName"],C$=["splitArea","splitLine","minorSplitLine"],oR=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="CartesianAxisPointer",e}return t.prototype.render=function(e,i,n,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new at,this.group.add(this._axisGroup),!!e.get("show")){var s=e.getCoordSysModel(),l=Nm(s,e),u=new je(e,z({handleAutoShown:function(c){for(var f=s.coordinateSystem.getCartesians(),v=0;v<f.length;v++)if(Am(f[v].getOtherAxis(e.axis).scale))return!0;return!1}},l));A(M$,u.add,u),this._axisGroup.add(u.getGroup()),A(C$,function(c){e.get([c,"show"])&&A$[c](this,this._axisGroup,e,s)},this);var h=a&&a.type==="changeAxisOrder"&&a.isInitSort;h||mh(o,this._axisGroup,e),r.prototype.render.call(this,e,i,n,a)}},t.prototype.remove=function(){aR(this)},t.type="cartesianAxis",t}(Ao),A$={splitLine:function(r,t,e,i){var n=e.axis;if(!n.scale.isBlank()){var a=e.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color"),l=a.get("showMinLine")!==!1,u=a.get("showMaxLine")!==!1;s=V(s)?s:[s];for(var h=i.coordinateSystem.getRect(),c=n.isHorizontal(),f=0,v=n.getTicksCoords({tickModel:a}),d=[],p=[],g=o.getLineStyle(),y=0;y<v.length;y++){var m=n.toGlobalCoord(v[y].coord);if(!(y===0&&!l||y===v.length-1&&!u)){var _=v[y].tickValue;c?(d[0]=m,d[1]=h.y,p[0]=m,p[1]=h.y+h.height):(d[0]=h.x,d[1]=m,p[0]=h.x+h.width,p[1]=m);var x=f++%s.length,b=new ce({anid:_!=null?"line_"+_:null,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},style:tt({stroke:s[x]},g),silent:!0});Cs(b.shape,g.lineWidth),t.add(b)}}}},minorSplitLine:function(r,t,e,i){var n=e.axis,a=e.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=i.coordinateSystem.getRect(),l=n.isHorizontal(),u=n.getMinorTicksCoords();if(u.length)for(var h=[],c=[],f=o.getLineStyle(),v=0;v<u.length;v++)for(var d=0;d<u[v].length;d++){var p=n.toGlobalCoord(u[v][d].coord);l?(h[0]=p,h[1]=s.y,c[0]=p,c[1]=s.y+s.height):(h[0]=s.x,h[1]=p,c[0]=s.x+s.width,c[1]=p);var g=new ce({anid:"minor_line_"+u[v][d].tickValue,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:c[0],y2:c[1]},style:f,silent:!0});Cs(g.shape,f.lineWidth),t.add(g)}},splitArea:function(r,t,e,i){nR(r,t,e,i)}},sR=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="xAxis",t}(oR),D$=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=sR.type,e}return t.type="yAxis",t}(oR),L$=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="grid",e}return t.prototype.render=function(e,i){this.group.removeAll(),e.get("show")&&this.group.add(new wt({shape:e.coordinateSystem.getRect(),style:tt({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(Yt),rM={offset:0};function lR(r){r.registerComponentView(L$),r.registerComponentModel(i$),r.registerCoordinateSystem("cartesian2d",c$),Is(r,"x",Em,rM),Is(r,"y",Em,rM),r.registerComponentView(sR),r.registerComponentView(D$),r.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function I$(r){pt(lR),r.registerSeriesModel(J8),r.registerChartView(r$),r.registerLayout(Mh("scatter"))}function P$(r){r.eachSeriesByType("radar",function(t){var e=t.getData(),i=[],n=t.coordinateSystem;if(n){var a=n.getIndicatorAxes();A(a,function(o,s){e.each(e.mapDimension(a[s].dim),function(l,u){i[u]=i[u]||[];var h=n.dataToPoint(l,s);i[u][s]=iM(h)?h:nM(n)})}),e.each(function(o){var s=OL(i[o],function(l){return iM(l)})||nM(n);i[o].push(s.slice()),e.setItemLayout(o,i[o])})}})}function iM(r){return!isNaN(r[0])&&!isNaN(r[1])}function nM(r){return[r.cx,r.cy]}function k$(r){var t=r.polar;if(t){V(t)||(t=[t]);var e=[];A(t,function(i,n){i.indicator?(i.type&&!i.shape&&(i.shape=i.type),r.radar=r.radar||[],V(r.radar)||(r.radar=[r.radar]),r.radar.push(i)):e.push(i)}),r.polar=e}A(r.series,function(i){i&&i.type==="radar"&&i.polarIndex&&(i.radarIndex=i.polarIndex)})}var R$=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=e.coordinateSystem,o=this.group,s=e.getData(),l=this._data;function u(f,v){var d=f.getItemVisual(v,"symbol")||"circle";if(d!=="none"){var p=js(f.getItemVisual(v,"symbolSize")),g=ae(d,-1,-1,2,2),y=f.getItemVisual(v,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:p[0]/2,scaleY:p[1]/2,rotation:y*Math.PI/180||0}),g}}function h(f,v,d,p,g,y){d.removeAll();for(var m=0;m<v.length-1;m++){var _=u(p,g);_&&(_.__dimIdx=m,f[m]?(_.setPosition(f[m]),wo[y?"initProps":"updateProps"](_,{x:v[m][0],y:v[m][1]},e,g)):_.setPosition(v[m]),d.add(_))}}function c(f){return F(f,function(v){return[a.cx,a.cy]})}s.diff(l).add(function(f){var v=s.getItemLayout(f);if(v){var d=new Ge,p=new We,g={shape:{points:v}};d.shape.points=c(v),p.shape.points=c(v),$t(d,g,e,f),$t(p,g,e,f);var y=new at,m=new at;y.add(p),y.add(d),y.add(m),h(p.shape.points,v,m,s,f,!0),s.setItemGraphicEl(f,y)}}).update(function(f,v){var d=l.getItemGraphicEl(v),p=d.childAt(0),g=d.childAt(1),y=d.childAt(2),m={shape:{points:s.getItemLayout(f)}};m.shape.points&&(h(p.shape.points,m.shape.points,y,s,f,!1),ri(g),ri(p),At(p,m,e),At(g,m,e),s.setItemGraphicEl(f,d))}).remove(function(f){o.remove(l.getItemGraphicEl(f))}).execute(),s.eachItemGraphicEl(function(f,v){var d=s.getItemModel(v),p=f.childAt(0),g=f.childAt(1),y=f.childAt(2),m=s.getItemVisual(v,"style"),_=m.fill;o.add(f),p.useStyle(tt(d.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),Ce(p,d,"lineStyle"),Ce(g,d,"areaStyle");var x=d.getModel("areaStyle"),b=x.isEmpty()&&x.parentModel.isEmpty();g.ignore=b,A(["emphasis","select","blur"],function(T){var M=d.getModel([T,"areaStyle"]),C=M.isEmpty()&&M.parentModel.isEmpty();g.ensureState(T).ignore=C&&b}),g.useStyle(tt(x.getAreaStyle(),{fill:_,opacity:.7,decal:m.decal}));var S=d.getModel("emphasis"),w=S.getModel("itemStyle").getItemStyle();y.eachChild(function(T){if(T instanceof xe){var M=T.style;T.useStyle(z({image:M.image,x:M.x,y:M.y,width:M.width,height:M.height},m))}else T.useStyle(m),T.setColor(_),T.style.strokeNoScale=!0;var C=T.ensureState("emphasis");C.style=it(w);var D=s.getStore().get(s.getDimensionIndex(T.__dimIdx),v);(D==null||isNaN(D))&&(D=""),Ae(T,me(d),{labelFetcher:s.hostModel,labelDataIndex:v,labelDimIndex:T.__dimIdx,defaultText:D,inheritColor:_,defaultOpacity:m.opacity})}),Kt(f,S.get("focus"),S.get("blurScope"),S.get("disabled"))}),this._data=s},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t}(Ot),E$=function(r){E(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),this.legendVisualProvider=new Ah($(this.getData,this),$(this.getRawData,this))},t.prototype.getInitialData=function(e,i){return Qs(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(e,i,n){var a=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(e),u=l===""?this.name:l,h=iP(this,e);return _e("section",{header:u,sortBlocks:!0,blocks:F(s,function(c){var f=a.get(a.mapDimension(c.dim),e);return _e("nameValue",{markerType:"subItem",markerColor:h,name:c.name,value:f,sortParam:f})})})},t.prototype.getTooltipPosition=function(e){if(e!=null){for(var i=this.getData(),n=this.coordinateSystem,a=i.getValues(F(n.dimensions,function(u){return i.mapDimension(u)}),e),o=0,s=a.length;o<s;o++)if(!isNaN(a[o])){var l=n.getIndicatorAxes();return n.coordToPoint(l[o].dataToCoord(a[o]),o)}}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t}(zt),Tl=eR.value;function Lc(r,t){return tt({show:t},r)}var O$=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){var e=this.get("boundaryGap"),i=this.get("splitNumber"),n=this.get("scale"),a=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),h=this.get(["axisName","formatter"]),c=this.get("axisNameGap"),f=this.get("triggerEvent"),v=F(this.get("indicator")||[],function(d){d.max!=null&&d.max>0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var p=l;d.color!=null&&(p=tt({color:d.color},l));var g=ht(it(d),{boundaryGap:e,splitNumber:i,scale:n,axisLine:a,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:c,nameTextStyle:p,triggerEvent:f},!1);if(Y(h)){var y=g.name;g.name=h.replace("{value}",y??"")}else Q(h)&&(g.name=h(g.name,g));var m=new Lt(g,null,this.ecModel);return re(m,Js.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=v},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ht({lineStyle:{color:"#bbb"}},Tl.axisLine),axisLabel:Lc(Tl.axisLabel,!1),axisTick:Lc(Tl.axisTick,!1),splitLine:Lc(Tl.splitLine,!0),splitArea:Lc(Tl.splitArea,!0),indicator:[]},t}(yt),N$=["axisLine","axisTickLabel","axisName"],B$=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=this.group;a.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var i=e.coordinateSystem,n=i.getIndicatorAxes(),a=F(n,function(o){var s=o.model.get("showName")?o.name:"",l=new je(o.model,{axisName:s,position:[i.cx,i.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});A(a,function(o){A(N$,o.add,o),this.group.add(o.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(e){var i=e.coordinateSystem,n=i.getIndicatorAxes();if(!n.length)return;var a=e.get("shape"),o=e.getModel("splitLine"),s=e.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),h=o.get("show"),c=s.get("show"),f=l.get("color"),v=u.get("color"),d=V(f)?f:[f],p=V(v)?v:[v],g=[],y=[];function m(k,R,N){var O=N%R.length;return k[O]=k[O]||[],O}if(a==="circle")for(var _=n[0].getTicksCoords(),x=i.cx,b=i.cy,S=0;S<_.length;S++){if(h){var w=m(g,d,S);g[w].push(new Ai({shape:{cx:x,cy:b,r:_[S].coord}}))}if(c&&S<_.length-1){var w=m(y,p,S);y[w].push(new Bs({shape:{cx:x,cy:b,r0:_[S].coord,r:_[S+1].coord}}))}}else for(var T,M=F(n,function(k,R){var N=k.getTicksCoords();return T=T==null?N.length-1:Math.min(N.length-1,T),F(N,function(O){return i.coordToPoint(O.coord,R)})}),C=[],S=0;S<=T;S++){for(var D=[],L=0;L<n.length;L++)D.push(M[L][S]);if(D[0]&&D.push(D[0].slice()),h){var w=m(g,d,S);g[w].push(new We({shape:{points:D}}))}if(c&&C){var w=m(y,p,S-1);y[w].push(new Ge({shape:{points:D.concat(C)}}))}C=D.slice().reverse()}var I=l.getLineStyle(),P=u.getAreaStyle();A(y,function(k,R){this.group.add(cr(k,{style:tt({stroke:"none",fill:p[R%p.length]},P),silent:!0}))},this),A(g,function(k,R){this.group.add(cr(k,{style:tt({fill:"none",stroke:d[R%d.length]},I),silent:!0}))},this)},t.type="radar",t}(Yt),z$=function(r){E(t,r);function t(e,i,n){var a=r.call(this,e,i,n)||this;return a.type="value",a.angle=0,a.name="",a}return t}(Br),V$=function(){function r(t,e,i){this.dimensions=[],this._model=t,this._indicatorAxes=F(t.getIndicatorModels(),function(n,a){var o="indicator_"+a,s=new z$(o,new en);return s.name=n.get("name"),s.model=n,n.axis=s,this.dimensions.push(o),s},this),this.resize(t,i)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},r.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e],n=i.angle,a=this.cx+t*Math.cos(n),o=this.cy-t*Math.sin(n);return[a,o]},r.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var a=Math.atan2(-i,e),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var h=this._indicatorAxes[u],c=Math.abs(a-h.angle);c<o&&(s=h,l=u,o=c)}return[l,+(s&&s.coordToData(n))]},r.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),a=e.getHeight(),o=Math.min(n,a)/2;this.cx=U(i[0],n),this.cy=U(i[1],a),this.startAngle=t.get("startAngle")*Math.PI/180;var s=t.get("radius");(Y(s)||Mt(s))&&(s=[0,s]),this.r0=U(s[0],o),this.r=U(s[1],o),A(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var h=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;h=Math.atan2(Math.sin(h),Math.cos(h)),l.angle=h},this)},r.prototype.update=function(t,e){var i=this._indicatorAxes,n=this._model;A(i,function(s){s.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||t.getComponent("radar",s.get("radarIndex"))!==n)){var u=s.getData();A(i,function(h){h.scale.unionExtentFromData(u,u.mapDimension(h.dim))})}},this);var a=n.get("splitNumber"),o=new en;o.setExtent(0,a),o.setInterval(1),A(i,function(s,l){rR(s.scale,s.model,o)})},r.prototype.convertToPixel=function(t,e,i){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(t,e,i){return console.warn("Not implemented."),null},r.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},r.create=function(t,e){var i=[];return t.eachComponent("radar",function(n){var a=new r(n,t,e);i.push(a),n.coordinateSystem=a}),t.eachSeriesByType("radar",function(n){n.get("coordinateSystem")==="radar"&&(n.coordinateSystem=i[n.get("radarIndex")||0])}),i},r.dimensions=[],r}();function F$(r){r.registerCoordinateSystem("radar",V$),r.registerComponentModel(O$),r.registerComponentView(B$),r.registerVisual({seriesType:"radar",reset:function(t){var e=t.getData();e.each(function(i){e.setItemVisual(i,"legendIcon","roundRect")}),e.setVisual("legendIcon","roundRect")}})}function G$(r){pt(F$),r.registerChartView(R$),r.registerSeriesModel(E$),r.registerLayout(P$),r.registerProcessor(Ch("radar")),r.registerPreprocessor(k$)}var aM="\0_ec_interaction_mutex";function H$(r,t,e){var i=hx(r);i[t]=e}function W$(r,t,e){var i=hx(r),n=i[t];n===e&&(i[t]=null)}function oM(r,t){return!!hx(r)[t]}function hx(r){return r[aM]||(r[aM]={})}ii({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},ee);var Dh=function(r){E(t,r);function t(e){var i=r.call(this)||this;i._zr=e;var n=$(i._mousedownHandler,i),a=$(i._mousemoveHandler,i),o=$(i._mouseupHandler,i),s=$(i._mousewheelHandler,i),l=$(i._pinchHandler,i);return i.enable=function(u,h){this.disable(),this._opt=tt(it(h)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(e.on("mousedown",n),e.on("mousemove",a),e.on("mouseup",o)),(u===!0||u==="scale"||u==="zoom")&&(e.on("mousewheel",s),e.on("pinch",l))},i.disable=function(){e.off("mousedown",n),e.off("mousemove",a),e.off("mouseup",o),e.off("mousewheel",s),e.off("pinch",l)},i}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!N1(e)){for(var i=e.target;i;){if(i.draggable)return;i=i.__hostTarget||i.parent}var n=e.offsetX,a=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,a)&&(this._x=n,this._y=a,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(!(!this._dragging||!pf("moveOnMouseMove",e,this._opt)||e.gestureEvent==="pinch"||oM(this._zr,"globalPan"))){var i=e.offsetX,n=e.offsetY,a=this._x,o=this._y,s=i-a,l=n-o;this._x=i,this._y=n,this._opt.preventDefaultMouseMove&&qi(e.event),uR(this,"pan","moveOnMouseMove",e,{dx:s,dy:l,oldX:a,oldY:o,newX:i,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){N1(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var i=pf("zoomOnMouseWheel",e,this._opt),n=pf("moveOnMouseWheel",e,this._opt),a=e.wheelDelta,o=Math.abs(a),s=e.offsetX,l=e.offsetY;if(!(a===0||!i&&!n)){if(i){var u=o>3?1.4:o>1?1.2:1.1,h=a>0?u:1/u;cg(this,"zoom","zoomOnMouseWheel",e,{scale:h,originX:s,originY:l,isAvailableBehavior:null})}if(n){var c=Math.abs(a),f=(a>0?1:-1)*(c>3?.4:c>1?.15:.05);cg(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:f,originX:s,originY:l,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!oM(this._zr,"globalPan")){var i=e.pinchScale>1?1.1:1/1.1;cg(this,"zoom",null,e,{scale:i,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}(Rr);function cg(r,t,e,i,n){r.pointerChecker&&r.pointerChecker(i,n.originX,n.originY)&&(qi(i.event),uR(r,t,e,i,n))}function uR(r,t,e,i,n){n.isAvailableBehavior=$(pf,null,e,i),r.trigger(t,n)}function pf(r,t,e){var i=e[r];return!r||i&&(!Y(i)||t.event[i+"Key"])}function cx(r,t,e){var i=r.target;i.x+=t,i.y+=e,i.dirty()}function fx(r,t,e,i){var n=r.target,a=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=t,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,n.x-=(e-n.x)*(u-1),n.y-=(i-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}var U$={axisPointer:1,tooltip:1,brush:1};function _d(r,t,e){var i=t.getComponentByElement(r.topTarget),n=i&&i.coordinateSystem;return i&&i!==e&&!U$.hasOwnProperty(i.mainType)&&n&&n.model!==e}function hR(r){if(Y(r)){var t=new DOMParser;r=t.parseFromString(r,"text/xml")}var e=r;for(e.nodeType===9&&(e=e.firstChild);e.nodeName.toLowerCase()!=="svg"||e.nodeType!==1;)e=e.nextSibling;return e}var fg,hv={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},sM=xt(hv),cv={"alignment-baseline":"textBaseline","stop-color":"stopColor"},lM=xt(cv),Y$=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(t,e){e=e||{};var i=hR(t);this._defsUsePending=[];var n=new at;this._root=n;var a=[],o=i.getAttribute("viewBox")||"",s=parseFloat(i.getAttribute("width")||e.width),l=parseFloat(i.getAttribute("height")||e.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),lr(i,n,null,!0,!1);for(var u=i.firstChild;u;)this._parseNode(u,n,a,null,!1,!1),u=u.nextSibling;Z$(this._defs,this._defsUsePending),this._defsUsePending=[];var h,c;if(o){var f=xd(o);f.length>=4&&(h={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(h&&s!=null&&l!=null&&(c=fR(h,{x:0,y:0,width:s,height:l}),!e.ignoreViewBox)){var v=n;n=new at,n.add(v),v.scaleX=v.scaleY=c.scale,v.x=c.x,v.y=c.y}return!e.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new wt({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:h,viewBoxTransform:c,named:a}},r.prototype._parseNode=function(t,e,i,n,a,o){var s=t.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=e;else{if(!a){var h=fg[s];if(h&&X(fg,s)){l=h.call(this,t,e);var c=t.getAttribute("name");if(c){var f={name:c,namedFrom:null,svgNodeTagLower:s,el:l};i.push(f),s==="g"&&(u=f)}else n&&i.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});e.add(l)}}var v=uM[s];if(v&&X(uM,s)){var d=v.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,i,u,a,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(t,e){var i=new Ms({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});_r(e,i),lr(t,i,this._defsUsePending,!1,!1),$$(i,e);var n=i.style,a=n.fontSize;a&&a<9&&(n.fontSize=9,i.scaleX*=a/9,i.scaleY*=a/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=i.getBoundingRect();return this._textX+=s.width,e.add(i),i},r.internalField=function(){fg={g:function(t,e){var i=new at;return _r(e,i),lr(t,i,this._defsUsePending,!1,!1),i},rect:function(t,e){var i=new wt;return _r(e,i),lr(t,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(t,e){var i=new Ai;return _r(e,i),lr(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),i.silent=!0,i},line:function(t,e){var i=new ce;return _r(e,i),lr(t,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(t,e){var i=new ph;return _r(e,i),lr(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(t,e){var i=t.getAttribute("points"),n;i&&(n=fM(i));var a=new Ge({shape:{points:n||[]},silent:!0});return _r(e,a),lr(t,a,this._defsUsePending,!1,!1),a},polyline:function(t,e){var i=t.getAttribute("points"),n;i&&(n=fM(i));var a=new We({shape:{points:n||[]},silent:!0});return _r(e,a),lr(t,a,this._defsUsePending,!1,!1),a},image:function(t,e){var i=new xe;return _r(e,i),lr(t,i,this._defsUsePending,!1,!1),i.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),i.silent=!0,i},text:function(t,e){var i=t.getAttribute("x")||"0",n=t.getAttribute("y")||"0",a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(n)+parseFloat(o);var s=new at;return _r(e,s),lr(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");i!=null&&(this._textX=parseFloat(i)),n!=null&&(this._textY=parseFloat(n));var a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new at;return _r(e,s),lr(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(t,e){var i=t.getAttribute("d")||"",n=tI(i);return _r(e,n),lr(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),r}(),uM={lineargradient:function(r){var t=parseInt(r.getAttribute("x1")||"0",10),e=parseInt(r.getAttribute("y1")||"0",10),i=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),a=new Vs(t,e,i,n);return hM(r,a),cM(r,a),a},radialgradient:function(r){var t=parseInt(r.getAttribute("cx")||"0",10),e=parseInt(r.getAttribute("cy")||"0",10),i=parseInt(r.getAttribute("r")||"0",10),n=new f_(t,e,i);return hM(r,n),cM(r,n),n}};function hM(r,t){var e=r.getAttribute("gradientUnits");e==="userSpaceOnUse"&&(t.global=!0)}function cM(r,t){for(var e=r.firstChild;e;){if(e.nodeType===1&&e.nodeName.toLocaleLowerCase()==="stop"){var i=e.getAttribute("offset"),n=void 0;i&&i.indexOf("%")>0?n=parseInt(i,10)/100:i?n=parseFloat(i):n=0;var a={};cR(e,a,a);var o=a.stopColor||e.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:n,color:o})}e=e.nextSibling}}function _r(r,t){r&&r.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),tt(t.__inheritedStyle,r.__inheritedStyle))}function fM(r){for(var t=xd(r),e=[],i=0;i<t.length;i+=2){var n=parseFloat(t[i]),a=parseFloat(t[i+1]);e.push([n,a])}return e}function lr(r,t,e,i,n){var a=t,o=a.__inheritedStyle=a.__inheritedStyle||{},s={};r.nodeType===1&&(K$(r,t),cR(r,o,s),i||J$(r,o,s)),a.style=a.style||{},o.fill!=null&&(a.style.fill=vM(a,"fill",o.fill,e)),o.stroke!=null&&(a.style.stroke=vM(a,"stroke",o.stroke,e)),A(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(a.style[l]=parseFloat(o[l]))}),A(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(a.style[l]=o[l])}),n&&(a.__selfStyle=s),o.lineDash&&(a.style.lineDash=F(xd(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(a.invisible=!0),o.display==="none"&&(a.ignore=!0)}function $$(r,t){var e=t.__selfStyle;if(e){var i=e.textBaseline,n=i;!i||i==="auto"||i==="baseline"?n="alphabetic":i==="before-edge"||i==="text-before-edge"?n="top":i==="after-edge"||i==="text-after-edge"?n="bottom":(i==="central"||i==="mathematical")&&(n="middle"),r.style.textBaseline=n}var a=t.__inheritedStyle;if(a){var o=a.textAlign,s=o;o&&(o==="middle"&&(s="center"),r.style.textAlign=s)}}var X$=/^url\(\s*#(.*?)\)/;function vM(r,t,e,i){var n=e&&e.match(X$);if(n){var a=Lr(n[1]);i.push([r,t,a]);return}return e==="none"&&(e=null),e}function Z$(r,t){for(var e=0;e<t.length;e++){var i=t[e];i[0].style[i[1]]=r[i[2]]}}var j$=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function xd(r){return r.match(j$)||[]}var q$=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,vg=Math.PI/180;function K$(r,t){var e=r.getAttribute("transform");if(e){e=e.replace(/,/g," ");var i=[],n=null;e.replace(q$,function(c,f,v){return i.push(f,v),""});for(var a=i.length-1;a>0;a-=2){var o=i[a],s=i[a-1],l=xd(o);switch(n=n||or(),s){case"translate":ti(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Hv(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Qn(n,n,-parseFloat(l[0])*vg,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*vg);bi(n,[1,0,u,1,0,0],n);break;case"skewY":var h=Math.tan(parseFloat(l[0])*vg);bi(n,[1,h,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 dM=/([^\s:;]+)\s*:\s*([^:;]+)/g;function cR(r,t,e){var i=r.getAttribute("style");if(i){dM.lastIndex=0;for(var n;(n=dM.exec(i))!=null;){var a=n[1],o=X(hv,a)?hv[a]:null;o&&(t[o]=n[2]);var s=X(cv,a)?cv[a]:null;s&&(e[s]=n[2])}}}function J$(r,t,e){for(var i=0;i<sM.length;i++){var n=sM[i],a=r.getAttribute(n);a!=null&&(t[hv[n]]=a)}for(var i=0;i<lM.length;i++){var n=lM[i],a=r.getAttribute(n);a!=null&&(e[cv[n]]=a)}}function fR(r,t){var e=t.width/r.width,i=t.height/r.height,n=Math.min(e,i);return{scale:n,x:-(r.x+r.width/2)*n+(t.x+t.width/2),y:-(r.y+r.height/2)*n+(t.y+t.height/2)}}function Q$(r,t){var e=new Y$;return e.parse(r,t)}var t7=Z(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),e7=function(){function r(t,e){this.type="geoSVG",this._usedGraphicMap=Z(),this._freedGraphics=[],this._mapName=t,this._parsedXML=hR(e)}return r.prototype.load=function(){var t=this._firstGraphic;if(!t){t=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(t),this._boundingRect=this._firstGraphic.boundingRect.clone();var e=i7(t.named),i=e.regions,n=e.regionsMap;this._regions=i,this._regionsMap=n}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(t){var e,i;try{e=t&&Q$(t,{ignoreViewBox:!0,ignoreRootClip:!0})||{},i=e.root,Ve(i!=null)}catch(g){throw new Error(`Invalid svg format
|
||
`+g.message)}var n=new at;n.add(i),n.isGeoSVGGraphicRoot=!0;var a=e.width,o=e.height,s=e.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,h=void 0,c=void 0,f=void 0;if(a!=null?(u=0,c=a):s&&(u=s.x,c=s.width),o!=null?(h=0,f=o):s&&(h=s.y,f=s.height),u==null||h==null){var v=i.getBoundingRect();u==null&&(u=v.x,c=v.width),h==null&&(h=v.y,f=v.height)}l=this._boundingRect=new ft(u,h,c,f)}if(s){var d=fR(s,l);i.scaleX=i.scaleY=d.scale,i.x=d.x,i.y=d.y}n.setClipPath(new wt({shape:l.plain()}));var p=[];return A(e.named,function(g){t7.get(g.svgNodeTagLower)!=null&&(p.push(g),r7(g.el))}),{root:n,boundingRect:l,named:p}},r.prototype.useGraphic=function(t){var e=this._usedGraphicMap,i=e.get(t);return i||(i=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),e.set(t,i),i)},r.prototype.freeGraphic=function(t){var e=this._usedGraphicMap,i=e.get(t);i&&(e.removeKey(t),this._freedGraphics.push(i))},r}();function r7(r){r.silent=!1,r.isGroup&&r.traverse(function(t){t.silent=!1})}function i7(r){var t=[],e=Z();return A(r,function(i){if(i.namedFrom==null){var n=new WU(i.name,i.el);t.push(n),e.set(i.name,n)}}),{regions:t,regionsMap:e}}var Vm=[126,25],pM="南海诸岛",Oa=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var Pa=0;Pa<Oa.length;Pa++)for(var Uo=0;Uo<Oa[Pa].length;Uo++)Oa[Pa][Uo][0]/=10.5,Oa[Pa][Uo][1]/=-10.5/.75,Oa[Pa][Uo][0]+=Vm[0],Oa[Pa][Uo][1]+=Vm[1];function n7(r,t){if(r==="china"){for(var e=0;e<t.length;e++)if(t[e].name===pM)return;t.push(new lk(pM,F(Oa,function(i){return{type:"polygon",exterior:i}}),Vm))}}var a7={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function o7(r,t){if(r==="china"){var e=a7[t.name];if(e){var i=t.getCenter();i[0]+=e[0]/10.5,i[1]+=-e[1]/(10.5/.75),t.setCenter(i)}}}var s7=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function l7(r,t){r==="china"&&t.name==="台湾"&&t.geometries.push({type:"polygon",exterior:s7[0]})}var u7="name",h7=function(){function r(t,e,i){this.type="geoJSON",this._parsedMap=Z(),this._mapName=t,this._specialAreas=i,this._geoJSON=f7(e)}return r.prototype.load=function(t,e){e=e||u7;var i=this._parsedMap.get(e);if(!i){var n=this._parseToRegions(e);i=this._parsedMap.set(e,{regions:n,boundingRect:c7(n)})}var a=Z(),o=[];return A(i.regions,function(s){var l=s.name;t&&X(t,l)&&(s=s.cloneShallow(l=t[l])),o.push(s),a.set(l,s)}),{regions:o,boundingRect:i.boundingRect||new ft(0,0,0,0),regionsMap:a}},r.prototype._parseToRegions=function(t){var e=this._mapName,i=this._geoJSON,n;try{n=i?Lm(i,t):[]}catch(a){throw new Error(`Invalid geoJson format
|
||
`+a.message)}return n7(e,n),A(n,function(a){var o=a.name;o7(e,a),l7(e,a);var s=this._specialAreas&&this._specialAreas[o];s&&a.transformTo(s.left,s.top,s.width,s.height)},this),n},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r}();function c7(r){for(var t,e=0;e<r.length;e++){var i=r[e].getBoundingRect();t=t||i.clone(),t.union(i)}return t}function f7(r){return Y(r)?typeof JSON<"u"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var Ml=Z();const rn={registerMap:function(r,t,e){if(t.svg){var i=new e7(r,t.svg);Ml.set(r,i)}else{var n=t.geoJson||t.geoJSON;n&&!t.features?e=t.specialAreas:n=t;var i=new h7(r,n,e);Ml.set(r,i)}},getGeoResource:function(r){return Ml.get(r)},getMapForUser:function(r){var t=Ml.get(r);return t&&t.type==="geoJSON"&&t.getMapForUser()},load:function(r,t,e){var i=Ml.get(r);if(i)return i.load(t,e)}};var vx=["rect","circle","line","ellipse","polygon","polyline","path"],v7=Z(vx),d7=Z(vx.concat(["g"])),p7=Z(vx.concat(["g"])),vR=Tt();function Ic(r){var t=r.getItemStyle(),e=r.get("areaColor");return e!=null&&(t.fill=e),t}function gM(r){var t=r.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var dR=function(){function r(t){var e=new at;this.uid=Ws("ec_map_draw"),this._controller=new Dh(t.getZr()),this._controllerHost={target:e},this.group=e,e.add(this._regionsGroup=new at),e.add(this._svgGroup=new at)}return r.prototype.draw=function(t,e,i,n,a){var o=t.mainType==="geo",s=t.getData&&t.getData();o&&e.eachComponent({mainType:"series",subType:"map"},function(y){!s&&y.getHostGeoModel()===t&&(s=y.getData())});var l=t.coordinateSystem,u=this._regionsGroup,h=this.group,c=l.getTransformInfo(),f=c.raw,v=c.roam,d=!u.childAt(0)||a;d?(h.x=v.x,h.y=v.y,h.scaleX=v.scaleX,h.scaleY=v.scaleY,h.dirty()):At(h,v,t);var p=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,g={api:i,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:f};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(t,e,i),this._updateMapSelectHandler(t,u,i,n)},r.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=Z(),i=Z(),n=this._regionsGroup,a=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function h(v,d){return d&&(v=d(v)),v&&[v[0]*a.scaleX+a.x,v[1]*a.scaleY+a.y]}function c(v){for(var d=[],p=!u&&l&&l.project,g=0;g<v.length;++g){var y=h(v[g],p);y&&d.push(y)}return d}function f(v){return{shape:{points:c(v)}}}n.removeAll(),A(t.geo.regions,function(v){var d=v.name,p=e.get(d),g=i.get(d)||{},y=g.dataIdx,m=g.regionModel;if(!p){p=e.set(d,new at),n.add(p),y=s?s.indexOfName(d):null,m=t.isGeo?o.getRegionModel(d):s?s.getItemModel(y):null;var _=m.get("silent",!0);_!=null&&(p.silent=_),i.set(d,{dataIdx:y,regionModel:m})}var x=[],b=[];A(v.geometries,function(T){if(T.type==="polygon"){var M=[T.exterior].concat(T.interiors||[]);u&&(M=SM(M,u)),A(M,function(D){x.push(new Ge(f(D)))})}else{var C=T.points;u&&(C=SM(C,u,!0)),A(C,function(D){b.push(new We(f(D)))})}});var S=h(v.getCenter(),l&&l.project);function w(T,M){if(T.length){var C=new Qv({culling:!0,segmentIgnoreThreshold:1,shape:{paths:T}});p.add(C),yM(t,C,y,m),mM(t,C,d,m,o,y,S),M&&(gM(C),A(C.states,gM))}}w(x),w(b,!0)}),e.each(function(v,d){var p=i.get(d),g=p.dataIdx,y=p.regionModel;_M(t,v,d,y,o,g),xM(t,v,d,y,o),bM(t,v,d,y,o)},this)},r.prototype._buildSVG=function(t){var e=t.geo.map,i=t.transformInfoRaw;this._svgGroup.x=i.x,this._svgGroup.y=i.y,this._svgGroup.scaleX=i.scaleX,this._svgGroup.scaleY=i.scaleY,this._svgResourceChanged(e)&&(this._freeSVG(),this._useSVG(e));var n=this._svgDispatcherMap=Z(),a=!1;A(this._svgGraphicRecord.named,function(o){var s=o.name,l=t.mapOrGeoModel,u=t.data,h=o.svgNodeTagLower,c=o.el,f=u?u.indexOfName(s):null,v=l.getRegionModel(s);v7.get(h)!=null&&c instanceof kr&&yM(t,c,f,v),c instanceof kr&&(c.culling=!0);var d=v.get("silent",!0);if(d!=null&&(c.silent=d),c.z2EmphasisLift=0,!o.namedFrom&&(p7.get(h)!=null&&mM(t,c,s,v,l,f,null),_M(t,c,s,v,l,f),xM(t,c,s,v,l),d7.get(h)!=null)){var p=bM(t,c,s,v,l);p==="self"&&(a=!0);var g=n.get(s)||n.set(s,[]);g.push(c)}},this),this._enableBlurEntireSVG(a,t)},r.prototype._enableBlurEntireSVG=function(t,e){if(t&&e.isGeo){var i=e.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),n=i.opacity;this._svgGraphicRecord.root.traverse(function(a){if(!a.isGroup){po(a);var o=a.ensureState("blur").style||{};o.opacity==null&&n!=null&&(o.opacity=n),a.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(t,e){if(t==null)return[];var i=e.coordinateSystem;if(i.resourceType==="geoJSON"){var n=this._regionsGroupByName;if(n){var a=n.get(t);return a?[a]:[]}}else if(i.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},r.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},r.prototype._useSVG=function(t){var e=rn.getGeoResource(t);if(e&&e.type==="geoSVG"){var i=e.useGraphic(this.uid);this._svgGroup.add(i.root),this._svgGraphicRecord=i,this._svgMapName=t}},r.prototype._freeSVG=function(){var t=this._svgMapName;if(t!=null){var e=rn.getGeoResource(t);e&&e.type==="geoSVG"&&e.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(t,e,i){var n=t.coordinateSystem,a=this._controller,o=this._controllerHost;o.zoomLimit=t.get("scaleLimit"),o.zoom=n.getZoom(),a.enable(t.get("roam")||!1);var s=t.mainType;function l(){var u={type:"geoRoam",componentType:s};return u[s+"Id"]=t.id,u}a.off("pan").on("pan",function(u){this._mouseDownFlag=!1,cx(o,u.dx,u.dy),i.dispatchAction(z(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),a.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,fx(o,u.scale,u.originX,u.originY),i.dispatchAction(z(l(),{totalZoom:o.zoom,zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),a.setPointerChecker(function(u,h,c){return n.containPoint([h,c])&&!_d(u,i,t)})},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(t){var e=t.getTextContent();e&&(e.ignore=vR(e).ignore)})},r.prototype._updateMapSelectHandler=function(t,e,i,n){var a=this;e.off("mousedown"),e.off("click"),t.get("selectedMode")&&(e.on("mousedown",function(){a._mouseDownFlag=!0}),e.on("click",function(o){a._mouseDownFlag&&(a._mouseDownFlag=!1)}))},r}();function yM(r,t,e,i){var n=i.getModel("itemStyle"),a=i.getModel(["emphasis","itemStyle"]),o=i.getModel(["blur","itemStyle"]),s=i.getModel(["select","itemStyle"]),l=Ic(n),u=Ic(a),h=Ic(s),c=Ic(o),f=r.data;if(f){var v=f.getItemVisual(e,"style"),d=f.getItemVisual(e,"decal");r.isVisualEncodedByVisualMap&&v.fill&&(l.fill=v.fill),d&&(l.decal=Ds(d,r.api))}t.setStyle(l),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=u,t.ensureState("select").style=h,t.ensureState("blur").style=c,po(t)}function mM(r,t,e,i,n,a,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),a)),h=s&&s.getItemLayout(a);if(l||u||h&&h.showLabel){var c=l?e:a,f=void 0;(!s||a>=0)&&(f=n);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Ae(t,me(i),{labelFetcher:f,labelDataIndex:c,defaultText:e},v);var d=t.getTextContent();if(d&&(vR(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 _M(r,t,e,i,n,a){r.data?r.data.setItemGraphicEl(a,t):ot(t).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:e,region:i&&i.option||{}}}function xM(r,t,e,i,n){r.data||So({el:t,componentModel:n,itemName:e,itemTooltipOption:i.get("tooltip")})}function bM(r,t,e,i,n){t.highDownSilentOnTouch=!!n.get("selectedMode");var a=i.getModel("emphasis"),o=a.get("focus");return Kt(t,o,a.get("blurScope"),a.get("disabled")),r.isGeo&&J3(t,n,e),o}function SM(r,t,e){var i=[],n;function a(){n=[]}function o(){n.length&&(i.push(n),n=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,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<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!e&&s.polygonEnd(),i}var g7=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n,a){if(!(a&&a.type==="mapToggleSelect"&&a.from===this.uid)){var o=this.group;if(o.removeAll(),!e.getHostGeoModel()){if(this._mapDraw&&a&&a.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),a&&a.type==="geoRoam"&&a.componentType==="series"&&a.seriesId===e.id){var s=this._mapDraw;s&&o.add(s.group)}else if(e.needsDrawMap){var s=this._mapDraw||new dR(n);o.add(s.group),s.draw(e,i,n,this,a),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&i.getComponent("legend")&&this._renderSymbols(e,i,n)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e,i,n){var a=e.originalData,o=this.group;a.each(a.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=a.getItemLayout(l);if(!(!u||!u.point)){var h=u.point,c=u.offset,f=new Ai({style:{fill:e.getData().getVisual("style").fill},shape:{cx:h[0]+c*9,cy:h[1],r:3},silent:!0,z2:8+(c?0:Ns+1)});if(!c){var v=e.mainSeries.getData(),d=a.getName(l),p=v.indexOfName(d),g=a.getItemModel(l),y=g.getModel("label"),m=v.getItemGraphicEl(p);Ae(f,me(g),{labelFetcher:{getFormattedLabel:function(_,x){return e.getFormattedLabel(p,x)}},defaultText:d}),f.disableLabelAnimation=!0,y.get("position")||f.setTextConfig({position:"bottom"}),m.onHoverStateChange=function(_){Hf(f,_)}}o.add(f)}}})},t.type="map",t}(Ot),y7=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.needsDrawMap=!1,e.seriesGroup=[],e.getTooltipPosition=function(i){if(i!=null){var n=this.getData().getName(i),a=this.coordinateSystem,o=a.getRegion(n);return o&&a.dataToPoint(o.getCenter())}},e}return t.prototype.getInitialData=function(e){for(var i=Qs(this,{coordDimensions:["value"],encodeDefaulter:ut(D_,this)}),n=Z(),a=[],o=0,s=i.count();o<s;o++){var l=i.getName(o);n.set(l,o)}var u=rn.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return A(u.regions,function(h){var c=h.name,f=n.get(c),v=h.properties&&h.properties.echartsStyle,d;f==null?(d={name:c},a.push(d)):d=i.getRawDataItem(f),v&&ht(d,v)}),i.appendData(a),i},t.prototype.getHostGeoModel=function(){var e=this.option.geoIndex;return e!=null?this.ecModel.getComponent("geo",e):null},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(e){var i=this.getData();return i.get(i.mapDimension("value"),e)},t.prototype.getRegionModel=function(e){var i=this.getData();return i.getItemModel(i.indexOfName(e))},t.prototype.formatTooltip=function(e,i,n){for(var a=this.getData(),o=this.getRawValue(e),s=a.getName(e),l=this.seriesGroup,u=[],h=0;h<l.length;h++){var c=l[h].originalData.indexOfName(s),f=a.mapDimension("value");isNaN(l[h].originalData.get(f,c))||u.push(l[h].name)}return _e("section",{header:u.join(", "),noHeader:!u.length,blocks:[_e("nameValue",{name:s,value:o})]})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.getLegendIcon=function(e){var i=e.icon||"roundRect",n=ae(i,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill);return n.setStyle(e.itemStyle),n.style.stroke="none",i.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",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:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(zt);function m7(r,t){var e={};return A(r,function(i){i.each(i.mapDimension("value"),function(n,a){var o="ec-"+i.getName(a);e[o]=e[o]||[],isNaN(n)||e[o].push(n)})}),r[0].map(r[0].mapDimension("value"),function(i,n){for(var a="ec-"+r[0].getName(n),o=0,s=1/0,l=-1/0,u=e[a].length,h=0;h<u;h++)s=Math.min(s,e[a][h]),l=Math.max(l,e[a][h]),o+=e[a][h];var c;return t==="min"?c=s:t==="max"?c=l:t==="average"?c=o/u:c=o,u===0?NaN:c})}function _7(r){var t={};r.eachSeriesByType("map",function(e){var i=e.getHostGeoModel(),n=i?"o"+i.id:"i"+e.getMapType();(t[n]=t[n]||[]).push(e)}),A(t,function(e,i){for(var n=m7(F(e,function(o){return o.getData()}),e[0].get("mapValueCalculation")),a=0;a<e.length;a++)e[a].originalData=e[a].getData();for(var a=0;a<e.length;a++)e[a].seriesGroup=e,e[a].needsDrawMap=a===0&&!e[a].getHostGeoModel(),e[a].setData(n.cloneShallow()),e[a].mainSeries=e[0]})}function x7(r){var t={};r.eachSeriesByType("map",function(e){var i=e.getMapType();if(!(e.getHostGeoModel()||t[i])){var n={};A(e.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&r.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,h){var c=l.getName(h),f=s.getRegion(c);if(!(!f||isNaN(u))){var v=n[c]||0,d=s.dataToPoint(f.getCenter());n[c]=v+1,l.setItemLayout(h,{point:d,offset:v})}})});var a=e.getData();a.each(function(o){var s=a.getName(o),l=a.getItemLayout(o)||{};l.showLabel=!n[s],a.setItemLayout(o,l)}),t[i]=!0}})}var wM=we,Lh=function(r){E(t,r);function t(e){var i=r.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new $i,i._rawTransformable=new $i,i.name=e,i}return t.prototype.setBoundingRect=function(e,i,n,a){return this._rect=new ft(e,i,n,a),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(e,i,n,a){this._transformTo(e,i,n,a),this._viewRect=new ft(e,i,n,a)},t.prototype._transformTo=function(e,i,n,a){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new ft(e,i,n,a));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},t.prototype.setCenter=function(e,i){e&&(this._center=[U(e[0],i.getWidth()),U(e[1],i.getHeight())],this._updateCenterAndZoom())},t.prototype.setZoom=function(e){e=e||1;var i=this.zoomLimit;i&&(i.max!=null&&(e=Math.min(i.max,e)),i.min!=null&&(e=Math.max(i.min,e))),this._zoom=e,this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var e=this.getBoundingRect(),i=e.x+e.width/2,n=e.y+e.height/2;return[i,n]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var e=this._rawTransformable.getLocalTransform(),i=this._roamTransformable,n=this.getDefaultCenter(),a=this.getCenter(),o=this.getZoom();a=we([],a,e),n=we([],n,e),i.originX=a[0],i.originY=a[1],i.x=n[0]-a[0],i.y=n[1]-a[1],i.scaleX=i.scaleY=o,this._updateTransform()},t.prototype._updateTransform=function(){var e=this._roamTransformable,i=this._rawTransformable;i.parent=e,e.updateTransform(),i.updateTransform(),Gv(this.transform||(this.transform=[]),i.transform||or()),this._rawTransform=i.getLocalTransform(),this.invTransform=this.invTransform||[],bo(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var e=this._rawTransformable,i=this._roamTransformable,n=new $i;return n.transform=i.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},t.prototype.dataToPoint=function(e,i,n){var a=i?this._rawTransform:this.transform;return n=n||[],a?wM(n,e,a):ke(n,e)},t.prototype.pointToData=function(e){var i=this.invTransform;return i?wM([],e,i):[e[0],e[1]]},t.prototype.convertToPixel=function(e,i,n){var a=TM(i);return a===this?a.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,i,n){var a=TM(i);return a===this?a.pointToData(n):null},t.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},t.dimensions=["x","y"],t}($i);function TM(r){var t=r.seriesModel;return t?t.coordinateSystem:null}var b7={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},pR=["lng","lat"],Fm=function(r){E(t,r);function t(e,i,n){var a=r.call(this,e)||this;a.dimensions=pR,a.type="geo",a._nameCoordMap=Z(),a.map=i;var o=n.projection,s=rn.load(i,n.nameMap,n.nameProperty),l=rn.getGeoResource(i);a.resourceType=l?l.type:null;var u=a.regions=s.regions,h=b7[l.type];a._regionsMap=s.regionsMap,a.regions=s.regions,a.projection=o;var c;if(o)for(var f=0;f<u.length;f++){var v=u[f].getBoundingRect(o);c=c||v.clone(),c.union(v)}else c=s.boundingRect;return a.setBoundingRect(c.x,c.y,c.width,c.height),a.aspectScale=o?1:lt(n.aspectScale,h.aspectScale),a._invertLongitute=o?!1:h.invertLongitute,a}return t.prototype._transformTo=function(e,i,n,a){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new ft(e,i,n,a));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},t.prototype.getRegion=function(e){return this._regionsMap.get(e)},t.prototype.getRegionByCoord=function(e){for(var i=this.regions,n=0;n<i.length;n++){var a=i[n];if(a.type==="geoJSON"&&a.contain(e))return i[n]}},t.prototype.addGeoCoord=function(e,i){this._nameCoordMap.set(e,i)},t.prototype.getGeoCoord=function(e){var i=this._regionsMap.get(e);return this._nameCoordMap.get(e)||i&&i.getCenter()},t.prototype.dataToPoint=function(e,i,n){if(Y(e)&&(e=this.getGeoCoord(e)),e){var a=this.projection;return a&&(e=a.project(e)),e&&this.projectedToPoint(e,i,n)}},t.prototype.pointToData=function(e){var i=this.projection;return i&&(e=i.unproject(e)),e&&this.pointToProjected(e)},t.prototype.pointToProjected=function(e){return r.prototype.pointToData.call(this,e)},t.prototype.projectedToPoint=function(e,i,n){return r.prototype.dataToPoint.call(this,e,i,n)},t.prototype.convertToPixel=function(e,i,n){var a=MM(i);return a===this?a.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,i,n){var a=MM(i);return a===this?a.pointToData(n):null},t}(Lh);re(Fm,Lh);function MM(r){var t=r.geoModel,e=r.seriesModel;return t?t.coordinateSystem:e?e.coordinateSystem||(e.getReferringComponents("geo",le).models[0]||{}).coordinateSystem:null}function CM(r,t){var e=r.get("boundingCoords");if(e!=null){var i=e[0],n=e[1];if(isFinite(i[0])&&isFinite(i[1])&&isFinite(n[0])&&isFinite(n[1])){var a=this.projection;if(a){var o=i[0],s=i[1],l=n[0],u=n[1];i=[1/0,1/0],n=[-1/0,-1/0];var h=function(S,w,T,M){for(var C=T-S,D=M-w,L=0;L<=100;L++){var I=L/100,P=a.project([S+C*I,w+D*I]);Ui(i,i,P),Yi(n,n,P)}};h(o,s,l,s),h(l,s,l,u),h(l,u,o,u),h(o,u,l,s)}this.setBoundingRect(i[0],i[1],n[0]-i[0],n[1]-i[1])}}var c=this.getBoundingRect(),f=r.get("layoutCenter"),v=r.get("layoutSize"),d=t.getWidth(),p=t.getHeight(),g=c.width/c.height*this.aspectScale,y=!1,m,_;f&&v&&(m=[U(f[0],d),U(f[1],p)],_=U(v,Math.min(d,p)),!isNaN(m[0])&&!isNaN(m[1])&&!isNaN(_)&&(y=!0));var x;if(y)x={},g>1?(x.width=_,x.height=_/g):(x.height=_,x.width=_*g),x.y=m[1]-x.height/2,x.x=m[0]-x.width/2;else{var b=r.getBoxLayoutParams();b.aspect=g,x=ue(b,{width:d,height:p})}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(r.get("center"),t),this.setZoom(r.get("zoom"))}function S7(r,t){A(t.get("geoCoord"),function(e,i){r.addGeoCoord(i,e)})}var w7=function(){function r(){this.dimensions=pR}return r.prototype.create=function(t,e){var i=[];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 Fm(l+s,l,z({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),i.push(u),o.coordinateSystem=u,u.model=o,u.resize=CM,u.resize(o,e)}),t.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=i[l]}});var a={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),A(a,function(o,s){var l=F(o,function(h){return h.get("nameMap")}),u=new Fm(s,s,z({nameMap:zv(l)},n(o[0])));u.zoomLimit=pe.apply(null,F(o,function(h){return h.get("scaleLimit")})),i.push(u),u.resize=CM,u.resize(o[0],e),A(o,function(h){h.coordinateSystem=u,S7(u,h)})}),i},r.prototype.getFilledRegions=function(t,e,i,n){for(var a=(t||[]).slice(),o=Z(),s=0;s<a.length;s++)o.set(a[s].name,a[s]);var l=rn.load(e,i,n);return A(l.regions,function(u){var h=u.name,c=o.get(h),f=u.properties&&u.properties.echartsStyle;c||(c={name:h},a.push(c)),f&&ht(c,f)}),a},r}(),gR=new w7,T7=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i,n){var a=rn.getGeoResource(e.map);if(a&&a.type==="geoJSON"){var o=e.itemStyle=e.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(e,n),co(e,"label",["show"])},t.prototype.optionUpdated=function(){var e=this,i=this.option;i.regions=gR.getFilledRegions(i.regions,i.map,i.nameMap,i.nameProperty);var n={};this._optionModelMap=Pr(i.regions||[],function(a,o){var s=o.name;return s&&(a.set(s,new Lt(o,e,e.ecModel)),o.selected&&(n[s]=!0)),a},Z()),i.selectedMap||(i.selectedMap=n)},t.prototype.getRegionModel=function(e){return this._optionModelMap.get(e)||new Lt(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(e,i){var n=this.getRegionModel(e),a=i==="normal"?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),o={name:e};if(Q(a))return o.status=i,a(o);if(Y(a))return a.replace("{a}",e??"")},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.select=function(e){var i=this.option,n=i.selectedMode;if(n){n!=="multiple"&&(i.selectedMap=null);var a=i.selectedMap||(i.selectedMap={});a[e]=!0}},t.prototype.unSelect=function(e){var i=this.option.selectedMap;i&&(i[e]=!1)},t.prototype.toggleSelected=function(e){this[this.isSelected(e)?"unSelect":"select"](e)},t.prototype.isSelected=function(e){var i=this.option.selectedMap;return!!(i&&i[e])},t.type="geo",t.layoutMode="box",t.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},t}(yt);function AM(r,t){return r.pointToProjected?r.pointToProjected(t):r.pointToData(t)}function dx(r,t,e,i){var n=r.getZoom(),a=r.getCenter(),o=t.zoom,s=r.projectedToPoint?r.projectedToPoint(a):r.dataToPoint(a);if(t.dx!=null&&t.dy!=null&&(s[0]-=t.dx,s[1]-=t.dy,r.setCenter(AM(r,s),i)),o!=null){if(e){var l=e.min||0,u=e.max||1/0;o=Math.max(Math.min(n*o,u),l)/n}r.scaleX*=o,r.scaleY*=o;var h=(t.originX-r.x)*(o-1),c=(t.originY-r.y)*(o-1);r.x-=h,r.y-=c,r.updateTransform(),r.setCenter(AM(r,s),i),r.setZoom(o*n)}return{center:r.getCenter(),zoom:r.getZoom()}}var M7=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.focusBlurEnabled=!0,e}return t.prototype.init=function(e,i){this._api=i},t.prototype.render=function(e,i,n,a){if(this._model=e,!e.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new dR(n));var o=this._mapDraw;o.draw(e,i,n,this,a),o.group.on("click",this._handleRegionClick,this),o.group.silent=e.get("silent"),this.group.add(o.group),this.updateSelectStatus(e,i,n)},t.prototype._handleRegionClick=function(e){var i;Za(e.target,function(n){return(i=ot(n).eventData)!=null},!0),i&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:i.name})},t.prototype.updateSelectStatus=function(e,i,n){var a=this;this._mapDraw.group.traverse(function(o){var s=ot(o).eventData;if(s)return a._model.isSelected(s.name)?n.enterSelect(o):n.leaveSelect(o),!0})},t.prototype.findHighDownDispatchers=function(e){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(e,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t}(Yt);function C7(r,t,e){rn.registerMap(r,t,e)}function yR(r){r.registerCoordinateSystem("geo",gR),r.registerComponentModel(T7),r.registerComponentView(M7),r.registerImpl("registerMap",C7),r.registerImpl("getMap",function(e){return rn.getMapForUser(e)});function t(e,i){i.update="geo:updateSelectStatus",r.registerAction(i,function(n,a){var o={},s=[];return a.eachComponent({mainType:"geo",query:n},function(l){l[e](n.name);var u=l.coordinateSystem;A(u.regions,function(c){o[c.name]=l.isSelected(c.name)||!1});var h=[];A(o,function(c,f){o[f]&&h.push(f)}),s.push({geoIndex:l.componentIndex,name:h})}),{selected:o,allSelected:s,name:n.name}})}t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(e,i,n){var a=e.componentType||"series";i.eachComponent({mainType:a,query:e},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=dx(s,e,o.get("scaleLimit"),n);o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),a==="series"&&A(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function A7(r){pt(yR),r.registerChartView(g7),r.registerSeriesModel(y7),r.registerLayout(x7),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,_7),pP("map",r.registerAction)}function D7(r){var t=r;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e=[t],i,n;i=e.pop();)if(n=i.children,i.isExpand&&n.length)for(var a=n.length,o=a-1;o>=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 L7(r,t){var e=r.isExpand?r.children:[],i=r.parentNode.children,n=r.hierNode.i?i[r.hierNode.i-1]:null;if(e.length){k7(r);var a=(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-a):r.hierNode.prelim=a}else n&&(r.hierNode.prelim=n.hierNode.prelim+t(r,n));r.parentNode.hierNode.defaultAncestor=R7(r,n,r.parentNode.hierNode.defaultAncestor||i[0],t)}function I7(r){var t=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:t},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function DM(r){return arguments.length?r:N7}function Zl(r,t){return r-=Math.PI/2,{x:t*Math.cos(r),y:t*Math.sin(r)}}function P7(r,t){return ue(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function k7(r){for(var t=r.children,e=t.length,i=0,n=0;--e>=0;){var a=t[e];a.hierNode.prelim+=i,a.hierNode.modifier+=i,n+=a.hierNode.change,i+=a.hierNode.shift+n}}function R7(r,t,e,i){if(t){for(var n=r,a=r,o=a.parentNode.children[0],s=t,l=n.hierNode.modifier,u=a.hierNode.modifier,h=o.hierNode.modifier,c=s.hierNode.modifier;s=dg(s),a=pg(a),s&&a;){n=dg(n),o=pg(o),n.hierNode.ancestor=r;var f=s.hierNode.prelim+c-a.hierNode.prelim-u+i(s,a);f>0&&(O7(E7(s,r,e),r,f),u+=f,l+=f),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=n.hierNode.modifier,h+=o.hierNode.modifier}s&&!dg(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=c-l),a&&!pg(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-h,e=r)}return e}function dg(r){var t=r.children;return t.length&&r.isExpand?t[t.length-1]:r.hierNode.thread}function pg(r){var t=r.children;return t.length&&r.isExpand?t[0]:r.hierNode.thread}function E7(r,t,e){return r.hierNode.ancestor.parentNode===t.parentNode?r.hierNode.ancestor:e}function O7(r,t,e){var i=e/(t.hierNode.i-r.hierNode.i);t.hierNode.change-=i,t.hierNode.shift+=e,t.hierNode.modifier+=e,t.hierNode.prelim+=e,r.hierNode.change+=i}function N7(r,t){return r.parentNode===t.parentNode?1:2}var B7=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),z7=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new B7},t.prototype.buildPath=function(e,i){var n=i.childPoints,a=n.length,o=i.parentPoint,s=n[0],l=n[a-1];if(a===1){e.moveTo(o[0],o[1]),e.lineTo(s[0],s[1]);return}var u=i.orient,h=u==="TB"||u==="BT"?0:1,c=1-h,f=U(i.forkPosition,1),v=[];v[h]=o[h],v[c]=o[c]+(l[c]-o[c])*f,e.moveTo(o[0],o[1]),e.lineTo(v[0],v[1]),e.moveTo(s[0],s[1]),v[h]=s[h],e.lineTo(v[0],v[1]),v[h]=l[h],e.lineTo(v[0],v[1]),e.lineTo(l[0],l[1]);for(var d=1;d<a-1;d++){var p=n[d];e.moveTo(p[0],p[1]),v[h]=p[h],e.lineTo(v[0],v[1])}},t}(_t),V7=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._mainGroup=new at,e}return t.prototype.init=function(e,i){this._controller=new Dh(i.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,i,n){var a=e.getData(),o=e.layoutInfo,s=this._mainGroup,l=e.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(e,n),this._updateController(e,i,n);var u=this._data;a.diff(u).add(function(h){LM(a,h)&&IM(a,h,null,s,e)}).update(function(h,c){var f=u.getItemGraphicEl(c);if(!LM(a,h)){f&&kM(u,c,f,s,e);return}IM(a,h,f,s,e)}).remove(function(h){var c=u.getItemGraphicEl(h);c&&kM(u,h,c,s,e)}).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),e.get("expandAndCollapse")===!0&&a.eachItemGraphicEl(function(h,c){h.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:c})})}),this._data=a},t.prototype._updateViewCoordSys=function(e,i){var n=e.getData(),a=[];n.each(function(c){var f=n.getItemLayout(c);f&&!isNaN(f.x)&&!isNaN(f.y)&&a.push([+f.x,+f.y])});var o=[],s=[];qv(a,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var h=e.coordinateSystem=new Lh;h.zoomLimit=e.get("scaleLimit"),h.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),h.setCenter(e.get("center"),i),h.setZoom(e.get("zoom")),this.group.attr({x:h.x,y:h.y,scaleX:h.scaleX,scaleY:h.scaleY}),this._min=o,this._max=s},t.prototype._updateController=function(e,i,n){var a=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,h,c){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(h,c)&&!_d(u,n,e)}),o.enable(e.get("roam")),s.zoomLimit=e.get("scaleLimit"),s.zoom=e.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){cx(s,u.dx,u.dy),n.dispatchAction({seriesId:e.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){fx(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(e),n.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(e){var i=e.getData(),n=this._getNodeGlobalScale(e);i.eachItemGraphicEl(function(a,o){a.setSymbolScale(n)})},t.prototype._getNodeGlobalScale=function(e){var i=e.coordinateSystem;if(i.type!=="view")return 1;var n=this._nodeScaleRatio,a=i.scaleX||1,o=i.getZoom(),s=(o-1)*n+1;return s/a},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t}(Ot);function LM(r,t){var e=r.getItemLayout(t);return e&&!isNaN(e.x)&&!isNaN(e.y)}function IM(r,t,e,i,n){var a=!e,o=r.tree.getNodeByDataIndex(t),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",h=r.tree.root,c=o.parentNode===h?o:o.parentNode||o,f=r.getItemGraphicEl(c.dataIndex),v=c.getLayout(),d=f?{x:f.__oldX,y:f.__oldY,rawX:f.__radialOldRawX,rawY:f.__radialOldRawY}:v,p=o.getLayout();a?(e=new Sh(r,t,null,{symbolInnerColor:u,useNameLabel:!0}),e.x=d.x,e.y=d.y):e.updateData(r,t,null,{symbolInnerColor:u,useNameLabel:!0}),e.__radialOldRawX=e.__radialRawX,e.__radialOldRawY=e.__radialRawY,e.__radialRawX=p.rawX,e.__radialRawY=p.rawY,i.add(e),r.setItemGraphicEl(t,e),e.__oldX=e.x,e.__oldY=e.y,At(e,{x:p.x,y:p.y},n);var g=e.getSymbolPath();if(n.get("layout")==="radial"){var y=h.children[0],m=y.getLayout(),_=y.children.length,x=void 0,b=void 0;if(p.x===m.x&&o.isExpand===!0&&y.children.length){var S={x:(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,y:(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2};x=Math.atan2(S.y-m.y,S.x-m.x),x<0&&(x=Math.PI*2+x),b=S.x<m.x,b&&(x=x-Math.PI)}else x=Math.atan2(p.y-m.y,p.x-m.x),x<0&&(x=Math.PI*2+x),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(b=p.x<m.x,b&&(x=x-Math.PI)):(b=p.x>m.x,b||(x=x-Math.PI));var w=b?"left":"right",T=s.getModel("label"),M=T.get("rotate"),C=M*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:T.get("position")||w,rotation:M==null?-x:C,origin:"center"}),D.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),I=L==="relative"?ws(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;I&&(ot(e).focus=I),F7(n,o,h,e,d,v,p,i),e.__edge&&(e.onHoverStateChange=function(P){if(P!=="blur"){var k=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);k&&k.hoverState===dh||Hf(e.__edge,P)}})}function F7(r,t,e,i,n,a,o,s){var l=t.getModel(),u=r.get("edgeShape"),h=r.get("layout"),c=r.getOrient(),f=r.get(["lineStyle","curveness"]),v=r.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),p=i.__edge;if(u==="curve")t.parentNode&&t.parentNode!==e&&(p||(p=i.__edge=new zs({shape:Gm(h,c,f,n,n)})),At(p,{shape:Gm(h,c,f,a,o)},r));else if(u==="polyline"&&h==="orthogonal"&&t!==e&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,y=[],m=0;m<g.length;m++){var _=g[m].getLayout();y.push([_.x,_.y])}p||(p=i.__edge=new z7({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:c,forkPosition:v}})),At(p,{shape:{parentPoint:[o.x,o.y],childPoints:y}},r)}p&&!(u==="polyline"&&!t.isExpand)&&(p.useStyle(tt({strokeNoScale:!0,fill:null},d)),Ce(p,l,"lineStyle"),po(p),s.add(p))}function PM(r,t,e,i,n){var a=t.tree.root,o=mR(a,r),s=o.source,l=o.sourceLayout,u=t.getItemGraphicEl(r.dataIndex);if(u){var h=t.getItemGraphicEl(s.dataIndex),c=h.__edge,f=u.__edge||(s.isExpand===!1||s.children.length===1?c:void 0),v=i.get("edgeShape"),d=i.get("layout"),p=i.get("orient"),g=i.get(["lineStyle","curveness"]);f&&(v==="curve"?Xn(f,{shape:Gm(d,p,g,l,l),style:{opacity:0}},i,{cb:function(){e.remove(f)},removeOpt:n}):v==="polyline"&&i.get("layout")==="orthogonal"&&Xn(f,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},i,{cb:function(){e.remove(f)},removeOpt:n}))}}function mR(r,t){for(var e=t.parentNode===r?t:t.parentNode||t,i;i=e.getLayout(),i==null;)e=e.parentNode===r?e:e.parentNode||e;return{source:e,sourceLayout:i}}function kM(r,t,e,i,n){var a=r.tree.getNodeByDataIndex(t),o=r.tree.root,s=mR(o,a).sourceLayout,l={duration:n.get("animationDurationUpdate"),easing:n.get("animationEasingUpdate")};Xn(e,{x:s.x+1,y:s.y+1},n,{cb:function(){i.remove(e),r.setItemGraphicEl(t,null)},removeOpt:l}),e.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),a.children.forEach(function(u){PM(u,r,i,n,l)}),PM(a,r,i,n,l)}function Gm(r,t,e,i,n){var a,o,s,l,u,h,c,f;if(r==="radial"){u=i.rawX,c=i.rawY,h=n.rawX,f=n.rawY;var v=Zl(u,c),d=Zl(u,c+(f-c)*e),p=Zl(h,f+(c-f)*e),g=Zl(h,f);return{x1:v.x||0,y1:v.y||0,x2:g.x||0,y2:g.y||0,cpx1:d.x||0,cpy1:d.y||0,cpx2:p.x||0,cpy2:p.y||0}}else u=i.x,c=i.y,h=n.x,f=n.y,(t==="LR"||t==="RL")&&(a=u+(h-u)*e,o=c,s=h+(u-h)*e,l=f),(t==="TB"||t==="BT")&&(a=u,o=c+(f-c)*e,s=h,l=f+(c-f)*e);return{x1:u,y1:c,x2:h,y2:f,cpx1:a,cpy1:o,cpx2:s,cpy2:l}}var Ir=Tt();function _R(r){var t=r.mainData,e=r.datas;e||(e={main:t},r.datasAttr={main:"data"}),r.datas=r.mainData=null,xR(t,e,r),A(e,function(i){A(t.TRANSFERABLE_METHODS,function(n){i.wrapMethod(n,ut(G7,r))})}),t.wrapMethod("cloneShallow",ut(W7,r)),A(t.CHANGABLE_METHODS,function(i){t.wrapMethod(i,ut(H7,r))}),Ve(e[t.dataType]===t)}function G7(r,t){if($7(this)){var e=z({},Ir(this).datas);e[this.dataType]=t,xR(t,e,r)}else px(t,this.dataType,Ir(this).mainData,r);return t}function H7(r,t){return r.struct&&r.struct.update(),t}function W7(r,t){return A(Ir(t).datas,function(e,i){e!==t&&px(e.cloneShallow(),i,t,r)}),t}function U7(r){var t=Ir(this).mainData;return r==null||t==null?t:Ir(t).datas[r]}function Y7(){var r=Ir(this).mainData;return r==null?[{data:r}]:F(xt(Ir(r).datas),function(t){return{type:t,data:Ir(r).datas[t]}})}function $7(r){return Ir(r).mainData===r}function xR(r,t,e){Ir(r).datas={},A(t,function(i,n){px(i,n,r,e)})}function px(r,t,e,i){Ir(e).datas[t]=r,Ir(r).mainData=e,r.dataType=t,i.struct&&(r[i.structAttr]=i.struct,i.struct[i.datasAttr[t]]=r),r.getLinkedData=U7,r.getLinkedDataAll=Y7}var X7=function(){function r(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(t,e,i){Q(t)&&(i=e,e=t,t=null),t=t||{},Y(t)&&(t={order:t});var n=t.order||"preorder",a=this[t.attr||"children"],o;n==="preorder"&&(o=e.call(i,this));for(var s=0;!o&&s<a.length;s++)a[s].eachNode(t,e,i);n==="postorder"&&e.call(i,this)},r.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(t+1),n.height>e&&(e=n.height)}this.height=e+1},r.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e<n;e++){var a=i[e].getNodeById(t);if(a)return a}},r.prototype.contains=function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;e<n;e++){var a=i[e].contains(t);if(a)return a}},r.prototype.getAncestors=function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},r.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},r.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(e){t.push(e.dataIndex)}),t},r.prototype.getValue=function(t){var e=this.hostTree.data;return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},r.prototype.setLayout=function(t,e){this.dataIndex>=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,i=e.data.getItemModel(this.dataIndex);return i.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<t.length;++e)if(t[e]===this)return e;return-1}return-1},r.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},r.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},r}(),gx=function(){function r(t){this.type="tree",this._nodes=[],this.hostModel=t}return r.prototype.eachNode=function(t,e,i){this.root.eachNode(t,e,i)},r.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},r.prototype.getNodeById=function(t){return this.root.getNodeById(t)},r.prototype.update=function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;i<n;i++)e[i].dataIndex=-1;for(var i=0,n=t.count();i<n;i++)e[t.getRawIndex(i)].dataIndex=i},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(t,e,i){var n=new r(e),a=[],o=1;s(t);function s(h,c){var f=h.value;o=Math.max(o,V(f)?f.length:1),a.push(h);var v=new X7(he(h.name,""),n);c?Z7(v,c):n.root=v,n._nodes.push(v);var d=h.children;if(d)for(var p=0;p<d.length;p++)s(d[p],v)}n.root.updateDepthAndHeight(0);var l=qs(a,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Be(l,e);return u.initData(a),i&&i(u),_R({mainData:u,struct:n,structAttr:"tree"}),n.update(),n},r}();function Z7(r,t){var e=t.children;r.parentNode!==t&&(e.push(r),r.parentNode=t)}function Ku(r,t,e){if(r&&vt(t,r.type)>=0){var i=e.getData().tree.root,n=r.targetNode;if(Y(n)&&(n=i.getNodeById(n)),n&&i.contains(n))return{node:n};var a=r.targetNodeId;if(a!=null&&(n=i.getNodeById(a)))return{node:n}}}function bR(r){for(var t=[];r;)r=r.parentNode,r&&t.push(r);return t.reverse()}function yx(r,t){var e=bR(r);return vt(e,t)>=0}function bd(r,t){for(var e=[];r;){var i=r.dataIndex;e.push({name:r.name,dataIndex:i,value:t.getRawValue(i)}),r=r.parentNode}return e.reverse(),e}var j7=function(r){E(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 i={name:e.name,children:e.data},n=e.leaves||{},a=new Lt(n,this,this.ecModel),o=gx.createTree(i,this,s);function s(c){c.wrapMethod("getItemModel",function(f,v){var d=o.getNodeByDataIndex(v);return d&&d.children.length&&d.isExpand||(f.parentModel=a),f})}var l=0;o.eachNode("preorder",function(c){c.depth>l&&(l=c.depth)});var u=e.expandAndCollapse,h=u&&e.initialTreeDepth>=0?e.initialTreeDepth:l;return o.root.eachNode("preorder",function(c){var f=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=f&&f.collapsed!=null?!f.collapsed:c.depth<=h}),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,i,n){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(e),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return _e("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(e){var i=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return i.treeAncestors=bd(n,this),i.collapsed=!n.isExpand,i},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(zt);function q7(r,t,e){for(var i=[r],n=[],a;a=i.pop();)if(n.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s<o.length;s++)i.push(o[s])}for(;a=n.pop();)t(a,e)}function Cl(r,t){for(var e=[r],i;i=e.pop();)if(t(i),i.isExpand){var n=i.children;if(n.length)for(var a=n.length-1;a>=0;a--)e.push(n[a])}}function K7(r,t){r.eachSeriesByType("tree",function(e){J7(e,t)})}function J7(r,t){var e=P7(r,t);r.layoutInfo=e;var i=r.get("layout"),n=0,a=0,o=null;i==="radial"?(n=2*Math.PI,a=Math.min(e.height,e.width)/2,o=DM(function(_,x){return(_.parentNode===x.parentNode?1:2)/_.depth})):(n=e.width,a=e.height,o=DM());var s=r.getData().tree.root,l=s.children[0];if(l){D7(s),q7(l,L7,o),s.hierNode.modifier=-l.hierNode.prelim,Cl(l,I7);var u=l,h=l,c=l;Cl(l,function(_){var x=_.getLayout().x;x<u.getLayout().x&&(u=_),x>h.getLayout().x&&(h=_),_.depth>c.depth&&(c=_)});var f=u===h?1:o(u,h)/2,v=f-u.getLayout().x,d=0,p=0,g=0,y=0;if(i==="radial")d=n/(h.getLayout().x+f+v),p=a/(c.depth-1||1),Cl(l,function(_){g=(_.getLayout().x+v)*d,y=(_.depth-1)*p;var x=Zl(g,y);_.setLayout({x:x.x,y:x.y,rawX:g,rawY:y},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(p=a/(h.getLayout().x+f+v),d=n/(c.depth-1||1),Cl(l,function(_){y=(_.getLayout().x+v)*p,g=m==="LR"?(_.depth-1)*d:n-(_.depth-1)*d,_.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(d=n/(h.getLayout().x+f+v),p=a/(c.depth-1||1),Cl(l,function(_){g=(_.getLayout().x+v)*d,y=m==="TB"?(_.depth-1)*p:a-(_.depth-1)*p,_.setLayout({x:g,y},!0)}))}}}function Q7(r){r.eachSeriesByType("tree",function(t){var e=t.getData(),i=e.tree;i.eachNode(function(n){var a=n.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=e.ensureUniqueItemVisual(n.dataIndex,"style");z(s,o)})})}function t9(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(i){var n=t.dataIndex,a=i.getData().tree,o=a.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e,i){e.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var a=n.coordinateSystem,o=dx(a,t,void 0,i);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function e9(r){r.registerChartView(V7),r.registerSeriesModel(j7),r.registerLayout(K7),r.registerVisual(Q7),t9(r)}var RM=["treemapZoomToNode","treemapRender","treemapMove"];function r9(r){for(var t=0;t<RM.length;t++)r.registerAction({type:RM[t],update:"updateView"},ee);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(e,i){i.eachComponent({mainType:"series",subType:"treemap",query:e},n);function n(a,o){var s=["treemapZoomToNode","treemapRootToNode"],l=Ku(e,s,a);if(l){var u=a.getViewRoot();u&&(e.direction=yx(u,l.node)?"rollUp":"drillDown"),a.resetViewRoot(l.node)}}})}function SR(r){var t=r.getData(),e=t.tree,i={};e.eachNode(function(n){for(var a=n;a&&a.depth>1;)a=a.parentNode;var o=dm(r.ecModel,a.name||a.dataIndex+"",i);n.setVisual("decal",o)})}var i9=function(r){E(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,i){var n={name:e.name,children:e.data};wR(n);var a=e.levels||[],o=this.designatedVisualItemStyle={},s=new Lt({itemStyle:o},this,i);a=e.levels=n9(a,i);var l=F(a||[],function(c){return new Lt(c,s,i)},this),u=gx.createTree(n,this,h);function h(c){c.wrapMethod("getItemModel",function(f,v){var d=u.getNodeByDataIndex(v),p=d?l[d.depth]:null;return f.parentModel=p||s,f})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,i,n){var a=this.getData(),o=this.getRawValue(e),s=a.getName(e);return _e("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(e){var i=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return i.treeAncestors=bd(n,this),i.treePathInfo=i.treeAncestors,i},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},z(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var i=this._idIndexMap;i||(i=this._idIndexMap=Z(),this._idIndexMapCount=0);var n=i.get(e);return n==null&&i.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 i=this.getRawData().tree.root;(!e||e!==i&&!i.contains(e))&&(this._viewRoot=i)},t.prototype.enableAriaDecal=function(){SR(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(zt);function wR(r){var t=0;A(r.children,function(i){wR(i);var n=i.value;V(n)&&(n=n[0]),t+=n});var e=r.value;V(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),V(r.value)?r.value[0]=e:r.value=e}function n9(r,t){var e=Bt(t.get("color")),i=Bt(t.get(["aria","decal","decals"]));if(e){r=r||[];var n,a;A(r,function(s){var l=new Lt(s),u=l.get("color"),h=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||h&&h!=="none")&&(a=!0)});var o=r[0]||(r[0]={});return n||(o.color=e.slice()),!a&&i&&(o.decal=i.slice()),r}}var a9=8,EM=8,gg=5,o9=function(){function r(t){this.group=new at,t.add(this.group)}return r.prototype.render=function(t,e,i,n){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!i)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),h=l.getModel(["itemStyle","textStyle"]),c={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,c,u),this._renderContent(t,c,s,l,u,h,n),sd(o,c.pos,c.box)}},r.prototype._prepare=function(t,e,i){for(var n=t;n;n=n.parentNode){var a=he(n.getModel().get("name"),""),o=i.getTextRect(a),s=Math.max(o.width+a9*2,e.emptyItemWidth);e.totalWidth+=s+EM,e.renderList.push({node:n,text:a,width:s})}},r.prototype._renderContent=function(t,e,i,n,a,o,s){for(var l=0,u=e.emptyItemWidth,h=t.get(["breadcrumb","height"]),c=JH(e.pos,e.box),f=e.totalWidth,v=e.renderList,d=n.getModel("itemStyle").getItemStyle(),p=v.length-1;p>=0;p--){var g=v[p],y=g.node,m=g.width,_=g.text;f>c.width&&(f-=m-u,m=u,_=null);var x=new Ge({shape:{points:s9(l,0,m,h,p===v.length-1,p===0)},style:tt(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new St({style:Gt(a,{text:_})}),textConfig:{position:"inside"},z2:Ns*1e4,onclick:ut(s,y)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=Gt(o,{text:_}),x.ensureState("emphasis").style=d,Kt(x,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(x),l9(x,t,y),l+=m+EM}},r.prototype.remove=function(){this.group.removeAll()},r}();function s9(r,t,e,i,n,a){var o=[[n?r:r-gg,t],[r+e,t],[r+e,t+i],[n?r:r-gg,t+i]];return!a&&o.splice(2,0,[r+e+gg,t+i/2]),!n&&o.push([r,t+i/2]),o}function l9(r,t,e){ot(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&&bd(e,t)}}var u9=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(t,e,i,n,a){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:i,delay:n,easing:a}),!0)},r.prototype.finished=function(t){return this._finishedCallback=t,this},r.prototype.start=function(){for(var t=this,e=this._storage.length,i=function(){e--,e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},n=0,a=this._storage.length;n<a;n++){var o=this._storage[n];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:i,aborted:i})}return this},r}();function h9(){return new u9}var Hm=at,OM=wt,NM=3,BM="label",zM="upperLabel",c9=Ns*10,f9=Ns*2,v9=Ns*3,Na=vo([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),VM=function(r){var t=Na(r);return t.stroke=t.fill=t.lineWidth=null,t},fv=Tt(),d9=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._state="ready",e._storage=Al(),e}return t.prototype.render=function(e,i,n,a){var o=i.findComponents({mainType:"series",subType:"treemap",query:a});if(!(vt(o,e)<0)){this.seriesModel=e,this.api=n,this.ecModel=i;var s=["treemapZoomToNode","treemapRootToNode"],l=Ku(a,s,e),u=a&&a.type,h=e.layoutInfo,c=!this._oldTree,f=this._storage,v=u==="treemapRootToNode"&&l&&f?{rootNodeGroup:f.nodeGroup[l.node.getRawIndex()],direction:a.direction}:null,d=this._giveContainerGroup(h),p=e.get("animation"),g=this._doRender(d,e,v);p&&!c&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(d,g,e,v):g.renderFinally(),this._resetController(n),this._renderBreadcrumb(e,n,l)}},t.prototype._giveContainerGroup=function(e){var i=this._containerGroup;return i||(i=this._containerGroup=new Hm,this._initEvents(i),this.group.add(i)),i.x=e.x,i.y=e.y,i},t.prototype._doRender=function(e,i,n){var a=i.getData().tree,o=this._oldTree,s=Al(),l=Al(),u=this._storage,h=[];function c(m,_,x,b){return p9(i,l,u,n,s,h,m,_,x,b)}p(a.root?[a.root]:[],o&&o.root?[o.root]:[],e,a===o||!o,0);var f=g(u);if(this._oldTree=a,this._storage=l,this._controllerHost){var v=this.seriesModel.layoutInfo,d=a.root.getLayout();d.width===v.width&&d.height===v.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:f,renderFinally:y};function p(m,_,x,b,S){b?(_=m,A(m,function(M,C){!M.isRemoved()&&T(C,C)})):new Qi(_,m,w,w).add(T).update(T).remove(ut(T,null)).execute();function w(M){return M.getId()}function T(M,C){var D=M!=null?m[M]:null,L=C!=null?_[C]:null,I=c(D,L,x,S);I&&p(D&&D.viewChildren||[],L&&L.viewChildren||[],I,b,S+1)}}function g(m){var _=Al();return m&&A(m,function(x,b){var S=_[b];A(x,function(w){w&&(S.push(w),fv(w).willDelete=!0)})}),_}function y(){A(f,function(m){A(m,function(_){_.parent&&_.parent.remove(_)})}),A(h,function(m){m.invisible=!0,m.dirty()})}},t.prototype._doAnimation=function(e,i,n,a){var o=n.get("animationDurationUpdate"),s=n.get("animationEasing"),l=(Q(o)?0:o)||0,u=(Q(s)?null:s)||"cubicOut",h=h9();A(i.willDeleteEls,function(c,f){A(c,function(v,d){if(!v.invisible){var p=v.parent,g,y=fv(p);if(a&&a.direction==="drillDown")g=p===a.rootNodeGroup?{shape:{x:0,y:0,width:y.nodeWidth,height:y.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var m=0,_=0;y.willDelete||(m=y.nodeWidth/2,_=y.nodeHeight/2),g=f==="nodeGroup"?{x:m,y:_,style:{opacity:0}}:{shape:{x:m,y:_,width:0,height:0},style:{opacity:0}}}g&&h.add(v,g,l,0,u)}})}),A(this._storage,function(c,f){A(c,function(v,d){var p=i.lastsForAnimation[f][d],g={};p&&(v instanceof at?p.oldX!=null&&(g.x=v.x,g.y=v.y,v.x=p.oldX,v.y=p.oldY):(p.oldShape&&(g.shape=z({},v.shape),v.setShape(p.oldShape)),p.fadein?(v.setStyle("opacity",0),g.style={opacity:1}):v.style.opacity!==1&&(g.style={opacity:1})),h.add(v,g,l,0,u))})},this),this._state="animating",h.finished($(function(){this._state="ready",i.renderFinally()},this)).start()},t.prototype._resetController=function(e){var i=this._controller,n=this._controllerHost;n||(this._controllerHost={target:this.group},n=this._controllerHost),i||(i=this._controller=new Dh(e.getZr()),i.enable(this.seriesModel.get("roam")),n.zoomLimit=this.seriesModel.get("scaleLimit"),n.zoom=this.seriesModel.get("zoom"),i.on("pan",$(this._onPan,this)),i.on("zoom",$(this._onZoom,this)));var a=new ft(0,0,e.getWidth(),e.getHeight());i.setPointerChecker(function(o,s,l){return a.contain(s,l)})},t.prototype._clearController=function(){var e=this._controller;this._controllerHost=null,e&&(e.dispose(),e=null)},t.prototype._onPan=function(e){if(this._state!=="animating"&&(Math.abs(e.dx)>NM||Math.abs(e.dy)>NM)){var i=this.seriesModel.getData().tree.root;if(!i)return;var n=i.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 i=e.originX,n=e.originY,a=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 ft(s.x,s.y,s.width,s.height),u=null,h=this._controllerHost;u=h.zoomLimit;var c=h.zoom=h.zoom||1;if(c*=a,u){var f=u.min||0,v=u.max||1/0;c=Math.max(Math.min(v,c),f)}var d=c/h.zoom;h.zoom=c;var p=this.seriesModel.layoutInfo;i-=p.x,n-=p.y;var g=or();ti(g,g,[-i,-n]),Hv(g,g,[d,d]),ti(g,g,[i,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 i=this;e.on("click",function(n){if(i._state==="ready"){var a=i.seriesModel.get("nodeClick",!0);if(a){var o=i.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)i._rootToNode(o);else if(a==="zoomToNode")i._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),h=l.get("target",!0)||"blank";u&&Zf(u,h)}}}}},this)},t.prototype._renderBreadcrumb=function(e,i,n){var a=this;n||(n=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(i.getWidth()/2,i.getHeight()/2),n||(n={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new o9(this.group))).render(e,i,n.node,function(o){a._state!=="animating"&&(yx(e.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Al(),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,i){var n,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(e,i),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}(Ot);function Al(){return{nodeGroup:[],background:[],content:[]}}function p9(r,t,e,i,n,a,o,s,l,u){if(!o)return;var h=o.getLayout(),c=r.getData(),f=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!h||!h.isInView)return;var v=h.width,d=h.height,p=h.borderWidth,g=h.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,x=h.upperHeight,b=_&&_.length,S=f.getModel("itemStyle"),w=f.getModel(["emphasis","itemStyle"]),T=f.getModel(["blur","itemStyle"]),M=f.getModel(["select","itemStyle"]),C=S.get("borderRadius")||0,D=nt("nodeGroup",Hm);if(!D)return;if(l.add(D),D.x=h.x||0,D.y=h.y||0,D.markRedraw(),fv(D).nodeWidth=v,fv(D).nodeHeight=d,h.isAboveViewRoot)return D;var L=nt("background",OM,u,f9);L&&G(D,L,b&&h.upperLabelHeight);var I=f.getModel("emphasis"),P=I.get("focus"),k=I.get("blurScope"),R=I.get("disabled"),N=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)zu(D)&&$a(D,!1),L&&($a(L,!R),c.setItemGraphicEl(o.dataIndex,L),om(L,N,k));else{var O=nt("content",OM,u,v9);O&&H(D,O),L.disableMorphing=!0,L&&zu(L)&&$a(L,!1),$a(D,!R),c.setItemGraphicEl(o.dataIndex,D);var B=f.getShallow("cursor");B&&O.attr("cursor",B),om(D,N,k)}return D;function G(dt,rt,gt){var J=ot(rt);if(J.dataIndex=o.dataIndex,J.seriesIndex=r.seriesIndex,rt.setShape({x:0,y:0,width:v,height:d,r:C}),g)W(rt);else{rt.invisible=!1;var st=o.getVisual("style"),Ht=st.stroke,Et=VM(S);Et.fill=Ht;var Vt=Na(w);Vt.fill=w.get("borderColor");var Xt=Na(T);Xt.fill=T.get("borderColor");var fe=Na(M);if(fe.fill=M.get("borderColor"),gt){var sr=v-2*p;q(rt,Ht,st.opacity,{x:p,y:0,width:sr,height:x})}else rt.removeTextContent();rt.setStyle(Et),rt.ensureState("emphasis").style=Vt,rt.ensureState("blur").style=Xt,rt.ensureState("select").style=fe,po(rt)}dt.add(rt)}function H(dt,rt){var gt=ot(rt);gt.dataIndex=o.dataIndex,gt.seriesIndex=r.seriesIndex;var J=Math.max(v-2*p,0),st=Math.max(d-2*p,0);if(rt.culling=!0,rt.setShape({x:p,y:p,width:J,height:st,r:C}),g)W(rt);else{rt.invisible=!1;var Ht=o.getVisual("style"),Et=Ht.fill,Vt=VM(S);Vt.fill=Et,Vt.decal=Ht.decal;var Xt=Na(w),fe=Na(T),sr=Na(M);q(rt,Et,Ht.opacity,null),rt.setStyle(Vt),rt.ensureState("emphasis").style=Xt,rt.ensureState("blur").style=fe,rt.ensureState("select").style=sr,po(rt)}dt.add(rt)}function W(dt){!dt.invisible&&a.push(dt)}function q(dt,rt,gt,J){var st=f.getModel(J?zM:BM),Ht=he(f.get("name"),null),Et=st.getShallow("show");Ae(dt,me(f,J?zM:BM),{defaultText:Et?Ht:null,inheritColor:rt,defaultOpacity:gt,labelFetcher:r,labelDataIndex:o.dataIndex});var Vt=dt.getTextContent();if(Vt){var Xt=Vt.style,fe=Fv(Xt.padding||0);J&&(dt.setTextConfig({layoutRect:J}),Vt.disableLabelLayout=!0),Vt.beforeUpdate=function(){var Je=Math.max((J?J.width:dt.shape.width)-fe[1]-fe[3],0),ia=Math.max((J?J.height:dt.shape.height)-fe[0]-fe[2],0);(Xt.width!==Je||Xt.height!==ia)&&Vt.setStyle({width:Je,height:ia})},Xt.truncateMinChar=2,Xt.lineOverflow="truncate",K(Xt,J,h);var sr=Vt.getState("emphasis");K(sr?sr.style:null,J,h)}}function K(dt,rt,gt){var J=dt?dt.text:null;if(!rt&>.isLeafRoot&&J!=null){var st=r.get("drillDownIcon",!0);dt.text=st?st+" "+J:J}}function nt(dt,rt,gt,J){var st=m!=null&&e[dt][m],Ht=n[dt];return st?(e[dt][m]=null,Ct(Ht,st)):g||(st=new rt,st instanceof kr&&(st.z2=g9(gt,J)),te(Ht,st)),t[dt][y]=st}function Ct(dt,rt){var gt=dt[y]={};rt instanceof Hm?(gt.oldX=rt.x,gt.oldY=rt.y):gt.oldShape=z({},rt.shape)}function te(dt,rt){var gt=dt[y]={},J=o.parentNode,st=rt instanceof at;if(J&&(!i||i.direction==="drillDown")){var Ht=0,Et=0,Vt=n.background[J.getRawIndex()];!i&&Vt&&Vt.oldShape&&(Ht=Vt.oldShape.width,Et=Vt.oldShape.height),st?(gt.oldX=0,gt.oldY=Et):gt.oldShape={x:Ht,y:Et,width:0,height:0}}gt.fadein=!st}}function g9(r,t){return r*c9+t}var Ju=A,y9=et,vv=-1,ye=function(){function r(t){var e=t.mappingMethod,i=t.type,n=this.option=it(t);this.type=i,this.mappingMethod=e,this._normalizeData=x9[e];var a=r.visualHandlers[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[e],e==="piecewise"?(yg(n),m9(n)):e==="category"?n.categories?_9(n):yg(n,!0):(Ve(e!=="linear"||n.dataExtent),yg(n))}return r.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},r.prototype.getNormalizer=function(){return $(this._normalizeData,this)},r.listVisualTypes=function(){return xt(r.visualHandlers)},r.isValidType=function(t){return r.visualHandlers.hasOwnProperty(t)},r.eachVisual=function(t,e,i){et(t)?A(t,e,i):e.call(i,t)},r.mapVisual=function(t,e,i){var n,a=V(t)?[]:et(t)?{}:(n=!0,null);return r.eachVisual(t,function(o,s){var l=e.call(i,o,s);n?a=l:a[s]=l}),a},r.retrieveVisuals=function(t){var e={},i;return t&&Ju(r.visualHandlers,function(n,a){t.hasOwnProperty(a)&&(e[a]=t[a],i=!0)}),i?e:null},r.prepareVisualTypes=function(t){if(V(t))t=t.slice();else if(y9(t)){var e=[];Ju(t,function(i,n){e.push(n)}),t=e}else return[];return t.sort(function(i,n){return n==="color"&&i!=="color"&&i.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,i){for(var n,a=1/0,o=0,s=e.length;o<s;o++){var l=e[o].value;if(l!=null){if(l===t||Y(l)&&l===t+"")return o;i&&f(l,o)}}for(var o=0,s=e.length;o<s;o++){var u=e[o],h=u.interval,c=u.close;if(h){if(h[0]===-1/0){if(kc(c[1],t,h[1]))return o}else if(h[1]===1/0){if(kc(c[0],h[0],t))return o}else if(kc(c[0],h[0],t)&&kc(c[1],t,h[1]))return o;i&&f(h[0],o),i&&f(h[1],o)}}if(i)return t===1/0?e.length-1:t===-1/0?0:n;function f(v,d){var p=Math.abs(v-t);p<a&&(a=p,n=d)}},r.visualHandlers={color:{applyVisual:Dl("color"),getColorMapper:function(){var t=this.option;return $(t.mappingMethod==="category"?function(e,i){return!i&&(e=this._normalizeData(e)),jl.call(this,e)}:function(e,i,n){var a=!!n;return!i&&(e=this._normalizeData(e)),n=uu(e,t.parsedVisual,n),a?n:Kr(n,"rgba")},this)},_normalizedToVisual:{linear:function(t){return Kr(uu(t,this.option.parsedVisual),"rgba")},category:jl,piecewise:function(t,e){var i=Um.call(this,e);return i==null&&(i=Kr(uu(t,this.option.parsedVisual),"rgba")),i},fixed:Ba}},colorHue:Pc(function(t,e){return fs(t,e)}),colorSaturation:Pc(function(t,e){return fs(t,null,e)}),colorLightness:Pc(function(t,e){return fs(t,null,null,e)}),colorAlpha:Pc(function(t,e){return Ru(t,e)}),decal:{applyVisual:Dl("decal"),_normalizedToVisual:{linear:null,category:jl,piecewise:null,fixed:null}},opacity:{applyVisual:Dl("opacity"),_normalizedToVisual:Wm([0,1])},liftZ:{applyVisual:Dl("liftZ"),_normalizedToVisual:{linear:Ba,category:Ba,piecewise:Ba,fixed:Ba}},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);i("symbol",n)},_normalizedToVisual:{linear:FM,category:jl,piecewise:function(t,e){var i=Um.call(this,e);return i==null&&(i=FM.call(this,t)),i},fixed:Ba}},symbolSize:{applyVisual:Dl("symbolSize"),_normalizedToVisual:Wm([0,1])}},r}();function m9(r){var t=r.pieceList;r.hasSpecialVisual=!1,A(t,function(e,i){e.originIndex=i,e.visual!=null&&(r.hasSpecialVisual=!0)})}function _9(r){var t=r.categories,e=r.categoryMap={},i=r.visual;if(Ju(t,function(o,s){e[o]=s}),!V(i)){var n=[];et(i)?Ju(i,function(o,s){var l=e[s];n[l??vv]=o}):n[vv]=i,i=TR(r,n)}for(var a=t.length-1;a>=0;a--)i[a]==null&&(delete e[t[a]],t.pop())}function yg(r,t){var e=r.visual,i=[];et(e)?Ju(e,function(a){i.push(a)}):e!=null&&i.push(e);var n={color:1,symbol:1};!t&&i.length===1&&!n.hasOwnProperty(r.type)&&(i[1]=i[0]),TR(r,i)}function Pc(r){return{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);i("color",r(e("color"),n))},_normalizedToVisual:Wm([0,1])}}function FM(r){var t=this.option.visual;return t[Math.round(Pt(r,[0,1],[0,t.length-1],!0))]||{}}function Dl(r){return function(t,e,i){i(r,this.mapValueToVisual(t))}}function jl(r){var t=this.option.visual;return t[this.option.loop&&r!==vv?r%t.length:r]}function Ba(){return this.option.visual[0]}function Wm(r){return{linear:function(t){return Pt(t,r,this.option.visual,!0)},category:jl,piecewise:function(t,e){var i=Um.call(this,e);return i==null&&(i=Pt(t,r,this.option.visual,!0)),i},fixed:Ba}}function Um(r){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var i=ye.findPieceIndex(r,e),n=e[i];if(n&&n.visual)return n.visual[this.type]}}function TR(r,t){return r.visual=t,r.type==="color"&&(r.parsedVisual=F(t,function(e){var i=Ze(e);return i||[0,0,0,1]})),t}var x9={linear:function(r){return Pt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var t=this.option.pieceList,e=ye.findPieceIndex(r,t,!0);if(e!=null)return Pt(e,[0,t.length-1],[0,1],!0)},category:function(r){var t=this.option.categories?this.option.categoryMap[r]:r;return t??vv},fixed:ee};function kc(r,t,e){return r?t<=e:t<e}var b9="itemStyle",MR=Tt();const S9={seriesType:"treemap",reset:function(r){var t=r.getData().tree,e=t.root;e.isRemoved()||CR(e,{},r.getViewRoot().getAncestors(),r)}};function CR(r,t,e,i){var n=r.getModel(),a=r.getLayout(),o=r.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=n.getModel(b9),l=w9(s,t,i),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),h=s.get("borderColor"),c=s.get("borderColorSaturation"),f;c!=null&&(f=GM(l),h=T9(c,f)),u.stroke=h;var v=r.viewChildren;if(!v||!v.length)f=GM(l),u.fill=f;else{var d=M9(r,n,a,s,l,v);A(v,function(p,g){if(p.depth>=e.length||p===e[p.depth]){var y=C9(n,l,p,g,d,i);CR(p,y,e,i)}})}}}function w9(r,t,e){var i=z({},t),n=e.designatedVisualItemStyle;return A(["color","colorAlpha","colorSaturation"],function(a){n[a]=t[a];var o=r.get(a);n[a]=null,o!=null&&(i[a]=o)}),i}function GM(r){var t=mg(r,"color");if(t){var e=mg(r,"colorAlpha"),i=mg(r,"colorSaturation");return i&&(t=fs(t,null,null,i)),e&&(t=Ru(t,e)),t}}function T9(r,t){return t!=null?fs(t,null,null,r):null}function mg(r,t){var e=r[t];if(e!=null&&e!=="none")return e}function M9(r,t,e,i,n,a){if(!(!a||!a.length)){var o=_g(t,"color")||n.color!=null&&n.color!=="none"&&(_g(t,"colorAlpha")||_g(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=e.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var h=t.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(h==="index"||h==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var f=new ye(c);return MR(f).drColorMappingBy=h,f}}}function _g(r,t){var e=r.get(t);return V(e)&&e.length?{name:t,range:e}:null}function C9(r,t,e,i,n,a){var o=z({},t);if(n){var s=n.type,l=s==="color"&&MR(n).drColorMappingBy,u=l==="index"?i:l==="id"?a.mapIdToIndex(e.getId()):e.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var Qu=Math.max,dv=Math.min,HM=pe,mx=A,AR=["itemStyle","borderWidth"],A9=["itemStyle","gapWidth"],D9=["upperLabel","show"],L9=["upperLabel","height"];const I9={seriesType:"treemap",reset:function(r,t,e,i){var n=e.getWidth(),a=e.getHeight(),o=r.option,s=ue(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),l=o.size||[],u=U(HM(s.width,l[0]),n),h=U(HM(s.height,l[1]),a),c=i&&i.type,f=["treemapZoomToNode","treemapRootToNode"],v=Ku(i,f,r),d=c==="treemapRender"||c==="treemapMove"?i.rootRect:null,p=r.getViewRoot(),g=bR(p);if(c!=="treemapMove"){var y=c==="treemapZoomToNode"?N9(r,v,p,u,h):d?[d.width,d.height]:[u,h],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var _={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var x={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};p.setLayout(x),DR(p,_,!1,0),x=p.getLayout(),mx(g,function(S,w){var T=(g[w+1]||p).getValue();S.setLayout(z({dataExtent:[T,T],borderWidth:0,upperHeight:0},x))})}var b=r.getData().tree.root;b.setLayout(B9(s,d,v),!0),r.setLayoutInfo(s),LR(b,new ft(-s.x,-s.y,n,a),g,p,0)}};function DR(r,t,e,i){var n,a;if(!r.isRemoved()){var o=r.getLayout();n=o.width,a=o.height;var s=r.getModel(),l=s.get(AR),u=s.get(A9)/2,h=IR(s),c=Math.max(l,h),f=l-u,v=c-u;r.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:h},!0),n=Qu(n-2*f,0),a=Qu(a-f-v,0);var d=n*a,p=P9(r,s,d,t,e,i);if(p.length){var g={x:f,y:v,width:n,height:a},y=dv(n,a),m=1/0,_=[];_.area=0;for(var x=0,b=p.length;x<b;){var S=p[x];_.push(S),_.area+=S.getLayout().area;var w=O9(_,y,t.squareRatio);w<=m?(x++,m=w):(_.area-=_.pop().getLayout().area,WM(_,y,g,u,!1),y=dv(g.width,g.height),_.length=_.area=0,m=1/0)}if(_.length&&WM(_,y,g,u,!0),!e){var T=s.get("childrenVisibleMin");T!=null&&d<T&&(e=!0)}for(var x=0,b=p.length;x<b;x++)DR(p[x],t,e,i+1)}}}function P9(r,t,e,i,n,a){var o=r.children||[],s=i.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=i.leafDepth!=null&&i.leafDepth<=a;if(n&&!l)return r.viewChildren=[];o=Dt(o,function(v){return!v.isRemoved()}),R9(o,s);var u=E9(t,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=k9(t,e,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var h=0,c=o.length;h<c;h++){var f=o[h].getValue()/u.sum*e;o[h].setLayout({area:f})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function k9(r,t,e,i,n){if(!i)return e;for(var a=r.get("visibleMin"),o=n.length,s=o,l=o-1;l>=0;l--){var u=n[i==="asc"?o-l-1:l].getValue();u/e*t<a&&(s=l,e-=u)}return i==="asc"?n.splice(0,o-s):n.splice(s,o-s),e}function R9(r,t){return t&&r.sort(function(e,i){var n=t==="asc"?e.getValue()-i.getValue():i.getValue()-e.getValue();return n===0?t==="asc"?e.dataIndex-i.dataIndex:i.dataIndex-e.dataIndex:n}),r}function E9(r,t,e){for(var i=0,n=0,a=t.length;n<a;n++)i+=t[n].getValue();var o=r.get("visualDimension"),s;return!t||!t.length?s=[NaN,NaN]:o==="value"&&e?(s=[t[t.length-1].getValue(),t[0].getValue()],e==="asc"&&s.reverse()):(s=[1/0,-1/0],mx(t,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:i,dataExtent:s}}function O9(r,t,e){for(var i=0,n=1/0,a=0,o=void 0,s=r.length;a<s;a++)o=r[a].getLayout().area,o&&(o<n&&(n=o),o>i&&(i=o));var l=r.area*r.area,u=t*t*e;return l?Qu(u*i/l,l/(u*n)):1/0}function WM(r,t,e,i,n){var a=t===e.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=e[s[a]],h=t?r.area/t:0;(n||h>e[l[o]])&&(h=e[l[o]]);for(var c=0,f=r.length;c<f;c++){var v=r[c],d={},p=h?v.getLayout().area/h:0,g=d[l[o]]=Qu(h-2*i,0),y=e[s[a]]+e[l[a]]-u,m=c===f-1||y<p?y:p,_=d[l[a]]=Qu(m-2*i,0);d[s[o]]=e[s[o]]+dv(i,g/2),d[s[a]]=u+dv(i,_/2),u+=m,v.setLayout(d,!0)}e[s[o]]+=h,e[l[o]]-=h}function N9(r,t,e,i,n){var a=(t||{}).node,o=[i,n];if(!a||a===e)return o;for(var s,l=i*n,u=l*r.option.zoomToNodeRatio;s=a.parentNode;){for(var h=0,c=s.children,f=0,v=c.length;f<v;f++)h+=c[f].getValue();var d=a.getValue();if(d===0)return o;u*=h/d;var p=s.getModel(),g=p.get(AR),y=Math.max(g,IR(p));u+=4*g*g+(3*g+y)*Math.pow(u,.5),u>Ky&&(u=Ky),a=s}u<l&&(u=l);var m=Math.pow(u/l,.5);return[i*m,n*m]}function B9(r,t,e){if(t)return{x:t.x,y:t.y};var i={x:0,y:0};if(!e)return i;var n=e.node,a=n.getLayout();if(!a)return i;for(var o=[a.width/2,a.height/2],s=n;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function LR(r,t,e,i,n){var a=r.getLayout(),o=e[n],s=o&&o===r;if(!(o&&!s||n===e.length&&r!==i)){r.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var l=new ft(t.x-a.x,t.y-a.y,t.width,t.height);mx(r.viewChildren||[],function(u){LR(u,l,e,i,n+1)})}}function IR(r){return r.get(D9)?r.get(L9):0}function z9(r){r.registerSeriesModel(i9),r.registerChartView(d9),r.registerVisual(S9),r.registerLayout(I9),r9(r)}function V9(r){var t=r.findComponents({mainType:"legend"});!t||!t.length||r.eachSeriesByType("graph",function(e){var i=e.getCategoriesData(),n=e.getGraph(),a=n.data,o=i.mapArray(i.getName);a.filterSelf(function(s){var l=a.getItemModel(s),u=l.getShallow("category");if(u!=null){Mt(u)&&(u=o[u]);for(var h=0;h<t.length;h++)if(!t[h].isSelected(u))return!1}return!0})})}function F9(r){var t={};r.eachSeriesByType("graph",function(e){var i=e.getCategoriesData(),n=e.getData(),a={};i.each(function(o){var s=i.getName(o);a["ec-"+s]=o;var l=i.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=e.getColorFromPalette(s,t)),i.setItemVisual(o,"style",u);for(var h=["symbol","symbolSize","symbolKeepAspect"],c=0;c<h.length;c++){var f=l.getShallow(h[c],!0);f!=null&&i.setItemVisual(o,h[c],f)}}),i.count()&&n.each(function(o){var s=n.getItemModel(o),l=s.getShallow("category");if(l!=null){Y(l)&&(l=a["ec-"+l]);var u=i.getItemVisual(l,"style"),h=n.ensureUniqueItemVisual(o,"style");z(h,u);for(var c=["symbol","symbolSize","symbolKeepAspect"],f=0;f<c.length;f++)n.setItemVisual(o,c[f],i.getItemVisual(l,c[f]))}})})}function Rc(r){return r instanceof Array||(r=[r,r]),r}function G9(r){r.eachSeriesByType("graph",function(t){var e=t.getGraph(),i=t.getEdgeData(),n=Rc(t.get("edgeSymbol")),a=Rc(t.get("edgeSymbolSize"));i.setVisual("fromSymbol",n&&n[0]),i.setVisual("toSymbol",n&&n[1]),i.setVisual("fromSymbolSize",a&&a[0]),i.setVisual("toSymbolSize",a&&a[1]),i.setVisual("style",t.getModel("lineStyle").getLineStyle()),i.each(function(o){var s=i.getItemModel(o),l=e.getEdgeByIndex(o),u=Rc(s.getShallow("symbol",!0)),h=Rc(s.getShallow("symbolSize",!0)),c=s.getModel("lineStyle").getLineStyle(),f=i.ensureUniqueItemVisual(o,"style");switch(z(f,c),f.stroke){case"source":{var v=l.node1.getVisual("style");f.stroke=v&&v.fill;break}case"target":{var v=l.node2.getVisual("style");f.stroke=v&&v.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),h[0]&&l.setVisual("fromSymbolSize",h[0]),h[1]&&l.setVisual("toSymbolSize",h[1])})})}var Ym="-->",Sd=function(r){return r.get("autoCurveness")||null},PR=function(r,t){var e=Sd(r),i=20,n=[];if(Mt(e))i=e;else if(V(e)){r.__curvenessList=e;return}t>i&&(i=t);var a=i%2?i+2:i+3;n=[];for(var o=0;o<a;o++)n.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=n},th=function(r,t,e){var i=[r.id,r.dataIndex].join("."),n=[t.id,t.dataIndex].join(".");return[e.uid,i,n].join(Ym)},kR=function(r){var t=r.split(Ym);return[t[0],t[2],t[1]].join(Ym)},H9=function(r,t){var e=th(r.node1,r.node2,t);return t.__edgeMap[e]},W9=function(r,t){var e=$m(th(r.node1,r.node2,t),t),i=$m(th(r.node2,r.node1,t),t);return e+i},$m=function(r,t){var e=t.__edgeMap;return e[r]?e[r].length:0};function U9(r){Sd(r)&&(r.__curvenessList=[],r.__edgeMap={},PR(r))}function Y9(r,t,e,i){if(Sd(e)){var n=th(r,t,e),a=e.__edgeMap,o=a[kR(n)];a[n]&&!o?a[n].isForward=!0:o&&a[n]&&(o.isForward=!0,a[n].isForward=!1),a[n]=a[n]||[],a[n].push(i)}}function _x(r,t,e,i){var n=Sd(t),a=V(n);if(!n)return null;var o=H9(r,t);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===e){s=l;break}var u=W9(r,t);PR(t,u),r.lineStyle=r.lineStyle||{};var h=th(r.node1,r.node2,t),c=t.__curvenessList,f=a||u%2?0:1;if(o.isForward)return c[f+s];var v=kR(h),d=$m(v,t),p=c[s+d+f];return i?a?n&&n[0]===0?(d+f)%2?p:-p:((d%2?0:1)+f)%2?p:-p:(d+f)%2?p:-p:c[s+d+f]}function RR(r){var t=r.coordinateSystem;if(!(t&&t.type!=="view")){var e=r.getGraph();e.eachNode(function(i){var n=i.getModel();i.setLayout([+n.get("x"),+n.get("y")])}),xx(e,r)}}function xx(r,t){r.eachEdge(function(e,i){var n=jr(e.getModel().get(["lineStyle","curveness"]),-_x(e,t,i,!0),0),a=xi(e.node1.getLayout()),o=xi(e.node2.getLayout()),s=[a,o];+n&&s.push([(a[0]+o[0])/2-(a[1]-o[1])*n,(a[1]+o[1])/2-(o[0]-a[0])*n]),e.setLayout(s)})}function $9(r,t){r.eachSeriesByType("graph",function(e){var i=e.get("layout"),n=e.coordinateSystem;if(n&&n.type!=="view"){var a=e.getData(),o=[];A(n.dimensions,function(f){o=o.concat(a.mapDimensionsAll(f))});for(var s=0;s<a.count();s++){for(var l=[],u=!1,h=0;h<o.length;h++){var c=a.get(o[h],s);isNaN(c)||(u=!0),l.push(c)}u?a.setItemLayout(s,n.dataToPoint(l)):a.setItemLayout(s,[NaN,NaN])}xx(a.graph,e)}else(!i||i==="none")&&RR(e)})}function ql(r){var t=r.coordinateSystem;if(t.type!=="view")return 1;var e=r.option.nodeScaleRatio,i=t.scaleX,n=t.getZoom(),a=(n-1)*e+1;return a/i}function Kl(r){var t=r.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var UM=Math.PI,xg=[];function bx(r,t,e,i){var n=r.coordinateSystem;if(!(n&&n.type!=="view")){var a=n.getBoundingRect(),o=r.getData(),s=o.graph,l=a.width/2+a.x,u=a.height/2+a.y,h=Math.min(a.width,a.height)/2,c=o.count();if(o.setLayout({cx:l,cy:u}),!!c){if(e){var f=n.pointToData(i),v=f[0],d=f[1],p=[v-l,d-u];xo(p,p),ou(p,p,h),e.setLayout([l+p[0],u+p[1]],!0);var g=r.get(["circular","rotateLabel"]);ER(e,g,l,u)}X9[t](r,s,o,h,l,u,c),s.eachEdge(function(y,m){var _=jr(y.getModel().get(["lineStyle","curveness"]),_x(y,r,m),0),x=xi(y.node1.getLayout()),b=xi(y.node2.getLayout()),S,w=(x[0]+b[0])/2,T=(x[1]+b[1])/2;+_&&(_*=3,S=[l*_+w*(1-_),u*_+T*(1-_)]),y.setLayout([x,b,S])})}}}var X9={value:function(r,t,e,i,n,a,o){var s=0,l=e.getSum("value"),u=Math.PI*2/(l||o);t.eachNode(function(h){var c=h.getValue("value"),f=u*(l?c:1)/2;s+=f,h.setLayout([i*Math.cos(s)+n,i*Math.sin(s)+a]),s+=f})},symbolSize:function(r,t,e,i,n,a,o){var s=0;xg.length=o;var l=ql(r);t.eachNode(function(c){var f=Kl(c);isNaN(f)&&(f=2),f<0&&(f=0),f*=l;var v=Math.asin(f/2/i);isNaN(v)&&(v=UM/2),xg[c.dataIndex]=v,s+=v*2});var u=(2*UM-s)/o/2,h=0;t.eachNode(function(c){var f=u+xg[c.dataIndex];h+=f,(!c.getLayout()||!c.getLayout().fixed)&&c.setLayout([i*Math.cos(h)+n,i*Math.sin(h)+a]),h+=f})}};function ER(r,t,e,i){var n=r.getGraphicEl();if(n){var a=r.getModel(),o=a.get(["label","rotate"])||0,s=n.getSymbolPath();if(t){var l=r.getLayout(),u=Math.atan2(l[1]-i,l[0]-e);u<0&&(u=Math.PI*2+u);var h=l[0]<e;h&&(u=u-Math.PI);var c=h?"left":"right";s.setTextConfig({rotation:-u,position:c,origin:"center"});var f=s.ensureState("emphasis");z(f.textConfig||(f.textConfig={}),{position:c})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function Z9(r){r.eachSeriesByType("graph",function(t){t.get("layout")==="circular"&&bx(t,"symbolSize")})}var Yo=Pf;function j9(r,t,e){for(var i=r,n=t,a=e.rect,o=a.width,s=a.height,l=[a.x+o/2,a.y+s/2],u=e.gravity==null?.1:e.gravity,h=0;h<i.length;h++){var c=i[h];c.p||(c.p=Jn(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),c.pp=xi(c.p),c.edges=null}var f=e.friction==null?.6:e.friction,v=f,d,p;return{warmUp:function(){v=f*.8},setFixed:function(g){i[g].fixed=!0},setUnfixed:function(g){i[g].fixed=!1},beforeStep:function(g){d=g},afterStep:function(g){p=g},step:function(g){d&&d(i,n);for(var y=[],m=i.length,_=0;_<n.length;_++){var x=n[_];if(!x.ignoreForceLayout){var b=x.n1,S=x.n2;An(y,S.p,b.p);var w=Iu(y)-x.d,T=S.w/(b.w+S.w);isNaN(T)&&(T=0),xo(y,y),!b.fixed&&Yo(b.p,b.p,y,T*w*v),!S.fixed&&Yo(S.p,S.p,y,-(1-T)*w*v)}}for(var _=0;_<m;_++){var M=i[_];M.fixed||(An(y,l,M.p),Yo(M.p,M.p,y,u*v))}for(var _=0;_<m;_++)for(var b=i[_],C=_+1;C<m;C++){var S=i[C];An(y,S.p,b.p);var w=Iu(y);w===0&&(GL(y,Math.random()-.5,Math.random()-.5),w=1);var D=(b.rep+S.rep)/w/w;!b.fixed&&Yo(b.pp,b.pp,y,D),!S.fixed&&Yo(S.pp,S.pp,y,-D)}for(var L=[],_=0;_<m;_++){var M=i[_];M.fixed||(An(L,M.p,M.pp),Yo(M.p,M.p,L,v),ke(M.pp,M.p))}v=v*.992;var I=v<.01;p&&p(i,n,I),g&&g(I)}}}function q9(r){r.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!(e&&e.type!=="view"))if(t.get("layout")==="force"){var i=t.preservedPoints||{},n=t.getGraph(),a=n.data,o=n.edgeData,s=t.getModel("force"),l=s.get("initLayout");t.preservedPoints?a.each(function(_){var x=a.getId(_);a.setItemLayout(_,i[x]||[NaN,NaN])}):!l||l==="none"?RR(t):l==="circular"&&bx(t,"value");var u=a.getDataExtent("value"),h=o.getDataExtent("value"),c=s.get("repulsion"),f=s.get("edgeLength"),v=V(c)?c:[c,c],d=V(f)?f:[f,f];d=[d[1],d[0]];var p=a.mapArray("value",function(_,x){var b=a.getItemLayout(x),S=Pt(_,u,v);return isNaN(S)&&(S=(v[0]+v[1])/2),{w:S,rep:S,fixed:a.getItemModel(x).get("fixed"),p:!b||isNaN(b[0])||isNaN(b[1])?null:b}}),g=o.mapArray("value",function(_,x){var b=n.getEdgeByIndex(x),S=Pt(_,h,d);isNaN(S)&&(S=(d[0]+d[1])/2);var w=b.getModel(),T=jr(b.getModel().get(["lineStyle","curveness"]),-_x(b,t,x,!0),0);return{n1:p[b.node1.dataIndex],n2:p[b.node2.dataIndex],d:S,curveness:T,ignoreForceLayout:w.get("ignoreForceLayout")}}),y=e.getBoundingRect(),m=j9(p,g,{rect:y,gravity:s.get("gravity"),friction:s.get("friction")});m.beforeStep(function(_,x){for(var b=0,S=_.length;b<S;b++)_[b].fixed&&ke(_[b].p,n.getNodeByIndex(b).getLayout())}),m.afterStep(function(_,x,b){for(var S=0,w=_.length;S<w;S++)_[S].fixed||n.getNodeByIndex(S).setLayout(_[S].p),i[a.getId(S)]=_[S].p;for(var S=0,w=x.length;S<w;S++){var T=x[S],M=n.getEdgeByIndex(S),C=T.n1.p,D=T.n2.p,L=M.getLayout();L=L?L.slice():[],L[0]=L[0]||[],L[1]=L[1]||[],ke(L[0],C),ke(L[1],D),+T.curveness&&(L[2]=[(C[0]+D[0])/2-(C[1]-D[1])*T.curveness,(C[1]+D[1])/2-(D[0]-C[0])*T.curveness]),M.setLayout(L)}}),t.forceLayout=m,t.preservedPoints=i,m.step()}else t.forceLayout=null})}function K9(r,t,e){var i=z(r.getBoxLayoutParams(),{aspect:e});return ue(i,{width:t.getWidth(),height:t.getHeight()})}function J9(r,t){var e=[];return r.eachSeriesByType("graph",function(i){var n=i.get("coordinateSystem");if(!n||n==="view"){var a=i.getData(),o=a.mapArray(function(g){var y=a.getItemModel(g);return[+y.get("x"),+y.get("y")]}),s=[],l=[];qv(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),h=K9(i,t,u);isNaN(u)&&(s=[h.x,h.y],l=[h.x+h.width,h.y+h.height]);var c=l[0]-s[0],f=l[1]-s[1],v=h.width,d=h.height,p=i.coordinateSystem=new Lh;p.zoomLimit=i.get("scaleLimit"),p.setBoundingRect(s[0],s[1],c,f),p.setViewRect(h.x,h.y,v,d),p.setCenter(i.get("center"),t),p.setZoom(i.get("zoom")),e.push(p)}}),e}var YM=ce.prototype,bg=zs.prototype,OR=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}();(function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(OR);function Sg(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var Q9=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-line",i}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new OR},t.prototype.buildPath=function(e,i){Sg(i)?YM.buildPath.call(this,e,i):bg.buildPath.call(this,e,i)},t.prototype.pointAt=function(e){return Sg(this.shape)?YM.pointAt.call(this,e):bg.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var i=this.shape,n=Sg(i)?[i.x2-i.x1,i.y2-i.y1]:bg.tangentAt.call(this,e);return xo(n,n)},t}(_t),wg=["fromSymbol","toSymbol"];function $M(r){return"_"+r+"Type"}function XM(r,t,e){var i=t.getItemVisual(e,r);if(!i||i==="none")return i;var n=t.getItemVisual(e,r+"Size"),a=t.getItemVisual(e,r+"Rotate"),o=t.getItemVisual(e,r+"Offset"),s=t.getItemVisual(e,r+"KeepAspect"),l=js(n),u=Mo(o||0,l);return i+l+u+(a||"")+(s||"")}function ZM(r,t,e){var i=t.getItemVisual(e,r);if(!(!i||i==="none")){var n=t.getItemVisual(e,r+"Size"),a=t.getItemVisual(e,r+"Rotate"),o=t.getItemVisual(e,r+"Offset"),s=t.getItemVisual(e,r+"KeepAspect"),l=js(n),u=Mo(o||0,l),h=ae(i,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return h.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,h.name=r,h}}function tX(r){var t=new Q9({name:"line",subPixelOptimize:!0});return Xm(t.shape,r),t}function Xm(r,t){r.x1=t[0][0],r.y1=t[0][1],r.x2=t[1][0],r.y2=t[1][1],r.percent=1;var e=t[2];e?(r.cpx1=e[0],r.cpy1=e[1]):(r.cpx1=NaN,r.cpy1=NaN)}var Sx=function(r){E(t,r);function t(e,i,n){var a=r.call(this)||this;return a._createLine(e,i,n),a}return t.prototype._createLine=function(e,i,n){var a=e.hostModel,o=e.getItemLayout(i),s=tX(o);s.shape.percent=0,$t(s,{shape:{percent:1}},a,i),this.add(s),A(wg,function(l){var u=ZM(l,e,i);this.add(u),this[$M(l)]=XM(l,e,i)},this),this._updateCommonStl(e,i,n)},t.prototype.updateData=function(e,i,n){var a=e.hostModel,o=this.childOfName("line"),s=e.getItemLayout(i),l={shape:{}};Xm(l.shape,s),At(o,l,a,i),A(wg,function(u){var h=XM(u,e,i),c=$M(u);if(this[c]!==h){this.remove(this.childOfName(u));var f=ZM(u,e,i);this.add(f)}this[c]=h},this),this._updateCommonStl(e,i,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,i,n){var a=e.hostModel,o=this.childOfName("line"),s=n&&n.emphasisLineStyle,l=n&&n.blurLineStyle,u=n&&n.selectLineStyle,h=n&&n.labelStatesModels,c=n&&n.emphasisDisabled,f=n&&n.focus,v=n&&n.blurScope;if(!n||e.hasItemOption){var d=e.getItemModel(i),p=d.getModel("emphasis");s=p.getModel("lineStyle").getLineStyle(),l=d.getModel(["blur","lineStyle"]).getLineStyle(),u=d.getModel(["select","lineStyle"]).getLineStyle(),c=p.get("disabled"),f=p.get("focus"),v=p.get("blurScope"),h=me(d)}var g=e.getItemVisual(i,"style"),y=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,A(wg,function(S){var w=this.childOfName(S);if(w){w.setColor(y),w.style.opacity=g.opacity;for(var T=0;T<Ke.length;T++){var M=Ke[T],C=o.getState(M);if(C){var D=C.style||{},L=w.ensureState(M),I=L.style||(L.style={});D.stroke!=null&&(I[w.__isEmptyBrush?"stroke":"fill"]=D.stroke),D.opacity!=null&&(I.opacity=D.opacity)}}w.markRedraw()}},this);var m=a.getRawValue(i);Ae(this,h,{labelDataIndex:i,labelFetcher:{getFormattedLabel:function(S,w){return a.getFormattedLabel(S,w,e.dataType)}},inheritColor:y||"#000",defaultOpacity:g.opacity,defaultText:(m==null?e.getName(i):isFinite(m)?Qt(m):m)+""});var _=this.getTextContent();if(_){var x=h.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=x.get("position")||"middle";var b=x.get("distance");V(b)||(b=[b,b]),_.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),Kt(this,f,v,c)},t.prototype.highlight=function(){Ki(this)},t.prototype.downplay=function(){Ji(this)},t.prototype.updateLayout=function(e,i){this.setLinePoints(e.getItemLayout(i))},t.prototype.setLinePoints=function(e){var i=this.childOfName("line");Xm(i.shape,e),i.dirty()},t.prototype.beforeUpdate=function(){var e=this,i=e.childOfName("fromSymbol"),n=e.childOfName("toSymbol"),a=e.getTextContent();if(!i&&!n&&(!a||a.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=e.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,h=l.pointAt(0),c=l.pointAt(u),f=An([],c,h);xo(f,f);function v(C,D){var L=C.__specifiedRotation;if(L==null){var I=l.tangentAt(D);C.attr("rotation",(D===1?-1:1)*Math.PI/2-Math.atan2(I[1],I[0]))}else C.attr("rotation",L)}if(i&&(i.setPosition(h),v(i,0),i.scaleX=i.scaleY=o*u,i.markRedraw()),n&&(n.setPosition(c),v(n,1),n.scaleX=n.scaleY=o*u,n.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var d=void 0,p=void 0,g=a.__labelDistance,y=g[0]*o,m=g[1]*o,_=u/2,x=l.tangentAt(_),b=[x[1],-x[0]],S=l.pointAt(_);b[1]>0&&(b[0]=-b[0],b[1]=-b[1]);var w=x[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var T=-Math.atan2(x[1],x[0]);c[0]<h[0]&&(T=Math.PI+T),a.rotation=T}var M=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":M=-m,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":M=m,p="top";break;default:M=0,p="middle"}switch(a.__position){case"end":a.x=f[0]*y+c[0],a.y=f[1]*m+c[1],d=f[0]>.8?"left":f[0]<-.8?"right":"center",p=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":a.x=-f[0]*y+h[0],a.y=-f[1]*m+h[1],d=f[0]>.8?"right":f[0]<-.8?"left":"center",p=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*w+h[0],a.y=h[1]+M,d=x[0]<0?"right":"left",a.originX=-y*w,a.originY=-M;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=S[0],a.y=S[1]+M,d="center",a.originY=-M;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-y*w+c[0],a.y=c[1]+M,d=x[0]>=0?"right":"left",a.originX=y*w,a.originY=-M;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||p,align:a.__align||d})}},t}(at),Tx=function(){function r(t){this.group=new at,this._LineCtor=t||Sx}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var i=this,n=i.group,a=i._lineData;i._lineData=t,a||n.removeAll();var o=jM(t);t.diff(a).add(function(s){e._doAdd(t,s,o)}).update(function(s,l){e._doUpdate(a,t,l,s,o)}).remove(function(s){n.remove(a.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=jM(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function i(s){!s.isGroup&&!eX(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=t.start;n<t.end;n++){var a=e.getItemLayout(n);if(Tg(a)){var o=new this._LineCtor(e,n,this._seriesScope);o.traverse(i),this.group.add(o),e.setItemGraphicEl(n,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(t){ta(this._progressiveEls||this.group,t)},r.prototype._doAdd=function(t,e,i){var n=t.getItemLayout(e);if(Tg(n)){var a=new this._LineCtor(t,e,i);t.setItemGraphicEl(e,a),this.group.add(a)}},r.prototype._doUpdate=function(t,e,i,n,a){var o=t.getItemGraphicEl(i);if(!Tg(e.getItemLayout(n))){this.group.remove(o);return}o?o.updateData(e,n,a):o=new this._LineCtor(e,n,a),e.setItemGraphicEl(n,o),this.group.add(o)},r}();function eX(r){return r.animators&&r.animators.length>0}function jM(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:me(t)}}function qM(r){return isNaN(r[0])||isNaN(r[1])}function Tg(r){return r&&!qM(r[0])&&!qM(r[1])}var Mg=[],Cg=[],Ag=[],$o=be,Dg=On,KM=Math.abs;function JM(r,t,e){for(var i=r[0],n=r[1],a=r[2],o=1/0,s,l=e*e,u=.1,h=.1;h<=.9;h+=.1){Mg[0]=$o(i[0],n[0],a[0],h),Mg[1]=$o(i[1],n[1],a[1],h);var c=KM(Dg(Mg,t)-l);c<o&&(o=c,s=h)}for(var f=0;f<32;f++){var v=s+u;Cg[0]=$o(i[0],n[0],a[0],s),Cg[1]=$o(i[1],n[1],a[1],s),Ag[0]=$o(i[0],n[0],a[0],v),Ag[1]=$o(i[1],n[1],a[1],v);var c=Dg(Cg,t)-l;if(KM(c)<.01)break;var d=Dg(Ag,t)-l;u/=2,c<0?d>=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function Lg(r,t){var e=[],i=Pu,n=[[],[],[]],a=[[],[]],o=[];t/=2,r.eachEdge(function(s,l){var u=s.getLayout(),h=s.getVisual("fromSymbol"),c=s.getVisual("toSymbol");u.__original||(u.__original=[xi(u[0]),xi(u[1])],u[2]&&u.__original.push(xi(u[2])));var f=u.__original;if(u[2]!=null){if(ke(n[0],f[0]),ke(n[1],f[2]),ke(n[2],f[1]),h&&h!=="none"){var v=Kl(s.node1),d=JM(n,f[0],v*t);i(n[0][0],n[1][0],n[2][0],d,e),n[0][0]=e[3],n[1][0]=e[4],i(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 v=Kl(s.node2),d=JM(n,f[1],v*t);i(n[0][0],n[1][0],n[2][0],d,e),n[1][0]=e[1],n[2][0]=e[2],i(n[0][1],n[1][1],n[2][1],d,e),n[1][1]=e[1],n[2][1]=e[2]}ke(u[0],n[0]),ke(u[1],n[2]),ke(u[2],n[1])}else{if(ke(a[0],f[0]),ke(a[1],f[1]),An(o,a[1],a[0]),xo(o,o),h&&h!=="none"){var v=Kl(s.node1);Pf(a[0],a[0],o,v*t)}if(c&&c!=="none"){var v=Kl(s.node2);Pf(a[1],a[1],o,-v*t)}ke(u[0],a[0]),ke(u[1],a[1])}})}function QM(r){return r.type==="view"}var rX=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){var n=new wh,a=new Tx,o=this.group;this._controller=new Dh(i.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(a.group),this._symbolDraw=n,this._lineDraw=a,this._firstRender=!0},t.prototype.render=function(e,i,n){var a=this,o=e.coordinateSystem;this._model=e;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(QM(o)){var h={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(h):At(u,h,e)}Lg(e.getGraph(),ql(e));var c=e.getData();s.updateData(c);var f=e.getEdgeData();l.updateData(f),this._updateNodeAndLinkScale(),this._updateController(e,i,n),clearTimeout(this._layoutTimeout);var v=e.forceLayout,d=e.get(["force","layoutAnimation"]);v&&this._startForceLayoutIteration(v,d);var p=e.get("layout");c.graph.eachNode(function(_){var x=_.dataIndex,b=_.getGraphicEl(),S=_.getModel();if(b){b.off("drag").off("dragend");var w=S.get("draggable");w&&b.on("drag",function(M){switch(p){case"force":v.warmUp(),!a._layouting&&a._startForceLayoutIteration(v,d),v.setFixed(x),c.setItemLayout(x,[b.x,b.y]);break;case"circular":c.setItemLayout(x,[b.x,b.y]),_.setLayout({fixed:!0},!0),bx(e,"symbolSize",_,[M.offsetX,M.offsetY]),a.updateLayout(e);break;case"none":default:c.setItemLayout(x,[b.x,b.y]),xx(e.getGraph(),e),a.updateLayout(e);break}}).on("dragend",function(){v&&v.setUnfixed(x)}),b.setDraggable(w,!!S.get("cursor"));var T=S.get(["emphasis","focus"]);T==="adjacency"&&(ot(b).focus=_.getAdjacentDataIndices())}}),c.graph.eachEdge(function(_){var x=_.getGraphicEl(),b=_.getModel().get(["emphasis","focus"]);x&&b==="adjacency"&&(ot(x).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=e.get("layout")==="circular"&&e.get(["circular","rotateLabel"]),y=c.getLayout("cx"),m=c.getLayout("cy");c.graph.eachNode(function(_){ER(_,g,y,m)}),this._firstRender=!1},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,i){var n=this;(function a(){e.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(i?n._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype._updateController=function(e,i,n){var a=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,h,c){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(h,c)&&!_d(u,n,e)}),!QM(e.coordinateSystem)){o.disable();return}o.enable(e.get("roam")),s.zoomLimit=e.get("scaleLimit"),s.zoom=e.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){cx(s,u.dx,u.dy),n.dispatchAction({seriesId:e.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){fx(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),Lg(e.getGraph(),ql(e)),a._lineDraw.updateLayout(),n.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,i=e.getData(),n=ql(e);i.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(n)})},t.prototype.updateLayout=function(e){Lg(e.getGraph(),ql(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(Ot);function Xo(r){return"_EC_"+r}var iX=function(){function r(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(t,e){t=t==null?""+e:""+t;var i=this._nodesMap;if(!i[Xo(t)]){var n=new za(t,e);return n.hostGraph=this,this.nodes.push(n),i[Xo(t)]=n,n}},r.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},r.prototype.getNodeById=function(t){return this._nodesMap[Xo(t)]},r.prototype.addEdge=function(t,e,i){var n=this._nodesMap,a=this._edgesMap;if(Mt(t)&&(t=this.nodes[t]),Mt(e)&&(e=this.nodes[e]),t instanceof za||(t=n[Xo(t)]),e instanceof za||(e=n[Xo(e)]),!(!t||!e)){var o=t.id+"-"+e.id,s=new NR(t,e,i);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),e.inEdges.push(s)),t.edges.push(s),t!==e&&e.edges.push(s),this.edges.push(s),a[o]=s,s}},r.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},r.prototype.getEdge=function(t,e){t instanceof za&&(t=t.id),e instanceof za&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},r.prototype.eachNode=function(t,e){for(var i=this.nodes,n=i.length,a=0;a<n;a++)i[a].dataIndex>=0&&t.call(e,i[a],a)},r.prototype.eachEdge=function(t,e){for(var i=this.edges,n=i.length,a=0;a<n;a++)i[a].dataIndex>=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&t.call(e,i[a],a)},r.prototype.breadthFirstTraverse=function(t,e,i,n){if(e instanceof za||(e=this._nodesMap[Xo(e)]),!!e){for(var a=i==="out"?"outEdges":i==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(n,e,null))for(var s=[e];s.length;)for(var l=s.shift(),u=l[a],o=0;o<u.length;o++){var h=u[o],c=h.node1===l?h.node2:h.node1;if(!c.__visited){if(t.call(n,c,l))return;s.push(c),c.__visited=!0}}}},r.prototype.update=function(){for(var t=this.data,e=this.edgeData,i=this.nodes,n=this.edges,a=0,o=i.length;a<o;a++)i[a].dataIndex=-1;for(var a=0,o=t.count();a<o;a++)i[t.getRawIndex(a)].dataIndex=a;e.filterSelf(function(s){var l=n[e.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var a=0,o=n.length;a<o;a++)n[a].dataIndex=-1;for(var a=0,o=e.count();a<o;a++)n[e.getRawIndex(a)].dataIndex=a},r.prototype.clone=function(){for(var t=new r(this._directed),e=this.nodes,i=this.edges,n=0;n<e.length;n++)t.addNode(e[n].id,e[n].dataIndex);for(var n=0;n<i.length;n++){var a=i[n];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},r}(),za=function(){function r(t,e){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=t??"",this.dataIndex=e??-1}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,i=e.data.getItemModel(this.dataIndex);return i.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},e=0;e<this.edges.length;e++){var i=this.edges[e];i.dataIndex<0||(t.edge.push(i.dataIndex),t.node.push(i.node1.dataIndex,i.node2.dataIndex))}return t},r.prototype.getTrajectoryDataIndices=function(){for(var t=Z(),e=Z(),i=0;i<this.edges.length;i++){var n=this.edges[i];if(!(n.dataIndex<0)){t.set(n.dataIndex,!0);for(var a=[n.node1],o=[n.node2],s=0;s<a.length;){var l=a[s];s++,e.set(l.dataIndex,!0);for(var u=0;u<l.inEdges.length;u++)t.set(l.inEdges[u].dataIndex,!0),a.push(l.inEdges[u].node1)}for(s=0;s<o.length;){var h=o[s];s++,e.set(h.dataIndex,!0);for(var u=0;u<h.outEdges.length;u++)t.set(h.outEdges[u].dataIndex,!0),o.push(h.outEdges[u].node2)}}}return{edge:t.keys(),node:e.keys()}},r}(),NR=function(){function r(t,e,i){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=i??-1}return r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,i=e.edgeData.getItemModel(this.dataIndex);return i.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var t=Z(),e=Z();t.set(this.dataIndex,!0);for(var i=[this.node1],n=[this.node2],a=0;a<i.length;){var o=i[a];a++,e.set(o.dataIndex,!0);for(var s=0;s<o.inEdges.length;s++)t.set(o.inEdges[s].dataIndex,!0),i.push(o.inEdges[s].node1)}for(a=0;a<n.length;){var l=n[a];a++,e.set(l.dataIndex,!0);for(var s=0;s<l.outEdges.length;s++)t.set(l.outEdges[s].dataIndex,!0),n.push(l.outEdges[s].node2)}return{edge:t.keys(),node:e.keys()}},r}();function BR(r,t){return{getValue:function(e){var i=this[r][t];return i.getStore().get(i.getDimensionIndex(e||"value"),this.dataIndex)},setVisual:function(e,i){this.dataIndex>=0&&this[r][t].setItemVisual(this.dataIndex,e,i)},getVisual:function(e){return this[r][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,i){this.dataIndex>=0&&this[r][t].setItemLayout(this.dataIndex,e,i)},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)}}}re(za,BR("hostGraph","data"));re(NR,BR("hostGraph","edgeData"));function zR(r,t,e,i,n){for(var a=new iX(i),o=0;o<r.length;o++)a.addNode(pe(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<t.length;o++){var h=t[o],c=h.source,f=h.target;a.addEdge(c,f,u)&&(l.push(h),s.push(pe(he(h.id,null),c+" > "+f)),u++)}var v=e.get("coordinateSystem"),d;if(v==="cartesian2d"||v==="polar")d=Li(r,e);else{var p=$s.get(v),g=p?p.dimensions||[]:[];vt(g,"value")<0&&g.concat(["value"]);var y=qs(r,{coordDimensions:g,encodeDefine:e.getEncode()}).dimensions;d=new Be(y,e),d.initData(r)}var m=new Be(["value"],e);return m.initData(l,s),n&&n(d,m),_R({mainData:d,struct:a,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var nX=function(r){E(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 i=this;function n(){return i._categoriesData}this.legendVisualProvider=new Ah(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),co(e,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,i){var n=e.edges||e.links||[],a=e.data||e.nodes||[],o=this;if(a&&n){U9(this);var s=zR(a,n,this,!0,l);return A(s.edges,function(u){Y9(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,h){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=Lt.prototype.getModel;function f(d,p){var g=c.call(this,d,p);return g.resolveParentPath=v,g}h.wrapMethod("getItemModel",function(d){return d.resolveParentPath=v,d.getModel=f,d});function v(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,i,n){if(n==="edge"){var a=this.getData(),o=this.getDataParams(e,n),s=a.graph.getEdgeByIndex(e),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),h=[];return l!=null&&h.push(l),u!=null&&h.push(u),_e("nameValue",{name:h.join(" > "),value:o.value,noValue:o.value==null})}var c=aP({series:this,dataIndex:e,multipleSeries:i});return c},t.prototype._updateCategoriesData=function(){var e=F(this.option.categories||[],function(n){return n.value!=null?n:z({value:0},n)}),i=new Be(["value"],this);i.initData(e),this._categoriesData=i,this._categoriesModels=i.mapArray(function(n){return i.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:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(zt),aX={type:"graphRoam",event:"graphRoam",update:"none"};function oX(r){r.registerChartView(rX),r.registerSeriesModel(nX),r.registerProcessor(V9),r.registerVisual(F9),r.registerVisual(G9),r.registerLayout($9),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,Z9),r.registerLayout(q9),r.registerCoordinateSystem("graphView",{dimensions:Lh.dimensions,create:J9}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},ee),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},ee),r.registerAction(aX,function(t,e,i){e.eachComponent({mainType:"series",query:t},function(n){var a=n.coordinateSystem,o=dx(a,t,void 0,i);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var sX=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),lX=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="pointer",i}return t.prototype.getDefaultShape=function(){return new sX},t.prototype.buildPath=function(e,i){var n=Math.cos,a=Math.sin,o=i.r,s=i.width,l=i.angle,u=i.x-n(l)*s*(s>=o/3?1:2),h=i.y-a(l)*s*(s>=o/3?1:2);l=i.angle-Math.PI/2,e.moveTo(u,h),e.lineTo(i.x+n(l)*s,i.y+a(l)*s),e.lineTo(i.x+n(i.angle)*o,i.y+a(i.angle)*o),e.lineTo(i.x-n(l)*s,i.y-a(l)*s),e.lineTo(u,h)},t}(_t);function uX(r,t){var e=r.get("center"),i=t.getWidth(),n=t.getHeight(),a=Math.min(i,n),o=U(e[0],t.getWidth()),s=U(e[1],t.getHeight()),l=U(r.get("radius"),a/2);return{cx:o,cy:s,r:l}}function Ec(r,t){var e=r==null?"":r+"";return t&&(Y(t)?e=t.replace("{value}",e):Q(t)&&(e=t(r))),e}var hX=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){this.group.removeAll();var a=e.get(["axisLine","lineStyle","color"]),o=uX(e,n);this._renderMain(e,i,n,a,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,i,n,a,o){var s=this.group,l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,h=-e.get("endAngle")/180*Math.PI,c=e.getModel("axisLine"),f=c.get("roundCap"),v=f?uv:Fe,d=c.get("show"),p=c.getModel("lineStyle"),g=p.get("width"),y=[u,h];a_(y,!l),u=y[0],h=y[1];for(var m=h-u,_=u,x=[],b=0;d&&b<a.length;b++){var S=Math.min(Math.max(a[b][0],0),1);h=u+m*S;var w=new v({shape:{startAngle:_,endAngle:h,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});w.setStyle({fill:a[b][1]}),w.setStyle(p.getLineStyle(["color","width"])),x.push(w),_=h}x.reverse(),A(x,function(M){return s.add(M)});var T=function(M){if(M<=0)return a[0][1];var C;for(C=0;C<a.length;C++)if(a[C][0]>=M&&(C===0?0:a[C-1][0])<M)return a[C][1];return a[C-1][1]};this._renderTicks(e,i,n,T,o,u,h,l,g),this._renderTitleAndDetail(e,i,n,T,o),this._renderAnchor(e,o),this._renderPointer(e,i,n,T,o,u,h,l,g)},t.prototype._renderTicks=function(e,i,n,a,o,s,l,u,h){for(var c=this.group,f=o.cx,v=o.cy,d=o.r,p=+e.get("min"),g=+e.get("max"),y=e.getModel("splitLine"),m=e.getModel("axisTick"),_=e.getModel("axisLabel"),x=e.get("splitNumber"),b=m.get("splitNumber"),S=U(y.get("length"),d),w=U(m.get("length"),d),T=s,M=(l-s)/x,C=M/b,D=y.getModel("lineStyle").getLineStyle(),L=m.getModel("lineStyle").getLineStyle(),I=y.get("distance"),P,k,R=0;R<=x;R++){if(P=Math.cos(T),k=Math.sin(T),y.get("show")){var N=I?I+h:h,O=new ce({shape:{x1:P*(d-N)+f,y1:k*(d-N)+v,x2:P*(d-S-N)+f,y2:k*(d-S-N)+v},style:D,silent:!0});D.stroke==="auto"&&O.setStyle({stroke:a(R/x)}),c.add(O)}if(_.get("show")){var N=_.get("distance")+I,B=Ec(Qt(R/x*(g-p)+p),_.get("formatter")),G=a(R/x),H=P*(d-S-N)+f,W=k*(d-S-N)+v,q=_.get("rotate"),K=0;q==="radial"?(K=-T+2*Math.PI,K>Math.PI/2&&(K+=Math.PI)):q==="tangential"?K=-T-Math.PI/2:Mt(q)&&(K=q*Math.PI/180),K===0?c.add(new St({style:Gt(_,{text:B,x:H,y:W,verticalAlign:k<-.8?"top":k>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:G}),silent:!0})):c.add(new St({style:Gt(_,{text:B,x:H,y:W,verticalAlign:"middle",align:"center"},{inheritColor:G}),silent:!0,originX:H,originY:W,rotation:K}))}if(m.get("show")&&R!==x){var N=m.get("distance");N=N?N+h:h;for(var nt=0;nt<=b;nt++){P=Math.cos(T),k=Math.sin(T);var Ct=new ce({shape:{x1:P*(d-N)+f,y1:k*(d-N)+v,x2:P*(d-w-N)+f,y2:k*(d-w-N)+v},silent:!0,style:L});L.stroke==="auto"&&Ct.setStyle({stroke:a((R+nt/b)/x)}),c.add(Ct),T+=C}T-=C}else T+=M}},t.prototype._renderPointer=function(e,i,n,a,o,s,l,u,h){var c=this.group,f=this._data,v=this._progressEls,d=[],p=e.get(["pointer","show"]),g=e.getModel("progress"),y=g.get("show"),m=e.getData(),_=m.mapDimension("value"),x=+e.get("min"),b=+e.get("max"),S=[x,b],w=[s,l];function T(C,D){var L=m.getItemModel(C),I=L.getModel("pointer"),P=U(I.get("width"),o.r),k=U(I.get("length"),o.r),R=e.get(["pointer","icon"]),N=I.get("offsetCenter"),O=U(N[0],o.r),B=U(N[1],o.r),G=I.get("keepAspect"),H;return R?H=ae(R,O-P/2,B-k,P,k,null,G):H=new lX({shape:{angle:-Math.PI/2,width:P,r:k,x:O,y:B}}),H.rotation=-(D+Math.PI/2),H.x=o.cx,H.y=o.cy,H}function M(C,D){var L=g.get("roundCap"),I=L?uv:Fe,P=g.get("overlap"),k=P?g.get("width"):h/m.count(),R=P?o.r-k:o.r-(C+1)*k,N=P?o.r:o.r-C*k,O=new I({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:N}});return P&&(O.z2=Pt(m.get(_,C),[x,b],[100,0],!0)),O}(y||p)&&(m.diff(f).add(function(C){var D=m.get(_,C);if(p){var L=T(C,s);$t(L,{rotation:-((isNaN(+D)?w[0]:Pt(D,S,w,!0))+Math.PI/2)},e),c.add(L),m.setItemGraphicEl(C,L)}if(y){var I=M(C,s),P=g.get("clip");$t(I,{shape:{endAngle:Pt(D,S,w,P)}},e),c.add(I),im(e.seriesIndex,m.dataType,C,I),d[C]=I}}).update(function(C,D){var L=m.get(_,C);if(p){var I=f.getItemGraphicEl(D),P=I?I.rotation:s,k=T(C,P);k.rotation=P,At(k,{rotation:-((isNaN(+L)?w[0]:Pt(L,S,w,!0))+Math.PI/2)},e),c.add(k),m.setItemGraphicEl(C,k)}if(y){var R=v[D],N=R?R.shape.endAngle:s,O=M(C,N),B=g.get("clip");At(O,{shape:{endAngle:Pt(L,S,w,B)}},e),c.add(O),im(e.seriesIndex,m.dataType,C,O),d[C]=O}}).execute(),m.each(function(C){var D=m.getItemModel(C),L=D.getModel("emphasis"),I=L.get("focus"),P=L.get("blurScope"),k=L.get("disabled");if(p){var R=m.getItemGraphicEl(C),N=m.getItemVisual(C,"style"),O=N.fill;if(R instanceof xe){var B=R.style;R.useStyle(z({image:B.image,x:B.x,y:B.y,width:B.width,height:B.height},N))}else R.useStyle(N),R.type!=="pointer"&&R.setColor(O);R.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",a(Pt(m.get(_,C),S,[0,1],!0))),R.z2EmphasisLift=0,Ce(R,D),Kt(R,I,P,k)}if(y){var G=d[C];G.useStyle(m.getItemVisual(C,"style")),G.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),G.z2EmphasisLift=0,Ce(G,D),Kt(G,I,P,k)}}),this._progressEls=d)},t.prototype._renderAnchor=function(e,i){var n=e.getModel("anchor"),a=n.get("show");if(a){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),h=ae(s,i.cx-o/2+U(l[0],i.r),i.cy-o/2+U(l[1],i.r),o,o,null,u);h.z2=n.get("showAbove")?1:0,h.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(h)}},t.prototype._renderTitleAndDetail=function(e,i,n,a,o){var s=this,l=e.getData(),u=l.mapDimension("value"),h=+e.get("min"),c=+e.get("max"),f=new at,v=[],d=[],p=e.isAnimationEnabled(),g=e.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){v[y]=new St({silent:!0}),d[y]=new St({silent:!0})}).update(function(y,m){v[y]=s._titleEls[m],d[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),x=new at,b=a(Pt(_,[h,c],[0,1],!0)),S=m.getModel("title");if(S.get("show")){var w=S.get("offsetCenter"),T=o.cx+U(w[0],o.r),M=o.cy+U(w[1],o.r),C=v[y];C.attr({z2:g?0:2,style:Gt(S,{x:T,y:M,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:b})}),x.add(C)}var D=m.getModel("detail");if(D.get("show")){var L=D.get("offsetCenter"),I=o.cx+U(L[0],o.r),P=o.cy+U(L[1],o.r),k=U(D.get("width"),o.r),R=U(D.get("height"),o.r),N=e.get(["progress","show"])?l.getItemVisual(y,"style").fill:b,C=d[y],O=D.get("formatter");C.attr({z2:g?0:2,style:Gt(D,{x:I,y:P,text:Ec(_,O),width:isNaN(k)?null:k,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:N})}),fI(C,{normal:D},_,function(G){return Ec(G,O)}),p&&vI(C,y,l,e,{getFormattedLabel:function(G,H,W,q,K,nt){return Ec(nt?nt.interpolatedValue:_,O)}}),x.add(C)}f.add(x)}),this.group.add(f),this._titleEls=v,this._detailEls=d},t.type="gauge",t}(Ot),cX=function(r){E(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,i){return Qs(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,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(zt);function fX(r){r.registerChartView(hX),r.registerSeriesModel(cX)}var vX=["itemStyle","opacity"],dX=function(r){E(t,r);function t(e,i){var n=r.call(this)||this,a=n,o=new We,s=new St;return a.setTextContent(s),n.setTextGuideLine(o),n.updateData(e,i,!0),n}return t.prototype.updateData=function(e,i,n){var a=this,o=e.hostModel,s=e.getItemModel(i),l=e.getItemLayout(i),u=s.getModel("emphasis"),h=s.get(vX);h=h??1,n||ri(a),a.useStyle(e.getItemVisual(i,"style")),a.style.lineJoin="round",n?(a.setShape({points:l.points}),a.style.opacity=0,$t(a,{style:{opacity:h}},o,i)):At(a,{style:{opacity:h},shape:{points:l.points}},o,i),Ce(a,s),this._updateLabel(e,i),Kt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,i){var n=this,a=this.getTextGuideLine(),o=n.getTextContent(),s=e.hostModel,l=e.getItemModel(i),u=e.getItemLayout(i),h=u.label,c=e.getItemVisual(i,"style"),f=c.fill;Ae(o,me(l),{labelFetcher:e.hostModel,labelDataIndex:i,defaultOpacity:c.opacity,defaultText:e.getName(i)},{normal:{align:h.textAlign,verticalAlign:h.verticalAlign}}),n.setTextConfig({local:!0,inside:!!h.inside,insideStroke:f,outsideFill:f});var v=h.linePoints;a.setShape({points:v}),n.textGuideLineConfig={anchor:v?new ct(v[0][0],v[0][1]):null},At(o,{style:{x:h.x,y:h.y}},s,i),o.attr({rotation:h.rotation,originX:h.x,originY:h.y,z2:10}),tx(n,ex(l),{stroke:f})},t}(Ge),pX=function(r){E(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,i,n){var a=e.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new dX(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var h=o.getItemGraphicEl(u);h.updateData(a,l),s.add(h),a.setItemGraphicEl(l,h)}).remove(function(l){var u=o.getItemGraphicEl(l);Vu(u,e,l)}).execute(),this._data=a},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(Ot),gX=function(r){E(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 Ah($(this.getData,this),$(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,i){return Qs(this,{coordDimensions:["value"],encodeDefaulter:ut(D_,this)})},t.prototype._defaultLabelLine=function(e){co(e,"labelLine",["show"]);var i=e.labelLine,n=e.emphasis.labelLine;i.show=i.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var i=this.getData(),n=r.prototype.getDataParams.call(this,e),a=i.mapDimension("value"),o=i.getSum(a);return n.percent=o?+(i.get(a,e)/o*100).toFixed(2):0,n.$vars.push("percent"),n},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(zt);function yX(r,t){return ue(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function mX(r,t){for(var e=r.mapDimension("value"),i=r.mapArray(e,function(l){return l}),n=[],a=t==="ascending",o=0,s=r.count();o<s;o++)n[o]=o;return Q(t)?n.sort(t):t!=="none"&&n.sort(function(l,u){return a?i[l]-i[u]:i[u]-i[l]}),n}function _X(r){var t=r.hostModel,e=t.get("orient");r.each(function(i){var n=r.getItemModel(i),a=n.getModel("label"),o=a.get("position"),s=n.getModel("labelLine"),l=r.getItemLayout(i),u=l.points,h=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",c,f,v,d;if(h)o==="insideLeft"?(f=(u[0][0]+u[3][0])/2+5,v=(u[0][1]+u[3][1])/2,c="left"):o==="insideRight"?(f=(u[1][0]+u[2][0])/2-5,v=(u[1][1]+u[2][1])/2,c="right"):(f=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,v=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,c="center"),d=[[f,v],[f,v]];else{var p=void 0,g=void 0,y=void 0,m=void 0,_=s.get("length");o==="left"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=p-_,f=y-5,c="right"):o==="right"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=p+_,f=y+5,c="left"):o==="top"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=g-_,v=m-5,c="center"):o==="bottom"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=g+_,v=m+5,c="center"):o==="rightTop"?(p=e==="horizontal"?u[3][0]:u[1][0],g=e==="horizontal"?u[3][1]:u[1][1],e==="horizontal"?(m=g-_,v=m-5,c="center"):(y=p+_,f=y+5,c="top")):o==="rightBottom"?(p=u[2][0],g=u[2][1],e==="horizontal"?(m=g+_,v=m+5,c="center"):(y=p+_,f=y+5,c="bottom")):o==="leftTop"?(p=u[0][0],g=e==="horizontal"?u[0][1]:u[1][1],e==="horizontal"?(m=g-_,v=m-5,c="center"):(y=p-_,f=y-5,c="right")):o==="leftBottom"?(p=e==="horizontal"?u[1][0]:u[3][0],g=e==="horizontal"?u[1][1]:u[2][1],e==="horizontal"?(m=g+_,v=m+5,c="center"):(y=p-_,f=y-5,c="right")):(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,e==="horizontal"?(m=g+_,v=m+5,c="center"):(y=p+_,f=y+5,c="left")),e==="horizontal"?(y=p,f=y):(m=g,v=m),d=[[p,g],[y,m]]}l.label={linePoints:d,x:f,y:v,verticalAlign:"middle",textAlign:c,inside:h}})}function xX(r,t){r.eachSeriesByType("funnel",function(e){var i=e.getData(),n=i.mapDimension("value"),a=e.get("sort"),o=yX(e,t),s=e.get("orient"),l=o.width,u=o.height,h=mX(i,a),c=o.x,f=o.y,v=s==="horizontal"?[U(e.get("minSize"),u),U(e.get("maxSize"),u)]:[U(e.get("minSize"),l),U(e.get("maxSize"),l)],d=i.getDataExtent(n),p=e.get("min"),g=e.get("max");p==null&&(p=Math.min(d[0],0)),g==null&&(g=d[1]);var y=e.get("funnelAlign"),m=e.get("gap"),_=s==="horizontal"?l:u,x=(_-m*(i.count()-1))/i.count(),b=function(P,k){if(s==="horizontal"){var R=i.get(n,P)||0,N=Pt(R,[p,g],v,!0),O=void 0;switch(y){case"top":O=f;break;case"center":O=f+(u-N)/2;break;case"bottom":O=f+(u-N);break}return[[k,O],[k,O+N]]}var B=i.get(n,P)||0,G=Pt(B,[p,g],v,!0),H;switch(y){case"left":H=c;break;case"center":H=c+(l-G)/2;break;case"right":H=c+l-G;break}return[[H,k],[H+G,k]]};a==="ascending"&&(x=-x,m=-m,s==="horizontal"?c+=l:f+=u,h=h.reverse());for(var S=0;S<h.length;S++){var w=h[S],T=h[S+1],M=i.getItemModel(w);if(s==="horizontal"){var C=M.get(["itemStyle","width"]);C==null?C=x:(C=U(C,l),a==="ascending"&&(C=-C));var D=b(w,c),L=b(T,c+C);c+=C+m,i.setItemLayout(w,{points:D.concat(L.slice().reverse())})}else{var I=M.get(["itemStyle","height"]);I==null?I=x:(I=U(I,u),a==="ascending"&&(I=-I));var D=b(w,f),L=b(T,f+I);f+=I+m,i.setItemLayout(w,{points:D.concat(L.slice().reverse())})}}_X(i)})}function bX(r){r.registerChartView(pX),r.registerSeriesModel(gX),r.registerLayout(xX),r.registerProcessor(Ch("funnel"))}var SX=.3,wX=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._dataGroup=new at,e._initialized=!1,e}return t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(e,i,n,a){this._progressiveEls=null;var o=this._dataGroup,s=e.getData(),l=this._data,u=e.coordinateSystem,h=u.dimensions,c=eC(e);s.diff(l).add(f).update(v).remove(d).execute();function f(g){var y=tC(s,o,g,h,u);Ig(y,s,g,c)}function v(g,y){var m=l.getItemGraphicEl(y),_=VR(s,g,h,u);s.setItemGraphicEl(g,m),At(m,{shape:{points:_}},e,g),ri(m),Ig(m,s,g,c)}function d(g){var y=l.getItemGraphicEl(g);o.remove(y)}if(!this._initialized){this._initialized=!0;var p=TX(u,e,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(p)}this._data=s},t.prototype.incrementalPrepareRender=function(e,i,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(e,i,n){for(var a=i.getData(),o=i.coordinateSystem,s=o.dimensions,l=eC(i),u=this._progressiveEls=[],h=e.start;h<e.end;h++){var c=tC(a,this._dataGroup,h,s,o);c.incremental=!0,Ig(c,a,h,l),u.push(c)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(Ot);function TX(r,t,e){var i=r.model,n=r.getRect(),a=new wt({shape:{x:n.x,y:n.y,width:n.width,height:n.height}}),o=i.get("layout")==="horizontal"?"width":"height";return a.setShape(o,0),$t(a,{shape:{width:n.width,height:n.height}},t,e),a}function VR(r,t,e,i){for(var n=[],a=0;a<e.length;a++){var o=e[a],s=r.get(r.mapDimension(o),t);MX(s,i.getAxis(o).type)||n.push(i.dataToPoint(s,o))}return n}function tC(r,t,e,i,n){var a=VR(r,e,i,n),o=new We({shape:{points:a},z2:10});return t.add(o),r.setItemGraphicEl(e,o),o}function eC(r){var t=r.get("smooth",!0);return t===!0&&(t=SX),t=Mi(t),Ss(t)&&(t=0),{smooth:t}}function Ig(r,t,e,i){r.useStyle(t.getItemVisual(e,"style")),r.style.fill=null,r.setShape("smooth",i.smooth);var n=t.getItemModel(e),a=n.getModel("emphasis");Ce(r,n,"lineStyle"),Kt(r,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function MX(r,t){return t==="category"?r==null:r==null||isNaN(r)}var CX=function(r){E(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.getInitialData=function(e,i){return Li(null,this,{useEncodeDefaulter:$(AX,null,this)})},t.prototype.getRawIndicesByActiveState=function(e){var i=this.coordinateSystem,n=this.getData(),a=[];return i.eachActiveState(n,function(o,s){e===o&&a.push(n.getRawIndex(s))}),a},t.type="series.parallel",t.dependencies=["parallel"],t.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},t}(zt);function AX(r){var t=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(t){var e={};return A(t.dimensions,function(i){var n=DX(i);e[i]=n}),e}}function DX(r){return+r.replace("dim","")}var LX=["lineStyle","opacity"],IX={seriesType:"parallel",reset:function(r,t){var e=r.coordinateSystem,i={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(n,a){e.eachActiveState(a,function(o,s){var l=i[o];if(o==="normal"&&a.hasItemOption){var u=a.getItemModel(s).get(LX,!0);u!=null&&(l=u)}var h=a.ensureUniqueItemVisual(s,"style");h.opacity=l},n.start,n.end)}}}};function PX(r){kX(r),RX(r)}function kX(r){if(!r.parallel){var t=!1;A(r.series,function(e){e&&e.type==="parallel"&&(t=!0)}),t&&(r.parallel=[{}])}}function RX(r){var t=Bt(r.parallelAxis);A(t,function(e){if(et(e)){var i=e.parallelIndex||0,n=Bt(r.parallel)[i];n&&n.parallelAxisDefault&&ht(e,n.parallelAxisDefault,!1)}})}var EX=5,OX=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){this._model=e,this._api=n,this._handlers||(this._handlers={},A(NX,function(a,o){n.getZr().on(o,this._handlers[o]=$(a,this))},this)),Zs(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(e,i){Wu(this,"_throttledDispatchExpand"),A(this._handlers,function(n,a){i.getZr().off(a,n)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(e){this._dispatchExpand(e)},t.prototype._dispatchExpand=function(e){e&&this._api.dispatchAction(z({type:"parallelAxisExpand"},e))},t.type="parallel",t}(Yt),NX={mousedown:function(r){Pg(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var t=this._mouseDownPoint;if(Pg(this,"click")&&t){var e=[r.offsetX,r.offsetY],i=Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2);if(i>EX)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||!Pg(this,"mousemove"))){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),i=e.behavior;i==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(i==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:i==="jump"?null:{duration:0}})}}};function Pg(r,t){var e=r._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}var BX=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var i=this.option;e&&ht(i,e,!0),this._initDimensions()},t.prototype.contains=function(e,i){var n=e.get("parallelIndex");return n!=null&&i.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){A(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(i){e.hasOwnProperty(i)&&(this.option[i]=e[i])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],i=this.parallelAxisIndex=[],n=Dt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);A(n,function(a){e.push("dim"+a.get("dim")),i.push(a.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}(yt),zX=function(r){E(t,r);function t(e,i,n,a,o){var s=r.call(this,e,i,n)||this;return s.type=a||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(Br);function Do(r,t,e,i,n,a){r=r||0;var o=e[1]-e[0];if(n!=null&&(n=Zo(n,[0,o])),a!=null&&(a=Math.max(a,n??0)),i==="all"){var s=Math.abs(t[1]-t[0]);s=Zo(s,[0,o]),n=a=Zo(s,[n,a]),i=0}t[0]=Zo(t[0],e),t[1]=Zo(t[1],e);var l=kg(t,i);t[i]+=r;var u=n||0,h=e.slice();l.sign<0?h[0]+=u:h[1]-=u,t[i]=Zo(t[i],h);var c;return c=kg(t,i),n!=null&&(c.sign!==l.sign||c.span<n)&&(t[1-i]=t[i]+l.sign*n),c=kg(t,i),a!=null&&c.span>a&&(t[1-i]=t[i]+c.sign*a),t}function kg(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 Zo(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var Rg=A,FR=Math.min,GR=Math.max,rC=Math.floor,VX=Math.ceil,iC=Qt,FX=Math.PI,GX=function(){function r(t,e,i){this.type="parallel",this._axesMap=Z(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,i)}return r.prototype._init=function(t,e,i){var n=t.dimensions,a=t.parallelAxisIndex;Rg(n,function(o,s){var l=a[s],u=e.getComponent("parallelAxis",l),h=this._axesMap.set(o,new zX(o,bh(u),[0,0],u.get("type"),l)),c=h.type==="category";h.onBand=c&&u.get("boundaryGap"),h.inverse=u.get("inverse"),u.axis=h,h.model=u,h.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},r.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,a=e.pixelDimIndex,o=t[1-a],s=t[a];return o>=i&&o<=i+e.axisLength&&s>=n&&s<=n+e.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(i){if(t.contains(i,e)){var n=i.getData();Rg(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(n,n.mapDimension(a)),yo(o.scale,o.model)},this)}},this)},r.prototype.resize=function(t,e){this._rect=ue(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,i=["x","y"],n=["width","height"],a=t.get("layout"),o=a==="horizontal"?0:1,s=e[n[o]],l=[0,s],u=this.dimensions.length,h=Oc(t.get("axisExpandWidth"),l),c=Oc(t.get("axisExpandCount")||0,[0,u]),f=t.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,v=t.get("axisExpandWindow"),d;if(v)d=Oc(v[1]-v[0],l),v[1]=v[0]+d;else{d=Oc(h*(c-1),l);var p=t.get("axisExpandCenter")||rC(u/2);v=[h*p-d/2],v[1]=v[0]+d}var g=(s-d)/(u-c);g<3&&(g=0);var y=[rC(iC(v[0]/h,1))+1,VX(iC(v[1]/h,1))-1],m=g/h*v[0];return{layout:a,pixelDimIndex:o,layoutBase:e[i[o]],layoutLength:s,axisBase:e[i[1-o]],axisLength:e[n[1-o]],axisExpandable:f,axisExpandWidth:h,axisCollapseWidth:g,axisExpandWindow:v,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;e.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Rg(i,function(o,s){var l=(n.axisExpandable?WX:HX)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},h={horizontal:FX/2,vertical:0},c=[u[a].x+t.x,u[a].y+t.y],f=h[a],v=or();Qn(v,v,f),ti(v,v,c),this._axesLayout[o]={position:c,rotation:f,transform:v,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(t){return this._axesMap.get(t)},r.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},r.prototype.eachActiveState=function(t,e,i,n){i==null&&(i=0),n==null&&(n=t.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];A(o,function(g){s.push(t.mapDimension(g)),l.push(a.get(g).model)});for(var u=this.hasAxisBrushed(),h=i;h<n;h++){var c=void 0;if(!u)c="normal";else{c="active";for(var f=t.getValues(s,h),v=0,d=o.length;v<d;v++){var p=l[v].getActiveState(f[v]);if(p==="inactive"){c="inactive";break}}}e(c,h)}},r.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,a=t.length;n<a;n++)e.get(t[n]).model.getActiveState()!=="normal"&&(i=!0);return i},r.prototype.axisCoordToPoint=function(t,e){var i=this._axesLayout[e];return Jr([t,0],i.transform)},r.prototype.getAxisLayout=function(t){return it(this._axesLayout[t])},r.prototype.getSlidedAxisExpandWindow=function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),a=n[1]-n[0],o=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var s=t[i]-e.layoutBase-e.axisExpandWindow0Pos,l,u="slide",h=e.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),f=c[0]!=null;if(h)f&&h&&s<a*c[0]?(u="jump",l=s-a*c[2]):f&&h&&s>a*(1-c[0])?(u="jump",l=s-a*(1-c[2])):(l=s-a*c[1])>=0&&(l=s-a*(1-c[1]))<=0&&(l=0),l*=e.axisExpandWidth/h,l?Do(l,n,o,"all"):u="none";else{var v=n[1]-n[0],d=o[1]*s/v;n=[GR(0,d-v/2)],n[1]=FR(o[1],n[0]+v),n[0]=n[1]-v}return{axisExpandWindow:n,behavior:u}},r}();function Oc(r,t){return FR(GR(r,t[0]),t[1])}function HX(r,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*r,axisNameAvailableWidth:e,axisLabelShow:!0}}function WX(r,t){var e=t.layoutLength,i=t.axisExpandWidth,n=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,l=a,u=!1,h;return r<o[0]?(s=r*a,h=a):r<=o[1]?(s=t.axisExpandWindow0Pos+r*i-t.axisExpandWindow[0],l=i,u=!0):(s=e-(n-1-r)*a,h=a),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:h}}function UX(r,t){var e=[];return r.eachComponent("parallel",function(i,n){var a=new GX(i,r,t);a.name="parallel_"+n,a.resize(i,t),i.coordinateSystem=a,a.model=i,e.push(a)}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="parallel"){var n=i.getReferringComponents("parallel",le).models[0];i.coordinateSystem=n.coordinateSystem}}),e}var YX={create:UX},Zm=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.activeIntervals=[],e}return t.prototype.getAreaSelectStyle=function(){return vo([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(e){var i=this.activeIntervals=it(e);if(i)for(var n=i.length-1;n>=0;n--)fr(i[n])},t.prototype.getActiveState=function(e){var i=this.activeIntervals;if(!i.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(i.length===1){var n=i[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var a=0,o=i.length;a<o;a++)if(i[a][0]<=e&&e<=i[a][1])return"active";return"inactive"},t}(yt);re(Zm,Js);var mo=!0,eh=Math.min,Ps=Math.max,$X=Math.pow,XX=1e4,ZX=6,jX=6,nC="globalPan",qX={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},KX={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},aC={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},JX=0,Mx=function(r){E(t,r);function t(e){var i=r.call(this)||this;return i._track=[],i._covers=[],i._handlers={},i._zr=e,i.group=new at,i._uid="brushController_"+JX++,A(aZ,function(n,a){this._handlers[a]=$(n,this)},i),i}return t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var i=this._zr;this._enableGlobalPan||H$(i,nC,this._uid),A(this._handlers,function(n,a){i.on(a,n)}),this._brushType=e.brushType,this._brushOption=ht(it(aC),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;W$(e,nC,this._uid),A(this._handlers,function(i,n){e.off(n,i)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var i=this._panels={};A(e,function(n){i[n.panelId]=it(n)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var i=this.group;return this._zr.add(i),i.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=i.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=F(e,function(f){return ht(it(aC),f,!0)});var i="\0-brush-index-",n=this._covers,a=this._covers=[],o=this,s=this._creatingCover;return new Qi(n,e,u,l).add(h).update(h).remove(c).execute(),this;function l(f,v){return(f.id!=null?f.id:i+v)+"-"+f.brushType}function u(f,v){return l(f.__brushOption,v)}function h(f,v){var d=e[f];if(v!=null&&n[v]===s)a[f]=n[v];else{var p=a[f]=v!=null?(n[v].__brushOption=d,n[v]):WR(o,HR(o,d));Cx(o,p)}}function c(f){n[f]!==s&&o.group.remove(n[f])}},t.prototype.unmount=function(){return this.enableBrush(!1),jm(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(Rr);function HR(r,t){var e=wd[t.brushType].createCover(r,t);return e.__brushOption=t,YR(e,t),r.group.add(e),e}function WR(r,t){var e=Ax(t);return e.endCreating&&(e.endCreating(r,t),YR(t,t.__brushOption)),t}function UR(r,t){var e=t.__brushOption;Ax(t).updateCoverShape(r,t,e.range,e)}function YR(r,t){var e=t.z;e==null&&(e=XX),r.traverse(function(i){i.z=e,i.z2=e})}function Cx(r,t){Ax(t).updateCommon(r,t),UR(r,t)}function Ax(r){return wd[r.__brushOption.brushType]}function Dx(r,t,e){var i=r._panels;if(!i)return mo;var n,a=r._transform;return A(i,function(o){o.isTargetByCursor(t,e,a)&&(n=o)}),n}function $R(r,t){var e=r._panels;if(!e)return mo;var i=t.__brushOption.panelId;return i!=null?e[i]:mo}function jm(r){var t=r._covers,e=t.length;return A(t,function(i){r.group.remove(i)},r),t.length=0,!!e}function _o(r,t){var e=F(r._covers,function(i){var n=i.__brushOption,a=it(n.range);return{brushType:n.brushType,panelId:n.panelId,range:a}});r.trigger("brush",{areas:e,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function QX(r){var t=r._track;if(!t.length)return!1;var e=t[t.length-1],i=t[0],n=e[0]-i[0],a=e[1]-i[1],o=$X(n*n+a*a,.5);return o>ZX}function XR(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function ZR(r,t,e,i){var n=new at;return n.add(new wt({name:"main",style:Lx(e),silent:!0,draggable:!0,cursor:"move",drift:ut(oC,r,t,n,["n","s","w","e"]),ondragend:ut(_o,t,{isEnd:!0})})),A(i,function(a){n.add(new wt({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ut(oC,r,t,n,a),ondragend:ut(_o,t,{isEnd:!0})}))}),n}function jR(r,t,e,i){var n=i.brushStyle.lineWidth||0,a=Ps(n,jX),o=e[0][0],s=e[1][0],l=o-n/2,u=s-n/2,h=e[0][1],c=e[1][1],f=h-a+n/2,v=c-a+n/2,d=h-o,p=c-s,g=d+n,y=p+n;Ei(r,t,"main",o,s,d,p),i.transformable&&(Ei(r,t,"w",l,u,a,y),Ei(r,t,"e",f,u,a,y),Ei(r,t,"n",l,u,g,a),Ei(r,t,"s",l,v,g,a),Ei(r,t,"nw",l,u,a,a),Ei(r,t,"ne",f,u,a,a),Ei(r,t,"sw",l,v,a,a),Ei(r,t,"se",f,v,a,a))}function qm(r,t){var e=t.__brushOption,i=e.transformable,n=t.childAt(0);n.useStyle(Lx(e)),n.attr({silent:!i,cursor:i?"move":"default"}),A([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?Km(r,a[0]):eZ(r,a);o&&o.attr({silent:!i,invisible:!i,cursor:i?KX[s]+"-resize":null})})}function Ei(r,t,e,i,n,a,o){var s=t.childOfName(e);s&&s.setShape(iZ(Ix(r,t,[[i,n],[i+a,n+o]])))}function Lx(r){return tt({strokeNoScale:!0},r.brushStyle)}function qR(r,t,e,i){var n=[eh(r,e),eh(t,i)],a=[Ps(r,e),Ps(t,i)];return[[n[0],a[0]],[n[1],a[1]]]}function tZ(r){return zn(r.group)}function Km(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},n=ed(e[t],tZ(r));return i[n]}function eZ(r,t){var e=[Km(r,t[0]),Km(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function oC(r,t,e,i,n,a){var o=e.__brushOption,s=r.toRectRange(o.range),l=KR(t,n,a);A(i,function(u){var h=qX[u];s[h[0]][h[1]]+=l[h[0]]}),o.range=r.fromRectRange(qR(s[0][0],s[1][0],s[0][1],s[1][1])),Cx(t,e),_o(t,{isEnd:!1})}function rZ(r,t,e,i){var n=t.__brushOption.range,a=KR(r,e,i);A(n,function(o){o[0]+=a[0],o[1]+=a[1]}),Cx(r,t),_o(r,{isEnd:!1})}function KR(r,t,e){var i=r.group,n=i.transformCoordToLocal(t,e),a=i.transformCoordToLocal(0,0);return[n[0]-a[0],n[1]-a[1]]}function Ix(r,t,e){var i=$R(r,t);return i&&i!==mo?i.clipPath(e,r._transform):it(e)}function iZ(r){var t=eh(r[0][0],r[1][0]),e=eh(r[0][1],r[1][1]),i=Ps(r[0][0],r[1][0]),n=Ps(r[0][1],r[1][1]);return{x:t,y:e,width:i-t,height:n-e}}function nZ(r,t,e){if(!(!r._brushType||oZ(r,t.offsetX,t.offsetY))){var i=r._zr,n=r._covers,a=Dx(r,t,e);if(!r._dragging)for(var o=0;o<n.length;o++){var s=n[o].__brushOption;if(a&&(a===mo||s.panelId===a.panelId)&&wd[s.brushType].contain(n[o],e[0],e[1]))return}a&&i.setCursorStyle("crosshair")}}function Jm(r){var t=r.event;t.preventDefault&&t.preventDefault()}function Qm(r,t,e){return r.childOfName("main").contain(t,e)}function JR(r,t,e,i){var n=r._creatingCover,a=r._creatingPanel,o=r._brushOption,s;if(r._track.push(e.slice()),QX(r)||n){if(a&&!n){o.brushMode==="single"&&jm(r);var l=it(o);l.brushType=sC(l.brushType,a),l.panelId=a===mo?null:a.panelId,n=r._creatingCover=HR(r,l),r._covers.push(n)}if(n){var u=wd[sC(r._brushType,a)],h=n.__brushOption;h.range=u.getCreatingRange(Ix(r,n,r._track)),i&&(WR(r,n),u.updateCommon(r,n)),UR(r,n),s={isEnd:i}}}else i&&o.brushMode==="single"&&o.removeOnClick&&Dx(r,t,e)&&jm(r)&&(s={isEnd:i,removeOnClick:!0});return s}function sC(r,t){return r==="auto"?t.defaultBrushType:r}var aZ={mousedown:function(r){if(this._dragging)lC(this,r);else if(!r.target||!r.target.draggable){Jm(r);var t=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var e=this._creatingPanel=Dx(this,r,t);e&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(r){var t=r.offsetX,e=r.offsetY,i=this.group.transformCoordToLocal(t,e);if(nZ(this,r,i),this._dragging){Jm(r);var n=JR(this,r,i,!1);n&&_o(this,n)}},mouseup:function(r){lC(this,r)}};function lC(r,t){if(r._dragging){Jm(t);var e=t.offsetX,i=t.offsetY,n=r.group.transformCoordToLocal(e,i),a=JR(r,t,n,!0);r._dragging=!1,r._track=[],r._creatingCover=null,a&&_o(r,a)}}function oZ(r,t,e){var i=r._zr;return t<0||t>i.getWidth()||e<0||e>i.getHeight()}var wd={lineX:uC(0),lineY:uC(1),rect:{createCover:function(r,t){function e(i){return i}return ZR({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=XR(r);return qR(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,i){jR(r,t,e,i)},updateCommon:qm,contain:Qm},polygon:{createCover:function(r,t){var e=new at;return e.add(new We({name:"main",style:Lx(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new Ge({name:"main",draggable:!0,drift:ut(rZ,r,t),ondragend:ut(_o,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,i){t.childAt(0).setShape({points:Ix(r,t,e)})},updateCommon:qm,contain:Qm}};function uC(r){return{createCover:function(t,e){return ZR({toRectRange:function(i){var n=[i,[0,100]];return r&&n.reverse(),n},fromRectRange:function(i){return i[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=XR(t),i=eh(e[0][r],e[1][r]),n=Ps(e[0][r],e[1][r]);return[i,n]},updateCoverShape:function(t,e,i,n){var a,o=$R(t,e);if(o!==mo&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(r);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[i,a];r&&l.reverse(),jR(t,e,l,n)},updateCommon:qm,contain:Qm}}function QR(r){return r=Px(r),function(t){return g_(t,r)}}function tE(r,t){return r=Px(r),function(e){var i=t??e,n=i?r.width:r.height,a=i?r.x:r.y;return[a,a+(n||0)]}}function eE(r,t,e){var i=Px(r);return function(n,a){return i.contain(a[0],a[1])&&!_d(n,t,e)}}function Px(r){return ft.create(r)}var sZ=["axisLine","axisTickLabel","axisName"],lZ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){r.prototype.init.apply(this,arguments),(this._brushController=new Mx(i.getZr())).on("brush",$(this._onBrush,this))},t.prototype.render=function(e,i,n,a){if(!uZ(e,i,a)){this.axisModel=e,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new at,this.group.add(this._axisGroup),!!e.get("show")){var s=cZ(e,i),l=s.coordinateSystem,u=e.getAreaSelectStyle(),h=u.width,c=e.axis.dim,f=l.getAxisLayout(c),v=z({strokeContainThreshold:h},f),d=new je(e,v);A(sZ,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(v,u,e,s,h,n),mh(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,i,n,a,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],h=Math.min(30,Math.abs(u)*.1),c=ft.create({x:l[0],y:-o/2,width:u,height:o});c.x-=h,c.width+=2*h,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:QR(c),isTargetByCursor:eE(c,s,a),getLinearBrushOtherExtent:tE(c,0)}]).enableBrush({brushType:"lineX",brushStyle:i,removeOnClick:!0}).updateCovers(hZ(n))},t.prototype._onBrush=function(e){var i=e.areas,n=this.axisModel,a=n.axis,o=F(i,function(s){return[a.coordToData(s.range[0],!0),a.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}(Yt);function uZ(r,t,e){return e&&e.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:e})[0]===r}function hZ(r){var t=r.axis;return F(r.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function cZ(r,t){return t.getComponent("parallel",r.get("parallelIndex"))}var fZ={type:"axisAreaSelect",event:"axisAreaSelected"};function vZ(r){r.registerAction(fZ,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(i){i.axis.model.setActiveIntervals(t.intervals)})}),r.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(i){i.setAxisExpand(t)})})}var dZ={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function rE(r){r.registerComponentView(OX),r.registerComponentModel(BX),r.registerCoordinateSystem("parallel",YX),r.registerPreprocessor(PX),r.registerComponentModel(Zm),r.registerComponentView(lZ),Is(r,"parallel",Zm,dZ),vZ(r)}function pZ(r){pt(rE),r.registerChartView(wX),r.registerSeriesModel(CX),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,IX)}var gZ=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}(),yZ=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new gZ},t.prototype.buildPath=function(e,i){var n=i.extent;e.moveTo(i.x1,i.y1),e.bezierCurveTo(i.cpx1,i.cpy1,i.cpx2,i.cpy2,i.x2,i.y2),i.orient==="vertical"?(e.lineTo(i.x2+n,i.y2),e.bezierCurveTo(i.cpx2+n,i.cpy2,i.cpx1+n,i.cpy1,i.x1+n,i.y1)):(e.lineTo(i.x2,i.y2+n),e.bezierCurveTo(i.cpx2,i.cpy2+n,i.cpx1,i.cpy1+n,i.x1,i.y1+n)),e.closePath()},t.prototype.highlight=function(){Ki(this)},t.prototype.downplay=function(){Ji(this)},t}(_t),mZ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._focusAdjacencyDisabled=!1,e}return t.prototype.render=function(e,i,n){var a=this,o=e.getGraph(),s=this.group,l=e.layoutInfo,u=l.width,h=l.height,c=e.getData(),f=e.getData("edge"),v=e.get("orient");this._model=e,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(d){var p=new yZ,g=ot(p);g.dataIndex=d.dataIndex,g.seriesIndex=e.seriesIndex,g.dataType="edge";var y=d.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),x=d.node1.getLayout(),b=d.node1.getModel(),S=b.get("localX"),w=b.get("localY"),T=d.node2.getLayout(),M=d.node2.getModel(),C=M.get("localX"),D=M.get("localY"),L=d.getLayout(),I,P,k,R,N,O,B,G;p.shape.extent=Math.max(1,L.dy),p.shape.orient=v,v==="vertical"?(I=(S!=null?S*u:x.x)+L.sy,P=(w!=null?w*h:x.y)+x.dy,k=(C!=null?C*u:T.x)+L.ty,R=D!=null?D*h:T.y,N=I,O=P*(1-_)+R*_,B=k,G=P*_+R*(1-_)):(I=(S!=null?S*u:x.x)+x.dx,P=(w!=null?w*h:x.y)+L.sy,k=C!=null?C*u:T.x,R=(D!=null?D*h:T.y)+L.ty,N=I*(1-_)+k*_,O=P,B=I*_+k*(1-_),G=R),p.setShape({x1:I,y1:P,x2:k,y2:R,cpx1:N,cpy1:O,cpx2:B,cpy2:G}),p.useStyle(m.getItemStyle()),hC(p.style,v,d);var H=""+y.get("value"),W=me(y,"edgeLabel");Ae(p,W,{labelFetcher:{getFormattedLabel:function(nt,Ct,te,dt,rt,gt){return e.getFormattedLabel(nt,Ct,"edge",dt,jr(rt,W.normal&&W.normal.get("formatter"),H),gt)}},labelDataIndex:d.dataIndex,defaultText:H}),p.setTextConfig({position:"inside"});var q=y.getModel("emphasis");Ce(p,y,"lineStyle",function(nt){var Ct=nt.getItemStyle();return hC(Ct,v,d),Ct}),s.add(p),f.setItemGraphicEl(d.dataIndex,p);var K=q.get("focus");Kt(p,K==="adjacency"?d.getAdjacentDataIndices():K==="trajectory"?d.getTrajectoryDataIndices():K,q.get("blurScope"),q.get("disabled"))}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),x=g.get(["itemStyle","borderRadius"])||0,b=new wt({shape:{x:y!=null?y*u:p.x,y:m!=null?m*h:p.y,width:p.dx,height:p.dy,r:x},style:g.getModel("itemStyle").getItemStyle(),z2:10});Ae(b,me(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),Ce(b,g),s.add(b),c.setItemGraphicEl(d.dataIndex,b),ot(b).dataType="node";var S=_.get("focus");Kt(b,S==="adjacency"?d.getAdjacentDataIndices():S==="trajectory"?d.getTrajectoryDataIndices():S,_.get("blurScope"),_.get("disabled"))}),c.eachItemGraphicEl(function(d,p){var g=c.getItemModel(p);g.get("draggable")&&(d.drift=function(y,m){a._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/h})},d.ondragend=function(){a._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&e.isAnimationEnabled()&&s.setClipPath(_Z(s.getBoundingRect(),e,function(){s.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(Ot);function hC(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 i=e.node1.getVisual("color"),n=e.node2.getVisual("color");Y(i)&&Y(n)&&(r.fill=new Vs(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:i,offset:0},{color:n,offset:1}]))}}function _Z(r,t,e){var i=new wt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return $t(i,{shape:{width:r.width+20}},t,e),i}var xZ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,i){var n=e.edges||e.links||[],a=e.data||e.nodes||[],o=e.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new Lt(o[l],this,i));var u=zR(a,n,this,!0,h);return u.data;function h(c,f){c.wrapMethod("getItemModel",function(v,d){var p=v.parentModel,g=p.getData().getItemLayout(d);if(g){var y=g.depth,m=p.levelModels[y];m&&(v.parentModel=m)}return v}),f.wrapMethod("getItemModel",function(v,d){var p=v.parentModel,g=p.getGraph().getEdgeByIndex(d),y=g.node1.getLayout();if(y){var m=y.depth,_=p.levelModels[m];_&&(v.parentModel=_)}return v})}},t.prototype.setNodePosition=function(e,i){var n=this.option.data||this.option.nodes,a=n[e];a.localX=i[0],a.localY=i[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,i,n){function a(v){return isNaN(v)||v==null}if(n==="edge"){var o=this.getDataParams(e,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return _e("nameValue",{name:u,value:l,noValue:a(l)})}else{var h=this.getGraph().getNodeByIndex(e),c=h.getLayout().value,f=this.getDataParams(e,n).data.name;return _e("nameValue",{name:f!=null?f+"":null,value:c,noValue:a(c)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,i){var n=r.prototype.getDataParams.call(this,e,i);if(n.value==null&&i==="node"){var a=this.getGraph().getNodeByIndex(e),o=a.getLayout().value;n.value=o}return n},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(zt);function bZ(r,t){r.eachSeriesByType("sankey",function(e){var i=e.get("nodeWidth"),n=e.get("nodeGap"),a=SZ(e,t);e.layoutInfo=a;var o=a.width,s=a.height,l=e.getGraph(),u=l.nodes,h=l.edges;TZ(u);var c=Dt(u,function(p){return p.getLayout().value===0}),f=c.length!==0?0:e.get("layoutIterations"),v=e.get("orient"),d=e.get("nodeAlign");wZ(u,h,i,n,o,s,f,v,d)})}function SZ(r,t){return ue(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function wZ(r,t,e,i,n,a,o,s,l){MZ(r,t,e,n,a,s,l),LZ(r,t,a,n,i,o,s),zZ(r,s)}function TZ(r){A(r,function(t){var e=Gn(t.outEdges,pv),i=Gn(t.inEdges,pv),n=t.getValue()||0,a=Math.max(e,i,n);t.setLayout({value:a},!0)})}function MZ(r,t,e,i,n,a,o){for(var s=[],l=[],u=[],h=[],c=0,f=0;f<t.length;f++)s[f]=1;for(var f=0;f<r.length;f++)l[f]=r[f].inEdges.length,l[f]===0&&u.push(r[f]);for(var v=-1;u.length;){for(var d=0;d<u.length;d++){var p=u[d],g=p.hostGraph.data.getRawDataItem(p.dataIndex),y=g.depth!=null&&g.depth>=0;y&&g.depth>v&&(v=g.depth),p.setLayout({depth:y?g.depth:c},!0),a==="vertical"?p.setLayout({dy:e},!0):p.setLayout({dx:e},!0);for(var m=0;m<p.outEdges.length;m++){var _=p.outEdges[m],x=t.indexOf(_);s[x]=0;var b=_.node2,S=r.indexOf(b);--l[S]===0&&h.indexOf(b)<0&&h.push(b)}}++c,u=h,h=[]}for(var f=0;f<s.length;f++)if(s[f]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var w=v>c-1?v:c-1;o&&o!=="left"&&CZ(r,o,a,w);var T=a==="vertical"?(n-e)/w:(i-e)/w;DZ(r,T,a)}function iE(r){var t=r.hostGraph.data.getRawDataItem(r.dataIndex);return t.depth!=null&&t.depth>=0}function CZ(r,t,e,i){if(t==="right"){for(var n=[],a=r,o=0;a.length;){for(var s=0;s<a.length;s++){var l=a[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var h=l.inEdges[u];n.indexOf(h.node1)<0&&n.push(h.node1)}}a=n,n=[],++o}A(r,function(c){iE(c)||c.setLayout({depth:Math.max(0,i-c.getLayout().skNodeHeight)},!0)})}else t==="justify"&&AZ(r,i)}function AZ(r,t){A(r,function(e){!iE(e)&&!e.outEdges.length&&e.setLayout({depth:t},!0)})}function DZ(r,t,e){A(r,function(i){var n=i.getLayout().depth*t;e==="vertical"?i.setLayout({y:n},!0):i.setLayout({x:n},!0)})}function LZ(r,t,e,i,n,a,o){var s=IZ(r,o);PZ(s,t,e,i,n,o),Eg(s,n,e,i,o);for(var l=1;a>0;a--)l*=.99,kZ(s,l,o),Eg(s,n,e,i,o),BZ(s,l,o),Eg(s,n,e,i,o)}function IZ(r,t){var e=[],i=t==="vertical"?"y":"x",n=Qy(r,function(a){return a.getLayout()[i]});return n.keys.sort(function(a,o){return a-o}),A(n.keys,function(a){e.push(n.buckets.get(a))}),e}function PZ(r,t,e,i,n,a){var o=1/0;A(r,function(s){var l=s.length,u=0;A(s,function(c){u+=c.getLayout().value});var h=a==="vertical"?(i-(l-1)*n)/u:(e-(l-1)*n)/u;h<o&&(o=h)}),A(r,function(s){A(s,function(l,u){var h=l.getLayout().value*o;a==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:h},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:h},!0))})}),A(t,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Eg(r,t,e,i,n){var a=n==="vertical"?"x":"y";A(r,function(o){o.sort(function(p,g){return p.getLayout()[a]-g.getLayout()[a]});for(var s,l,u,h=0,c=o.length,f=n==="vertical"?"dx":"dy",v=0;v<c;v++)l=o[v],u=h-l.getLayout()[a],u>0&&(s=l.getLayout()[a]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[a]+l.getLayout()[f]+t;var d=n==="vertical"?i:e;if(u=h-t-d,u>0){s=l.getLayout()[a]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),h=s;for(var v=c-2;v>=0;--v)l=o[v],u=l.getLayout()[a]+l.getLayout()[f]+t-h,u>0&&(s=l.getLayout()[a]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[a]}})}function kZ(r,t,e){A(r.slice().reverse(),function(i){A(i,function(n){if(n.outEdges.length){var a=Gn(n.outEdges,RZ,e)/Gn(n.outEdges,pv);if(isNaN(a)){var o=n.outEdges.length;a=o?Gn(n.outEdges,EZ,e)/o:0}if(e==="vertical"){var s=n.getLayout().x+(a-jn(n,e))*t;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(a-jn(n,e))*t;n.setLayout({y:l},!0)}}})})}function RZ(r,t){return jn(r.node2,t)*r.getValue()}function EZ(r,t){return jn(r.node2,t)}function OZ(r,t){return jn(r.node1,t)*r.getValue()}function NZ(r,t){return jn(r.node1,t)}function jn(r,t){return t==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function pv(r){return r.getValue()}function Gn(r,t,e){for(var i=0,n=r.length,a=-1;++a<n;){var o=+t(r[a],e);isNaN(o)||(i+=o)}return i}function BZ(r,t,e){A(r,function(i){A(i,function(n){if(n.inEdges.length){var a=Gn(n.inEdges,OZ,e)/Gn(n.inEdges,pv);if(isNaN(a)){var o=n.inEdges.length;a=o?Gn(n.inEdges,NZ,e)/o:0}if(e==="vertical"){var s=n.getLayout().x+(a-jn(n,e))*t;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(a-jn(n,e))*t;n.setLayout({y:l},!0)}}})})}function zZ(r,t){var e=t==="vertical"?"x":"y";A(r,function(i){i.outEdges.sort(function(n,a){return n.node2.getLayout()[e]-a.node2.getLayout()[e]}),i.inEdges.sort(function(n,a){return n.node1.getLayout()[e]-a.node1.getLayout()[e]})}),A(r,function(i){var n=0,a=0;A(i.outEdges,function(o){o.setLayout({sy:n},!0),n+=o.getLayout().dy}),A(i.inEdges,function(o){o.setLayout({ty:a},!0),a+=o.getLayout().dy})})}function VZ(r){r.eachSeriesByType("sankey",function(t){var e=t.getGraph(),i=e.nodes,n=e.edges;if(i.length){var a=1/0,o=-1/0;A(i,function(s){var l=s.getLayout().value;l<a&&(a=l),l>o&&(o=l)}),A(i,function(s){var l=new ye({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),h=s.getModel().get(["itemStyle","color"]);h!=null?(s.setVisual("color",h),s.setVisual("style",{fill:h})):(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 FZ(r){r.registerChartView(mZ),r.registerSeriesModel(xZ),r.registerLayout(bZ),r.registerVisual(VZ),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(i){i.setNodePosition(t.dataIndex,[t.localX,t.localY])})})}var nE=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 i,n=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=a.get("type"),l;o==="category"?(t.layout="horizontal",i=n.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",i=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],h=t.layout==="horizontal"?0:1,c=this._baseAxisDim=u[h],f=u[1-h],v=[n,a],d=v[h].get("type"),p=v[1-h].get("type"),g=t.data;if(g&&l){var y=[];A(g,function(x,b){var S;V(x)?(S=x.slice(),x.unshift(b)):V(x.value)?(S=z({},x),S.value=S.value.slice(),x.value.unshift(b)):S=x,y.push(S)}),t.data=y}var m=this.defaultValueDimensions,_=[{name:c,type:nv(d),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:nv(p),dimsDef:m.slice()}];return Qs(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:ut(kI,_,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r}(),aE=function(r){E(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:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(zt);re(aE,nE,!0);var GZ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=e.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=e.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var h=a.getItemLayout(u),c=cC(h,a,u,l,!0);a.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,h){var c=s.getItemGraphicEl(h);if(!a.hasValue(u)){o.remove(c);return}var f=a.getItemLayout(u);c?(ri(c),oE(f,c,a,u)):c=cC(f,a,u,l),o.add(c),a.setItemGraphicEl(u,c)}).remove(function(u){var h=s.getItemGraphicEl(u);h&&o.remove(h)}).execute(),this._data=a},t.prototype.remove=function(e){var i=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(a){a&&i.remove(a)})},t.type="boxplot",t}(Ot),HZ=function(){function r(){}return r}(),WZ=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="boxplotBoxPath",i}return t.prototype.getDefaultShape=function(){return new HZ},t.prototype.buildPath=function(e,i){var n=i.points,a=0;for(e.moveTo(n[a][0],n[a][1]),a++;a<4;a++)e.lineTo(n[a][0],n[a][1]);for(e.closePath();a<n.length;a++)e.moveTo(n[a][0],n[a][1]),a++,e.lineTo(n[a][0],n[a][1])},t}(_t);function cC(r,t,e,i,n){var a=r.ends,o=new WZ({shape:{points:n?UZ(a,i,r):a}});return oE(r,o,t,e,n),o}function oE(r,t,e,i,n){var a=e.hostModel,o=wo[n?"initProps":"updateProps"];o(t,{shape:{points:r.ends}},a,i),t.useStyle(e.getItemVisual(i,"style")),t.style.strokeNoScale=!0,t.z2=100;var s=e.getItemModel(i),l=s.getModel("emphasis");Ce(t,s),Kt(t,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function UZ(r,t,e){return F(r,function(i){return i=i.slice(),i[t]=e.initBaseline,i})}var xu=A;function YZ(r){var t=$Z(r);xu(t,function(e){var i=e.seriesModels;i.length&&(XZ(e),xu(i,function(n,a){ZZ(n,e.boxOffsetList[a],e.boxWidthList[a])}))})}function $Z(r){var t=[],e=[];return r.eachSeriesByType("boxplot",function(i){var n=i.getBaseAxis(),a=vt(e,n);a<0&&(a=e.length,e[a]=n,t[a]={axis:n,seriesModels:[]}),t[a].seriesModels.push(i)}),t}function XZ(r){var t=r.axis,e=r.seriesModels,i=e.length,n=r.boxWidthList=[],a=r.boxOffsetList=[],o=[],s;if(t.type==="category")s=t.getBandWidth();else{var l=0;xu(e,function(d){l=Math.max(l,d.getData().count())});var u=t.getExtent();s=Math.abs(u[1]-u[0])/l}xu(e,function(d){var p=d.get("boxWidth");V(p)||(p=[p,p]),o.push([U(p[0],s)||0,U(p[1],s)||0])});var h=s*.8-2,c=h/i*.3,f=(h-c*(i-1))/i,v=f/2-h/2;xu(e,function(d,p){a.push(v),v+=c+f,n.push(Math.min(Math.max(f,o[p][0]),o[p][1]))})}function ZZ(r,t,e){var i=r.coordinateSystem,n=r.getData(),a=e/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=n.mapDimension(l[o]),h=n.mapDimensionsAll(l[s]);if(u==null||h.length<5)return;for(var c=0;c<n.count();c++){var f=n.get(u,c),v=_(f,h[2],c),d=_(f,h[0],c),p=_(f,h[1],c),g=_(f,h[3],c),y=_(f,h[4],c),m=[];x(m,p,!1),x(m,g,!0),m.push(d,p,y,g),b(m,d),b(m,y),b(m,v),n.setItemLayout(c,{initBaseline:v[s],ends:m})}function _(S,w,T){var M=n.get(w,T),C=[];C[o]=S,C[s]=M;var D;return isNaN(S)||isNaN(M)?D=[NaN,NaN]:(D=i.dataToPoint(C),D[o]+=t),D}function x(S,w,T){var M=w.slice(),C=w.slice();M[o]+=a,C[o]-=a,T?S.push(M,C):S.push(C,M)}function b(S,w){var T=w.slice(),M=w.slice();T[o]-=a,M[o]+=a,S.push(T,M)}}function jZ(r,t){t=t||{};for(var e=[],i=[],n=t.boundIQR,a=n==="none"||n===0,o=0;o<r.length;o++){var s=fr(r[o].slice()),l=sf(s,.25),u=sf(s,.5),h=sf(s,.75),c=s[0],f=s[s.length-1],v=(n??1.5)*(h-l),d=a?c:Math.max(c,l-v),p=a?f:Math.min(f,h+v),g=t.itemNameFormatter,y=Q(g)?g({value:o}):Y(g)?g.replace("{value}",o+""):o+"";e.push([y,d,l,u,h,p]);for(var m=0;m<s.length;m++){var _=s[m];if(_<d||_>p){var x=[y,_];i.push(x)}}}return{boxData:e,outliers:i}}var qZ={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==He){var i="";kt(i)}var n=jZ(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function KZ(r){r.registerSeriesModel(aE),r.registerChartView(GZ),r.registerLayout(YZ),r.registerTransform(qZ)}var JZ=["itemStyle","borderColor"],QZ=["itemStyle","borderColor0"],tj=["itemStyle","borderColorDoji"],ej=["itemStyle","color"],rj=["itemStyle","color0"];function kx(r,t){return t.get(r>0?ej:rj)}function Rx(r,t){return t.get(r===0?tj:r>0?JZ:QZ)}var ij={seriesType:"candlestick",plan:Xs(),performRawSeries:!0,reset:function(r,t){if(!t.isSeriesFiltered(r)){var e=r.pipelineContext.large;return!e&&{progress:function(i,n){for(var a;(a=i.next())!=null;){var o=n.getItemModel(a),s=n.getItemLayout(a).sign,l=o.getItemStyle();l.fill=kx(s,o),l.stroke=Rx(s,o)||l.fill;var u=n.ensureUniqueItemVisual(a,"style");z(u,l)}}}}}},nj=["color","borderColor"],aj=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,i,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,i,n,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,i):this._incrementalRenderNormal(e,i)},t.prototype.eachRendered=function(e){ta(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var i=e.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},t.prototype._renderNormal=function(e){var i=e.getData(),n=this._data,a=this.group,o=i.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),i.diff(n).add(function(h){if(i.hasValue(h)){var c=i.getItemLayout(h);if(s&&fC(u,c))return;var f=Og(c,h,!0);$t(f,{shape:{points:c.ends}},e,h),Ng(f,i,h,o),a.add(f),i.setItemGraphicEl(h,f)}}).update(function(h,c){var f=n.getItemGraphicEl(c);if(!i.hasValue(h)){a.remove(f);return}var v=i.getItemLayout(h);if(s&&fC(u,v)){a.remove(f);return}f?(At(f,{shape:{points:v.ends}},e,h),ri(f)):f=Og(v),Ng(f,i,h,o),a.add(f),i.setItemGraphicEl(h,f)}).remove(function(h){var c=n.getItemGraphicEl(h);c&&a.remove(c)}).execute(),this._data=i},t.prototype._renderLarge=function(e){this._clear(),vC(e,this.group);var i=e.get("clip",!0)?Th(e.coordinateSystem,!1,e):null;i?this.group.setClipPath(i):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,i){for(var n=i.getData(),a=n.getLayout("isSimpleBox"),o;(o=e.next())!=null;){var s=n.getItemLayout(o),l=Og(s);Ng(l,n,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,i){vC(i,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}(Ot),oj=function(){function r(){}return r}(),sj=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="normalCandlestickBox",i}return t.prototype.getDefaultShape=function(){return new oj},t.prototype.buildPath=function(e,i){var n=i.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}(_t);function Og(r,t,e){var i=r.ends;return new sj({shape:{points:e?lj(i,r):i},z2:100})}function fC(r,t){for(var e=!0,i=0;i<t.ends.length;i++)if(r.contain(t.ends[i][0],t.ends[i][1])){e=!1;break}return e}function Ng(r,t,e,i){var n=t.getItemModel(e);r.useStyle(t.getItemVisual(e,"style")),r.style.strokeNoScale=!0,r.__simpleBox=i,Ce(r,n);var a=t.getItemLayout(e).sign;A(r.states,function(s,l){var u=n.getModel(l),h=kx(a,u),c=Rx(a,u)||h,f=s.style||(s.style={});h&&(f.fill=h),c&&(f.stroke=c)});var o=n.getModel("emphasis");Kt(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function lj(r,t){return F(r,function(e){return e=e.slice(),e[1]=t.initBaseline,e})}var uj=function(){function r(){}return r}(),Bg=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="largeCandlestickBox",i}return t.prototype.getDefaultShape=function(){return new uj},t.prototype.buildPath=function(e,i){for(var n=i.points,a=0;a<n.length;)if(this.__sign===n[a++]){var o=n[a++];e.moveTo(o,n[a++]),e.lineTo(o,n[a++])}else a+=3},t}(_t);function vC(r,t,e,i){var n=r.getData(),a=n.getLayout("largePoints"),o=new Bg({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});t.add(o);var s=new Bg({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var l=new Bg({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});t.add(l),zg(1,o,r),zg(-1,s,r),zg(0,l,r),i&&(o.incremental=!0,s.incremental=!0),e&&e.push(o,s)}function zg(r,t,e,i){var n=Rx(r,e)||kx(r,e),a=e.getModel("itemStyle").getItemStyle(nj);t.useStyle(a),t.style.fill=null,t.style.stroke=n}var sE=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],e}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,i,n){var a=i.getItemLayout(e);return a&&n.rect(a.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(zt);re(sE,nE,!0);function hj(r){!r||!V(r.series)||A(r.series,function(t){et(t)&&t.type==="k"&&(t.type="candlestick")})}var cj={seriesType:"candlestick",plan:Xs(),reset:function(r){var t=r.coordinateSystem,e=r.getData(),i=fj(r,e),n=0,a=1,o=["x","y"],s=e.getDimensionIndex(e.mapDimension(o[n])),l=F(e.mapDimensionsAll(o[a]),e.getDimensionIndex,e),u=l[0],h=l[1],c=l[2],f=l[3];if(e.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?d:v};function v(p,g){for(var y,m=g.getStore();(y=p.next())!=null;){var _=m.get(s,y),x=m.get(u,y),b=m.get(h,y),S=m.get(c,y),w=m.get(f,y),T=Math.min(x,b),M=Math.max(x,b),C=N(T,_),D=N(M,_),L=N(S,_),I=N(w,_),P=[];O(P,D,0),O(P,C,1),P.push(G(I),G(D),G(L),G(C));var k=g.getItemModel(y),R=!!k.get(["itemStyle","borderColorDoji"]);g.setItemLayout(y,{sign:dC(m,y,x,b,h,R),initBaseline:x>b?D[a]:C[a],ends:P,brushRect:B(S,w,_)})}function N(H,W){var q=[];return q[n]=W,q[a]=H,isNaN(W)||isNaN(H)?[NaN,NaN]:t.dataToPoint(q)}function O(H,W,q){var K=W.slice(),nt=W.slice();K[n]=hf(K[n]+i/2,1,!1),nt[n]=hf(nt[n]-i/2,1,!0),q?H.push(K,nt):H.push(nt,K)}function B(H,W,q){var K=N(H,q),nt=N(W,q);return K[n]-=i/2,nt[n]-=i/2,{x:K[0],y:K[1],width:i,height:nt[1]-K[1]}}function G(H){return H[n]=hf(H[n],1),H}}function d(p,g){for(var y=yi(p.count*4),m=0,_,x=[],b=[],S,w=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(S=p.next())!=null;){var M=w.get(s,S),C=w.get(u,S),D=w.get(h,S),L=w.get(c,S),I=w.get(f,S);if(isNaN(M)||isNaN(L)||isNaN(I)){y[m++]=NaN,m+=3;continue}y[m++]=dC(w,S,C,D,h,T),x[n]=M,x[a]=L,_=t.dataToPoint(x,null,b),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,x[a]=I,_=t.dataToPoint(x,null,b),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function dC(r,t,e,i,n,a){var o;return e>i?o=-1:e<i?o=1:o=a?0:t>0?r.get(n,t-1)<=i?1:-1:1,o}function fj(r,t){var e=r.getBaseAxis(),i,n=e.type==="category"?e.getBandWidth():(i=e.getExtent(),Math.abs(i[1]-i[0])/t.count()),a=U(lt(r.get("barMaxWidth"),n),n),o=U(lt(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?U(s,n):Math.max(Math.min(n/2,a),o)}function vj(r){r.registerChartView(aj),r.registerSeriesModel(sE),r.registerPreprocessor(hj),r.registerVisual(ij),r.registerLayout(cj)}function pC(r,t){var e=t.rippleEffectColor||t.color;r.eachChild(function(i){i.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?e:null,fill:t.brushType==="fill"?e:null}})})}var dj=function(r){E(t,r);function t(e,i){var n=r.call(this)||this,a=new Sh(e,i),o=new at;return n.add(a),n.add(o),n.updateData(e,i),n}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var i=e.symbolType,n=e.color,a=e.rippleNumber,o=this.childAt(1),s=0;s<a;s++){var l=ae(i,-1,-1,2,2,n);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/a*e.period+e.effectOffset;l.animate("",!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(e.period,{opacity:0}).delay(u).start(),o.add(l)}pC(o,e)},t.prototype.updateEffectAnimation=function(e){for(var i=this._effectCfg,n=this.childAt(1),a=["symbolType","period","rippleScale","rippleNumber"],o=0;o<a.length;o++){var s=a[o];if(i[s]!==e[s]){this.stopEffectAnimation(),this.startEffectAnimation(e);return}}pC(n,e)},t.prototype.highlight=function(){Ki(this)},t.prototype.downplay=function(){Ji(this)},t.prototype.getSymbolType=function(){var e=this.childAt(0);return e&&e.getSymbolType()},t.prototype.updateData=function(e,i){var n=this,a=e.hostModel;this.childAt(0).updateData(e,i);var o=this.childAt(1),s=e.getItemModel(i),l=e.getItemVisual(i,"symbol"),u=js(e.getItemVisual(i,"symbolSize")),h=e.getItemVisual(i,"style"),c=h&&h.fill,f=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",c)});var v=Mo(e.getItemVisual(i,"symbolOffset"),u);v&&(o.x=v[0],o.y=v[1]);var d=e.getItemVisual(i,"symbolRotate");o.rotation=(d||0)*Math.PI/180||0;var p={};p.showEffectOn=a.get("showEffectOn"),p.rippleScale=s.get(["rippleEffect","scale"]),p.brushType=s.get(["rippleEffect","brushType"]),p.period=s.get(["rippleEffect","period"])*1e3,p.effectOffset=i/e.count(),p.z=a.getShallow("z")||0,p.zlevel=a.getShallow("zlevel")||0,p.symbolType=l,p.color=c,p.rippleEffectColor=s.get(["rippleEffect","color"]),p.rippleNumber=s.get(["rippleEffect","number"]),p.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?p.showEffectOn!=="render"&&n.startEffectAnimation(p):g==="normal"&&p.showEffectOn!=="render"&&n.stopEffectAnimation()}),this._effectCfg=p,Kt(this,f.get("focus"),f.get("blurScope"),f.get("disabled"))},t.prototype.fadeOut=function(e){e&&e()},t}(at),pj=function(r){E(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._symbolDraw=new wh(dj)},t.prototype.render=function(e,i,n){var a=e.getData(),o=this._symbolDraw;o.updateData(a,{clipShape:this._getClipShape(e)}),this.group.add(o.group)},t.prototype._getClipShape=function(e){var i=e.coordinateSystem,n=i&&i.getArea&&i.getArea();return e.get("clip",!0)?n:null},t.prototype.updateTransform=function(e,i,n){var a=e.getData();this.group.dirty();var o=Mh("").reset(e,i,n);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(e){var i=e.coordinateSystem;i&&i.getRoamTransform&&(this.group.transform=UL(i.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(e,i){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t}(Ot),gj=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,i){return Li(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(e,i,n){return n.point(i.getItemLayout(e))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},t}(zt);function yj(r){r.registerChartView(pj),r.registerSeriesModel(gj),r.registerLayout(Mh("effectScatter"))}var lE=function(r){E(t,r);function t(e,i,n){var a=r.call(this)||this;return a.add(a.createLine(e,i,n)),a._updateEffectSymbol(e,i),a}return t.prototype.createLine=function(e,i,n){return new Sx(e,i,n)},t.prototype._updateEffectSymbol=function(e,i){var n=e.getItemModel(i),a=n.getModel("effect"),o=a.get("symbolSize"),s=a.get("symbol");V(o)||(o=[o,o]);var l=e.getItemVisual(i,"style"),u=a.get("color")||l&&l.stroke,h=this.childAt(1);this._symbolType!==s&&(this.remove(h),h=ae(s,-.5,-.5,1,1,u),h.z2=100,h.culling=!0,this.add(h)),h&&(h.setStyle("shadowColor",u),h.setStyle(a.getItemStyle(["color"])),h.scaleX=o[0],h.scaleY=o[1],h.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(e,a,i))},t.prototype._updateEffectAnimation=function(e,i,n){var a=this.childAt(1);if(a){var o=e.getItemLayout(n),s=i.get("period")*1e3,l=i.get("loop"),u=i.get("roundTrip"),h=i.get("constantSpeed"),c=pe(i.get("delay"),function(v){return v/e.count()*s/3});if(a.ignore=!0,this._updateAnimationPoints(a,o),h>0&&(s=this._getLineLength(a)/h*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var f=void 0;Q(c)?f=c(n):f=c,a.__t>0&&(f=-s*a.__t),this._animateSymbol(a,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(e,i,n,a,o){if(i>0){e.__t=0;var s=this,l=e.animate("",a).when(o?i*2:i,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(e)});a||l.done(function(){s.remove(e)}),l.start()}},t.prototype._getLineLength=function(e){return Wi(e.__p1,e.__cp1)+Wi(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,i){e.__p1=i[0],e.__p2=i[1],e.__cp1=i[2]||[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2]},t.prototype.updateData=function(e,i,n){this.childAt(0).updateData(e,i,n),this._updateEffectSymbol(e,i)},t.prototype._updateSymbolPosition=function(e){var i=e.__p1,n=e.__p2,a=e.__cp1,o=e.__t<1?e.__t:2-e.__t,s=[e.x,e.y],l=s.slice(),u=be,h=By;s[0]=u(i[0],a[0],n[0],o),s[1]=u(i[1],a[1],n[1],o);var c=e.__t<1?h(i[0],a[0],n[0],o):h(n[0],a[0],i[0],1-o),f=e.__t<1?h(i[1],a[1],n[1],o):h(n[1],a[1],i[1],1-o);e.rotation=-Math.atan2(f,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(e.__lastT!==void 0&&e.__lastT<e.__t?(e.scaleY=Wi(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):e.__lastT===1?e.scaleY=2*Wi(i,s):e.scaleY=this._symbolScale[1]),e.__lastT=e.__t,e.ignore=!1,e.x=s[0],e.y=s[1]},t.prototype.updateLayout=function(e,i){this.childAt(0).updateLayout(e,i);var n=e.getItemModel(i).getModel("effect");this._updateEffectAnimation(e,n,i)},t}(at),uE=function(r){E(t,r);function t(e,i,n){var a=r.call(this)||this;return a._createPolyline(e,i,n),a}return t.prototype._createPolyline=function(e,i,n){var a=e.getItemLayout(i),o=new We({shape:{points:a}});this.add(o),this._updateCommonStl(e,i,n)},t.prototype.updateData=function(e,i,n){var a=e.hostModel,o=this.childAt(0),s={shape:{points:e.getItemLayout(i)}};At(o,s,a,i),this._updateCommonStl(e,i,n)},t.prototype._updateCommonStl=function(e,i,n){var a=this.childAt(0),o=e.getItemModel(i),s=n&&n.emphasisLineStyle,l=n&&n.focus,u=n&&n.blurScope,h=n&&n.emphasisDisabled;if(!n||e.hasItemOption){var c=o.getModel("emphasis");s=c.getModel("lineStyle").getLineStyle(),h=c.get("disabled"),l=c.get("focus"),u=c.get("blurScope")}a.useStyle(e.getItemVisual(i,"style")),a.style.fill=null,a.style.strokeNoScale=!0;var f=a.ensureState("emphasis");f.style=s,Kt(this,l,u,h)},t.prototype.updateLayout=function(e,i){var n=this.childAt(0);n.setShape("points",e.getItemLayout(i))},t}(at),mj=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._lastFrame=0,e._lastFramePercent=0,e}return t.prototype.createLine=function(e,i,n){return new uE(e,i,n)},t.prototype._updateAnimationPoints=function(e,i){this._points=i;for(var n=[0],a=0,o=1;o<i.length;o++){var s=i[o-1],l=i[o];a+=Wi(s,l),n.push(a)}if(a===0){this._length=0;return}for(var o=0;o<n.length;o++)n[o]/=a;this._offsets=n,this._length=a},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(e){var i=e.__t<1?e.__t:2-e.__t,n=this._points,a=this._offsets,o=n.length;if(a){var s=this._lastFrame,l;if(i<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(a[l]<=i);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(a[l]>i);l++);l=Math.min(l-1,o-2)}var h=(i-a[l])/(a[l+1]-a[l]),c=n[l],f=n[l+1];e.x=c[0]*(1-h)+h*f[0],e.y=c[1]*(1-h)+h*f[1];var v=e.__t<1?f[0]-c[0]:c[0]-f[0],d=e.__t<1?f[1]-c[1]:c[1]-f[1];e.rotation=-Math.atan2(d,v)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=i,e.ignore=!1}},t}(lE),_j=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),xj=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i._off=0,i.hoverDataIdx=-1,i}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new _j},t.prototype.buildPath=function(e,i){var n=i.segs,a=i.curveness,o;if(i.polyline)for(o=this._off;o<n.length;){var s=n[o++];if(s>0){e.moveTo(n[o++],n[o++]);for(var l=1;l<s;l++)e.lineTo(n[o++],n[o++])}}else for(o=this._off;o<n.length;){var u=n[o++],h=n[o++],c=n[o++],f=n[o++];if(e.moveTo(u,h),a>0){var v=(u+c)/2-(h-f)*a,d=(h+f)/2-(c-u)*a;e.quadraticCurveTo(v,d,c,f)}else e.lineTo(c,f)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(e,i){var n=this.shape,a=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u<a.length;){var h=a[u++];if(h>0)for(var c=a[u++],f=a[u++],v=1;v<h;v++){var d=a[u++],p=a[u++];if(_n(c,f,d,p,s,e,i))return l}l++}else for(var l=0,u=0;u<a.length;){var c=a[u++],f=a[u++],d=a[u++],p=a[u++];if(o>0){var g=(c+d)/2-(f-p)*o,y=(f+p)/2-(d-c)*o;if(O2(c,f,g,y,d,p,s,e,i))return l}else if(_n(c,f,d,p,s,e,i))return l;l++}return-1},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect();if(e=n[0],i=n[1],a.contain(e,i)){var o=this.hoverDataIdx=this.findDataIndex(e,i);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var i=this.shape,n=i.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<n.length;){var h=n[u++],c=n[u++];a=Math.min(h,a),s=Math.max(h,s),o=Math.min(c,o),l=Math.max(c,l)}e=this._rect=new ft(a,o,s,l)}return e},t}(_t),bj=function(){function r(){this.group=new at}return r.prototype.updateData=function(t){this._clear();var e=this._create();e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t)},r.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(t,e){var i=this._newAdded[0],n=e.getLayout("linesPoints"),a=i&&i.shape.segs;if(a&&a.length<2e4){var o=a.length,s=new Float32Array(o+n.length);s.set(a),s.set(n,o),i.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:n}),this._setCommon(l,e),l.__startIndex=t.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},r.prototype._create=function(){var t=new xj({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},r.prototype._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get(["lineStyle","curveness"])}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var a=e.getVisual("style");a&&a.stroke&&t.setStyle("stroke",a.stroke),t.setStyle("fill",null);var o=ot(t);o.seriesIndex=n.seriesIndex,t.on("mousemove",function(s){o.dataIndex=null;var l=t.hoverDataIdx;l>0&&(o.dataIndex=l+t.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),hE={seriesType:"lines",plan:Xs(),reset:function(r){var t=r.coordinateSystem;if(t){var e=r.get("polyline"),i=r.pipelineContext.large;return{progress:function(n,a){var o=[];if(i){var s=void 0,l=n.end-n.start;if(e){for(var u=0,h=n.start;h<n.end;h++)u+=r.getLineCoordsCount(h);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var c=0,f=[],h=n.start;h<n.end;h++){var v=r.getLineCoords(h,o);e&&(s[c++]=v);for(var d=0;d<v;d++)f=t.dataToPoint(o[d],!1,f),s[c++]=f[0],s[c++]=f[1]}a.setLayout("linesPoints",s)}else for(var h=n.start;h<n.end;h++){var p=a.getItemModel(h),v=r.getLineCoords(h,o),g=[];if(e)for(var y=0;y<v;y++)g.push(t.dataToPoint(o[y]));else{g[0]=t.dataToPoint(o[0]),g[1]=t.dataToPoint(o[1]);var m=p.get(["lineStyle","curveness"]);+m&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*m,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*m])}a.setItemLayout(h,g)}}}}}},Sj=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=e.getData(),o=this._updateLineDraw(a,e),s=e.get("zlevel"),l=e.get(["effect","trailLength"]),u=n.getZr(),h=u.painter.getType()==="svg";h||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!h&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&l>0&&(h||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var c=e.get("clip",!0)&&Th(e.coordinateSystem,!1,e);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,i,n){var a=e.getData(),o=this._updateLineDraw(a,e);o.incrementalPrepareUpdate(a),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,i,n){this._lineDraw.incrementalUpdate(e,i.getData()),this._finished=e.end===i.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,i,n){var a=e.getData(),o=e.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=hE.reset(e,i,n);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,i){var n=this._lineDraw,a=this._showEffect(i),o=!!i.get("polyline"),s=i.pipelineContext,l=s.large;return(!n||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new bj:new Tx(o?a?mj:uE:a?lE:Sx),this._hasEffet=a,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 i=e.getZr(),n=i.painter.getType()==="svg";!n&&this._lastZlevel!=null&&i.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,i){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(i)},t.prototype.dispose=function(e,i){this.remove(e,i)},t.type="lines",t}(Ot),wj=typeof Uint32Array>"u"?Array:Uint32Array,Tj=typeof Float64Array>"u"?Array:Float64Array;function gC(r){var t=r.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(r.data=F(t,function(e){var i=[e[0].coord,e[1].coord],n={coords:i};return e[0].name&&(n.fromName=e[0].name),e[1].name&&(n.toName=e[1].name),zv([n,e[0],e[1]])}))}var Mj=function(r){E(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||[],gC(e);var i=this._processFlatCoordsArray(e.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(e.data=new Float32Array(i.count)),r.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(e){if(gC(e),e.data){var i=this._processFlatCoordsArray(e.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(e.data=new Float32Array(i.count))}r.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var i=this._processFlatCoordsArray(e.data);i.flatCoords&&(this._flatCoords?(this._flatCoords=ws(this._flatCoords,i.flatCoords),this._flatCoordsOffset=ws(this._flatCoordsOffset,i.flatCoordsOffset)):(this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset),e.data=new Float32Array(i.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var i=this.getData().getItemModel(e),n=i.option instanceof Array?i.option:i.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,i){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[e*2],a=this._flatCoordsOffset[e*2+1],o=0;o<a;o++)i[o]=i[o]||[],i[o][0]=this._flatCoords[n+o*2],i[o][1]=this._flatCoords[n+o*2+1];return a}else{for(var s=this._getCoordsFromItemModel(e),o=0;o<s.length;o++)i[o]=i[o]||[],i[o][0]=s[o][0],i[o][1]=s[o][1];return s.length}},t.prototype._processFlatCoordsArray=function(e){var i=0;if(this._flatCoords&&(i=this._flatCoords.length),Mt(e[0])){for(var n=e.length,a=new wj(n),o=new Tj(n),s=0,l=0,u=0,h=0;h<n;){u++;var c=e[h++];a[l++]=s+i,a[l++]=c;for(var f=0;f<c;f++){var v=e[h++],d=e[h++];o[s++]=v,o[s++]=d}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},t.prototype.getInitialData=function(e,i){var n=new Be(["value"],this);return n.hasItemOption=!1,n.initData(e.data,[],function(a,o,s,l){if(a instanceof Array)return NaN;n.hasItemOption=!0;var u=a.value;if(u!=null)return u instanceof Array?u[l]:u}),n},t.prototype.formatTooltip=function(e,i,n){var a=this.getData(),o=a.getItemModel(e),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),h=[];return l!=null&&h.push(l),u!=null&&h.push(u),_e("nameValue",{name:h.join(" > ")})},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"),i=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&i>0?i+"":""},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}(zt);function Nc(r){return r instanceof Array||(r=[r,r]),r}var Cj={seriesType:"lines",reset:function(r){var t=Nc(r.get("symbol")),e=Nc(r.get("symbolSize")),i=r.getData();i.setVisual("fromSymbol",t&&t[0]),i.setVisual("toSymbol",t&&t[1]),i.setVisual("fromSymbolSize",e&&e[0]),i.setVisual("toSymbolSize",e&&e[1]);function n(a,o){var s=a.getItemModel(o),l=Nc(s.getShallow("symbol",!0)),u=Nc(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:i.hasItemOption?n:null}}};function Aj(r){r.registerChartView(Sj),r.registerSeriesModel(Mj),r.registerLayout(hE),r.registerVisual(Cj)}var Dj=256,Lj=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=Qr.createCanvas();this.canvas=t}return r.prototype.update=function(t,e,i,n,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),h=this.pointSize+this.blurSize,c=this.canvas,f=c.getContext("2d"),v=t.length;c.width=e,c.height=i;for(var d=0;d<v;++d){var p=t[d],g=p[0],y=p[1],m=p[2],_=n(m);f.globalAlpha=_,f.drawImage(s,g-h,y-h)}if(!c.width||!c.height)return c;for(var x=f.getImageData(0,0,c.width,c.height),b=x.data,S=0,w=b.length,T=this.minOpacity,M=this.maxOpacity,C=M-T;S<w;){var _=b[S+3]/256,D=Math.floor(_*(Dj-1))*4;if(_>0){var L=o(_)?l:u;_>0&&(_=_*C+T),b[S++]=L[D],b[S++]=L[D+1],b[S++]=L[D+2],b[S++]=L[D+3]*_*256}else S+=4}return f.putImageData(x,0,0),c},r.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=Qr.createCanvas()),e=this.pointSize+this.blurSize,i=e*2;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",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 i=this._gradientPixels,n=i[e]||(i[e]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)t[e](s/255,!0,a),n[o++]=a[0],n[o++]=a[1],n[o++]=a[2],n[o++]=a[3];return n},r}();function Ij(r,t,e){var i=r[1]-r[0];t=F(t,function(o){return{interval:[(o.interval[0]-r[0])/i,(o.interval[1]-r[0])/i]}});var n=t.length,a=0;return function(o){var s;for(s=a;s<n;s++){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}if(s===n)for(s=a-1;s>=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s<n&&e[s]}}function Pj(r,t){var e=r[1]-r[0];return t=[(t[0]-r[0])/e,(t[1]-r[0])/e],function(i){return i>=t[0]&&i<=t[1]}}function yC(r){var t=r.dimensions;return t[0]==="lng"&&t[1]==="lat"}var kj=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a;i.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===e&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):yC(o)&&this._renderOnGeo(o,e,a,n)},t.prototype.incrementalPrepareRender=function(e,i,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,i,n,a){var o=i.coordinateSystem;o&&(yC(o)?this.render(i,n,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(i,a,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){ta(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,i,n,a,o){var s=e.coordinateSystem,l=Co(s,"cartesian2d"),u,h,c,f;if(l){var v=s.getAxis("x"),d=s.getAxis("y");u=v.getBandWidth()+.5,h=d.getBandWidth()+.5,c=v.scale.getExtent(),f=d.scale.getExtent()}for(var p=this.group,g=e.getData(),y=e.getModel(["emphasis","itemStyle"]).getItemStyle(),m=e.getModel(["blur","itemStyle"]).getItemStyle(),_=e.getModel(["select","itemStyle"]).getItemStyle(),x=e.get(["itemStyle","borderRadius"]),b=me(e),S=e.getModel("emphasis"),w=S.get("focus"),T=S.get("blurScope"),M=S.get("disabled"),C=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],D=n;D<a;D++){var L=void 0,I=g.getItemVisual(D,"style");if(l){var P=g.get(C[0],D),k=g.get(C[1],D);if(isNaN(g.get(C[2],D))||isNaN(P)||isNaN(k)||P<c[0]||P>c[1]||k<f[0]||k>f[1])continue;var R=s.dataToPoint([P,k]);L=new wt({shape:{x:R[0]-u/2,y:R[1]-h/2,width:u,height:h},style:I})}else{if(isNaN(g.get(C[1],D)))continue;L=new wt({z2:1,shape:s.dataToRect([g.get(C[0],D)]).contentShape,style:I})}if(g.hasItemOption){var N=g.getItemModel(D),O=N.getModel("emphasis");y=O.getModel("itemStyle").getItemStyle(),m=N.getModel(["blur","itemStyle"]).getItemStyle(),_=N.getModel(["select","itemStyle"]).getItemStyle(),x=N.get(["itemStyle","borderRadius"]),w=O.get("focus"),T=O.get("blurScope"),M=O.get("disabled"),b=me(N)}L.shape.r=x;var B=e.getRawValue(D),G="-";B&&B[2]!=null&&(G=B[2]+""),Ae(L,b,{labelFetcher:e,labelDataIndex:D,defaultOpacity:I.opacity,defaultText:G}),L.ensureState("emphasis").style=y,L.ensureState("blur").style=m,L.ensureState("select").style=_,Kt(L,w,T,M),L.incremental=o,o&&(L.states.emphasis.hoverLayer=!0),p.add(L),g.setItemGraphicEl(D,L),this._progressiveEls&&this._progressiveEls.push(L)}},t.prototype._renderOnGeo=function(e,i,n,a){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=i.getData(),u=this._hmLayer||this._hmLayer||new Lj;u.blurSize=i.get("blurSize"),u.pointSize=i.get("pointSize"),u.minOpacity=i.get("minOpacity"),u.maxOpacity=i.get("maxOpacity");var h=e.getViewRect().clone(),c=e.getRoamTransform();h.applyTransform(c);var f=Math.max(h.x,0),v=Math.max(h.y,0),d=Math.min(h.width+h.x,a.getWidth()),p=Math.min(h.height+h.y,a.getHeight()),g=d-f,y=p-v,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(w,T,M){var C=e.dataToPoint([w,T]);return C[0]-=f,C[1]-=v,C.push(M),C}),x=n.getExtent(),b=n.type==="visualMap.continuous"?Pj(x,n.option.range):Ij(x,n.getPieceList(),n.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var S=new xe({style:{width:g,height:y,x:f,y:v,image:u.canvas},silent:!0});this.group.add(S)},t.type="heatmap",t}(Ot),Rj=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,i){return Li(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=$s.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"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(zt);function Ej(r){r.registerChartView(kj),r.registerSeriesModel(Rj)}var Oj=["itemStyle","borderWidth"],mC=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Vg=new Ai,Nj=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis(),h=u.isHorizontal(),c=l.master.getRect(),f={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:h,valueDim:mC[+h],categoryDim:mC[1-+h]};o.diff(s).add(function(d){if(o.hasValue(d)){var p=xC(o,d),g=_C(o,d,p,f),y=bC(o,f,g);o.setItemGraphicEl(d,y),a.add(y),wC(y,f,g)}}).update(function(d,p){var g=s.getItemGraphicEl(p);if(!o.hasValue(d)){a.remove(g);return}var y=xC(o,d),m=_C(o,d,y,f),_=gE(o,m);g&&_!==g.__pictorialShapeStr&&(a.remove(g),o.setItemGraphicEl(d,null),g=null),g?Wj(g,f,m):g=bC(o,f,m,!0),o.setItemGraphicEl(d,g),g.__pictorialSymbolMeta=m,a.add(g),wC(g,f,m)}).remove(function(d){var p=s.getItemGraphicEl(d);p&&SC(s,d,p.__pictorialSymbolMeta.animationModel,p)}).execute();var v=e.get("clip",!0)?Th(e.coordinateSystem,!1,e):null;return v?a.setClipPath(v):a.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,i){var n=this.group,a=this._data;e.get("animation")?a&&a.eachItemGraphicEl(function(o){SC(a,ot(o).dataIndex,e,o)}):n.removeAll()},t.type="pictorialBar",t}(Ot);function _C(r,t,e,i){var n=r.getItemLayout(t),a=e.get("symbolRepeat"),o=e.get("symbolClip"),s=e.get("symbolPosition")||"start",l=e.get("symbolRotate"),u=(l||0)*Math.PI/180||0,h=e.get("symbolPatternSize")||2,c=e.isAnimationEnabled(),f={dataIndex:t,layout:n,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:c?e:null,hoverScale:c&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};Bj(e,a,n,i,f),zj(r,t,n,a,o,f.boundingLength,f.pxSign,h,i,f),Vj(e,f.symbolScale,u,i,f);var v=f.symbolSize,d=Mo(e.get("symbolOffset"),v);return Fj(e,v,n,a,o,d,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,i,f),f}function Bj(r,t,e,i,n){var a=i.valueDim,o=r.get("symbolBoundingData"),s=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(e[a.wh]<=0),h;if(V(o)){var c=[Fg(s,o[0])-l,Fg(s,o[1])-l];c[1]<c[0]&&c.reverse(),h=c[u]}else o!=null?h=Fg(s,o)-l:t?h=i.coordSysExtent[a.index][u]-l:h=e[a.wh];n.boundingLength=h,t&&(n.repeatCutLength=e[a.wh]);var f=a.xy==="x",v=s.inverse;n.pxSign=f&&!v||!f&&v?h>=0?1:-1:h>0?1:-1}function Fg(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function zj(r,t,e,i,n,a,o,s,l,u){var h=l.valueDim,c=l.categoryDim,f=Math.abs(e[c.wh]),v=r.getItemVisual(t,"symbolSize"),d;V(v)?d=v.slice():v==null?d=["100%","100%"]:d=[v,v],d[c.index]=U(d[c.index],f),d[h.index]=U(d[h.index],i?f:Math.abs(a)),u.symbolSize=d;var p=u.symbolScale=[d[0]/s,d[1]/s];p[h.index]*=(l.isHorizontal?-1:1)*o}function Vj(r,t,e,i,n){var a=r.get(Oj)||0;a&&(Vg.attr({scaleX:t[0],scaleY:t[1],rotation:e}),Vg.updateTransform(),a/=Vg.getLineScale(),a*=t[i.valueDim.index]),n.valueLineWidth=a||0}function Fj(r,t,e,i,n,a,o,s,l,u,h,c){var f=h.categoryDim,v=h.valueDim,d=c.pxSign,p=Math.max(t[v.index]+s,0),g=p;if(i){var y=Math.abs(l),m=pe(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var x=U(m,t[v.index]),b=Math.max(p+x*2,0),S=_?0:x*2,w=t_(i),T=w?i:TC((y+S)/b),M=y-T*p;x=M/2/(_?T:Math.max(T-1,1)),b=p+x*2,S=_?0:x*2,!w&&i!=="fixed"&&(T=u?TC((Math.abs(u)+S)/b):0),g=T*b-S,c.repeatTimes=T,c.symbolMargin=x}var C=d*(g/2),D=c.pathPosition=[];D[f.index]=e[f.wh]/2,D[v.index]=o==="start"?C:o==="end"?l-C:l/2,a&&(D[0]+=a[0],D[1]+=a[1]);var L=c.bundlePosition=[];L[f.index]=e[f.xy],L[v.index]=e[v.xy];var I=c.barRectShape=z({},e);I[v.wh]=d*Math.max(Math.abs(e[v.wh]),Math.abs(D[v.index]+C)),I[f.wh]=e[f.wh];var P=c.clipShape={};P[f.xy]=-e[f.xy],P[f.wh]=h.ecSize[f.wh],P[v.xy]=0,P[v.wh]=e[v.wh]}function cE(r){var t=r.symbolPatternSize,e=ae(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function fE(r,t,e,i){var n=r.__pictorialBundle,a=e.symbolSize,o=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,h=0,c=a[t.valueDim.index]+o+e.symbolMargin*2;for(Ex(r,function(p){p.__pictorialAnimationIndex=h,p.__pictorialRepeatTimes=u,h<u?ys(p,null,d(h),e,i):ys(p,null,{scaleX:0,scaleY:0},e,i,function(){n.remove(p)}),h++});h<u;h++){var f=cE(e);f.__pictorialAnimationIndex=h,f.__pictorialRepeatTimes=u,n.add(f);var v=d(h);ys(f,{x:v.x,y:v.y,scaleX:0,scaleY:0},{scaleX:v.scaleX,scaleY:v.scaleY,rotation:v.rotation},e,i)}function d(p){var g=s.slice(),y=e.pxSign,m=p;return(e.symbolRepeatDirection==="start"?y>0: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 vE(r,t,e,i){var n=r.__pictorialBundle,a=r.__pictorialMainPath;a?ys(a,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,i):(a=r.__pictorialMainPath=cE(e),n.add(a),ys(a,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,i))}function dE(r,t,e){var i=z({},t.barRectShape),n=r.__pictorialBarRect;n?ys(n,null,{shape:i},t,e):(n=r.__pictorialBarRect=new wt({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function pE(r,t,e,i){if(e.symbolClip){var n=r.__pictorialClipPath,a=z({},e.clipShape),o=t.valueDim,s=e.animationModel,l=e.dataIndex;if(n)At(n,{shape:a},s,l);else{a[o.wh]=0,n=new wt({shape:a}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=e.clipShape[o.wh],wo[i?"updateProps":"initProps"](n,{shape:u},s,l)}}}function xC(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=Gj,e.isAnimationEnabled=Hj,e}function Gj(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function Hj(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function bC(r,t,e,i){var n=new at,a=new at;return n.add(a),n.__pictorialBundle=a,a.x=e.bundlePosition[0],a.y=e.bundlePosition[1],e.symbolRepeat?fE(n,t,e):vE(n,t,e),dE(n,e,i),pE(n,t,e,i),n.__pictorialShapeStr=gE(r,e),n.__pictorialSymbolMeta=e,n}function Wj(r,t,e){var i=e.animationModel,n=e.dataIndex,a=r.__pictorialBundle;At(a,{x:e.bundlePosition[0],y:e.bundlePosition[1]},i,n),e.symbolRepeat?fE(r,t,e,!0):vE(r,t,e,!0),dE(r,e,!0),pE(r,t,e,!0)}function SC(r,t,e,i){var n=i.__pictorialBarRect;n&&n.removeTextContent();var a=[];Ex(i,function(o){a.push(o)}),i.__pictorialMainPath&&a.push(i.__pictorialMainPath),i.__pictorialClipPath&&(e=null),A(a,function(o){Xn(o,{scaleX:0,scaleY:0},e,t,function(){i.parent&&i.parent.remove(i)})}),r.setItemGraphicEl(t,null)}function gE(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function Ex(r,t,e){A(r.__pictorialBundle.children(),function(i){i!==r.__pictorialBarRect&&t.call(e,i)})}function ys(r,t,e,i,n,a){t&&r.attr(t),i.symbolClip&&!n?e&&r.attr(e):e&&wo[n?"updateProps":"initProps"](r,e,i.animationModel,i.dataIndex,a)}function wC(r,t,e){var i=e.dataIndex,n=e.itemModel,a=n.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),h=a.get("focus"),c=a.get("blurScope"),f=a.get("scale");Ex(r,function(p){if(p instanceof xe){var g=p.style;p.useStyle(z({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,f&&(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 v=t.valueDim.posDesc[+(e.boundingLength>0)],d=r.__pictorialBarRect;d.ignoreClip=!0,Ae(d,me(n),{labelFetcher:t.seriesModel,labelDataIndex:i,defaultText:Ls(t.seriesModel.getData(),i),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:v}),Kt(r,h,c,a.get("disabled"))}function TC(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}var Uj=function(r){E(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=ea(ju.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:"#212121"}}}),t}(ju);function Yj(r){r.registerChartView(Nj),r.registerSeriesModel(Uj),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ut(QP,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,tk("pictorialBar"))}var $j=function(r){E(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,i,n){var a=e.getData(),o=this,s=this.group,l=e.getLayerSeries(),u=a.getLayout("layoutInfo"),h=u.rect,c=u.boundaryGap;s.x=0,s.y=h.y+c[0];function f(g){return g.name}var v=new Qi(this._layersSeries||[],l,f,f),d=[];v.add($(p,this,"add")).update($(p,this,"update")).remove($(p,this,"remove")).execute();function p(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var x=[],b=[],S,w=l[y].indices,T=0;T<w.length;T++){var M=a.getItemLayout(w[T]),C=M.x,D=M.y0,L=M.y;x.push(C,D),b.push(C,D+L),S=a.getItemVisual(w[T],"style")}var I,P=a.getItemLayout(w[0]),k=e.getModel("label"),R=k.get("margin"),N=e.getModel("emphasis");if(g==="add"){var O=d[y]=new at;I=new Hk({shape:{points:x,stackedOnPoints:b,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),O.add(I),s.add(O),e.isAnimationEnabled()&&I.setClipPath(Xj(I.getBoundingRect(),e,function(){I.removeClipPath()}))}else{var O=_[m];I=O.childAt(0),s.add(O),d[y]=O,At(I,{shape:{points:x,stackedOnPoints:b}},e),ri(I)}Ae(I,me(e),{labelDataIndex:w[T-1],defaultText:a.getName(w[T-1]),inheritColor:S.fill},{normal:{verticalAlign:"middle"}}),I.setTextConfig({position:null,local:!0});var B=I.getTextContent();B&&(B.x=P.x-R,B.y=P.y0+P.y/2),I.useStyle(S),a.setItemGraphicEl(y,I),Ce(I,e),Kt(I,N.get("focus"),N.get("blurScope"),N.get("disabled"))}this._layersSeries=l,this._layers=d},t.type="themeRiver",t}(Ot);function Xj(r,t,e){var i=new wt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return $t(i,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},t,e),i}var Gg=2,Zj=function(r){E(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 Ah($(this.getData,this),$(this.getRawData,this))},t.prototype.fixData=function(e){var i=e.length,n={},a=Qy(e,function(f){return n.hasOwnProperty(f[0]+"")||(n[f[0]+""]=-1),f[2]}),o=[];a.buckets.each(function(f,v){o.push({name:v,dataList:f})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,h=0;h<o[l].dataList.length;++h){var c=o[l].dataList[h][0]+"";n[c]=l}for(var c in n)n.hasOwnProperty(c)&&n[c]!==l&&(n[c]=l,e[i]=[c,0,u],i++)}return e},t.prototype.getInitialData=function(e,i){for(var n=this.getReferringComponents("singleAxis",le).models[0],a=n.get("type"),o=Dt(e.data,function(d){return d[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=Z(),h=0,c=0;c<s.length;++c)l.push(s[c][Gg]),u.get(s[c][Gg])||(u.set(s[c][Gg],h),h++);var f=qs(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:nv(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,v=new Be(f,this);return v.initData(s),v},t.prototype.getLayerSeries=function(){for(var e=this.getData(),i=e.count(),n=[],a=0;a<i;++a)n[a]=a;var o=e.mapDimension("single"),s=Qy(n,function(u){return e.get("name",u)}),l=[];return s.buckets.each(function(u,h){u.sort(function(c,f){return e.get(o,c)-e.get(o,f)}),l.push({name:h,indices:u})}),l},t.prototype.getAxisTooltipData=function(e,i,n){V(e)||(e=e?[e]:[]);for(var a=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,h=0;h<l;++h){for(var c=Number.MAX_VALUE,f=-1,v=o[h].indices.length,d=0;d<v;++d){var p=a.get(e[0],o[h].indices[d]),g=Math.abs(p-i);g<=c&&(u=p,c=g,f=o[h].indices[d])}s.push(f)}return{dataIndices:s,nestestValue:u}},t.prototype.formatTooltip=function(e,i,n){var a=this.getData(),o=a.getName(e),s=a.get(a.mapDimension("value"),e);return _e("nameValue",{name:o,value:s})},t.type="series.themeRiver",t.dependencies=["singleAxis"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},t}(zt);function jj(r,t){r.eachSeriesByType("themeRiver",function(e){var i=e.getData(),n=e.coordinateSystem,a={},o=n.getRect();a.rect=o;var s=e.get("boundaryGap"),l=n.getAxis();if(a.boundaryGap=s,l.orient==="horizontal"){s[0]=U(s[0],o.height),s[1]=U(s[1],o.height);var u=o.height-s[0]-s[1];MC(i,e,u)}else{s[0]=U(s[0],o.width),s[1]=U(s[1],o.width);var h=o.width-s[0]-s[1];MC(i,e,h)}i.setLayout("layoutInfo",a)})}function MC(r,t,e){if(r.count())for(var i=t.coordinateSystem,n=t.getLayerSeries(),a=r.mapDimension("single"),o=r.mapDimension("value"),s=F(n,function(g){return F(g.indices,function(y){var m=i.dataToPoint(r.get(a,y));return m[1]=r.get(o,y),m})}),l=qj(s),u=l.y0,h=e/l.max,c=n.length,f=n[0].indices.length,v,d=0;d<f;++d){v=u[d]*h,r.setItemLayout(n[0].indices[d],{layerIndex:0,x:s[0][d][0],y0:v,y:s[0][d][1]*h});for(var p=1;p<c;++p)v+=s[p-1][d][1]*h,r.setItemLayout(n[p].indices[d],{layerIndex:p,x:s[p][d][0],y0:v,y:s[p][d][1]*h})}}function qj(r){for(var t=r.length,e=r[0].length,i=[],n=[],a=0,o=0;o<e;++o){for(var s=0,l=0;l<t;++l)s+=r[l][o][1];s>a&&(a=s),i.push(s)}for(var u=0;u<e;++u)n[u]=(a-i[u])/2;a=0;for(var h=0;h<e;++h){var c=i[h]+n[h];c>a&&(a=c)}return{y0:n,max:a}}function Kj(r){r.registerChartView($j),r.registerSeriesModel(Zj),r.registerLayout(jj),r.registerProcessor(Ch("themeRiver"))}var Jj=2,Qj=4,CC=function(r){E(t,r);function t(e,i,n,a){var o=r.call(this)||this;o.z2=Jj,o.textConfig={inside:!0},ot(o).seriesIndex=i.seriesIndex;var s=new St({z2:Qj,silent:e.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,e,i,n,a),o}return t.prototype.updateData=function(e,i,n,a,o){this.node=i,i.piece=this,n=n||this._seriesModel,a=a||this._ecModel;var s=this;ot(s).dataIndex=i.dataIndex;var l=i.getModel(),u=l.getModel("emphasis"),h=i.getLayout(),c=z({},h);c.label=null;var f=i.getVisual("style");f.lineJoin="bevel";var v=i.getVisual("decal");v&&(f.decal=Ds(v,o));var d=Ka(l.getModel("itemStyle"),c,!0);z(c,d),A(Ke,function(m){var _=s.ensureState(m),x=l.getModel([m,"itemStyle"]);_.style=x.getItemStyle();var b=Ka(x,c);b&&(_.shape=b)}),e?(s.setShape(c),s.shape.r=h.r0,$t(s,{shape:{r:h.r}},n,i.dataIndex)):(At(s,{shape:c},n),ri(s)),s.useStyle(f),this._updateLabel(n);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=a||this._ecModel;var g=u.get("focus"),y=g==="relative"?ws(i.getAncestorsIndices(),i.getDescendantIndices()):g==="ancestor"?i.getAncestorsIndices():g==="descendant"?i.getDescendantIndices():g;Kt(this,y,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){var i=this,n=this.node.getModel(),a=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),h=Math.sin(l),c=this,f=c.getTextContent(),v=this.node.dataIndex,d=a.get("minAngle")/180*Math.PI,p=a.get("show")&&!(d!=null&&Math.abs(s)<d);f.ignore=!p,A(Bu,function(y){var m=y==="normal"?n.getModel("label"):n.getModel([y,"label"]),_=y==="normal",x=_?f:f.ensureState(y),b=e.getFormattedLabel(v,y);_&&(b=b||i.node.name),x.style=Gt(m,{},null,y!=="normal",!0),b&&(x.style.text=b);var S=m.get("show");S!=null&&!_&&(x.ignore=!S);var w=g(m,"position"),T=_?c:c.states[y],M=T.style.fill;T.textConfig={outsideFill:m.get("color")==="inherit"?M:null,inside:w!=="outside"};var C,D=g(m,"distance")||0,L=g(m,"align"),I=g(m,"rotate"),P=Math.PI*.5,k=Math.PI*1.5,R=vr(I==="tangential"?Math.PI/2-l:l),N=R>P&&!Ts(R-P)&&R<k;w==="outside"?(C=o.r+D,L=N?"right":"left"):!L||L==="center"?(s===2*Math.PI&&o.r0===0?C=0:C=(o.r+o.r0)/2,L="center"):L==="left"?(C=o.r0+D,L=N?"right":"left"):L==="right"&&(C=o.r-D,L=N?"left":"right"),x.style.align=L,x.style.verticalAlign=g(m,"verticalAlign")||"middle",x.x=C*u+o.cx,x.y=C*h+o.cy;var O=0;I==="radial"?O=vr(-l)+(N?Math.PI:0):I==="tangential"?O=vr(Math.PI/2-l)+(N?Math.PI:0):Mt(I)&&(O=I*Math.PI/180),x.rotation=vr(O)});function g(y,m){var _=y.get(m);return _??a.get(m)}f.dirtyStyle()},t}(Fe),t0="sunburstRootToNode",AC="sunburstHighlight",tq="sunburstUnhighlight";function eq(r){r.registerAction({type:t0,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},i);function i(n,a){var o=Ku(t,[t0],n);if(o){var s=n.getViewRoot();s&&(t.direction=yx(s,o.node)?"rollUp":"drillDown"),n.resetViewRoot(o.node)}}}),r.registerAction({type:AC,update:"none"},function(t,e,i){t=z({},t),e.eachComponent({mainType:"series",subType:"sunburst",query:t},n);function n(a){var o=Ku(t,[AC],a);o&&(t.dataIndex=o.node.dataIndex)}i.dispatchAction(z(t,{type:"highlight"}))}),r.registerAction({type:tq,update:"updateView"},function(t,e,i){t=z({},t),i.dispatchAction(z(t,{type:"downplay"}))})}var rq=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n,a){var o=this;this.seriesModel=e,this.api=n,this.ecModel=i;var s=e.getData(),l=s.tree.root,u=e.getViewRoot(),h=this.group,c=e.get("renderLabelForZeroData"),f=[];u.eachNode(function(m){f.push(m)});var v=this._oldChildren||[];d(f,v),y(l,u),this._initEvents(),this._oldChildren=f;function d(m,_){if(m.length===0&&_.length===0)return;new Qi(_,m,x,x).add(b).update(b).remove(ut(b,null)).execute();function x(S){return S.getId()}function b(S,w){var T=S==null?null:m[S],M=w==null?null:_[w];p(T,M)}}function p(m,_){if(!c&&m&&!m.getValue()&&(m=null),m!==l&&_!==l){if(_&&_.piece)m?(_.piece.updateData(!1,m,e,i,n),s.setItemGraphicEl(m.dataIndex,_.piece)):g(_);else if(m){var x=new CC(m,e,i,n);h.add(x),s.setItemGraphicEl(m.dataIndex,x)}}}function g(m){m&&m.piece&&(h.remove(m.piece),m.piece=null)}function y(m,_){_.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,e,i,n):(o.virtualPiece=new CC(m,e,i,n),h.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(_.parentNode)})):o.virtualPiece&&(h.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(i){var n=!1,a=e.seriesModel.getViewRoot();a.eachNode(function(o){if(!n&&o.piece&&o.piece===i.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 h=l.get("target",!0)||"_blank";Zf(u,h)}}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:t0,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,i){var n=i.getData(),a=n.getItemLayout(0);if(a){var o=e[0]-a.cx,s=e[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="sunburst",t}(Ot),iq=function(r){E(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,i){var n={name:e.name,children:e.data};yE(n);var a=this._levelModels=F(e.levels||[],function(l){return new Lt(l,this,i)},this),o=gx.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,h){var c=o.getNodeByDataIndex(h),f=a[c.depth];return f&&(u.parentModel=f),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(e){var i=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return i.treePathInfo=bd(n,this),i},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 i=this.getRawData().tree.root;(!e||e!==i&&!i.contains(e))&&(this._viewRoot=i)},t.prototype.enableAriaDecal=function(){SR(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}(zt);function yE(r){var t=0;A(r.children,function(i){yE(i);var n=i.value;V(n)&&(n=n[0]),t+=n});var e=r.value;V(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),V(r.value)?r.value[0]=e:r.value=e}var DC=Math.PI/180;function nq(r,t,e){t.eachSeriesByType(r,function(i){var n=i.get("center"),a=i.get("radius");V(a)||(a=[0,a]),V(n)||(n=[n,n]);var o=e.getWidth(),s=e.getHeight(),l=Math.min(o,s),u=U(n[0],o),h=U(n[1],s),c=U(a[0],l/2),f=U(a[1],l/2),v=-i.get("startAngle")*DC,d=i.get("minAngle")*DC,p=i.getData().tree.root,g=i.getViewRoot(),y=g.depth,m=i.get("sort");m!=null&&mE(g,m);var _=0;A(g.children,function(R){!isNaN(R.getValue())&&_++});var x=g.getValue(),b=Math.PI/(x||_)*2,S=g.depth>0,w=g.height-(S?-1:1),T=(f-c)/(w||1),M=i.get("clockwise"),C=i.get("stillShowZeroSum"),D=M?1:-1,L=function(R,N){if(R){var O=N;if(R!==p){var B=R.getValue(),G=x===0&&C?b:B*b;G<d&&(G=d),O=N+D*G;var H=R.depth-y-(S?-1:1),W=c+T*H,q=c+T*(H+1),K=i.getLevelModel(R);if(K){var nt=K.get("r0",!0),Ct=K.get("r",!0),te=K.get("radius",!0);te!=null&&(nt=te[0],Ct=te[1]),nt!=null&&(W=U(nt,l/2)),Ct!=null&&(q=U(Ct,l/2))}R.setLayout({angle:G,startAngle:N,endAngle:O,clockwise:M,cx:u,cy:h,r0:W,r:q})}if(R.children&&R.children.length){var dt=0;A(R.children,function(rt){dt+=L(rt,N+dt)})}return O-N}};if(S){var I=c,P=c+T,k=Math.PI*2;p.setLayout({angle:k,startAngle:v,endAngle:v+k,clockwise:M,cx:u,cy:h,r0:I,r:P})}L(g,v)})}function mE(r,t){var e=r.children||[];r.children=aq(e,t),e.length&&A(r.children,function(i){mE(i,t)})}function aq(r,t){if(Q(t)){var e=F(r,function(n,a){var o=n.getValue();return{params:{depth:n.depth,height:n.height,dataIndex:n.dataIndex,getValue:function(){return o}},index:a}});return e.sort(function(n,a){return t(n.params,a.params)}),F(e,function(n){return r[n.index]})}else{var i=t==="asc";return r.sort(function(n,a){var o=(n.getValue()-a.getValue())*(i?1:-1);return o===0?(n.dataIndex-a.dataIndex)*(i?-1:1):o})}}function oq(r){var t={};function e(i,n,a){for(var o=i;o&&o.depth>1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",t);return i.depth>1&&Y(s)&&(s=Nf(s,(i.depth-1)/(a-1)*.5)),s}r.eachSeriesByType("sunburst",function(i){var n=i.getData(),a=n.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=e(o,i,a.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");z(u,l)})})}function sq(r){r.registerChartView(rq),r.registerSeriesModel(iq),r.registerLayout(ut(nq,"sunburst")),r.registerProcessor(ut(Ch,"sunburst")),r.registerVisual(oq),eq(r)}var LC={color:"fill",borderColor:"stroke"},lq={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Zi=Tt(),uq=function(r){E(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,i){return Li(null,this)},t.prototype.getDataParams=function(e,i,n){var a=r.prototype.getDataParams.call(this,e,i);return n&&(a.info=Zi(n).info),a},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(zt);function hq(r,t){return t=t||[0,0],F(["x","y"],function(e,i){var n=this.getAxis(e),a=t[i],o=r[i]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(a-o)-n.dataToCoord(a+o))},this)}function cq(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:$(hq,r)}}}function fq(r,t){return t=t||[0,0],F([0,1],function(e){var i=t[e],n=r[e]/2,a=[],o=[];return a[e]=i-n,o[e]=i+n,a[1-e]=o[1-e]=t[1-e],Math.abs(this.dataToPoint(a)[e]-this.dataToPoint(o)[e])},this)}function vq(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:$(fq,r)}}}function dq(r,t){var e=this.getAxis(),i=t instanceof Array?t[0]:t,n=(r instanceof Array?r[0]:r)/2;return e.type==="category"?e.getBandWidth():Math.abs(e.dataToCoord(i-n)-e.dataToCoord(i+n))}function pq(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:$(dq,r)}}}function gq(r,t){return t=t||[0,0],F(["Radius","Angle"],function(e,i){var n="get"+e+"Axis",a=this[n](),o=t[i],s=r[i]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return e==="Angle"&&(l=l*Math.PI/180),l},this)}function yq(r){var t=r.getRadiusAxis(),e=r.getAngleAxis(),i=t.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:i[1],r0:i[0]},api:{coord:function(n){var a=t.dataToRadius(n[0]),o=e.dataToAngle(n[1]),s=r.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:$(gq,r)}}}function mq(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(i,n){return r.dataToPoint(i,n)}}}}function _E(r,t,e,i){return r&&(r.legacy||r.legacy!==!1&&!e&&!i&&t!=="tspan"&&(t==="text"||X(r,"text")))}function xE(r,t,e){var i=r,n,a,o;if(t==="text")o=i;else{o={},X(i,"text")&&(o.text=i.text),X(i,"rich")&&(o.rich=i.rich),X(i,"textFill")&&(o.fill=i.textFill),X(i,"textStroke")&&(o.stroke=i.textStroke),X(i,"fontFamily")&&(o.fontFamily=i.fontFamily),X(i,"fontSize")&&(o.fontSize=i.fontSize),X(i,"fontStyle")&&(o.fontStyle=i.fontStyle),X(i,"fontWeight")&&(o.fontWeight=i.fontWeight),a={type:"text",style:o,silent:!0},n={};var s=X(i,"textPosition");e?n.position=s?i.textPosition:"inside":s&&(n.position=i.textPosition),X(i,"textPosition")&&(n.position=i.textPosition),X(i,"textOffset")&&(n.offset=i.textOffset),X(i,"textRotation")&&(n.rotation=i.textRotation),X(i,"textDistance")&&(n.distance=i.textDistance)}return IC(o,r),A(o.rich,function(l){IC(l,l)}),{textConfig:n,textContent:a}}function IC(r,t){t&&(t.font=t.textFont||t.font,X(t,"textStrokeWidth")&&(r.lineWidth=t.textStrokeWidth),X(t,"textAlign")&&(r.align=t.textAlign),X(t,"textVerticalAlign")&&(r.verticalAlign=t.textVerticalAlign),X(t,"textLineHeight")&&(r.lineHeight=t.textLineHeight),X(t,"textWidth")&&(r.width=t.textWidth),X(t,"textHeight")&&(r.height=t.textHeight),X(t,"textBackgroundColor")&&(r.backgroundColor=t.textBackgroundColor),X(t,"textPadding")&&(r.padding=t.textPadding),X(t,"textBorderColor")&&(r.borderColor=t.textBorderColor),X(t,"textBorderWidth")&&(r.borderWidth=t.textBorderWidth),X(t,"textBorderRadius")&&(r.borderRadius=t.textBorderRadius),X(t,"textBoxShadowColor")&&(r.shadowColor=t.textBoxShadowColor),X(t,"textBoxShadowBlur")&&(r.shadowBlur=t.textBoxShadowBlur),X(t,"textBoxShadowOffsetX")&&(r.shadowOffsetX=t.textBoxShadowOffsetX),X(t,"textBoxShadowOffsetY")&&(r.shadowOffsetY=t.textBoxShadowOffsetY))}function PC(r,t,e){var i=r;i.textPosition=i.textPosition||e.position||"inside",e.offset!=null&&(i.textOffset=e.offset),e.rotation!=null&&(i.textRotation=e.rotation),e.distance!=null&&(i.textDistance=e.distance);var n=i.textPosition.indexOf("inside")>=0,a=r.fill||"#000";kC(i,t);var o=i.textFill==null;return n?o&&(i.textFill=e.insideFill||"#fff",!i.textStroke&&e.insideStroke&&(i.textStroke=e.insideStroke),!i.textStroke&&(i.textStroke=a),i.textStrokeWidth==null&&(i.textStrokeWidth=2)):(o&&(i.textFill=r.fill||e.outsideFill||"#000"),!i.textStroke&&e.outsideStroke&&(i.textStroke=e.outsideStroke)),i.text=t.text,i.rich=t.rich,A(t.rich,function(s){kC(s,s)}),i}function kC(r,t){t&&(X(t,"fill")&&(r.textFill=t.fill),X(t,"stroke")&&(r.textStroke=t.fill),X(t,"lineWidth")&&(r.textStrokeWidth=t.lineWidth),X(t,"font")&&(r.font=t.font),X(t,"fontStyle")&&(r.fontStyle=t.fontStyle),X(t,"fontWeight")&&(r.fontWeight=t.fontWeight),X(t,"fontSize")&&(r.fontSize=t.fontSize),X(t,"fontFamily")&&(r.fontFamily=t.fontFamily),X(t,"align")&&(r.textAlign=t.align),X(t,"verticalAlign")&&(r.textVerticalAlign=t.verticalAlign),X(t,"lineHeight")&&(r.textLineHeight=t.lineHeight),X(t,"width")&&(r.textWidth=t.width),X(t,"height")&&(r.textHeight=t.height),X(t,"backgroundColor")&&(r.textBackgroundColor=t.backgroundColor),X(t,"padding")&&(r.textPadding=t.padding),X(t,"borderColor")&&(r.textBorderColor=t.borderColor),X(t,"borderWidth")&&(r.textBorderWidth=t.borderWidth),X(t,"borderRadius")&&(r.textBorderRadius=t.borderRadius),X(t,"shadowColor")&&(r.textBoxShadowColor=t.shadowColor),X(t,"shadowBlur")&&(r.textBoxShadowBlur=t.shadowBlur),X(t,"shadowOffsetX")&&(r.textBoxShadowOffsetX=t.shadowOffsetX),X(t,"shadowOffsetY")&&(r.textBoxShadowOffsetY=t.shadowOffsetY),X(t,"textShadowColor")&&(r.textShadowColor=t.textShadowColor),X(t,"textShadowBlur")&&(r.textShadowBlur=t.textShadowBlur),X(t,"textShadowOffsetX")&&(r.textShadowOffsetX=t.textShadowOffsetX),X(t,"textShadowOffsetY")&&(r.textShadowOffsetY=t.textShadowOffsetY))}var bE={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},RC=xt(bE);Pr(Ti,function(r,t){return r[t]=1,r},{});Ti.join(", ");var gv=["","style","shape","extra"],ks=Tt();function Ox(r,t,e,i,n){var a=r+"Animation",o=Fs(r,i,n)||{},s=ks(t).userDuring;return o.duration>0&&(o.during=s?$(wq,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=r),z(o,e[a]),o}function gf(r,t,e,i){i=i||{};var n=i.dataIndex,a=i.isInit,o=i.clearStyle,s=e.isAnimationEnabled(),l=ks(r),u=t.style;l.userDuring=t.during;var h={},c={};if(Mq(r,t,c),OC("shape",t,c),OC("extra",t,c),!a&&s&&(Tq(r,t,h),EC("shape",r,t,h),EC("extra",r,t,h),Cq(r,t,u,h)),c.style=u,_q(r,c,o),bq(r,t),s)if(a){var f={};A(gv,function(d){var p=d?t[d]:t;p&&p.enterFrom&&(d&&(f[d]=f[d]||{}),z(d?f[d]:f,p.enterFrom))});var v=Ox("enter",r,t,e,n);v.duration>0&&r.animateFrom(f,v)}else xq(r,t,n||0,e,h);SE(r,t),u?r.dirty():r.markRedraw()}function SE(r,t){for(var e=ks(r).leaveToProps,i=0;i<gv.length;i++){var n=gv[i],a=n?t[n]:t;a&&a.leaveTo&&(e||(e=ks(r).leaveToProps={}),n&&(e[n]=e[n]||{}),z(n?e[n]:e,a.leaveTo))}}function Td(r,t,e,i){if(r){var n=r.parent,a=ks(r).leaveToProps;if(a){var o=Ox("update",r,t,e,0);o.done=function(){n.remove(r)},r.animateTo(a,o)}else n.remove(r)}}function oo(r){return r==="all"}function _q(r,t,e){var i=t.style;if(!r.isGroup&&i){if(e){r.useStyle({});for(var n=r.animators,a=0;a<n.length;a++){var o=n[a];o.targetName==="style"&&o.changeTarget(r.style)}}r.setStyle(i)}t&&(t.style=null,t&&r.attr(t),t.style=i)}function xq(r,t,e,i,n){if(n){var a=Ox("update",r,t,i,e);a.duration>0&&r.animateFrom(n,a)}}function bq(r,t){X(t,"silent")&&(r.silent=t.silent),X(t,"ignore")&&(r.ignore=t.ignore),r instanceof kr&&X(t,"invisible")&&(r.invisible=t.invisible),r instanceof _t&&X(t,"autoBatch")&&(r.autoBatch=t.autoBatch)}var hi={},Sq={setTransform:function(r,t){return hi.el[r]=t,this},getTransform:function(r){return hi.el[r]},setShape:function(r,t){var e=hi.el,i=e.shape||(e.shape={});return i[r]=t,e.dirtyShape&&e.dirtyShape(),this},getShape:function(r){var t=hi.el.shape;if(t)return t[r]},setStyle:function(r,t){var e=hi.el,i=e.style;return i&&(i[r]=t,e.dirtyStyle&&e.dirtyStyle()),this},getStyle:function(r){var t=hi.el.style;if(t)return t[r]},setExtra:function(r,t){var e=hi.el.extra||(hi.el.extra={});return e[r]=t,this},getExtra:function(r){var t=hi.el.extra;if(t)return t[r]}};function wq(){var r=this,t=r.el;if(t){var e=ks(t).userDuring,i=r.userDuring;if(e!==i){r.el=r.userDuring=null;return}hi.el=t,i(Sq)}}function EC(r,t,e,i){var n=e[r];if(n){var a=t[r],o;if(a){var s=e.transition,l=n.transition;if(l)if(!o&&(o=i[r]={}),oo(l))z(o,a);else for(var u=Bt(l),h=0;h<u.length;h++){var c=u[h],f=a[c];o[c]=f}else if(oo(s)||vt(s,r)>=0){!o&&(o=i[r]={});for(var v=xt(a),h=0;h<v.length;h++){var c=v[h],f=a[c];Aq(n[c],f)&&(o[c]=f)}}}}}function OC(r,t,e){var i=t[r];if(i)for(var n=e[r]={},a=xt(i),o=0;o<a.length;o++){var s=a[o];n[s]=hu(i[s])}}function Tq(r,t,e){for(var i=t.transition,n=oo(i)?Ti:Bt(i||[]),a=0;a<n.length;a++){var o=n[a];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];e[o]=s}}}function Mq(r,t,e){for(var i=0;i<RC.length;i++){var n=RC[i],a=bE[n],o=t[n];o&&(e[a[0]]=o[0],e[a[1]]=o[1])}for(var i=0;i<Ti.length;i++){var s=Ti[i];t[s]!=null&&(e[s]=t[s])}}function Cq(r,t,e,i){if(e){var n=r.style,a;if(n){var o=e.transition,s=t.transition;if(o&&!oo(o)){var l=Bt(o);!a&&(a=i.style={});for(var u=0;u<l.length;u++){var h=l[u],c=n[h];a[h]=c}}else if(r.getAnimationStyleProps&&(oo(s)||oo(o)||vt(s,"style")>=0)){var f=r.getAnimationStyleProps(),v=f?f.style:null;if(v){!a&&(a=i.style={});for(var d=xt(e),u=0;u<d.length;u++){var h=d[u];if(v[h]){var c=n[h];a[h]=c}}}}}}}function Aq(r,t){return Me(r)?r!==t:r!=null&&isFinite(r)}var wE=Tt(),Dq=["percent","easing","shape","style","extra"];function TE(r){r.stopAnimation("keyframe"),r.attr(wE(r))}function yv(r,t,e){if(!(!e.isAnimationEnabled()||!t)){if(V(t)){A(t,function(s){yv(r,s,e)});return}var i=t.keyframes,n=t.duration;if(e&&n==null){var a=Fs("enter",e,0);n=a&&a.duration}if(!(!i||!n)){var o=wE(r);A(gv,function(s){if(!(s&&!r[s])){var l;i.sort(function(u,h){return u.percent-h.percent}),A(i,function(u){var h=r.animators,c=s?u[s]:u;if(c){var f=xt(c);if(s||(f=Dt(f,function(p){return vt(Dq,p)<0})),!!f.length){l||(l=r.animate(s,t.loop,!0),l.scope="keyframe");for(var v=0;v<h.length;v++)h[v]!==l&&h[v].targetName===l.targetName&&h[v].stopTracks(f);s&&(o[s]=o[s]||{});var d=s?o[s]:o;A(f,function(p){d[p]=((s?r[s]:r)||{})[p]}),l.whenWithKeys(n*u.percent,c,f,u.easing)}}}),l&&l.delay(t.delay||0).duration(n).start(t.easing)}})}}}var ji="emphasis",kn="normal",Nx="blur",Bx="select",qn=[kn,ji,Nx,Bx],Hg={normal:["itemStyle"],emphasis:[ji,"itemStyle"],blur:[Nx,"itemStyle"],select:[Bx,"itemStyle"]},Wg={normal:["label"],emphasis:[ji,"label"],blur:[Nx,"label"],select:[Bx,"label"]},Lq=["x","y"],Iq="e\0\0",xr={normal:{},emphasis:{},blur:{},select:{}},Pq={cartesian2d:cq,geo:vq,single:pq,polar:yq,calendar:mq};function e0(r){return r instanceof _t}function r0(r){return r instanceof kr}function kq(r,t){t.copyTransform(r),r0(t)&&r0(r)&&(t.setStyle(r.style),t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t.invisible=r.invisible,t.ignore=r.ignore,e0(t)&&e0(r)&&t.setShape(r.shape))}var Rq=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n,a){this._progressiveEls=null;var o=this._data,s=e.getData(),l=this.group,u=NC(e,s,i,n);o||l.removeAll(),s.diff(o).add(function(c){Ug(n,null,c,u(c,a),e,l,s)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&Td(f,Zi(f).option,e)}).update(function(c,f){var v=o.getItemGraphicEl(f);Ug(n,v,c,u(c,a),e,l,s)}).execute();var h=e.get("clip",!0)?Th(e.coordinateSystem,!1,e):null;h?l.setClipPath(h):l.removeClipPath(),this._data=s},t.prototype.incrementalPrepareRender=function(e,i,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,i,n,a,o){var s=i.getData(),l=NC(i,s,n,a),u=this._progressiveEls=[];function h(v){v.isGroup||(v.incremental=!0,v.ensureState("emphasis").hoverLayer=!0)}for(var c=e.start;c<e.end;c++){var f=Ug(null,null,c,l(c,o),i,this.group,s);f&&(f.traverse(h),u.push(f))}},t.prototype.eachRendered=function(e){ta(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,i,n,a){var o=i.element;if(o==null||n.name===o)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===o)return!0;return!1},t.type="custom",t}(Ot);function zx(r){var t=r.type,e;if(t==="path"){var i=r.shape,n=i.width!=null&&i.height!=null?{x:i.x||0,y:i.y||0,width:i.width,height:i.height}:null,a=AE(i);e=yh(a,null,n,i.layout||"center"),Zi(e).customPathData=a}else if(t==="image")e=new xe({}),Zi(e).customImagePath=r.style.image;else if(t==="text")e=new St({});else if(t==="group")e=new at;else{if(t==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=td(t);if(!o){var s="";kt(s)}e=new o}return Zi(e).customGraphicType=t,e.name=r.name,e.z2EmphasisLift=1,e.z2SelectLift=1,e}function Vx(r,t,e,i,n,a,o){TE(t);var s=n&&n.normal.cfg;s&&t.setTextConfig(s),i&&i.transition==null&&(i.transition=Lq);var l=i&&i.style;if(l){if(t.type==="text"){var u=l;X(u,"textFill")&&(u.fill=u.textFill),X(u,"textStroke")&&(u.stroke=u.textStroke)}var h=void 0,c=e0(t)?l.decal:null;r&&c&&(c.dirty=!0,h=Ds(c,r)),l.__decalPattern=h}if(r0(t)&&l){var h=l.__decalPattern;h&&(l.decal=h)}gf(t,i,a,{dataIndex:e,isInit:o,clearStyle:!0}),yv(t,i.keyframeAnimation,a)}function ME(r,t,e,i,n){var a=t.isGroup?null:t,o=n&&n[r].cfg;if(a){var s=a.ensureState(r);if(i===!1){var l=a.getState(r);l&&(l.style=null)}else s.style=i||null;o&&(s.textConfig=o),po(a)}}function Eq(r,t,e){if(!r.isGroup){var i=r,n=e.currentZ,a=e.currentZLevel;i.z=n,i.zlevel=a;var o=t.z2;o!=null&&(i.z2=o||0);for(var s=0;s<qn.length;s++)Oq(i,t,qn[s])}}function Oq(r,t,e){var i=e===kn,n=i?t:mv(t,e),a=n?n.z2:null,o;a!=null&&(o=i?r:r.ensureState(e),o.z2=a||0)}function NC(r,t,e,i){var n=r.get("renderItem"),a=r.coordinateSystem,o={};a&&(o=a.prepareCustoms?a.prepareCustoms(a):Pq[a.type](a));for(var s=tt({getWidth:i.getWidth,getHeight:i.getHeight,getZr:i.getZr,getDevicePixelRatio:i.getDevicePixelRatio,value:x,style:S,ordinalRawValue:b,styleEmphasis:w,visual:C,barLayout:D,currentSeriesIndices:L,font:I},o.api||{}),l={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:o.coordSys,dataInsideLength:t.count(),encode:Nq(r.getData())},u,h,c={},f={},v={},d={},p=0;p<qn.length;p++){var g=qn[p];v[g]=r.getModel(Hg[g]),d[g]=r.getModel(Wg[g])}function y(P){return P===u?h||(h=t.getItemModel(P)):t.getItemModel(P)}function m(P,k){return t.hasItemOption?P===u?c[k]||(c[k]=y(P).getModel(Hg[k])):y(P).getModel(Hg[k]):v[k]}function _(P,k){return t.hasItemOption?P===u?f[k]||(f[k]=y(P).getModel(Wg[k])):y(P).getModel(Wg[k]):d[k]}return function(P,k){return u=P,h=null,c={},f={},n&&n(tt({dataIndexInside:P,dataIndex:t.getRawIndex(P),actionType:k?k.type:null},l),s)};function x(P,k){return k==null&&(k=u),t.getStore().get(t.getDimensionIndex(P||0),k)}function b(P,k){k==null&&(k=u),P=P||0;var R=t.getDimensionInfo(P);if(!R){var N=t.getDimensionIndex(P);return N>=0?t.getStore().get(N,k):void 0}var O=t.get(R.name,k),B=R&&R.ordinalMeta;return B?B.categories[O]:O}function S(P,k){k==null&&(k=u);var R=t.getItemVisual(k,"style"),N=R&&R.fill,O=R&&R.opacity,B=m(k,kn).getItemStyle();N!=null&&(B.fill=N),O!=null&&(B.opacity=O);var G={inheritColor:Y(N)?N:"#000"},H=_(k,kn),W=Gt(H,null,G,!1,!0);W.text=H.getShallow("show")?lt(r.getFormattedLabel(k,kn),Ls(t,k)):null;var q=$f(H,G,!1);return M(P,B),B=PC(B,W,q),P&&T(B,P),B.legacy=!0,B}function w(P,k){k==null&&(k=u);var R=m(k,ji).getItemStyle(),N=_(k,ji),O=Gt(N,null,null,!0,!0);O.text=N.getShallow("show")?jr(r.getFormattedLabel(k,ji),r.getFormattedLabel(k,kn),Ls(t,k)):null;var B=$f(N,null,!0);return M(P,R),R=PC(R,O,B),P&&T(R,P),R.legacy=!0,R}function T(P,k){for(var R in k)X(k,R)&&(P[R]=k[R])}function M(P,k){P&&(P.textFill&&(k.textFill=P.textFill),P.textPosition&&(k.textPosition=P.textPosition))}function C(P,k){if(k==null&&(k=u),X(LC,P)){var R=t.getItemVisual(k,"style");return R?R[LC[P]]:null}if(X(lq,P))return t.getItemVisual(k,P)}function D(P){if(a.type==="cartesian2d"){var k=a.getBaseAxis();return cU(tt({axis:k},P))}}function L(){return e.getCurrentSeriesIndices()}function I(P){return y_(P,e)}}function Nq(r){var t={};return A(r.dimensions,function(e){var i=r.getDimensionInfo(e);if(!i.isExtraCoord){var n=i.coordDim,a=t[n]=t[n]||[];a[i.coordDimIndex]=r.getDimensionIndex(e)}}),t}function Ug(r,t,e,i,n,a,o){if(!i){a.remove(t);return}var s=Fx(r,t,e,i,n,a);return s&&o.setItemGraphicEl(e,s),s&&Kt(s,i.focus,i.blurScope,i.emphasisDisabled),s}function Fx(r,t,e,i,n,a){var o=-1,s=t;t&&CE(t,i,n)&&(o=vt(a.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=zx(i),s&&kq(s,u)),i.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),xr.normal.cfg=xr.normal.conOpt=xr.emphasis.cfg=xr.emphasis.conOpt=xr.blur.cfg=xr.blur.conOpt=xr.select.cfg=xr.select.conOpt=null,xr.isLegacy=!1,zq(u,e,i,n,l,xr),Bq(u,e,i,n,l),Vx(r,u,e,i,xr,n,l),X(i,"info")&&(Zi(u).info=i.info);for(var h=0;h<qn.length;h++){var c=qn[h];if(c!==kn){var f=mv(i,c),v=Gx(i,f,c);ME(c,u,f,v,xr)}}return Eq(u,i,n),i.type==="group"&&Vq(r,u,e,i,n),o>=0?a.replaceAt(u,o):a.add(u),u}function CE(r,t,e){var i=Zi(r),n=t.type,a=t.shape,o=t.style;return e.isUniversalTransitionEnabled()||n!=null&&n!==i.customGraphicType||n==="path"&&Wq(a)&&AE(a)!==i.customPathData||n==="image"&&X(o,"image")&&o.image!==i.customImagePath}function Bq(r,t,e,i,n){var a=e.clipPath;if(a===!1)r&&r.getClipPath()&&r.removeClipPath();else if(a){var o=r.getClipPath();o&&CE(o,a,i)&&(o=null),o||(o=zx(a),r.setClipPath(o)),Vx(null,o,t,a,null,i,n)}}function zq(r,t,e,i,n,a){if(!r.isGroup){BC(e,null,a),BC(e,ji,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var h=r.getTextContent();if(o===!1)h&&r.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},h?h.clearStates():(h=zx(o),r.setTextContent(h)),Vx(null,h,t,o,null,i,n);for(var c=o&&o.style,f=0;f<qn.length;f++){var v=qn[f];if(v!==kn){var d=a[v].conOpt;ME(v,h,d,Gx(o,d,v),null)}}c?h.dirty():h.markRedraw()}}}}function BC(r,t,e){var i=t?mv(r,t):r,n=t?Gx(r,i,ji):r.style,a=r.type,o=i?i.textConfig:null,s=r.textContent,l=s?t?mv(s,t):s:null;if(n&&(e.isLegacy||_E(n,a,!!o,!!l))){e.isLegacy=!0;var u=xE(n,a,!t);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var h=l;!h.type&&(h.type="text")}var c=t?e[t]:e.normal;c.cfg=o,c.conOpt=l}function mv(r,t){return t?r?r[t]:null:r}function Gx(r,t,e){var i=t&&t.style;return i==null&&e===ji&&r&&(i=r.styleEmphasis),i}function Vq(r,t,e,i,n){var a=i.children,o=a?a.length:0,s=i.$mergeChildren,l=s==="byName"||i.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){Gq({api:r,oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,seriesModel:n,group:t});return}u&&t.removeAll();for(var h=0;h<o;h++){var c=a[h],f=t.childAt(h);c?(c.ignore==null&&(c.ignore=!1),Fx(r,f,e,c,n,t)):f.ignore=!0}for(var v=t.childCount()-1;v>=h;v--){var d=t.childAt(v);Fq(t,d,n)}}}function Fq(r,t,e){t&&Td(t,Zi(r).option,e)}function Gq(r){new Qi(r.oldChildren,r.newChildren,zC,zC,r).add(VC).update(VC).remove(Hq).execute()}function zC(r,t){var e=r&&r.name;return e??Iq+t}function VC(r,t){var e=this.context,i=r!=null?e.newChildren[r]:null,n=t!=null?e.oldChildren[t]:null;Fx(e.api,n,e.dataIndex,i,e.seriesModel,e.group)}function Hq(r){var t=this.context,e=t.oldChildren[r];e&&Td(e,Zi(e).option,t.seriesModel)}function AE(r){return r&&(r.pathData||r.d)}function Wq(r){return r&&(X(r,"pathData")||X(r,"d"))}function Uq(r){r.registerChartView(Rq),r.registerSeriesModel(uq)}var Ha=Tt(),FC=it,Yg=$,Hx=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,i,n){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,!(!n&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,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,a,t,e,i);var h=u.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var c=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new at,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),i.getZr().add(s);else{var f=ut(GC,e,c);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,e)}WC(s,e,!0),this._renderHandle(a)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var i=e.get("animation"),n=t.axis,a=n.type==="category",o=e.get("snap");if(!o&&!a)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(a&&n.getBandWidth()>s)return!0;if(o){var l=ux(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},r.prototype.makeElOption=function(t,e,i,n,a){},r.prototype.createPointerEl=function(t,e,i,n){var a=e.pointer;if(a){var o=Ha(t).pointerEl=new wo[a.type](FC(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,i,n){if(e.label){var a=Ha(t).labelEl=new St(FC(e.label));t.add(a),HC(a,n)}},r.prototype.updatePointerEl=function(t,e,i){var n=Ha(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,i,n){var a=Ha(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{x:e.label.x,y:e.label.y}),HC(a,n))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||o==="hide"){n&&i.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=Gs(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){qi(u.event)},onmousedown:Yg(this._onHandleDragMove,this,0,0),drift:Yg(this._onHandleDragMove,this),ondragend:Yg(this._onHandleDragEnd,this)}),i.add(n)),WC(n,e,!1),n.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");V(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,Zs(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){GC(this._axisPointerModel,!e&&this._moveAnimation,this._handle,$g(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform($g(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr($g(n)),Ha(i).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),Wu(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}},r}();function GC(r,t,e,i){DE(Ha(e).lastProp,i)||(Ha(e).lastProp=i,t?At(e,i,r):(e.stopAnimation(),e.attr(i)))}function DE(r,t){if(et(r)&&et(t)){var e=!0;return A(t,function(i,n){e=e&&DE(r[n],i)}),!!e}else return r===t}function HC(r,t){r[t.get(["label","show"])?"show":"hide"]()}function $g(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function WC(r,t,e){var i=t.get("z"),n=t.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(i!=null&&(a.z=i),n!=null&&(a.zlevel=n),a.silent=e)})}function Wx(r){var t=r.get("type"),e=r.getModel(t+"Style"),i;return t==="line"?(i=e.getLineStyle(),i.fill=null):t==="shadow"&&(i=e.getAreaStyle(),i.stroke=null),i}function LE(r,t,e,i,n){var a=e.get("value"),o=IE(a,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=To(s.get("padding")||0),u=s.getFont(),h=fh(o,u),c=n.position,f=h.width+l[1]+l[3],v=h.height+l[0]+l[2],d=n.align;d==="right"&&(c[0]-=f),d==="center"&&(c[0]-=f/2);var p=n.verticalAlign;p==="bottom"&&(c[1]-=v),p==="middle"&&(c[1]-=v/2),Yq(c,f,v,i);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:c[0],y:c[1],style:Gt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function Yq(r,t,e,i){var n=i.getWidth(),a=i.getHeight();r[0]=Math.min(r[0]+t,n)-t,r[1]=Math.min(r[1]+e,a)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function IE(r,t,e,i,n){r=t.scale.parse(r);var a=t.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:J_(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};A(i,function(l){var u=e.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,c=u&&u.getDataParams(h);c&&s.seriesData.push(c)}),Y(o)?a=o.replace("{value}",a):Q(o)&&(a=o(s))}return a}function Ux(r,t,e){var i=or();return Qn(i,i,e.rotation),ti(i,i,e.position),Jr([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],i)}function PE(r,t,e,i,n,a){var o=je.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=n.get(["label","margin"]),LE(t,i,n,a,{position:Ux(i.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Yx(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function kE(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}function UC(r,t,e,i,n,a){return{cx:r,cy:t,r0:e,r:i,startAngle:n,endAngle:a,clockwise:!0}}var $q=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,i,n,a,o){var s=n.axis,l=s.grid,u=a.get("type"),h=YC(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var f=Wx(a),v=Xq[u](s,c,h);v.style=f,e.graphicKey=v.type,e.pointer=v}var d=Nm(l.model,n);PE(i,e,d,n,a,o)},t.prototype.getHandleTransform=function(e,i,n){var a=Nm(i.axis.grid.model,i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var o=Ux(i.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,i,n,a){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=YC(s,o).getOtherAxis(o).getGlobalExtent(),h=o.dim==="x"?0:1,c=[e.x,e.y];c[h]+=i[h],c[h]=Math.min(l[1],c[h]),c[h]=Math.max(l[0],c[h]);var f=(u[1]+u[0])/2,v=[f,f];v[h]=c[h];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:v,tooltipOption:d[h]}},t}(Hx);function YC(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var Xq={line:function(r,t,e){var i=Yx([t,e[0]],[t,e[1]],$C(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,t,e){var i=Math.max(1,r.getBandWidth()),n=e[1]-e[0];return{type:"Rect",shape:kE([t-i/2,e[0]],[i,n],$C(r))}}};function $C(r){return r.dim==="x"?0:1}var Zq=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(yt),Xi=Tt(),jq=A;function RE(r,t,e){if(!mt.node){var i=t.getZr();Xi(i).records||(Xi(i).records={}),qq(i,t);var n=Xi(i).records[r]||(Xi(i).records[r]={});n.handler=e}}function qq(r,t){if(Xi(r).initialized)return;Xi(r).initialized=!0,e("click",ut(XC,"click")),e("mousemove",ut(XC,"mousemove")),e("globalout",Jq);function e(i,n){r.on(i,function(a){var o=Qq(t);jq(Xi(r).records,function(s){s&&n(s,a,o.dispatchAction)}),Kq(o.pendings,t)})}}function Kq(r,t){var e=r.showTip.length,i=r.hideTip.length,n;e?n=r.showTip[e-1]:i&&(n=r.hideTip[i-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function Jq(r,t,e){r.handler("leave",null,e)}function XC(r,t,e,i){t.handler(r,e,i)}function Qq(r){var t={showTip:[],hideTip:[]},e=function(i){var n=t[i.type];n?n.push(i):(i.dispatchAction=e,r.dispatchAction(i))};return{dispatchAction:e,pendings:t}}function i0(r,t){if(!mt.node){var e=t.getZr(),i=(Xi(e).records||{})[r];i&&(Xi(e).records[r]=null)}}var tK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=i.getComponent("tooltip"),o=e.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";RE("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,i){i0("axisPointer",i)},t.prototype.dispose=function(e,i){i0("axisPointer",i)},t.type="axisPointer",t}(Yt);function EE(r,t){var e=[],i=r.seriesIndex,n;if(i==null||!(n=t.getSeriesByIndex(i)))return{point:[]};var a=n.getData(),o=fo(a,r);if(o==null||o<0||V(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)e=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u),c=h.dim,f=u.dim,v=c==="x"||c==="radius"?1:0,d=a.mapDimension(f),p=[];p[v]=a.get(d,o),p[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(p)||[]}else e=l.dataToPoint(a.getValues(F(l.dimensions,function(y){return a.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 ZC=Tt();function eK(r,t,e){var i=r.currTrigger,n=[r.x,r.y],a=r,o=r.dispatchAction||$(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){yf(n)&&(n=EE({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=yf(n),u=a.axesInfo,h=s.axesInfo,c=i==="leave"||yf(n),f={},v={},d={list:[],map:{}},p={showPointer:ut(iK,v),showTooltip:ut(nK,d)};A(s.coordSysMap,function(y,m){var _=l||y.containPoint(n);A(s.coordSysAxesInfo[m],function(x,b){var S=x.axis,w=lK(u,x);if(!c&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=S.pointToData(n)),T!=null&&jC(x,T,p,!1,f)}})});var g={};return A(h,function(y,m){var _=y.linkGroup;_&&!v[m]&&A(_.axesInfo,function(x,b){var S=v[b];if(x!==y&&S){var w=S.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,qC(x),qC(y)))),g[y.key]=w}})}),A(g,function(y,m){jC(h[m],y,p,!0,f)}),aK(v,h,f),oK(d,n,r,o),sK(h,o,e),f}}function jC(r,t,e,i,n){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=rK(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&z(n,s[0]),!i&&r.snap&&a.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function rK(r,t){var e=t.axis,i=e.dim,n=r,a=[],o=Number.MAX_VALUE,s=-1;return A(t.seriesModels,function(l,u){var h=l.getData().mapDimensionsAll(i),c,f;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(h,r,e);f=v.dataIndices,c=v.nestestValue}else{if(f=l.getData().indicesOfNearest(h[0],r,e.type==="category"?.5:null),!f.length)return;c=l.getData().get(h[0],f[0])}if(!(c==null||!isFinite(c))){var d=r-c,p=Math.abs(d);p<=o&&((p<o||d>=0&&s<0)&&(o=p,s=d,n=c,a.length=0),A(f,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:n}}function iK(r,t,e,i){r[t.key]={value:e,payloadBatch:i}}function nK(r,t,e,i){var n=e.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var l=t.coordSys.model,u=qu(l),h=r.map[u];h||(h=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function aK(r,t,e){var i=e.axesInfo=[];A(t,function(n,a){var o=n.axisPointerModel.option,s=r[a];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&i.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function oK(r,t,e,i){if(yf(t)||!r.list.length){i({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function sK(r,t,e){var i=e.getZr(),n="axisPointerLastHighlights",a=ZC(i)[n]||{},o=ZC(i)[n]={};A(r,function(u,h){var c=u.axisPointerModel.option;c.status==="show"&&u.triggerEmphasis&&A(c.seriesDataIndices,function(f){var v=f.seriesIndex+" | "+f.dataIndex;o[v]=f})});var s=[],l=[];A(a,function(u,h){!o[h]&&l.push(u)}),A(o,function(u,h){!a[h]&&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 lK(r,t){for(var e=0;e<(r||[]).length;e++){var i=r[e];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}function qC(r){var t=r.axis.model,e={},i=e.axisDim=r.axis.dim;return e.axisIndex=e[i+"AxisIndex"]=t.componentIndex,e.axisName=e[i+"AxisName"]=t.name,e.axisId=e[i+"AxisId"]=t.id,e}function yf(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Ih(r){Ao.registerAxisPointerClass("CartesianAxisPointer",$q),r.registerComponentModel(Zq),r.registerComponentView(tK),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!V(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=m$(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},eK)}function uK(r){pt(lR),pt(Ih)}var hK=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,i,n,a,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),h=u.getExtent(),c=s.dataToCoord(i),f=a.get("type");if(f&&f!=="none"){var v=Wx(a),d=fK[f](s,l,c,h);d.style=v,e.graphicKey=d.type,e.pointer=d}var p=a.get(["label","margin"]),g=cK(i,n,a,l,p);LE(e,n,a,o,g)},t}(Hx);function cK(r,t,e,i,n){var a=t.axis,o=a.dataToCoord(r),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=i.getRadiusAxis().getExtent(),u,h,c;if(a.dim==="radius"){var f=or();Qn(f,f,s),ti(f,f,[i.cx,i.cy]),u=Jr([o,-n],f);var v=t.getModel("axisLabel").get("rotate")||0,d=je.innerTextLayout(s,v*Math.PI/180,-1);h=d.textAlign,c=d.textVerticalAlign}else{var p=l[1];u=i.coordToPoint([p+n,o]);var g=i.cx,y=i.cy;h=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:h,verticalAlign:c}}var fK={line:function(r,t,e,i){return r.dim==="angle"?{type:"Line",shape:Yx(t.coordToPoint([i[0],e]),t.coordToPoint([i[1],e]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:e}}},shadow:function(r,t,e,i){var n=Math.max(1,r.getBandWidth()),a=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:UC(t.cx,t.cy,i[0],i[1],(-e-n/2)*a,(-e+n/2)*a)}:{type:"Sector",shape:UC(t.cx,t.cy,e-n/2,e+n/2,0,Math.PI*2)}}},vK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.findAxisModel=function(e){var i,n=this.ecModel;return n.eachComponent(e,function(a){a.getCoordSysModel()===this&&(i=a)},this),i},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(yt),$x=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",le).models[0]},t.type="polarAxis",t}(yt);re($x,Js);var dK=function(r){E(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),pK=function(r){E(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),Xx=function(r){E(t,r);function t(e,i){return r.call(this,"radius",e,i)||this}return t.prototype.pointToData=function(e,i){return this.polar.pointToData(e,i)[this.dim==="radius"?0:1]},t}(Br);Xx.prototype.dataToRadius=Br.prototype.dataToCoord;Xx.prototype.radiusToData=Br.prototype.coordToData;var gK=Tt(),Zx=function(r){E(t,r);function t(e,i){return r.call(this,"angle",e,i||[0,360])||this}return t.prototype.pointToData=function(e,i){return this.polar.pointToData(e,i)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,i=e.getLabelModel(),n=e.scale,a=n.getExtent(),o=n.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=e.dataToCoord(s+1)-e.dataToCoord(s),u=Math.abs(l),h=fh(s==null?"":s+"",i.getFont(),"center","top"),c=Math.max(h.height,7),f=c/u;isNaN(f)&&(f=1/0);var v=Math.max(0,Math.floor(f)),d=gK(e.model),p=d.lastAutoInterval,g=d.lastTickCount;return p!=null&&g!=null&&Math.abs(p-v)<=1&&Math.abs(g-o)<=1&&p>v?v=p:(d.lastTickCount=o,d.lastAutoInterval=v),v},t}(Br);Zx.prototype.dataToAngle=Br.prototype.dataToCoord;Zx.prototype.angleToData=Br.prototype.coordToData;var OE=["radius","angle"],yK=function(){function r(t){this.dimensions=OE,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Xx,this._angleAxis=new Zx,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},r.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},r.prototype.getAxis=function(t){var e="_"+t+"Axis";return this[e]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),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){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},r.prototype.pointToData=function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},r.prototype.pointToCoord=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),a=n.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(e*e+i*i);e/=l,i/=l;for(var u=Math.atan2(-i,e)/Math.PI*180,h=u<o?1:-1;u<o||u>s;)u+=h*360;return[l,u]},r.prototype.coordToPoint=function(t){var e=t[0],i=t[1]/180*Math.PI,n=Math.cos(i)*e+this.cx,a=-Math.sin(i)*e+this.cy;return[n,a]},r.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),i=e.getExtent().slice();i[0]>i[1]&&i.reverse();var n=t.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-n[0]*a,endAngle:-n[1]*a,clockwise:t.inverse,contain:function(s,l){var u=s-this.cx,h=l-this.cy,c=u*u+h*h,f=this.r,v=this.r0;return f!==v&&c-o<=f*f&&c+o>=v*v}}},r.prototype.convertToPixel=function(t,e,i){var n=KC(e);return n===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(t,e,i){var n=KC(e);return n===this?this.pointToData(i):null},r}();function KC(r){var t=r.seriesModel,e=r.polarModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function mK(r,t,e){var i=t.get("center"),n=e.getWidth(),a=e.getHeight();r.cx=U(i[0],n),r.cy=U(i[1],a);var o=r.getRadiusAxis(),s=Math.min(n,a)/2,l=t.get("radius");l==null?l=[0,"100%"]:V(l)||(l=[0,l]);var u=[U(l[0],s),U(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function _K(r,t){var e=this,i=e.getAngleAxis(),n=e.getRadiusAxis();if(i.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(av(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),A(av(l,"angle"),function(u){i.scale.unionExtentFromData(l,u)})}}),yo(i.scale,i.model),yo(n.scale,n.model),i.type==="category"&&!i.onBand){var a=i.getExtent(),o=360/i.scale.count();i.inverse?a[1]+=o:a[1]-=o,i.setExtent(a[0],a[1])}}function xK(r){return r.mainType==="angleAxis"}function JC(r,t){var e;if(r.type=t.get("type"),r.scale=bh(t),r.onBand=t.get("boundaryGap")&&r.type==="category",r.inverse=t.get("inverse"),xK(t)){r.inverse=r.inverse!==t.get("clockwise");var i=t.get("startAngle"),n=(e=t.get("endAngle"))!==null&&e!==void 0?e:i+(r.inverse?-360:360);r.setExtent(i,n)}t.axis=r,r.model=t}var bK={dimensions:OE,create:function(r,t){var e=[];return r.eachComponent("polar",function(i,n){var a=new yK(n+"");a.update=_K;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=i.findAxisModel("radiusAxis"),u=i.findAxisModel("angleAxis");JC(o,l),JC(s,u),mK(a,i,t),e.push(a),i.coordinateSystem=a,a.model=i}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="polar"){var n=i.getReferringComponents("polar",le).models[0];i.coordinateSystem=n.coordinateSystem}}),e}},SK=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Bc(r,t,e){t[1]>t[0]&&(t=t.slice().reverse());var i=r.coordToPoint([t[0],e]),n=r.coordToPoint([t[1],e]);return{x1:i[0],y1:i[1],x2:n[0],y2:n[1]}}function zc(r){var t=r.getRadiusAxis();return t.inverse?0:1}function QC(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 wK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return t.prototype.render=function(e,i){if(this.group.removeAll(),!!e.get("show")){var n=e.axis,a=n.polar,o=a.getRadiusAxis().getExtent(),s=n.getTicksCoords(),l=n.getMinorTicksCoords(),u=F(n.getViewLabels(),function(h){h=it(h);var c=n.scale,f=c.type==="ordinal"?c.getRawOrdinalNumber(h.tickValue):h.tickValue;return h.coord=n.dataToCoord(f),h});QC(u),QC(s),A(SK,function(h){e.get([h,"show"])&&(!n.scale.isBlank()||h==="axisLine")&&TK[h](this.group,e,a,s,l,o,u)},this)}},t.type="angleAxis",t}(Ao),TK={axisLine:function(r,t,e,i,n,a){var o=t.getModel(["axisLine","lineStyle"]),s=e.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),h=zc(e),c=h?0:1,f,v=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[c]===0?f=new wo[v]({shape:{cx:e.cx,cy:e.cy,r:a[h],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):f=new Bs({shape:{cx:e.cx,cy:e.cy,r:a[h],r0:a[c]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,r.add(f)},axisTick:function(r,t,e,i,n,a){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[zc(e)],u=F(i,function(h){return new ce({shape:Bc(e,[l,l+s],h.coord)})});r.add(cr(u,{style:tt(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,t,e,i,n,a){if(n.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[zc(e)],h=[],c=0;c<n.length;c++)for(var f=0;f<n[c].length;f++)h.push(new ce({shape:Bc(e,[u,u+l],n[c][f].coord)}));r.add(cr(h,{style:tt(s.getModel("lineStyle").getLineStyle(),tt(o.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(r,t,e,i,n,a,o){var s=t.getCategories(!0),l=t.getModel("axisLabel"),u=l.get("margin"),h=t.get("triggerEvent");A(o,function(c,f){var v=l,d=c.tickValue,p=a[zc(e)],g=e.coordToPoint([p+u,c.coord]),y=e.cx,m=e.cy,_=Math.abs(g[0]-y)/p<.3?"center":g[0]>y?"left":"right",x=Math.abs(g[1]-m)/p<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[d]){var b=s[d];et(b)&&b.textStyle&&(v=new Lt(b.textStyle,l,l.ecModel))}var S=new St({silent:je.isLabelSilent(t),style:Gt(v,{x:g[0],y:g[1],fill:v.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:_,verticalAlign:x})});if(r.add(S),h){var w=je.makeAxisEventDataBase(t);w.targetType="axisLabel",w.value=c.rawLabel,ot(S).eventData=w}},this)},splitLine:function(r,t,e,i,n,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=0;c<i.length;c++){var f=u++%l.length;h[f]=h[f]||[],h[f].push(new ce({shape:Bc(e,a,i[c].coord)}))}for(var c=0;c<h.length;c++)r.add(cr(h[c],{style:tt({stroke:l[c%l.length]},s.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(r,t,e,i,n,a){if(n.length){for(var o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<n.length;u++)for(var h=0;h<n[u].length;h++)l.push(new ce({shape:Bc(e,a,n[u][h].coord)}));r.add(cr(l,{style:s.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(r,t,e,i,n,a){if(i.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=Math.PI/180,f=-i[0].coord*c,v=Math.min(a[0],a[1]),d=Math.max(a[0],a[1]),p=t.get("clockwise"),g=1,y=i.length;g<=y;g++){var m=g===y?i[0].coord:i[g].coord,_=u++%l.length;h[_]=h[_]||[],h[_].push(new Fe({shape:{cx:e.cx,cy:e.cy,r0:v,r:d,startAngle:f,endAngle:-m*c,clockwise:p},silent:!0})),f=-m*c}for(var g=0;g<h.length;g++)r.add(cr(h[g],{style:tt({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}},MK=["axisLine","axisTickLabel","axisName"],CK=["splitLine","splitArea","minorSplitLine"],AK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return t.prototype.render=function(e,i){if(this.group.removeAll(),!!e.get("show")){var n=this._axisGroup,a=this._axisGroup=new at;this.group.add(a);var o=e.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),h=o.getMinorTicksCoords(),c=l.getExtent()[0],f=o.getExtent(),v=LK(s,e,c),d=new je(e,v);A(MK,d.add,d),a.add(d.getGroup()),mh(n,a,e),A(CK,function(p){e.get([p,"show"])&&!o.scale.isBlank()&&DK[p](this.group,e,s,c,f,u,h)},this)}},t.type="radiusAxis",t}(Ao),DK={splitLine:function(r,t,e,i,n,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,h=e.getAngleAxis(),c=Math.PI/180,f=h.getExtent(),v=Math.abs(f[1]-f[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var d=[],p=0;p<a.length;p++){var g=u++%l.length;d[g]=d[g]||[],d[g].push(new wo[v]({shape:{cx:e.cx,cy:e.cy,r:Math.max(a[p].coord,0),startAngle:-f[0]*c,endAngle:-f[1]*c,clockwise:h.inverse}}))}for(var p=0;p<d.length;p++)r.add(cr(d[p],{style:tt({stroke:l[p%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(r,t,e,i,n,a,o){if(o.length){for(var s=t.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],h=0;h<o.length;h++)for(var c=0;c<o[h].length;c++)u.push(new Ai({shape:{cx:e.cx,cy:e.cy,r:o[h][c].coord}}));r.add(cr(u,{style:tt({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(r,t,e,i,n,a){if(a.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=a[0].coord,f=1;f<a.length;f++){var v=u++%l.length;h[v]=h[v]||[],h[v].push(new Fe({shape:{cx:e.cx,cy:e.cy,r0:c,r:a[f].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),c=a[f].coord}for(var f=0;f<h.length;f++)r.add(cr(h[f],{style:tt({fill:l[f%l.length]},s.getAreaStyle()),silent:!0}))}}};function LK(r,t,e){return{position:[r.cx,r.cy],rotation:e/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}function NE(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function BE(r,t){return t.dim+r.model.componentIndex}function IK(r,t,e){var i={},n=PK(Dt(t.getSeriesByType(r),function(a){return!t.isSeriesFiltered(a)&&a.coordinateSystem&&a.coordinateSystem.type==="polar"}));t.eachSeriesByType(r,function(a){if(a.coordinateSystem.type==="polar"){var o=a.getData(),s=a.coordinateSystem,l=s.getBaseAxis(),u=BE(s,l),h=NE(a),c=n[u][h],f=c.offset,v=c.width,d=s.getOtherAxis(l),p=a.coordinateSystem.cx,g=a.coordinateSystem.cy,y=a.get("barMinHeight")||0,m=a.get("barMinAngle")||0;i[h]=i[h]||[];for(var _=o.mapDimension(d.dim),x=o.mapDimension(l.dim),b=tn(o,_),S=l.dim!=="radius"||!a.get("roundCap",!0),w=d.model,T=w.get("startValue"),M=d.dataToCoord(T||0),C=0,D=o.count();C<D;C++){var L=o.get(_,C),I=o.get(x,C),P=L>=0?"p":"n",k=M;b&&(i[h][I]||(i[h][I]={p:M,n:M}),k=i[h][I][P]);var R=void 0,N=void 0,O=void 0,B=void 0;if(d.dim==="radius"){var G=d.dataToCoord(L)-M,H=l.dataToCoord(I);Math.abs(G)<y&&(G=(G<0?-1:1)*y),R=k,N=k+G,O=H-f,B=O-v,b&&(i[h][I][P]=N)}else{var W=d.dataToCoord(L,S)-M,q=l.dataToCoord(I);Math.abs(W)<m&&(W=(W<0?-1:1)*m),R=q+f,N=R+v,O=k,B=k+W,b&&(i[h][I][P]=B)}o.setItemLayout(C,{cx:p,cy:g,r0:R,r:N,startAngle:-O*Math.PI/180,endAngle:-B*Math.PI/180,clockwise:O>=B})}}})}function PK(r){var t={};A(r,function(i,n){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=BE(o,s),u=s.getExtent(),h=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),c=t[l]||{bandWidth:h,remainedWidth:h,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=c.stacks;t[l]=c;var v=NE(i);f[v]||c.autoWidthCount++,f[v]=f[v]||{width:0,maxWidth:0};var d=U(i.get("barWidth"),h),p=U(i.get("barMaxWidth"),h),g=i.get("barGap"),y=i.get("barCategoryGap");d&&!f[v].width&&(d=Math.min(c.remainedWidth,d),f[v].width=d,c.remainedWidth-=d),p&&(f[v].maxWidth=p),g!=null&&(c.gap=g),y!=null&&(c.categoryGap=y)});var e={};return A(t,function(i,n){e[n]={};var a=i.stacks,o=i.bandWidth,s=U(i.categoryGap,o),l=U(i.gap,1),u=i.remainedWidth,h=i.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),A(a,function(p,g){var y=p.maxWidth;y&&y<c&&(y=Math.min(y,u),p.width&&(y=Math.min(y,p.width)),u-=y,p.width=y,h--)}),c=(u-s)/(h+(h-1)*l),c=Math.max(c,0);var f=0,v;A(a,function(p,g){p.width||(p.width=c),v=p,f+=p.width*(1+l)}),v&&(f-=v.width*l);var d=-f/2;A(a,function(p,g){e[n][g]=e[n][g]||{offset:d,width:p.width},d+=p.width*(1+l)})}),e}var kK={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},RK={splitNumber:5},EK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="polar",t}(Yt);function OK(r){pt(Ih),Ao.registerAxisPointerClass("PolarAxisPointer",hK),r.registerCoordinateSystem("polar",bK),r.registerComponentModel(vK),r.registerComponentView(EK),Is(r,"angle",dK,kK),Is(r,"radius",pK,RK),r.registerComponentView(wK),r.registerComponentView(AK),r.registerLayout(ut(IK,"bar"))}function n0(r,t){t=t||{};var e=r.coordinateSystem,i=r.axis,n={},a=i.position,o=i.orient,s=e.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};n.position=[o==="vertical"?u.vertical[a]:l[0],o==="horizontal"?u.horizontal[a]:l[3]];var h={horizontal:0,vertical:1};n.rotation=Math.PI/2*h[o];var c={top:-1,bottom:1,right:1,left:-1};n.labelDirection=n.tickDirection=n.nameDirection=c[a],r.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),pe(t.labelInside,r.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var f=t.rotate;return f==null&&(f=r.get(["axisLabel","rotate"])),n.labelRotation=a==="top"?-f:f,n.z2=1,n}var NK=["axisLine","axisTickLabel","axisName"],BK=["splitArea","splitLine"],zK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="SingleAxisPointer",e}return t.prototype.render=function(e,i,n,a){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new at;var l=n0(e),u=new je(e,l);A(NK,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),A(BK,function(h){e.get([h,"show"])&&VK[h](this,this.group,this._axisGroup,e)},this),mh(s,this._axisGroup,e),r.prototype.render.call(this,e,i,n,a)},t.prototype.remove=function(){aR(this)},t.type="singleAxis",t}(Ao),VK={splitLine:function(r,t,e,i){var n=i.axis;if(!n.scale.isBlank()){var a=i.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=i.coordinateSystem.getRect(),h=n.isHorizontal(),c=[],f=0,v=n.getTicksCoords({tickModel:a}),d=[],p=[],g=0;g<v.length;++g){var y=n.toGlobalCoord(v[g].coord);h?(d[0]=y,d[1]=u.y,p[0]=y,p[1]=u.y+u.height):(d[0]=u.x,d[1]=y,p[0]=u.x+u.width,p[1]=y);var m=new ce({shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},silent:!0});Cs(m.shape,l);var _=f++%s.length;c[_]=c[_]||[],c[_].push(m)}for(var x=o.getLineStyle(["color"]),g=0;g<c.length;++g)t.add(cr(c[g],{style:tt({stroke:s[g%s.length]},x),silent:!0}))}},splitArea:function(r,t,e,i){nR(r,e,i,i)}},mf=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getCoordSysModel=function(){return this},t.type="singleAxis",t.layoutMode="box",t.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},t}(yt);re(mf,Js.prototype);var FK=function(r){E(t,r);function t(e,i,n,a,o){var s=r.call(this,e,i,n)||this;return s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.pointToData=function(e,i){return this.coordinateSystem.pointToData(e)[0]},t}(Br),zE=["single"],GK=function(){function r(t,e,i){this.type="single",this.dimension="single",this.dimensions=zE,this.axisPointerEnabled=!0,this.model=t,this._init(t,e,i)}return r.prototype._init=function(t,e,i){var n=this.dimension,a=new FK(n,bh(t),[0,0],t.get("type"),t.get("position")),o=a.type==="category";a.onBand=o&&t.get("boundaryGap"),a.inverse=t.get("inverse"),a.orient=t.get("orient"),t.axis=a,a.model=t,a.coordinateSystem=this,this._axis=a},r.prototype.update=function(t,e){t.eachSeries(function(i){if(i.coordinateSystem===this){var n=i.getData();A(n.mapDimensionsAll(this.dimension),function(a){this._axis.scale.unionExtentFromData(n,a)},this),yo(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(t,e){this._rect=ue({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],a=e.inverse?1:0;e.setExtent(n[a],n[1-a]),this._updateAxisTransform(e,i?t.x:t.y)},r.prototype._updateAxisTransform=function(t,e){var i=t.getExtent(),n=i[0]+i[1],a=t.isHorizontal();t.toGlobalCoord=a?function(o){return o+e}:function(o){return n-o+e},t.toLocalCoord=a?function(o){return o-e}:function(o){return n-o+e}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(t){var e=this.getRect(),i=this.getAxis(),n=i.orient;return n==="horizontal"?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},r.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t[e.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(t){var e=this.getAxis(),i=this.getRect(),n=[],a=e.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),n[a]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-a]=a===0?i.y+i.height/2:i.x+i.width/2,n},r.prototype.convertToPixel=function(t,e,i){var n=tA(e);return n===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(t,e,i){var n=tA(e);return n===this?this.pointToData(i):null},r}();function tA(r){var t=r.seriesModel,e=r.singleAxisModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function HK(r,t){var e=[];return r.eachComponent("singleAxis",function(i,n){var a=new GK(i,r,t);a.name="single_"+n,a.resize(i,t),i.coordinateSystem=a,e.push(a)}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="singleAxis"){var n=i.getReferringComponents("singleAxis",le).models[0];i.coordinateSystem=n&&n.coordinateSystem}}),e}var WK={create:HK,dimensions:zE},eA=["x","y"],UK=["width","height"],YK=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,i,n,a,o){var s=n.axis,l=s.coordinateSystem,u=Xg(l,1-_v(s)),h=l.dataToPoint(i)[0],c=a.get("type");if(c&&c!=="none"){var f=Wx(a),v=$K[c](s,h,u);v.style=f,e.graphicKey=v.type,e.pointer=v}var d=n0(n);PE(i,e,d,n,a,o)},t.prototype.getHandleTransform=function(e,i,n){var a=n0(i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var o=Ux(i.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,i,n,a){var o=n.axis,s=o.coordinateSystem,l=_v(o),u=Xg(s,l),h=[e.x,e.y];h[l]+=i[l],h[l]=Math.min(u[1],h[l]),h[l]=Math.max(u[0],h[l]);var c=Xg(s,1-l),f=(c[1]+c[0])/2,v=[f,f];return v[l]=h[l],{x:h[0],y:h[1],rotation:e.rotation,cursorPoint:v,tooltipOption:{verticalAlign:"middle"}}},t}(Hx),$K={line:function(r,t,e){var i=Yx([t,e[0]],[t,e[1]],_v(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,t,e){var i=r.getBandWidth(),n=e[1]-e[0];return{type:"Rect",shape:kE([t-i/2,e[0]],[i,n],_v(r))}}};function _v(r){return r.isHorizontal()?0:1}function Xg(r,t){var e=r.getRect();return[e[eA[t]],e[eA[t]]+e[UK[t]]]}var XK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="single",t}(Yt);function ZK(r){pt(Ih),Ao.registerAxisPointerClass("SingleAxisPointer",YK),r.registerComponentView(XK),r.registerComponentView(zK),r.registerComponentModel(mf),Is(r,"single",mf,mf.defaultOption),r.registerCoordinateSystem("single",WK)}var jK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i,n){var a=Us(e);r.prototype.init.apply(this,arguments),rA(e,a)},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),rA(this.option,e)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(yt);function rA(r,t){var e=r.cellSize,i;V(e)?i=e:i=r.cellSize=[e,e],i.length===1&&(i[1]=i[0]);var n=F([0,1],function(a){return QH(t,a)&&(i[a]="auto"),i[a]!=null&&i[a]!=="auto"});Zn(r,t,{type:"box",ignoreSize:n})}var qK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=this.group;a.removeAll();var o=e.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=i.getLocaleModel();this._renderDayRect(e,s,a),this._renderLines(e,s,l,a),this._renderYearText(e,s,l,a),this._renderMonthText(e,u,l,a),this._renderWeekText(e,u,s,l,a)},t.prototype._renderDayRect=function(e,i,n){for(var a=e.coordinateSystem,o=e.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=i.start.time;u<=i.end.time;u=a.getNextNDay(u,1).time){var h=a.dataToRect([u],!1).tl,c=new wt({shape:{x:h[0],y:h[1],width:s,height:l},cursor:"default",style:o});n.add(c)}},t.prototype._renderLines=function(e,i,n,a){var o=this,s=e.coordinateSystem,l=e.getModel(["splitLine","lineStyle"]).getLineStyle(),u=e.get(["splitLine","show"]),h=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=i.start,f=0;c.time<=i.end.time;f++){d(c.formatedDate),f===0&&(c=s.getDateInfo(i.start.y+"-"+i.start.m));var v=c.date;v.setMonth(v.getMonth()+1),c=s.getDateInfo(v)}d(s.getNextNDay(i.end.time,1).formatedDate);function d(p){o._firstDayOfMonth.push(s.getDateInfo(p)),o._firstDayPoints.push(s.dataToRect([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,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,h,n),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,h,n),l,a)},t.prototype._getEdgesPoints=function(e,i,n){var a=[e[0].slice(),e[e.length-1].slice()],o=n==="horizontal"?0:1;return a[0][o]=a[0][o]-i/2,a[1][o]=a[1][o]+i/2,a},t.prototype._drawSplitline=function(e,i,n){var a=new We({z2:20,shape:{points:e},style:i});n.add(a)},t.prototype._getLinePointsOfOneWeek=function(e,i,n){for(var a=e.coordinateSystem,o=a.getDateInfo(i),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),h=a.dataToRect([u.time],!1);s[2*u.day]=h.tl,s[2*u.day+1]=h[n==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(e,i){return Y(e)&&e?jH(e,i):Q(e)?e(i):i.nameMap},t.prototype._yearTextPositionControl=function(e,i,n,a,o){var s=i[0],l=i[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var h=0;return(a==="left"||a==="right")&&(h=Math.PI/2),{rotation:h,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(e,i,n,a){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]],h=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,f=n==="horizontal"?0:1,v={top:[h,u[f][1]],bottom:[h,u[1-f][1]],left:[u[1-f][0],c],right:[u[f][0],c]},d=i.start.y;+i.end.y>+i.start.y&&(d=d+"-"+i.end.y);var p=o.get("formatter"),g={start:i.start.y,end:i.end.y,nameMap:d},y=this._formatterLabel(p,g),m=new St({z2:30,style:Gt(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,v[l],n,l,s)),a.add(m)}},t.prototype._monthTextPositionControl=function(e,i,n,a,o){var s="left",l="top",u=e[0],h=e[1];return n==="horizontal"?(h=h+o,i&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,i&&(l="middle"),a==="start"&&(s="right")),{x:u,y:h,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(e,i,n,a){var o=e.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),h=o.get("align"),c=[this._tlpoints,this._blpoints];(!s||Y(s))&&(s&&(i=cm(s)||i),s=i.get(["time","monthAbbr"])||[]);var f=u==="start"?0:1,v=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=h==="center",p=o.get("silent"),g=0;g<c[f].length-1;g++){var y=c[f][g].slice(),m=this._firstDayOfMonth[g];if(d){var _=this._firstDayPoints[g];y[v]=(_[v]+c[0][g+1][v])/2}var x=o.get("formatter"),b=s[+m.m-1],S={yyyy:m.y,yy:(m.y+"").slice(2),MM:m.m,M:+m.m,nameMap:b},w=this._formatterLabel(x,S),T=new St({z2:30,style:z(Gt(o,{text:w}),this._monthTextPositionControl(y,d,n,u,l)),silent:p});a.add(T)}}},t.prototype._weekTextPositionControl=function(e,i,n,a,o){var s="center",l="middle",u=e[0],h=e[1],c=n==="start";return i==="horizontal"?(u=u+a+(c?1:-1)*o[0]/2,s=c?"right":"left"):(h=h+a+(c?1:-1)*o[1]/2,l=c?"bottom":"top"),{x:u,y:h,align:s,verticalAlign:l}},t.prototype._renderWeekText=function(e,i,n,a,o){var s=e.getModel("dayLabel");if(s.get("show")){var l=e.coordinateSystem,u=s.get("position"),h=s.get("nameMap"),c=s.get("margin"),f=l.getFirstDayOfWeek();if(!h||Y(h)){h&&(i=cm(h)||i);var v=i.get(["time","dayOfWeekShort"]);h=v||F(i.get(["time","dayOfWeekAbbr"]),function(S){return S[0]})}var d=l.getNextNDay(n.end.time,7-n.lweek).time,p=[l.getCellWidth(),l.getCellHeight()];c=U(c,Math.min(p[1],p[0])),u==="start"&&(d=l.getNextNDay(n.start.time,-(7+n.fweek)).time,c=-c);for(var g=s.get("silent"),y=0;y<7;y++){var m=l.getNextNDay(d,y),_=l.dataToRect([m.time],!1).center,x=y;x=Math.abs((y+f)%7);var b=new St({z2:30,style:z(Gt(s,{text:h[x]}),this._weekTextPositionControl(_,a,u,c,p)),silent:g});o.add(b)}}},t.type="calendar",t}(Yt),Zg=864e5,KK=function(){function r(t,e,i){this.type="calendar",this.dimensions=r.dimensions,this.getDimensionsInfo=r.getDimensionsInfo,this._model=t}return r.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},r.prototype.getRangeInfo=function(){return this._rangeInfo},r.prototype.getModel=function(){return this._model},r.prototype.getRect=function(){return this._rect},r.prototype.getCellWidth=function(){return this._sw},r.prototype.getCellHeight=function(){return this._sh},r.prototype.getOrient=function(){return this._orient},r.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},r.prototype.getDateInfo=function(t){t=pr(t);var e=t.getFullYear(),i=t.getMonth()+1,n=i<10?"0"+i:""+i,a=t.getDate(),o=a<10?"0"+a:""+a,s=t.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:e+"",m:n,d:o,day:s,time:t.getTime(),formatedDate:e+"-"+n+"-"+o,date:t}},r.prototype.getNextNDay=function(t,e){return e=e||0,e===0?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+e),this.getDateInfo(t))},r.prototype.update=function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,n=["width","height"],a=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[i,7]:[7,i];A([0,1],function(c){h(a,c)&&(o[n[c]]=a[c]*s[c])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=ue(o,l);A([0,1],function(c){h(a,c)||(a[c]=u[n[c]]/s[c])});function h(c,f){return c[f]!=null&&c[f]!=="auto"}this._sw=a[0],this._sh=a[1]},r.prototype.dataToPoint=function(t,e){V(t)&&(t=t[0]),e==null&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,a=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.time<n.end.time+Zg))return[NaN,NaN];var o=i.day,s=this._getRangeInfo([n.start.time,a]).nthWeek;return this._orient==="vertical"?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},r.prototype.pointToData=function(t){var e=this.pointToDate(t);return e&&e.time},r.prototype.dataToRect=function(t,e){var i=this.dataToPoint(t,e);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},r.prototype.pointToDate=function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(i,e-1,n):this._getDateByWeeksAndDay(e,i-1,n)},r.prototype.convertToPixel=function(t,e,i){var n=iA(e);return n===this?n.dataToPoint(i):null},r.prototype.convertFromPixel=function(t,e,i){var n=iA(e);return n===this?n.pointToData(i):null},r.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},r.prototype._initRangeOption=function(){var t=this._model.get("range"),e;if(V(t)&&t.length===1&&(t=t[0]),V(t))e=t;else{var i=t.toString();if(/^\d{4}$/.test(i)&&(e=[i+"-01-01",i+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(i)){var n=this.getDateInfo(i),a=n.date;a.setMonth(a.getMonth()+1);var o=this.getNextNDay(a,-1);e=[n.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(i)&&(e=[i,i])}if(!e)return t;var s=this._getRangeInfo(e);return s.start.time>s.end.time&&e.reverse(),e},r.prototype._getRangeInfo=function(t){var e=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],i;e[0].time>e[1].time&&(i=!0,e.reverse());var n=Math.floor(e[1].time/Zg)-Math.floor(e[0].time/Zg)+1,a=new Date(e[0].time),o=a.getDate(),s=e[1].date.getDate();a.setDate(o+n-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-e[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-e[1].time)*u>0;)n-=u,a.setDate(l-u);var h=Math.floor((n+e[0].day+6)/7),c=i?-h+1:h-1;return i&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:n,weeks:h,nthWeek:c,fweek:e[0].day,lweek:e[1].day}},r.prototype._getDateByWeeksAndDay=function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||t===0&&e<n.fweek||t===n.weeks&&e>n.lweek)return null;var a=(t-1)*7-n.fweek+e,o=new Date(n.start.time);return o.setDate(+n.start.d+a),this.getDateInfo(o)},r.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var a=new r(n);i.push(a),n.coordinateSystem=a}),t.eachSeries(function(n){n.get("coordinateSystem")==="calendar"&&(n.coordinateSystem=i[n.get("calendarIndex")||0])}),i},r.dimensions=["time","value"],r}();function iA(r){var t=r.calendarModel,e=r.seriesModel,i=t?t.coordinateSystem:e?e.coordinateSystem:null;return i}function JK(r){r.registerComponentModel(jK),r.registerComponentView(qK),r.registerCoordinateSystem("calendar",KK)}function QK(r,t){var e=r.existing;if(t.id=r.keyInfo.id,!t.type&&e&&(t.type=e.type),t.parentId==null){var i=t.parentOption;i?t.parentId=i.id:e&&(t.parentId=e.parentId)}t.parentOption=null}function nA(r,t){var e;return A(t,function(i){r[i]!=null&&r[i]!=="auto"&&(e=!0)}),e}function tJ(r,t,e){var i=z({},e),n=r[t],a=e.$action||"merge";a==="merge"?n?(ht(n,i,!0),Zn(n,i,{ignoreSize:!0}),AI(e,n),Vc(e,n),Vc(e,n,"shape"),Vc(e,n,"style"),Vc(e,n,"extra"),e.clipPath=n.clipPath):r[t]=i:a==="replace"?r[t]=i:a==="remove"&&n&&(r[t]=null)}var VE=["transition","enterFrom","leaveTo"],eJ=VE.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Vc(r,t,e){if(e&&(!r[e]&&t[e]&&(r[e]={}),r=r[e],t=t[e]),!(!r||!t))for(var i=e?VE:eJ,n=0;n<i.length;n++){var a=i[n];r[a]==null&&t[a]!=null&&(r[a]=t[a])}}function rJ(r,t){if(r&&(r.hv=t.hv=[nA(t,["left","right"]),nA(t,["top","bottom"])],r.type==="group")){var e=r,i=t;e.width==null&&(e.width=i.width=0),e.height==null&&(e.height=i.height=0)}}var iJ=function(r){E(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.mergeOption=function(e,i){var n=this.option.elements;this.option.elements=null,r.prototype.mergeOption.call(this,e,i),this.option.elements=n},t.prototype.optionUpdated=function(e,i){var n=this.option,a=(i?n:e).elements,o=n.elements=i?[]:n.elements,s=[];this._flatten(a,s,null);var l=M2(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];A(l,function(h,c){var f=h.newOption;f&&(u.push(f),QK(h,f),tJ(o,c,f),rJ(o[c],f))},this),n.elements=Dt(o,function(h){return h&&delete h.$action,h!=null})},t.prototype._flatten=function(e,i,n){A(e,function(a){if(a){n&&(a.parentOption=n),i.push(a);var o=a.children;o&&o.length&&this._flatten(o,i,a),delete a.children}},this)},t.prototype.useElOptionsToUpdate=function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e},t.type="graphic",t.defaultOption={elements:[]},t}(yt),aA={path:null,compoundPath:null,group:at,image:xe,text:St},Mr=Tt(),nJ=function(r){E(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._elMap=Z()},t.prototype.render=function(e,i,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)},t.prototype._updateElements=function(e){var i=e.useElOptionsToUpdate();if(i){var n=this._elMap,a=this.group,o=e.get("z"),s=e.get("zlevel");A(i,function(l){var u=he(l.id,null),h=u!=null?n.get(u):null,c=he(l.parentId,null),f=c!=null?n.get(c):a,v=l.type,d=l.style;v==="text"&&d&&l.hv&&l.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);var p=l.textContent,g=l.textConfig;if(d&&_E(d,v,!!g,!!p)){var y=xE(d,v,!0);!g&&y.textConfig&&(g=l.textConfig=y.textConfig),!p&&y.textContent&&(p=y.textContent)}var m=aJ(l),_=l.$action||"merge",x=_==="merge",b=_==="replace";if(x){var S=!h,w=h;S?w=oA(u,f,l.type,n):(w&&(Mr(w).isNew=!1),TE(w)),w&&(gf(w,m,e,{isInit:S}),sA(w,l,o,s))}else if(b){_f(h,l,n,e);var T=oA(u,f,l.type,n);T&&(gf(T,m,e,{isInit:!0}),sA(T,l,o,s))}else _==="remove"&&(SE(h,l),_f(h,l,n,e));var M=n.get(u);if(M&&p)if(x){var C=M.getTextContent();C?C.attr(p):M.setTextContent(new St(p))}else b&&M.setTextContent(new St(p));if(M){var D=l.clipPath;if(D){var L=D.type,I=void 0,S=!1;if(x){var P=M.getClipPath();S=!P||Mr(P).type!==L,I=S?a0(L):P}else b&&(S=!0,I=a0(L));M.setClipPath(I),gf(I,D,e,{isInit:S}),yv(I,D.keyframeAnimation,e)}var k=Mr(M);M.setTextConfig(g),k.option=l,oJ(M,e,l),So({el:M,componentModel:e,itemName:M.name,itemTooltipOption:l.tooltip}),yv(M,l.keyframeAnimation,e)}})}},t.prototype._relocate=function(e,i){for(var n=e.option.elements,a=this.group,o=this._elMap,s=i.getWidth(),l=i.getHeight(),u=["x","y"],h=0;h<n.length;h++){var c=n[h],f=he(c.id,null),v=f!=null?o.get(f):null;if(!(!v||!v.isGroup)){var d=v.parent,p=d===a,g=Mr(v),y=Mr(d);g.width=U(g.option.width,p?s:y.width)||0,g.height=U(g.option.height,p?l:y.height)||0}}for(var h=n.length-1;h>=0;h--){var c=n[h],f=he(c.id,null),v=f!=null?o.get(f):null;if(v){var d=v.parent,y=Mr(d),m=d===a?{width:s,height:l}:{width:y.width,height:y.height},_={},x=sd(v,c,m,null,{hv:c.hv,boundingMode:c.bounding},_);if(!Mr(v).isNew&&x){for(var b=c.transition,S={},w=0;w<u.length;w++){var T=u[w],M=_[T];b&&(oo(b)||vt(b,T)>=0)?S[T]=M:v[T]=M}At(v,S,e,0)}else v.attr(_)}}},t.prototype._clear=function(){var e=this,i=this._elMap;i.each(function(n){_f(n,Mr(n).option,i,e._lastGraphicModel)}),this._elMap=Z()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(Yt);function a0(r){var t=X(aA,r)?aA[r]:td(r),e=new t({});return Mr(e).type=r,e}function oA(r,t,e,i){var n=a0(e);return t.add(n),i.set(r,n),Mr(n).id=r,Mr(n).isNew=!0,n}function _f(r,t,e,i){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(a){_f(a,t,e,i)}),Td(r,t,i),e.removeKey(Mr(r).id))}function sA(r,t,e,i){r.isGroup||A([["cursor",kr.prototype.cursor],["zlevel",i||0],["z",e||0],["z2",0]],function(n){var a=n[0];X(t,a)?r[a]=lt(t[a],n[1]):r[a]==null&&(r[a]=n[1])}),A(xt(t),function(n){if(n.indexOf("on")===0){var a=t[n];r[n]=Q(a)?a:null}}),X(t,"draggable")&&(r.draggable=t.draggable),t.name!=null&&(r.name=t.name),t.id!=null&&(r.id=t.id)}function aJ(r){return r=z({},r),A(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(CI),function(t){delete r[t]}),r}function oJ(r,t,e){var i=ot(r).eventData;!r.silent&&!r.ignore&&!i&&(i=ot(r).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:r.name}),i&&(i.info=e.info)}function sJ(r){r.registerComponentModel(iJ),r.registerComponentView(nJ),r.registerPreprocessor(function(t){var e=t.graphic;V(e)?!e[0]||!e[0].elements?t.graphic=[{elements:e}]:t.graphic=[t.graphic[0]]:e&&!e.elements&&(t.graphic=[{elements:[e]}])})}var lA=["x","y","radius","angle","single"],lJ=["cartesian2d","polar","singleAxis"];function uJ(r){var t=r.get("coordinateSystem");return vt(lJ,t)>=0}function Rn(r){return r+"Axis"}function hJ(r,t){var e=Z(),i=[],n=Z();r.eachComponent({mainType:"dataZoom",query:t},function(h){n.get(h.uid)||s(h)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(h){!n.get(h.uid)&&l(h)&&(s(h),a=!0)}function s(h){n.set(h.uid,!0),i.push(h),u(h)}function l(h){var c=!1;return h.eachTargetAxis(function(f,v){var d=e.get(f);d&&d[v]&&(c=!0)}),c}function u(h){h.eachTargetAxis(function(c,f){(e.get(c)||e.set(c,[]))[f]=!0})}return i}function FE(r){var t=r.ecModel,e={infoList:[],infoMap:Z()};return r.eachTargetAxis(function(i,n){var a=t.getComponent(Rn(i),n);if(a){var o=a.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(a)}}}),e}var jg=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}(),rh=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,i,n){var a=uA(e);this.settledOption=a,this.mergeDefaultAndTheme(e,n),this._doInit(a)},t.prototype.mergeOption=function(e){var i=uA(e);ht(this.option,e,!0),ht(this.settledOption,i,!0),this._doInit(i)},t.prototype._doInit=function(e){var i=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(i[a[0]]=n[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),i=this._targetAxisInfoMap=Z(),n=this._fillSpecifiedTargetAxis(i);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var i=!1;return A(lA,function(n){var a=this.getReferringComponents(Rn(n),GG);if(a.specified){i=!0;var o=new jg;A(a.models,function(s){o.add(s.componentIndex)}),e.set(n,o)}},this),i},t.prototype._fillAutoTargetAxisByOrient=function(e,i){var n=this.ecModel,a=!0;if(a){var o=i==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=n.findComponents({mainType:"singleAxis",filter:function(h){return h.get("orient",!0)===i}});l(s,"single")}function l(u,h){var c=u[0];if(c){var f=new jg;if(f.add(c.componentIndex),e.set(h,f),a=!1,h==="x"||h==="y"){var v=c.getReferringComponents("grid",le).models[0];v&&A(u,function(d){c.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",le).models[0]&&f.add(d.componentIndex)})}}}a&&A(lA,function(u){if(a){var h=n.findComponents({mainType:Rn(u),filter:function(f){return f.get("type",!0)==="category"}});if(h[0]){var c=new jg;c.add(h[0].componentIndex),e.set(u,c),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(i){!e&&(e=i)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var i=this._rangePropMode,n=this.get("rangeMode");A([["start","startValue"],["end","endValue"]],function(a,o){var s=e[a[0]]!=null,l=e[a[1]]!=null;s&&!l?i[o]="percent":!s&&l?i[o]="value":n?i[o]=n[o]:s&&(i[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(i,n){e==null&&(e=this.ecModel.getComponent(Rn(i),n))},this),e},t.prototype.eachTargetAxis=function(e,i){this._targetAxisInfoMap.each(function(n,a){A(n.indexList,function(o){e.call(i,a,o)})})},t.prototype.getAxisProxy=function(e,i){var n=this.getAxisModel(e,i);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,i){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[i])return this.ecModel.getComponent(Rn(e),i)},t.prototype.setRawRange=function(e){var i=this.option,n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(a){(e[a[0]]!=null||e[a[1]]!=null)&&(i[a[0]]=n[a[0]]=e[a[0]],i[a[1]]=n[a[1]]=e[a[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var i=this.option;A(["start","startValue","end","endValue"],function(n){i[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,i){if(e==null&&i==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(e,i).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var i,n=this._targetAxisInfoMap.keys(),a=0;a<n.length;a++)for(var o=n[a],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;i||(i=u)}return i},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(yt);function uA(r){var t={};return A(["start","end","startValue","endValue","throttle"],function(e){r.hasOwnProperty(e)&&(t[e]=r[e])}),t}var cJ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t}(rh),jx=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n,a){this.dataZoomModel=e,this.ecModel=i,this.api=n},t.type="dataZoom",t}(Yt),fJ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t}(jx),is=A,hA=fr,vJ=function(){function r(t,e,i,n){this._dimName=t,this._axisIndex=e,this.ecModel=n,this._dataZoomModel=i}return r.prototype.hostedBy=function(t){return this._dataZoomModel===t},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(uJ(e)){var i=Rn(this._dimName),n=e.getReferringComponents(i,le).models[0];n&&this._axisIndex===n.componentIndex&&t.push(e)}},this),t},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return it(this._minMaxSpan)},r.prototype.calculateDataWindow=function(t){var e=this._dataExtent,i=this.getAxisModel(),n=i.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;is(["start","end"],function(f,v){var d=t[f],p=t[f+"Value"];a[v]==="percent"?(d==null&&(d=o[v]),p=n.parse(Pt(d,o,e))):(u=!0,p=p==null?e[v]:n.parse(p),d=Pt(p,e,o)),l[v]=p==null||isNaN(p)?e[v]:p,s[v]=d==null||isNaN(d)?o[v]:d}),hA(l),hA(s);var h=this._minMaxSpan;u?c(l,s,e,o,!1):c(s,l,o,e,!0);function c(f,v,d,p,g){var y=g?"Span":"ValueSpan";Do(0,f,d,"all",h["min"+y],h["max"+y]);for(var m=0;m<2;m++)v[m]=Pt(f[m],d,p,!0),g&&(v[m]=n.parse(v[m]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=dJ(this,this._dimName,e),this._updateMinMaxSpan();var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(t,e){if(t!==this._dataZoomModel)return;var i=this._dimName,n=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._valueWindow;if(a==="none")return;is(n,function(l){var u=l.getData(),h=u.mapDimensionsAll(i);if(h.length){if(a==="weakFilter"){var c=u.getStore(),f=F(h,function(v){return u.getDimensionIndex(v)},u);u.filterSelf(function(v){for(var d,p,g,y=0;y<h.length;y++){var m=c.get(f[y],v),_=!isNaN(m),x=m<o[0],b=m>o[1];if(_&&!x&&!b)return!0;_&&(g=!0),x&&(d=!0),b&&(p=!0)}return g&&d&&p})}else is(h,function(v){if(a==="empty")l.setData(u=u.map(v,function(p){return s(p)?p:NaN}));else{var d={};d[v]=o,u.selectRange(d)}});is(h,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,i=this._dataExtent;is(["min","max"],function(n){var a=e.get(n+"Span"),o=e.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=Pt(i[0]+o,i,[0,100],!0):a!=null&&(o=Pt(a,[0,100],i,!0)-i[0]),t[n+"Span"]=a,t[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,i=this._valueWindow;if(e){var n=K0(i,[0,500]);n=Math.min(n,20);var a=t.axis.scale.rawExtentInfo;e[0]!==0&&a.setDeterminedMinMax("min",+i[0].toFixed(n)),e[1]!==100&&a.setDeterminedMinMax("max",+i[1].toFixed(n)),a.freeze()}},r}();function dJ(r,t,e){var i=[1/0,-1/0];is(e,function(o){RU(i,o.getData(),t)});var n=r.getAxisModel(),a=nk(n.axis.scale,n,i).calculate();return[a.min,a.max]}var pJ={getTargetSeries:function(r){function t(n){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(Rn(o),s);n(o,s,l,a)})})}t(function(n,a,o,s){o.__dzAxisProxy=null});var e=[];t(function(n,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new vJ(n,a,s,r),e.push(o.__dzAxisProxy))});var i=Z();return A(e,function(n){A(n.getTargetSeriesModels(),function(a){i.set(a.uid,a)})}),i},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(i,n){e.getAxisProxy(i,n).reset(e)}),e.eachTargetAxis(function(i,n){e.getAxisProxy(i,n).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var i=e.findRepresentativeAxisProxy();if(i){var n=i.getDataPercentWindow(),a=i.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:a[0],endValue:a[1]})}})}};function gJ(r){r.registerAction("dataZoom",function(t,e){var i=hJ(e,t);A(i,function(n){n.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var cA=!1;function qx(r){cA||(cA=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,pJ),gJ(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function yJ(r){r.registerComponentModel(cJ),r.registerComponentView(fJ),qx(r)}var Ar=function(){function r(){}return r}(),GE={};function ns(r,t){GE[r]=t}function HE(r){return GE[r]}var mJ=function(r){E(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(i,n){var a=HE(n);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(e)),ht(i,a.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(yt);function _J(r,t,e){var i=t.getBoxLayoutParams(),n=t.get("padding"),a={width:e.getWidth(),height:e.getHeight()},o=ue(i,a,n);io(t.get("orient"),r,t.get("itemGap"),o.width,o.height),sd(r,i,a,n)}function WE(r,t){var e=To(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),r=new wt({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1}),r}var xJ=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,i,n,a){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")||{},h=this._features||(this._features={}),c=[];A(u,function(d,p){c.push(p)}),new Qi(this._featureNames||[],c).add(f).update(f).remove(ut(f,null)).execute(),this._featureNames=c;function f(d,p){var g=c[d],y=c[p],m=u[g],_=new Lt(m,e,e.ecModel),x;if(a&&a.newTitle!=null&&a.featureName===g&&(m.title=a.newTitle),g&&!y){if(bJ(g))x={onclick:_.option.onclick,featureName:g};else{var b=HE(g);if(!b)return;x=new b}h[g]=x}else if(x=h[y],!x)return;x.uid=Ws("toolbox-feature"),x.model=_,x.ecModel=i,x.api=n;var S=x instanceof Ar;if(!g&&y){S&&x.dispose&&x.dispose(i,n);return}if(!_.get("show")||S&&x.unusable){S&&x.remove&&x.remove(i,n);return}v(_,x,g),_.setIconStatus=function(w,T){var M=this.option,C=this.iconPaths;M.iconStatus=M.iconStatus||{},M.iconStatus[w]=T,C[w]&&(T==="emphasis"?Ki:Ji)(C[w])},x instanceof Ar&&x.render&&x.render(_,i,n,a)}function v(d,p,g){var y=d.getModel("iconStyle"),m=d.getModel(["emphasis","iconStyle"]),_=p instanceof Ar&&p.getIcons?p.getIcons():d.get("icon"),x=d.get("title")||{},b,S;Y(_)?(b={},b[g]=_):b=_,Y(x)?(S={},S[g]=x):S=x;var w=d.iconPaths={};A(b,function(T,M){var C=Gs(T,{},{x:-s/2,y:-s/2,width:s,height:s});C.setStyle(y.getItemStyle());var D=C.ensureState("emphasis");D.style=m.getItemStyle();var L=new St({style:{text:S[M],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null,font:y_({fontStyle:m.get("textFontStyle"),fontFamily:m.get("textFontFamily"),fontSize:m.get("textFontSize"),fontWeight:m.get("textFontWeight")},i)},ignore:!0});C.setTextContent(L),So({el:C,componentModel:e,itemName:M,formatterParamsExtra:{title:S[M]}}),C.__title=S[M],C.on("mouseover",function(){var I=m.getItemStyle(),P=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";L.setStyle({fill:m.get("textFill")||I.fill||I.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),C.setTextConfig({position:m.get("textPosition")||P}),L.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",M])!=="emphasis"&&n.leaveEmphasis(this),L.hide()}),(d.get(["iconStatus",M])==="emphasis"?Ki:Ji)(C),o.add(C),C.on("click",$(p.onclick,p,i,n,M)),w[M]=C})}_J(o,e,n),o.add(WE(o.getBoundingRect(),e)),l||o.eachChild(function(d){var p=d.__title,g=d.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),m=d.getTextContent(),_=m&&m.ensureState("emphasis");if(_&&!Q(_)&&p){var x=_.style||(_.style={}),b=fh(p,St.makeFont(x)),S=d.x+o.x,w=d.y+o.y+s,T=!1;w+b.height>n.getHeight()&&(y.position="top",T=!0);var M=T?-5-b.height:s+10;S+b.width/2>n.getWidth()?(y.position=["100%",M],x.align="right"):S-b.width/2<0&&(y.position=[0,M],x.align="left")}})},t.prototype.updateView=function(e,i,n,a){A(this._features,function(o){o instanceof Ar&&o.updateView&&o.updateView(o.model,i,n,a)})},t.prototype.remove=function(e,i){A(this._features,function(n){n instanceof Ar&&n.remove&&n.remove(e,i)}),this.group.removeAll()},t.prototype.dispose=function(e,i){A(this._features,function(n){n instanceof Ar&&n.dispose&&n.dispose(e,i)})},t.type="toolbox",t}(Yt);function bJ(r){return r.indexOf("my")===0}var SJ=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,i){var n=this.model,a=n.get("name")||e.get("title.0.text")||"echarts",o=i.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=i.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=mt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var h=document.createElement("a");h.download=a+"."+s,h.target="_blank",h.href=l;var c=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});h.dispatchEvent(c)}else if(window.navigator.msSaveOrOpenBlob||o){var f=l.split(","),v=f[0].indexOf("base64")>-1,d=o?decodeURIComponent(f[1]):f[1];v&&(d=window.atob(d));var p=a+"."+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 x=_.contentWindow,b=x.document;b.open("image/svg+xml","replace"),b.write(d),b.close(),x.focus(),b.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var S=n.get("lang"),w='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(S&&S[0]||"")+'" /></body>',T=window.open();T.document.write(w),T.document.title=a}},t.getDefaultOption=function(e){var i={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return i},t}(Ar),fA="__ec_magicType_stack__",wJ=[["line","bar"],["stack"]],TJ=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,i=e.get("icon"),n={};return A(e.get("type"),function(a){i[a]&&(n[a]=i[a])}),n},t.getDefaultOption=function(e){var i={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return i},t.prototype.onclick=function(e,i,n){var a=this.model,o=a.get(["seriesIndex",n]);if(vA[n]){var s={series:[]},l=function(c){var f=c.subType,v=c.id,d=vA[n](f,v,c,a);d&&(tt(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,le).models[0],x=_.componentIndex;s[m]=s[m]||[];for(var b=0;b<=x;b++)s[m][x]=s[m][x]||{};s[m][x].boundaryGap=n==="bar"}}};A(wJ,function(c){vt(c,n)>=0&&A(c,function(f){a.setIconStatus(f,"normal")})}),a.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,h=n;n==="stack"&&(u=ht({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",n])!=="emphasis"&&(h="tiled")),i.dispatchAction({type:"changeMagicType",currentType:h,newOption:s,newTitle:u,featureName:"magicType"})}},t}(Ar),vA={line:function(r,t,e,i){if(r==="bar")return ht({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(r,t,e,i){if(r==="line")return ht({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(r,t,e,i){var n=e.get("stack")===fA;if(r==="line"||r==="bar")return i.setIconStatus("stack",n?"normal":"emphasis"),ht({id:t,stack:n?"":fA},i.get(["option","stack"])||{},!0)}};ii({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var Md=new Array(60).join("-"),Rs=" ";function MJ(r){var t={},e=[],i=[];return r.eachRawSeries(function(n){var a=n.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},i.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:i}}function CJ(r){var t=[];return A(r,function(e,i){var n=e.categoryAxis,a=e.valueAxis,o=a.dim,s=[" "].concat(F(e.series,function(v){return v.name})),l=[n.model.getCategories()];A(e.series,function(v){var d=v.getRawData();l.push(v.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(Rs)],h=0;h<l[0].length;h++){for(var c=[],f=0;f<l.length;f++)c.push(l[f][h]);u.push(c.join(Rs))}t.push(u.join(`
|
||
`))}),t.join(`
|
||
|
||
`+Md+`
|
||
|
||
`)}function AJ(r){return F(r,function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,function(){for(var a=arguments.length,o=arguments[a-1],s=e.getName(o),l=0;l<a-1;l++)n[l]=arguments[l];i.push((s?s+Rs:"")+n.join(Rs))}),i.join(`
|
||
`)}).join(`
|
||
|
||
`+Md+`
|
||
|
||
`)}function DJ(r){var t=MJ(r);return{value:Dt([CJ(t.seriesGroupByCategoryAxis),AJ(t.other)],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join(`
|
||
|
||
`+Md+`
|
||
|
||
`),meta:t.meta}}function xv(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function LJ(r){var t=r.slice(0,r.indexOf(`
|
||
`));if(t.indexOf(Rs)>=0)return!0}var o0=new RegExp("["+Rs+"]+","g");function IJ(r){for(var t=r.split(/\n+/g),e=xv(t.shift()).split(o0),i=[],n=F(e,function(l){return{name:l,data:[]}}),a=0;a<t.length;a++){var o=xv(t[a]).split(o0);i.push(o.shift());for(var s=0;s<o.length;s++)n[s]&&(n[s].data[a]=o[s])}return{series:n,categories:i}}function PJ(r){for(var t=r.split(/\n+/g),e=xv(t.shift()),i=[],n=0;n<t.length;n++){var a=xv(t[n]);if(a){var o=a.split(o0),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),i[n]={name:s,value:[]},l=i[n].value):l=i[n]=[];for(var h=0;h<o.length;h++)l.push(+o[h]);l.length===1&&(u?i[n].value=l[0]:i[n]=l[0])}}return{name:e,data:i}}function kJ(r,t){var e=r.split(new RegExp(`
|
||
*`+Md+`
|
||
*`,"g")),i={series:[]};return A(e,function(n,a){if(LJ(n)){var o=IJ(n),s=t[a],l=s.axisDim+"Axis";s&&(i[l]=i[l]||[],i[l][s.axisIndex]={data:o.categories},i.series=i.series.concat(o.series))}else{var o=PJ(n);i.series.push(o)}}),i}var RJ=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,i){setTimeout(function(){i.dispatchAction({type:"hideTip"})});var n=i.getDom(),a=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=a.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=a.get("lang")||[];s.innerHTML=l[0]||a.get("title"),s.style.cssText="margin:10px 20px",s.style.color=a.get("textColor");var u=document.createElement("div"),h=document.createElement("textarea");u.style.cssText="overflow:auto";var c=a.get("optionToContent"),f=a.get("contentToOption"),v=DJ(e);if(Q(c)){var d=c(i.getOption());Y(d)?u.innerHTML=d:ho(d)&&u.appendChild(d)}else{h.readOnly=a.get("readOnly");var p=h.style;p.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",p.color=a.get("textColor"),p.borderColor=a.get("textareaBorderColor"),p.backgroundColor=a.get("textareaColor"),h.value=v.value,u.appendChild(h)}var g=v.meta,y=document.createElement("div");y.style.cssText="position:absolute;bottom:5px;left:0;right:0";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),x=document.createElement("div");m+=";background-color:"+a.get("buttonColor"),m+=";color:"+a.get("buttonTextColor");var b=this;function S(){n.removeChild(o),b._dom=null}Ny(_,"click",S),Ny(x,"click",function(){if(f==null&&c!=null||f!=null&&c==null){S();return}var w;try{Q(f)?w=f(u,i.getOption()):w=kJ(h.value,g)}catch(T){throw S(),new Error("Data view format error "+T)}w&&i.dispatchAction({type:"changeDataView",newOption:w}),S()}),_.innerHTML=l[1],x.innerHTML=l[2],x.style.cssText=_.style.cssText=m,!a.get("readOnly")&&y.appendChild(x),y.appendChild(_),o.appendChild(s),o.appendChild(u),o.appendChild(y),u.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},t.prototype.remove=function(e,i){this._dom&&i.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,i){this.remove(e,i)},t.getDefaultOption=function(e){var i={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return i},t}(Ar);function EJ(r,t){return F(r,function(e,i){var n=t&&t[i];if(et(n)&&!V(n)){var a=et(e)&&!V(e);a||(e={value:e});var o=n.name!=null&&e.name==null;return e=tt(e,n),o&&delete e.name,e}else return e})}ii({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,t){var e=[];A(r.newOption.series,function(i){var n=t.getSeriesByName(i.name)[0];if(!n)e.push(z({type:"scatter"},i));else{var a=n.get("data");e.push({name:i.name,data:EJ(i.data,a)})}}),t.mergeOption(tt({series:e},r.newOption))});var UE=A,YE=Tt();function OJ(r,t){var e=Kx(r);UE(t,function(i,n){for(var a=e.length-1;a>=0;a--){var o=e[a];if(o[n])break}if(a<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 NJ(r){var t=Kx(r),e=t[t.length-1];t.length>1&&t.pop();var i={};return UE(e,function(n,a){for(var o=t.length-1;o>=0;o--)if(n=t[o][a],n){i[a]=n;break}}),i}function BJ(r){YE(r).snapshots=null}function zJ(r){return Kx(r).length}function Kx(r){var t=YE(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var VJ=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,i){BJ(e),i.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var i={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])};return i},t}(Ar);ii({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var FJ=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Jx=function(){function r(t,e,i){var n=this;this._targetInfoList=[];var a=dA(e,t);A(GJ,function(o,s){(!i||!i.include||vt(i.include,s)>=0)&&o(a,n._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(i,n,a){if((i.coordRanges||(i.coordRanges=[])).push(n),!i.coordRange){i.coordRange=n;var o=qg[i.brushType](0,a,n);i.__rangeOffset={offset:mA[i.brushType](o.values,i.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,i){A(t,function(n){var a=this.findTargetInfo(n,e);a&&a!==!0&&A(a.coordSyses,function(o){var s=qg[n.brushType](1,o,n.range,!0);i(n,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){A(t,function(i){var n=this.findTargetInfo(i,e);if(i.range=i.range||[],n&&n!==!0){i.panelId=n.panelId;var a=qg[i.brushType](0,n.coordSys,i.coordRange),o=i.__rangeOffset;i.range=o?mA[i.brushType](a.values,o.offset,HJ(a.xyMinMax,o.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(t,e){return F(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e?e(i):null,clipPath:QR(n),isTargetByCursor:eE(n,t,i.coordSysModel),getLinearBrushOtherExtent:tE(n)}})},r.prototype.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return n===!0||n&&vt(n.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=dA(e,t),a=0;a<i.length;a++){var o=i[a],s=t.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<pA.length;l++)if(pA[l](n,o))return o}return!0},r}();function s0(r){return r[0]>r[1]&&r.reverse(),r}function dA(r,t){return fu(r,t,{includeMainTypes:FJ})}var GJ={grid:function(r,t){var e=r.xAxisModels,i=r.yAxisModels,n=r.gridModels,a=Z(),o={},s={};!e&&!i&&!n||(A(e,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),A(i,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),A(n,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,h=[];A(u.getCartesians(),function(c,f){(vt(e,c.getAxis("x").model)>=0||vt(i,c.getAxis("y").model)>=0)&&h.push(c)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:h[0],coordSyses:h,getPanelRect:gA.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){A(r.geoModels,function(e){var i=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:i,coordSyses:[i],getPanelRect:gA.geo})})}},pA=[function(r,t){var e=r.xAxisModel,i=r.yAxisModel,n=r.gridModel;return!n&&e&&(n=e.axis.grid.model),!n&&i&&(n=i.axis.grid.model),n&&n===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],gA={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(zn(r)),t}},qg={lineX:ut(yA,0),lineY:ut(yA,1),rect:function(r,t,e,i){var n=r?t.pointToData([e[0][0],e[1][0]],i):t.dataToPoint([e[0][0],e[1][0]],i),a=r?t.pointToData([e[0][1],e[1][1]],i):t.dataToPoint([e[0][1],e[1][1]],i),o=[s0([n[0],a[0]]),s0([n[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]],a=F(e,function(o){var s=r?t.pointToData(o,i):t.dataToPoint(o,i);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:a,xyMinMax:n}}};function yA(r,t,e,i){var n=e.getAxis(["x","y"][r]),a=s0(F([0,1],function(s){return t?n.coordToData(n.toLocalCoord(i[s]),!0):n.toGlobalCoord(n.dataToCoord(i[s]))})),o=[];return o[r]=a,o[1-r]=[NaN,NaN],{values:a,xyMinMax:o}}var mA={lineX:ut(_A,0),lineY:ut(_A,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 F(r,function(i,n){return[i[0]-e[0]*t[n][0],i[1]-e[1]*t[n][1]]})}};function _A(r,t,e,i){return[t[0]-i[r]*e[0],t[1]-i[r]*e[1]]}function HJ(r,t){var e=xA(r),i=xA(t),n=[e[0]/i[0],e[1]/i[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function xA(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var l0=A,WJ=NG("toolbox-dataZoom_"),UJ=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,i,n,a){this._brushController||(this._brushController=new Mx(n.getZr()),this._brushController.on("brush",$(this._onBrush,this)).mount()),XJ(e,i,this,a,n),$J(e,i)},t.prototype.onclick=function(e,i,n){YJ[n].call(this)},t.prototype.remove=function(e,i){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,i){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var i=e.areas;if(!e.isEnd||!i.length)return;var n={},a=this.ecModel;this._brushController.updateCovers([]);var o=new Jx(Qx(this.model),a,{include:["grid"]});o.matchOutputRanges(i,a,function(u,h,c){if(c.type==="cartesian2d"){var f=u.brushType;f==="rect"?(s("x",c,h[0]),s("y",c,h[1])):s({lineX:"x",lineY:"y"}[f],c,h)}}),OJ(a,n),this._dispatchZoomAction(n);function s(u,h,c){var f=h.getAxis(u),v=f.model,d=l(u,v,a),p=d.findRepresentativeAxisProxy(v).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(c=Do(0,c.slice(),f.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(n[d.id]={dataZoomId:d.id,startValue:c[0],endValue:c[1]})}function l(u,h,c){var f;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var d=v.getAxisModel(u,h.componentIndex);d&&(f=v)}),f}},t.prototype._dispatchZoomAction=function(e){var i=[];l0(e,function(n,a){i.push(it(n))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},t.getDefaultOption=function(e){var i={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return i},t}(Ar),YJ={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(NJ(this.ecModel))}};function Qx(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 $J(r,t){r.setIconStatus("back",zJ(t)>1?"emphasis":"normal")}function XJ(r,t,e,i,n){var a=e._isZoomActive;i&&i.type==="takeGlobalCursor"&&(a=i.key==="dataZoomSelect"?i.dataZoomSelectActive:!1),e._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var o=new Jx(Qx(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(a&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}aW("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var i=t.getModel(e),n=[],a=Qx(i),o=fu(r,a);l0(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),l0(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,h){var c=l.componentIndex,f={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:WJ+u+c};f[h]=c,n.push(f)}return n});function ZJ(r){r.registerComponentModel(mJ),r.registerComponentView(xJ),ns("saveAsImage",SJ),ns("magicType",TJ),ns("dataView",RJ),ns("dataZoom",UJ),ns("restore",VJ),pt(yJ)}var jJ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(yt);function $E(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function XE(r){if(mt.domSupported){for(var t=document.documentElement.style,e=0,i=r.length;e<i;e++)if(r[e]in t)return r[e]}}var ZE=XE(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),qJ=XE(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function jE(r,t){if(!r)return t;t=M_(t,!0);var e=r.indexOf(t);return r=e===-1?t:"-"+r.slice(0,e)+"-"+t,r.toLowerCase()}function KJ(r,t){var e=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return e?e[t]:null}var JJ=jE(qJ,"transition"),tb=jE(ZE,"transform"),QJ="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(mt.transform3dSupported?"will-change:transform;":"");function tQ(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function eQ(r,t,e){if(!Y(e)||e==="inside")return"";var i=r.get("backgroundColor"),n=r.get("borderWidth");t=go(t);var a=tQ(e),o=Math.max(Math.round(n)*1.5,6),s="",l=tb+":",u;vt(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var h=u*Math.PI/180,c=o+n,f=c*Math.abs(Math.cos(h))+c*Math.abs(Math.sin(h)),v=Math.round(((f-Math.SQRT2*n)/2+Math.SQRT2*n-(f-c)/2)*100)/100;s+=";"+a+":-"+v+"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:"+i+";"];return'<div style="'+p.join("")+'"></div>'}function rQ(r,t){var e="cubic-bezier(0.23,1,0.32,1)",i=" "+r/2+"s "+e,n="opacity"+i+",visibility"+i;return t||(i=" "+r+"s "+e,n+=mt.transformSupported?","+tb+i:",left"+i+",top"+i),JJ+":"+n}function bA(r,t,e){var i=r.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!mt.transformSupported)return e?"top:"+n+";left:"+i+";":[["top",n],["left",i]];var a=mt.transform3dSupported,o="translate"+(a?"3d":"")+"("+i+","+n+(a?",0":"")+")";return e?"top:0;left:0;"+tb+":"+o+";":[["top",0],["left",0],[ZE,o]]}function iQ(r){var t=[],e=r.get("fontSize"),i=r.getTextColor();i&&t.push("color:"+i),t.push("font:"+r.getFont());var n=lt(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+n+"px");var a=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),A(["decoration","align"],function(u){var h=r.get(u);h&&t.push("text-"+u+":"+h)}),t.join(";")}function nQ(r,t,e){var i=[],n=r.get("transitionDuration"),a=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),h=r.getModel("textStyle"),c=nP(r,"html"),f=l+"px "+u+"px "+o+"px "+s;return i.push("box-shadow:"+f),t&&n&&i.push(rQ(n,e)),a&&i.push("background-color:"+a),A(["width","color","radius"],function(v){var d="border-"+v,p=M_(d),g=r.get(p);g!=null&&i.push(d+":"+g+(v==="color"?"":"px"))}),i.push(iQ(h)),c!=null&&i.push("padding:"+To(c).join("px ")+"px"),i.join(";")+";"}function SA(r,t,e,i,n){var a=t&&t.painter;if(e){var o=a&&a.getViewportRoot();o&&hF(r,o,e,i,n)}else{r[0]=i,r[1]=n;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var aQ=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,mt.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=t.getZr(),a=e.appendTo,o=a&&(Y(a)?document.querySelector(a):ho(a)?a:Q(a)&&a(t.getDom()));SA(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(i),this._api=t,this._container=o;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,h=n.painter.getViewportRoot();Sr(h,l,!0),u.dispatch("mousemove",l)}},i.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(),i=KJ(e,"position"),n=e.style;n.position!=="absolute"&&i!=="absolute"&&(n.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,a=this._styleCoord;i.innerHTML?n.cssText=QJ+nQ(t,!this._firstShow,this._longHide)+bA(a[0],a[1],!0)+("border-color:"+go(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,i,n,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(Y(a)&&i.get("trigger")==="item"&&!$E(i)&&(s=eQ(i,n,a)),Y(t))o.innerHTML=t+s;else if(t){o.innerHTML="",V(t)||(t=[t]);for(var l=0;l<t.length;l++)ho(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},r.prototype.moveTo=function(t,e){if(this.el){var i=this._styleCoord;if(SA(i,this._zr,this._container,t,e),i[0]!=null&&i[1]!=null){var n=this.el.style,a=bA(i[0],i[1]);A(a,function(o){n[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){var t=this,e=this.el.style;e.visibility="hidden",e.opacity="0",mt.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout($(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this.el.parentNode;t&&t.removeChild(this.el),this.el=this._container=null},r}(),oQ=function(){function r(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),TA(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return r.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(t,e,i,n,a){var o=this;et(t)&&kt(""),this.el&&this._zr.remove(this.el);var s=i.getModel("textStyle");this.el=new St({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:n,textShadowColor:s.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:nP(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),A(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=i.get(u)}),A(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),i=wA(t.style);return[e.width+i.left+i.right,e.height+i.top+i.bottom]},r.prototype.moveTo=function(t,e){var i=this.el;if(i){var n=this._styleCoord;TA(n,this._zr,t,e),t=n[0],e=n[1];var a=i.style,o=mn(a.borderWidth||0),s=wA(a);i.x=t+o+s.left,i.y=e+o+s.top,i.markRedraw()}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout($(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r}();function mn(r){return Math.max(0,r)}function wA(r){var t=mn(r.shadowBlur||0),e=mn(r.shadowOffsetX||0),i=mn(r.shadowOffsetY||0);return{left:mn(t-e),right:mn(t+e),top:mn(t-i),bottom:mn(t+i)}}function TA(r,t,e,i){r[0]=e,r[1]=i,r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var sQ=new wt({shape:{x:-1,y:-1,width:2,height:2}}),lQ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){if(!(mt.node||!i.getDom())){var n=e.getComponent("tooltip"),a=this._renderMode=WG(n.get("renderMode"));this._tooltipContent=a==="richText"?new oQ(i):new aQ(i,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},t.prototype.render=function(e,i,n){if(!(mt.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=i,this._api=n;var a=this._tooltipContent;a.update(e),a.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&e.get("transitionDuration")?Zs(this,"_updatePosition",50,"fixRate"):Wu(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel,i=e.get("triggerOn");RE("itemTooltip",this._api,$(function(n,a,o){i!=="none"&&(i.indexOf(n)>=0?this._tryShow(a,o):n==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,i=this._ecModel,n=this._api,a=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(e,i,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,i,n,a){if(!(a.from===this.uid||mt.node||!n.getDom())){var o=MA(a,n);this._ticket="";var s=a.dataByCoordSys,l=fQ(a,i,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:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var h=sQ;h.x=a.x,h.y=a.y,h.update(),ot(h).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:h},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(e,i,n,a))return;var c=EE(a,i),f=c.point[0],v=c.point[1];f!=null&&v!=null&&this._tryShow({offsetX:f,offsetY:v,target:c.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:n.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(e,i,n,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(MA(a,n))},t.prototype._manuallyAxisShowTip=function(e,i,n,a){var o=a.seriesIndex,s=a.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=i.getSeriesByIndex(o);if(u){var h=u.getData(),c=Ll([h.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(e,i){var n=e.target,a=this._tooltipModel;if(a){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=ot(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Za(n,function(h){if(ot(h).dataIndex!=null)return l=h,!0;if(ot(h).tooltipConfig!=null)return u=h,!0},!0),l?this._showSeriesItemTooltip(e,l,i):u?this._showComponentItemTooltip(e,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},t.prototype._showOrMove=function(e,i){var n=e.get("showDelay");i=$(i,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(i,n):i()},t.prototype._showAxisTooltip=function(e,i){var n=this._ecModel,a=this._tooltipModel,o=[i.offsetX,i.offsetY],s=Ll([i.tooltipOption],a),l=this._renderMode,u=[],h=_e("section",{blocks:[],noHeader:!0}),c=[],f=new Op;A(e,function(m){A(m.dataByAxis,function(_){var x=n.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!x||b==null)){var S=IE(b,x.axis,n,_.seriesDataIndices,_.valueLabelOpt),w=_e("section",{header:S,noHeader:!Lr(S),sortBlocks:!0,blocks:[]});h.blocks.push(w),A(_.seriesDataIndices,function(T){var M=n.getSeriesByIndex(T.seriesIndex),C=T.dataIndexInside,D=M.getDataParams(C);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=J_(x.axis,{value:b}),D.axisValueLabel=S,D.marker=f.makeTooltipMarker("item",go(D.color),l);var L=fw(M.formatTooltip(C,!0,null)),I=L.frag;if(I){var P=Ll([M],a).get("valueFormatter");w.blocks.push(P?z({valueFormatter:P},I):I)}L.text&&c.push(L.text),u.push(D)}})}})}),h.blocks.reverse(),c.reverse();var v=i.position,d=s.get("order"),p=mw(h,f,l,d,n.get("useUTC"),s.get("textStyle"));p&&c.unshift(p);var g=l==="richText"?`
|
||
|
||
`:"<br/>",y=c.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],v,null,f)})},t.prototype._showSeriesItemTooltip=function(e,i,n){var a=this._ecModel,o=ot(i),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,h=o.dataIndex,c=o.dataType,f=u.getData(c),v=this._renderMode,d=e.positionDefault,p=Ll([f.getItemModel(h),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(h,c),m=new Op;y.marker=m.makeTooltipMarker("item",go(y.color),v);var _=fw(u.formatTooltip(h,!1,c)),x=p.get("order"),b=p.get("valueFormatter"),S=_.frag,w=S?mw(b?z({valueFormatter:b},S):S,m,v,x,a.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+h;this._showOrMove(p,function(){this._showTooltipContent(p,w,y,T,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:h,dataIndex:f.getRawIndex(h),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,i,n){var a=this._renderMode==="html",o=ot(i),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(Y(l)){var h=l;l={content:h,formatter:h},u=!0}u&&a&&l.content&&(l=it(l),l.content=Oe(l.content));var c=[l],f=this._ecModel.getComponent(o.componentMainType,o.componentIndex);f&&c.push(f),c.push({formatter:l.content});var v=e.positionDefault,d=Ll(c,this._tooltipModel,v?{position:v}:null),p=d.get("content"),g=Math.random()+"",y=new Op;this._showOrMove(d,function(){var m=it(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,g,e.offsetX,e.offsetY,e.position,i,y)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,i,n,a,o,s,l,u,h){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var c=this._tooltipContent;c.setEnterable(e.get("enterable"));var f=e.get("formatter");l=l||e.get("position");var v=i,d=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor")),p=d.color;if(f)if(Y(f)){var g=e.ecModel.get("useUTC"),y=V(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=f,m&&(v=_h(y.axisValue,v,g)),v=C_(v,n,!0)}else if(Q(f)){var _=$(function(x,b){x===this._ticket&&(c.setContent(b,h,e,p,l),this._updatePosition(e,l,o,s,c,n,u))},this);this._ticket=a,v=f(n,a,_)}else v=f;c.setContent(v,h,e,p,l),c.show(e,p),this._updatePosition(e,l,o,s,c,n,u)}},t.prototype._getNearestPoint=function(e,i,n,a){if(n==="axis"||V(i))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!V(i))return{color:a||i.color||i.borderColor}},t.prototype._updatePosition=function(e,i,n,a,o,s,l){var u=this._api.getWidth(),h=this._api.getHeight();i=i||e.get("position");var c=o.getSize(),f=e.get("align"),v=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),Q(i)&&(i=i([n,a],s,o.el,d,{viewSize:[u,h],contentSize:c.slice()})),V(i))n=U(i[0],u),a=U(i[1],h);else if(et(i)){var p=i;p.width=c[0],p.height=c[1];var g=ue(p,{width:u,height:h});n=g.x,a=g.y,f=null,v=null}else if(Y(i)&&l){var y=cQ(i,d,c,e.get("borderWidth"));n=y[0],a=y[1]}else{var y=uQ(n,a,o,u,h,f?null:20,v?null:20);n=y[0],a=y[1]}if(f&&(n-=CA(f)?c[0]/2:f==="right"?c[0]:0),v&&(a-=CA(v)?c[1]/2:v==="bottom"?c[1]:0),$E(e)){var y=hQ(n,a,o,u,h);n=y[0],a=y[1]}o.moveTo(n,a)},t.prototype._updateContentNotChangedOnAxis=function(e,i){var n=this._lastDataByCoordSys,a=this._cbParamsList,o=!!n&&n.length===e.length;return o&&A(n,function(s,l){var u=s.dataByAxis||[],h=e[l]||{},c=h.dataByAxis||[];o=o&&u.length===c.length,o&&A(u,function(f,v){var d=c[v]||{},p=f.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&f.value===d.value&&f.axisType===d.axisType&&f.axisId===d.axisId&&p.length===g.length,o&&A(p,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),a&&A(f.seriesDataIndices,function(y){var m=y.seriesIndex,_=i[m],x=a[m];_&&x&&x.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=i,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,i){mt.node||!i.getDom()||(Wu(this,"_updatePosition"),this._tooltipContent.dispose(),i0("itemTooltip",i))},t.type="tooltip",t}(Yt);function Ll(r,t,e){var i=t.ecModel,n;e?(n=new Lt(e,i,i),n=new Lt(t.option,n,i)):n=t;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof Lt&&(o=o.get("tooltip",!0)),Y(o)&&(o={formatter:o}),o&&(n=new Lt(o,n,i)))}return n}function MA(r,t){return r.dispatchAction||$(t.dispatchAction,t)}function uQ(r,t,e,i,n,a,o){var s=e.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>i?r-=l+a:r+=a),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function hQ(r,t,e,i,n){var a=e.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,i)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function cQ(r,t,e,i){var n=e[0],a=e[1],o=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=t.width,h=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+h/2-a/2;break;case"top":s=t.x+u/2-n/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+h+o;break;case"left":s=t.x-n-o,l=t.y+h/2-a/2;break;case"right":s=t.x+u+o,l=t.y+h/2-a/2}return[s,l]}function CA(r){return r==="center"||r==="middle"}function fQ(r,t,e){var i=r_(r).queryOptionMap,n=i.keys()[0];if(!(!n||n==="series")){var a=vh(t,n,i.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var h=ot(u).tooltipConfig;if(h&&h.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function vQ(r){pt(Ih),r.registerComponentModel(jJ),r.registerComponentView(lQ),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ee),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ee)}var dQ=["rect","polygon","keep","clear"];function pQ(r,t){var e=Bt(r?r.brush:[]);if(e.length){var i=[];A(e,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(i=i.concat(u))});var n=r&&r.toolbox;V(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var a=n.feature||(n.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,i),gQ(s),t&&!s.length&&s.push.apply(s,dQ)}}function gQ(r){var t={};A(r,function(e){t[e]=1}),r.length=0,A(t,function(e,i){r.push(i)})}var AA=A;function DA(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function u0(r,t,e){var i={};return AA(t,function(a){var o=i[a]=n();AA(r[a],function(s,l){if(ye.isValidType(l)){var u={type:l,visual:s};e&&e(u,a),o[l]=new ye(u),l==="opacity"&&(u=it(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new ye(u))}})}),i;function n(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function qE(r,t,e){var i;A(e,function(n){t.hasOwnProperty(n)&&DA(t[n])&&(i=!0)}),i&&A(e,function(n){t.hasOwnProperty(n)&&DA(t[n])?r[n]=it(t[n]):delete r[n]})}function yQ(r,t,e,i,n,a){var o={};A(r,function(c){var f=ye.prepareVisualTypes(t[c]);o[c]=f});var s;function l(c){return N_(e,s,c)}function u(c,f){dP(e,s,c,f)}e.each(h);function h(c,f){s=c;var v=e.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var d=i.call(n,c),p=t[d],g=o[d],y=0,m=g.length;y<m;y++){var _=g[y];p[_]&&p[_].applyVisual(c,l,u)}}}function mQ(r,t,e,i){var n={};return A(r,function(a){var o=ye.prepareVisualTypes(t[a]);n[a]=o}),{progress:function(o,s){var l;i!=null&&(l=s.getDimensionIndex(i));function u(b){return N_(s,c,b)}function h(b,S){dP(s,c,b,S)}for(var c,f=s.getStore();(c=o.next())!=null;){var v=s.getRawDataItem(c);if(!(v&&v.visualMap===!1))for(var d=i!=null?f.get(l,c):c,p=e(d),g=t[p],y=n[p],m=0,_=y.length;m<_;m++){var x=y[m];g[x]&&g[x].applyVisual(d,u,h)}}}}}function _Q(r){var t=r.brushType,e={point:function(i){return LA[t].point(i,e,r)},rect:function(i){return LA[t].rect(i,e,r)}};return e}var LA={lineX:IA(0),lineY:IA(1),rect:{point:function(r,t,e){return r&&e.boundingRect.contain(r[0],r[1])},rect:function(r,t,e){return r&&e.boundingRect.intersect(r)}},polygon:{point:function(r,t,e){return r&&e.boundingRect.contain(r[0],r[1])&&Fa(e.range,r[0],r[1])},rect:function(r,t,e){var i=e.range;if(!r||i.length<=1)return!1;var n=r.x,a=r.y,o=r.width,s=r.height,l=i[0];if(Fa(i,n,a)||Fa(i,n+o,a)||Fa(i,n,a+s)||Fa(i,n+o,a+s)||ft.create(r).contain(l[0],l[1])||Ul(n,a,n+o,a,i)||Ul(n,a,n,a+s,i)||Ul(n+o,a,n+o,a+s,i)||Ul(n,a+s,n+o,a+s,i))return!0}}};function IA(r){var t=["x","y"],e=["width","height"];return{point:function(i,n,a){if(i){var o=a.range,s=i[r];return Il(s,o)}},rect:function(i,n,a){if(i){var o=a.range,s=[i[t[r]],i[t[r]]+i[e[r]]];return s[1]<s[0]&&s.reverse(),Il(s[0],o)||Il(s[1],o)||Il(o[0],s)||Il(o[1],s)}}}}function Il(r,t){return t[0]<=r&&r<=t[1]}var PA=["inBrush","outOfBrush"],Kg="__ecBrushSelect",h0="__ecInBrushSelectEvent";function KE(r){r.eachComponent({mainType:"brush"},function(t){var e=t.brushTargetManager=new Jx(t.option,r);e.setInputRanges(t.areas,r)})}function xQ(r,t,e){var i=[],n,a;r.eachComponent({mainType:"brush"},function(o){e&&e.type==="takeGlobalCursor"&&o.setBrushOption(e.key==="brush"?e.brushOption:{brushType:!1})}),KE(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:it(o.areas),selected:[]};i.push(l);var u=o.option,h=u.brushLink,c=[],f=[],v=[],d=!1;s||(n=u.throttleType,a=u.throttleDelay);var p=F(o.areas,function(b){var S=TQ[b.brushType],w=tt({boundingRect:S?S(b):void 0},b);return w.selectors=_Q(w),w}),g=u0(o.option,PA,function(b){b.mappingMethod="fixed"});V(h)&&A(h,function(b){c[b]=1});function y(b){return h==="all"||!!c[b]}function m(b){return!!b.length}r.eachSeries(function(b,S){var w=v[S]=[];b.subType==="parallel"?_(b,S):x(b,S,w)});function _(b,S){var w=b.coordinateSystem;d=d||w.hasAxisBrushed(),y(S)&&w.eachActiveState(b.getData(),function(T,M){T==="active"&&(f[M]=1)})}function x(b,S,w){if(!(!b.brushSelector||wQ(o,S))&&(A(p,function(M){o.brushTargetManager.controlSeries(M,b,r)&&w.push(M),d=d||m(w)}),y(S)&&m(w))){var T=b.getData();T.each(function(M){kA(b,w,T,M)&&(f[M]=1)})}}r.eachSeries(function(b,S){var w={seriesId:b.id,seriesIndex:S,seriesName:b.name,dataIndex:[]};l.selected.push(w);var T=v[S],M=b.getData(),C=y(S)?function(D){return f[D]?(w.dataIndex.push(M.getRawIndex(D)),"inBrush"):"outOfBrush"}:function(D){return kA(b,T,M,D)?(w.dataIndex.push(M.getRawIndex(D)),"inBrush"):"outOfBrush"};(y(S)?d:m(T))&&yQ(PA,g,M,C)})}),bQ(t,n,a,i,e)}function bQ(r,t,e,i,n){if(n){var a=r.getZr();if(!a[h0]){a[Kg]||(a[Kg]=SQ);var o=Zs(a,Kg,e,t);o(r,i)}}}function SQ(r,t){if(!r.isDisposed()){var e=r.getZr();e[h0]=!0,r.dispatchAction({type:"brushSelect",batch:t}),e[h0]=!1}}function kA(r,t,e,i){for(var n=0,a=t.length;n<a;n++){var o=t[n];if(r.brushSelector(i,e,o.selectors,o))return!0}}function wQ(r,t){var e=r.option.seriesIndex;return e!=null&&e!=="all"&&(V(e)?vt(e,t)<0:t!==e)}var TQ={rect:function(r){return RA(r.range)},polygon:function(r){for(var t,e=r.range,i=0,n=e.length;i<n;i++){t=t||[[1/0,-1/0],[1/0,-1/0]];var a=e[i];a[0]<t[0][0]&&(t[0][0]=a[0]),a[0]>t[0][1]&&(t[0][1]=a[0]),a[1]<t[1][0]&&(t[1][0]=a[1]),a[1]>t[1][1]&&(t[1][1]=a[1])}return t&&RA(t)}};function RA(r){return new ft(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var MQ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){this.ecModel=e,this.api=i,this.model,(this._brushController=new Mx(i.getZr())).on("brush",$(this._onBrush,this)).mount()},t.prototype.render=function(e,i,n,a){this.model=e,this._updateController(e,i,n,a)},t.prototype.updateTransform=function(e,i,n,a){KE(i),this._updateController(e,i,n,a)},t.prototype.updateVisual=function(e,i,n,a){this.updateTransform(e,i,n,a)},t.prototype.updateView=function(e,i,n,a){this._updateController(e,i,n,a)},t.prototype._updateController=function(e,i,n,a){(!a||a.$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 i=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:it(n),$from:i}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:it(n),$from:i})},t.type="brush",t}(Yt),CQ="#ddd",AQ=function(r){E(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,i){var n=this.option;!i&&qE(n,e,["inBrush","outOfBrush"]);var a=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:CQ},a.hasOwnProperty("liftZ")||(a.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=F(e,function(i){return EA(this.option,i)},this))},t.prototype.setBrushOption=function(e){this.brushOption=EA(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:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(yt);function EA(r,t){return ht({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Lt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},t,!0)}var DQ=["rect","polygon","lineX","lineY","keep","clear"],LQ=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,i,n){var a,o,s;i.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,A(e.get("type",!0),function(l){e.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},t.prototype.updateView=function(e,i,n){this.render(e,i,n)},t.prototype.getIcons=function(){var e=this.model,i=e.get("icon",!0),n={};return A(e.get("type",!0),function(a){i[a]&&(n[a]=i[a])}),n},t.prototype.onclick=function(e,i,n){var a=this._brushType,o=this._brushMode;n==="clear"?(i.dispatchAction({type:"axisAreaSelect",intervals:[]}),i.dispatchAction({type:"brush",command:"clear",areas:[]})):i.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?a:a===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(e){var i={show:!0,type:DQ.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 i},t}(Ar);function IQ(r){r.registerComponentView(MQ),r.registerComponentModel(AQ),r.registerPreprocessor(pQ),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,xQ),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(i){i.setAreas(t.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},ee),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},ee),ns("brush",LQ)}var PQ=function(r){E(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:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(yt),kQ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){if(this.group.removeAll(),!!e.get("show")){var a=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=lt(e.get("textBaseline"),e.get("textVerticalAlign")),h=new St({style:Gt(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=h.getBoundingRect(),f=e.get("subtext"),v=new St({style:Gt(s,{text:f,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);h.silent=!d&&!g,v.silent=!p&&!g,d&&h.on("click",function(){Zf(d,"_"+e.get("target"))}),p&&v.on("click",function(){Zf(p,"_"+e.get("subtarget"))}),ot(h).eventData=ot(v).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,a.add(h),f&&a.add(v);var y=a.getBoundingRect(),m=e.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=ue(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var x={align:l,verticalAlign:u};h.setStyle(x),v.setStyle(x),y=a.getBoundingRect();var b=_.margin,S=e.getItemStyle(["color","opacity"]);S.fill=e.get("backgroundColor");var w=new wt({shape:{x:y.x-b[3],y:y.y-b[0],width:y.width+b[1]+b[3],height:y.height+b[0]+b[2],r:e.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});a.add(w)}},t.type="title",t}(Yt);function RQ(r){r.registerComponentModel(PQ),r.registerComponentView(kQ)}var OA=function(r){E(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,i,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 i=this._data.count();this.option.loop?e=(e%i+i)%i:(e>=i&&(e=i-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,i=e.data||[],n=e.axisType,a=this._names=[],o;n==="category"?(o=[],A(i,function(u,h){var c=he(Os(u),""),f;et(u)?(f=it(u),f.value=h):f=h,o.push(f),a.push(c)})):o=i;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new Be([{name:"value",type:s}],this);l.initData(o,a)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t}(yt),JE=function(r){E(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=ea(OA.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t}(OA);re(JE,ud.prototype);var EQ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline",t}(Yt),OQ=function(r){E(t,r);function t(e,i,n,a){var o=r.call(this,e,i,n)||this;return o.type=a||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(Br),Jg=Math.PI,NA=Tt(),NQ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){this.api=i},t.prototype.render=function(e,i,n){if(this.model=e,this.api=n,this.ecModel=i,this.group.removeAll(),e.get("show",!0)){var a=this._layout(e,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,e);e.formatTooltip=function(u){var h=l.scale.getLabel({value:u});return _e("nameValue",{noName:!0,value:h})},A(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,e)},this),this._renderAxisLabel(a,s,l,e),this._position(a,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,i){var n=e.get(["label","position"]),a=e.get("orient"),o=zQ(e,i),s;n==null||n==="auto"?s=a==="horizontal"?o.y+o.height/2<i.getHeight()/2?"-":"+":o.x+o.width/2<i.getWidth()/2?"+":"-":Y(n)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][n]:s=n;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:Jg/2},c=a==="vertical"?o.height:o.width,f=e.getModel("controlStyle"),v=f.get("show",!0),d=v?f.get("itemSize"):0,p=v?f.get("itemGap"):0,g=d+p,y=e.get(["label","rotate"])||0;y=y*Jg/180;var m,_,x,b=f.get("position",!0),S=v&&f.get("showPlayBtn",!0),w=v&&f.get("showPrevBtn",!0),T=v&&f.get("showNextBtn",!0),M=0,C=c;b==="left"||b==="bottom"?(S&&(m=[0,0],M+=g),w&&(_=[M,0],M+=g),T&&(x=[C-d,0],C-=g)):(S&&(m=[C-d,0],C-=g),w&&(_=[0,0],M+=g),T&&(x=[C-d,0],C-=g));var D=[M,C];return e.get("inverse")&&D.reverse(),{viewRect:o,mainLength:c,orient:a,rotation:h[a],labelRotation:y,labelPosOpt:s,labelAlign:e.get(["label","align"])||l[a],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||u[a],playPosition:m,prevBtnPosition:_,nextBtnPosition:x,axisExtent:D,controlSize:d,controlGap:p}},t.prototype._position=function(e,i){var n=this._mainGroup,a=this._labelGroup,o=e.viewRect;if(e.orient==="vertical"){var s=or(),l=o.x,u=o.y+o.height;ti(s,s,[-l,-u]),Qn(s,s,-Jg/2),ti(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var h=m(o),c=m(n.getBoundingRect()),f=m(a.getBoundingRect()),v=[n.x,n.y],d=[a.x,a.y];d[0]=v[0]=h[0][0];var p=e.labelPosOpt;if(p==null||Y(p)){var g=p==="+"?0:1;_(v,c,h,1,g),_(d,f,h,1,1-g)}else{var g=p>=0?0:1;_(v,c,h,1,g),d[1]=v[1]+p}n.setPosition(v),a.setPosition(d),n.rotation=a.rotation=e.rotation,y(n),y(a);function y(x){x.originX=h[0][0]-x.x,x.originY=h[1][0]-x.y}function m(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function _(x,b,S,w,T){x[w]+=S[w][T]-b[w][T]}},t.prototype._createAxis=function(e,i){var n=i.getData(),a=i.get("axisType"),o=BQ(i,a);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 OQ("value",o,e.axisExtent,a);return l.model=i,l},t.prototype._createGroup=function(e){var i=this[e]=new at;return this.group.add(i),i},t.prototype._renderAxisLine=function(e,i,n,a){var o=n.getExtent();if(a.get(["lineStyle","show"])){var s=new ce({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:z({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});i.add(s);var l=this._progressLine=new ce({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:tt({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});i.add(l)}},t.prototype._renderAxisTick=function(e,i,n,a){var o=this,s=a.getData(),l=n.scale.getTicks();this._tickSymbols=[],A(l,function(u){var h=n.dataToCoord(u.value),c=s.getItemModel(u.value),f=c.getModel("itemStyle"),v=c.getModel(["emphasis","itemStyle"]),d=c.getModel(["progress","itemStyle"]),p={x:h,y:0,onclick:$(o._changeTimeline,o,u.value)},g=BA(c,f,i,p);g.ensureState("emphasis").style=v.getItemStyle(),g.ensureState("progress").style=d.getItemStyle(),Bn(g);var y=ot(g);c.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},t.prototype._renderAxisLabel=function(e,i,n,a){var o=this,s=n.getLabelModel();if(s.get("show")){var l=a.getData(),u=n.getViewLabels();this._tickLabels=[],A(u,function(h){var c=h.tickValue,f=l.getItemModel(c),v=f.getModel("label"),d=f.getModel(["emphasis","label"]),p=f.getModel(["progress","label"]),g=n.dataToCoord(h.tickValue),y=new St({x:g,y:0,rotation:e.labelRotation-e.rotation,onclick:$(o._changeTimeline,o,c),silent:!1,style:Gt(v,{text:h.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});y.ensureState("emphasis").style=Gt(d),y.ensureState("progress").style=Gt(p),i.add(y),Bn(y),NA(y).dataIndex=c,o._tickLabels.push(y)})}},t.prototype._renderControl=function(e,i,n,a){var o=e.controlSize,s=e.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),h=a.getPlayState(),c=a.get("inverse",!0);f(e.nextBtnPosition,"next",$(this._changeTimeline,this,c?"-":"+")),f(e.prevBtnPosition,"prev",$(this._changeTimeline,this,c?"+":"-")),f(e.playPosition,h?"stop":"play",$(this._handlePlayClick,this,!h),!0);function f(v,d,p,g){if(v){var y=ei(lt(a.get(["controlStyle",d+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=VQ(a,d+"Icon",m,{x:v[0],y:v[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:p});_.ensureState("emphasis").style=u,i.add(_),Bn(_)}}},t.prototype._renderCurrentPointer=function(e,i,n,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,h={onCreate:function(c){c.draggable=!0,c.drift=$(u._handlePointerDrag,u),c.ondragend=$(u._handlePointerDragend,u),zA(c,u._progressLine,s,n,a,!0)},onUpdate:function(c){zA(c,u._progressLine,s,n,a)}};this._currentPointer=BA(l,l,this._mainGroup,{},this._currentPointer,h)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,i,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,i){var n=this._toAxisCoord(e)[0],a=this._axis,o=fr(a.getExtent().slice());n>o[1]&&(n=o[1]),n<o[0]&&(n=o[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=n,s.dirty());var l=this._findNearestTick(n),u=this.model;(i||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},t.prototype._doPlayStop=function(){var e=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var i=e.model;e._changeTimeline(i.getCurrentIndex()+(i.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},t.prototype._toAxisCoord=function(e){var i=this._mainGroup.getLocalTransform();return Jr(e,i,!0)},t.prototype._findNearestTick=function(e){var i=this.model.getData(),n=1/0,a,o=this._axis;return i.each(["value"],function(s,l){var u=o.dataToCoord(s),h=Math.abs(u-e);h<n&&(n=h,a=l)}),a},t.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},t.prototype._changeTimeline=function(e){var i=this.model.getCurrentIndex();e==="+"?e=i+1:e==="-"&&(e=i-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})},t.prototype._updateTicksStatus=function(){var e=this.model.getCurrentIndex(),i=this._tickSymbols,n=this._tickLabels;if(i)for(var a=0;a<i.length;a++)i&&i[a]&&i[a].toggleState("progress",a<e);if(n)for(var a=0;a<n.length;a++)n&&n[a]&&n[a].toggleState("progress",NA(n[a]).dataIndex<=e)},t.type="timeline.slider",t}(EQ);function BQ(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new yd({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new q_({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new en}}function zQ(r,t){return ue(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},r.get("padding"))}function VQ(r,t,e,i){var n=i.style,a=Gs(r.get(["controlStyle",t]),i||{},new ft(e[0],e[1],e[2],e[3]));return n&&a.setStyle(n),a}function BA(r,t,e,i,n,a){var o=t.get("color");if(n)n.setColor(o),e.add(n),a&&a.onUpdate(n);else{var s=r.get("symbol");n=ae(s,-1,-1,2,2,o),n.setStyle("strokeNoScale",!0),e.add(n),a&&a.onCreate(n)}var l=t.getItemStyle(["color"]);n.setStyle(l),i=ht({rectHover:!0,z2:100},i,!0);var u=js(r.get("symbolSize"));i.scaleX=u[0]/2,i.scaleY=u[1]/2;var h=Mo(r.get("symbolOffset"),u);h&&(i.x=(i.x||0)+h[0],i.y=(i.y||0)+h[1]);var c=r.get("symbolRotate");return i.rotation=(c||0)*Math.PI/180||0,n.attr(i),n.updateTransform(),n}function zA(r,t,e,i,n,a){if(!r.dragging){var o=n.getModel("checkpointStyle"),s=i.dataToCoord(n.getData().get("value",e));if(a||!o.get("animation",!0))r.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};r.stopAnimation(null,!0),r.animateTo({x:s,y:0},l),t&&t.animateTo({shape:{x2:s}},l)}}}function FQ(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e,i){var n=e.getComponent("timeline");return n&&t.currentIndex!=null&&(n.setCurrentIndex(t.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.getPlayState()&&(n.setPlayState(!1),i.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),e.resetOption("timeline",{replaceMerge:n.get("replaceMerge",!0)}),tt({currentIndex:n.option.currentIndex},t)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&t.playState!=null&&i.setPlayState(t.playState)})}function GQ(r){var t=r&&r.timeline;V(t)||(t=t?[t]:[]),A(t,function(e){e&&HQ(e)})}function HQ(r){var t=r.type,e={number:"value",time:"time"};if(e[t]&&(r.axisType=e[t],delete r.type),VA(r),Wa(r,"controlPosition")){var i=r.controlStyle||(r.controlStyle={});Wa(i,"position")||(i.position=r.controlPosition),i.position==="none"&&!Wa(i,"show")&&(i.show=!1,delete i.position),delete r.controlPosition}A(r.data||[],function(n){et(n)&&!V(n)&&(!Wa(n,"value")&&Wa(n,"name")&&(n.value=n.name),VA(n))})}function VA(r){var t=r.itemStyle||(r.itemStyle={}),e=t.emphasis||(t.emphasis={}),i=r.label||r.label||{},n=i.normal||(i.normal={}),a={normal:1,emphasis:1};A(i,function(o,s){!a[s]&&!Wa(n,s)&&(n[s]=o)}),e.label&&!Wa(i,"emphasis")&&(i.emphasis=e.label,delete e.label)}function Wa(r,t){return r.hasOwnProperty(t)}function WQ(r){r.registerComponentModel(JE),r.registerComponentView(NQ),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),FQ(r),r.registerPreprocessor(GQ)}function eb(r,t){if(!r)return!1;for(var e=V(r)?r:[r],i=0;i<e.length;i++)if(e[i]&&e[i][t])return!0;return!1}function Fc(r){co(r,"label",["show"])}var Gc=Tt(),nn=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.createdBySelf=!1,e}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(mt.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,i){this._mergeOption(e,i,!1,!1)},t.prototype._mergeOption=function(e,i,n,a){var o=this.mainType;n||i.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Gc(s)[o];if(!l||!l.data){Gc(s)[o]=null;return}u?u._mergeOption(l,i,!0):(a&&Fc(l),A(l.data,function(h){h instanceof Array?(Fc(h[0]),Fc(h[1])):Fc(h)}),u=this.createMarkerModelFromSeries(l,this,i),z(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Gc(s)[o]=u},this)},t.prototype.formatTooltip=function(e,i,n){var a=this.getData(),o=this.getRawValue(e),s=a.getName(e);return _e("section",{header:this.name,blocks:[_e("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,i){var n=ud.prototype.getDataParams.call(this,e,i),a=this.__hostSeries;return a&&(n.seriesId=a.id,n.seriesName=a.name,n.seriesType=a.subType),n},t.getMarkerModelFromSeries=function(e,i){return Gc(e)[i]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(yt);re(nn,ud.prototype);var UQ=function(r){E(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,i,n){return new t(e,i,n)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(nn);function c0(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function YQ(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function Hc(r,t,e,i,n,a){var o=[],s=tn(t,i),l=s?t.getCalculationInfo("stackResultDimension"):i,u=rb(t,l,r),h=t.indicesOfNearest(l,u)[0];o[n]=t.get(e,h),o[a]=t.get(l,h);var c=t.get(i,h),f=$r(t.get(i,h));return f=Math.min(f,20),f>=0&&(o[a]=+o[a].toFixed(f)),[o,c]}var Qg={min:ut(Hc,"min"),max:ut(Hc,"max"),average:ut(Hc,"average"),median:ut(Hc,"median")};function ih(r,t){if(t){var e=r.getData(),i=r.coordinateSystem,n=i&&i.dimensions;if(!YQ(t)&&!V(t.coord)&&V(n)){var a=QE(t,e,i,r);if(t=it(t),t.type&&Qg[t.type]&&a.baseAxis&&a.valueAxis){var o=vt(n,a.baseAxis.dim),s=vt(n,a.valueAxis.dim),l=Qg[t.type](e,a.baseDataDim,a.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||!V(n))t.coord=[];else for(var u=t.coord,h=0;h<2;h++)Qg[u[h]]&&(u[h]=rb(e,e.mapDimension(n[h]),u[h]));return t}}function QE(r,t,e,i){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,n.valueAxis=e.getAxis($Q(i,n.valueDataDim)),n.baseAxis=e.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=i.getBaseAxis(),n.valueAxis=e.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function $Q(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function nh(r,t){return r&&r.containData&&t.coord&&!c0(t)?r.containData(t.coord):!0}function XQ(r,t,e){return r&&r.containZone&&t.coord&&e.coord&&!c0(t)&&!c0(e)?r.containZone(t.coord,e.coord):!0}function tO(r,t){return r?function(e,i,n,a){var o=a<2?e.coord&&e.coord[a]:e.value;return Fn(o,t[a])}:function(e,i,n,a){return Fn(e.value,t[a])}}function rb(r,t,e){if(e==="average"){var i=0,n=0;return r.each(t,function(a,o){isNaN(a)||(i+=a,n++)}),i/n}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var ty=Tt(),ib=function(r){E(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=Z()},t.prototype.render=function(e,i,n){var a=this,o=this.markerGroupMap;o.each(function(s){ty(s).keep=!1}),i.eachSeries(function(s){var l=nn.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,i,n)}),o.each(function(s){!ty(s).keep&&a.group.remove(s.group)})},t.prototype.markKeep=function(e){ty(e).keep=!0},t.prototype.toggleBlurSeries=function(e,i){var n=this;A(e,function(a){var o=nn.getMarkerModelFromSeries(a,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(i?Y2(l):u_(l))})}})},t.type="marker",t}(Yt);function FA(r,t,e){var i=t.coordinateSystem;r.each(function(n){var a=r.getItemModel(n),o,s=U(a.get("x"),e.getWidth()),l=U(a.get("y"),e.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(t.getMarkerPosition)o=t.getMarkerPosition(r.getValues(r.dimensions,n));else if(i){var u=r.get(i.dimensions[0],n),h=r.get(i.dimensions[1],n);o=i.dataToPoint([u,h])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(n,o)})}var ZQ=function(r){E(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,i,n){i.eachSeries(function(a){var o=nn.getMarkerModelFromSeries(a,"markPoint");o&&(FA(o.getData(),a,n),this.markerGroupMap.get(a.id).updateLayout())},this)},t.prototype.renderSeries=function(e,i,n,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new wh),c=jQ(o,e,i);i.setData(c),FA(i.getData(),e,a),c.each(function(f){var v=c.getItemModel(f),d=v.getShallow("symbol"),p=v.getShallow("symbolSize"),g=v.getShallow("symbolRotate"),y=v.getShallow("symbolOffset"),m=v.getShallow("symbolKeepAspect");if(Q(d)||Q(p)||Q(g)||Q(y)){var _=i.getRawValue(f),x=i.getDataParams(f);Q(d)&&(d=d(_,x)),Q(p)&&(p=p(_,x)),Q(g)&&(g=g(_,x)),Q(y)&&(y=y(_,x))}var b=v.getModel("itemStyle").getItemStyle(),S=xh(l,"color");b.fill||(b.fill=S),c.setItemVisual(f,{symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:b})}),h.updateData(c),this.group.add(h.group),c.eachItemGraphicEl(function(f){f.traverse(function(v){ot(v).dataModel=i})}),this.markKeep(h),h.group.silent=i.get("silent")||e.get("silent")},t.type="markPoint",t}(ib);function jQ(r,t,e){var i;r?i=F(r&&r.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return z(z({},l),{name:s,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new Be(i,e),a=F(e.get("data"),ut(ih,t));r&&(a=Dt(a,ut(nh,r)));var o=tO(!!r,i);return n.initData(a,null,o),n}function qQ(r){r.registerComponentModel(UQ),r.registerComponentView(ZQ),r.registerPreprocessor(function(t){eb(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var KQ=function(r){E(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,i,n){return new t(e,i,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}(nn),Wc=Tt(),JQ=function(r,t,e,i){var n=r.getData(),a;if(V(i))a=i;else{var o=i.type;if(o==="min"||o==="max"||o==="average"||o==="median"||i.xAxis!=null||i.yAxis!=null){var s=void 0,l=void 0;if(i.yAxis!=null||i.xAxis!=null)s=t.getAxis(i.yAxis!=null?"y":"x"),l=pe(i.yAxis,i.xAxis);else{var u=QE(i,n,t,r);s=u.valueAxis;var h=Z_(n,u.valueDataDim);l=rb(n,h,o)}var c=s.dim==="x"?0:1,f=1-c,v=it(i),d={coord:[]};v.type=null,v.coord=[],v.coord[f]=-1/0,d.coord[f]=1/0;var p=e.get("precision");p>=0&&Mt(l)&&(l=+l.toFixed(Math.min(p,20))),v.coord[c]=d.coord[c]=l,a=[v,d,{type:o,valueIndex:i.valueIndex,value:l}]}else a=[]}var g=[ih(r,a[0]),ih(r,a[1]),z({},a[2])];return g[2].type=g[2].type||null,ht(g[2],g[0]),ht(g[2],g[1]),g};function bv(r){return!isNaN(r)&&!isFinite(r)}function GA(r,t,e,i){var n=1-r,a=i.dimensions[r];return bv(t[n])&&bv(e[n])&&t[r]===e[r]&&i.getAxis(a).containData(t[r])}function QQ(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,i=t[1].coord;if(e&&i&&(GA(1,e,i,r)||GA(0,e,i,r)))return!0}return nh(r,t[0])&&nh(r,t[1])}function ey(r,t,e,i,n){var a=i.coordinateSystem,o=r.getItemModel(t),s,l=U(o.get("x"),n.getWidth()),u=U(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition)s=i.getMarkerPosition(r.getValues(r.dimensions,t));else{var h=a.dimensions,c=r.get(h[0],t),f=r.get(h[1],t);s=a.dataToPoint([c,f])}if(Co(a,"cartesian2d")){var v=a.getAxis("x"),d=a.getAxis("y"),h=a.dimensions;bv(r.get(h[0],t))?s[0]=v.toGlobalCoord(v.getExtent()[e?0:1]):bv(r.get(h[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 ttt=function(r){E(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,i,n){i.eachSeries(function(a){var o=nn.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Wc(o).from,u=Wc(o).to;l.each(function(h){ey(l,h,!0,a,n),ey(u,h,!1,a,n)}),s.each(function(h){s.setItemLayout(h,[l.getItemLayout(h),u.getItemLayout(h)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,i,n,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new Tx);this.group.add(h.group);var c=ett(o,e,i),f=c.from,v=c.to,d=c.line;Wc(i).from=f,Wc(i).to=v,i.setData(d);var p=i.get("symbol"),g=i.get("symbolSize"),y=i.get("symbolRotate"),m=i.get("symbolOffset");V(p)||(p=[p,p]),V(g)||(g=[g,g]),V(y)||(y=[y,y]),V(m)||(m=[m,m]),c.from.each(function(x){_(f,x,!0),_(v,x,!1)}),d.each(function(x){var b=d.getItemModel(x).getModel("lineStyle").getLineStyle();d.setItemLayout(x,[f.getItemLayout(x),v.getItemLayout(x)]),b.stroke==null&&(b.stroke=f.getItemVisual(x,"style").fill),d.setItemVisual(x,{fromSymbolKeepAspect:f.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(x,"symbolOffset"),fromSymbolRotate:f.getItemVisual(x,"symbolRotate"),fromSymbolSize:f.getItemVisual(x,"symbolSize"),fromSymbol:f.getItemVisual(x,"symbol"),toSymbolKeepAspect:v.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(x,"symbolOffset"),toSymbolRotate:v.getItemVisual(x,"symbolRotate"),toSymbolSize:v.getItemVisual(x,"symbolSize"),toSymbol:v.getItemVisual(x,"symbol"),style:b})}),h.updateData(d),c.line.eachItemGraphicEl(function(x){ot(x).dataModel=i,x.traverse(function(b){ot(b).dataModel=i})});function _(x,b,S){var w=x.getItemModel(b);ey(x,b,S,e,a);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=xh(l,"color")),x.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:lt(w.get("symbolOffset",!0),m[S?0:1]),symbolRotate:lt(w.get("symbolRotate",!0),y[S?0:1]),symbolSize:lt(w.get("symbolSize"),g[S?0:1]),symbol:lt(w.get("symbol",!0),p[S?0:1]),style:T})}this.markKeep(h),h.group.silent=i.get("silent")||e.get("silent")},t.type="markLine",t}(ib);function ett(r,t,e){var i;r?i=F(r&&r.dimensions,function(u){var h=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return z(z({},h),{name:u,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new Be(i,e),a=new Be(i,e),o=new Be([],e),s=F(e.get("data"),ut(JQ,t,r,e));r&&(s=Dt(s,ut(QQ,r)));var l=tO(!!r,i);return n.initData(F(s,function(u){return u[0]}),null,l),a.initData(F(s,function(u){return u[1]}),null,l),o.initData(F(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:a,line:o}}function rtt(r){r.registerComponentModel(KQ),r.registerComponentView(ttt),r.registerPreprocessor(function(t){eb(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var itt=function(r){E(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,i,n){return new t(e,i,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}(nn),Uc=Tt(),ntt=function(r,t,e,i){var n=i[0],a=i[1];if(!(!n||!a)){var o=ih(r,n),s=ih(r,a),l=o.coord,u=s.coord;l[0]=pe(l[0],-1/0),l[1]=pe(l[1],-1/0),u[0]=pe(u[0],1/0),u[1]=pe(u[1],1/0);var h=zv([{},o,s]);return h.coord=[o.coord,s.coord],h.x0=o.x,h.y0=o.y,h.x1=s.x,h.y1=s.y,h}};function Sv(r){return!isNaN(r)&&!isFinite(r)}function HA(r,t,e,i){var n=1-r;return Sv(t[n])&&Sv(e[n])}function att(r,t){var e=t.coord[0],i=t.coord[1],n={coord:e,x:t.x0,y:t.y0},a={coord:i,x:t.x1,y:t.y1};return Co(r,"cartesian2d")?e&&i&&(HA(1,e,i)||HA(0,e,i))?!0:XQ(r,n,a):nh(r,n)||nh(r,a)}function WA(r,t,e,i,n){var a=i.coordinateSystem,o=r.getItemModel(t),s,l=U(o.get(e[0]),n.getWidth()),u=U(o.get(e[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition){var h=r.getValues(["x0","y0"],t),c=r.getValues(["x1","y1"],t),f=a.clampData(h),v=a.clampData(c),d=[];e[0]==="x0"?d[0]=f[0]>v[0]?c[0]:h[0]:d[0]=f[0]>v[0]?h[0]:c[0],e[1]==="y0"?d[1]=f[1]>v[1]?c[1]:h[1]:d[1]=f[1]>v[1]?h[1]:c[1],s=i.getMarkerPosition(d,e,!0)}else{var p=r.get(e[0],t),g=r.get(e[1],t),y=[p,g];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(Co(a,"cartesian2d")){var m=a.getAxis("x"),_=a.getAxis("y"),p=r.get(e[0],t),g=r.get(e[1],t);Sv(p)?s[0]=m.toGlobalCoord(m.getExtent()[e[0]==="x0"?0:1]):Sv(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[e[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var UA=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],ott=function(r){E(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,i,n){i.eachSeries(function(a){var o=nn.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=F(UA,function(c){return WA(s,l,c,a,n)});s.setItemLayout(l,u);var h=s.getItemGraphicEl(l);h.setShape("points",u)})}},this)},t.prototype.renderSeries=function(e,i,n,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,{group:new at});this.group.add(h.group),this.markKeep(h);var c=stt(o,e,i);i.setData(c),c.each(function(f){var v=F(UA,function(T){return WA(c,f,T,e,a)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),y=p.getExtent(),m=[d.parse(c.get("x0",f)),d.parse(c.get("x1",f))],_=[p.parse(c.get("y0",f)),p.parse(c.get("y1",f))];fr(m),fr(_);var x=!(g[0]>m[1]||g[1]<m[0]||y[0]>_[1]||y[1]<_[0]),b=!x;c.setItemLayout(f,{points:v,allClipped:b});var S=c.getItemModel(f).getModel("itemStyle").getItemStyle(),w=xh(l,"color");S.fill||(S.fill=w,Y(S.fill)&&(S.fill=Ru(S.fill,.4))),S.stroke||(S.stroke=w),c.setItemVisual(f,"style",S)}),c.diff(Uc(h).data).add(function(f){var v=c.getItemLayout(f);if(!v.allClipped){var d=new Ge({shape:{points:v.points}});c.setItemGraphicEl(f,d),h.group.add(d)}}).update(function(f,v){var d=Uc(h).data.getItemGraphicEl(v),p=c.getItemLayout(f);p.allClipped?d&&h.group.remove(d):(d?At(d,{shape:{points:p.points}},i,f):d=new Ge({shape:{points:p.points}}),c.setItemGraphicEl(f,d),h.group.add(d))}).remove(function(f){var v=Uc(h).data.getItemGraphicEl(f);h.group.remove(v)}).execute(),c.eachItemGraphicEl(function(f,v){var d=c.getItemModel(v),p=c.getItemVisual(v,"style");f.useStyle(c.getItemVisual(v,"style")),Ae(f,me(d),{labelFetcher:i,labelDataIndex:v,defaultText:c.getName(v)||"",inheritColor:Y(p.fill)?Ru(p.fill,1):"#000"}),Ce(f,d),Kt(f,null,null,d.get(["emphasis","disabled"])),ot(f).dataModel=i}),Uc(h).data=c,h.group.silent=i.get("silent")||e.get("silent")},t.type="markArea",t}(ib);function stt(r,t,e){var i,n,a=["x0","y0","x1","y1"];if(r){var o=F(r&&r.dimensions,function(u){var h=t.getData(),c=h.getDimensionInfo(h.mapDimension(u))||{};return z(z({},c),{name:u,ordinalMeta:null})});n=F(a,function(u,h){return{name:u,type:o[h%2].type}}),i=new Be(n,e)}else n=[{name:"value",type:"float"}],i=new Be(n,e);var s=F(e.get("data"),ut(ntt,t,r,e));r&&(s=Dt(s,ut(att,r)));var l=r?function(u,h,c,f){var v=u.coord[Math.floor(f/2)][f%2];return Fn(v,n[f])}:function(u,h,c,f){return Fn(u.value,n[f])};return i.initData(s,null,l),i.hasItemOption=!0,i}function ltt(r){r.registerComponentModel(itt),r.registerComponentView(ott),r.registerPreprocessor(function(t){eb(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var utt=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"])}},f0=function(r){E(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,i,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.call(this,e,i),this._updateSelector(e)},t.prototype._updateSelector=function(e){var i=e.selector,n=this.ecModel;i===!0&&(i=e.selector=["all","inverse"]),V(i)&&A(i,function(a,o){Y(a)&&(a={type:a}),i[o]=ht(a,utt(n,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var i=!1,n=0;n<e.length;n++){var a=e[n].get("name");if(this.isSelected(a)){this.select(a),i=!0;break}}!i&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var i=[],n=[];e.eachRawSeries(function(l){var u=l.name;n.push(u);var h;if(l.legendVisualProvider){var c=l.legendVisualProvider,f=c.getAllNames();e.isSeriesFiltered(l)||(n=n.concat(f)),f.length?i=i.concat(f):h=!0}else h=!0;h&&e_(l)&&i.push(l.name)}),this._availableNames=n;var a=this.get("data")||i,o=Z(),s=F(a,function(l){return(Y(l)||Mt(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Lt(l,this,this.ecModel))},this);this._data=Dt(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var i=this.option.selected,n=this.get("selectedMode");if(n==="single"){var a=this._data;A(a,function(o){i[o.get("name")]=!1})}i[e]=!0},t.prototype.unSelect=function(e){this.get("selectedMode")!=="single"&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var i=this.option.selected;i.hasOwnProperty(e)||(i[e]=!0),this[i[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,i=this.option.selected;A(e,function(n){i[n.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,i=this.option.selected;A(e,function(n){var a=n.get("name",!0);i.hasOwnProperty(a)||(i[a]=!0),i[a]=!i[a]})},t.prototype.isSelected=function(e){var i=this.option.selected;return!(i.hasOwnProperty(e)&&!i[e])&&vt(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(yt),jo=ut,v0=A,Yc=at,eO=function(r){E(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 Yc),this.group.add(this._selectorGroup=new Yc),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,i,n){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,i,n,l,s,u);var h=e.getBoxLayoutParams(),c={width:n.getWidth(),height:n.getHeight()},f=e.get("padding"),v=ue(h,c,f),d=this.layoutInner(e,o,v,a,l,u),p=ue(tt({width:d.width,height:d.height},h),c,f);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=WE(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,i,n,a,o,s,l){var u=this.getContentGroup(),h=Z(),c=i.get("selectedMode"),f=[];n.eachRawSeries(function(v){!v.get("legendHoverLink")&&f.push(v.id)}),v0(i.getData(),function(v,d){var p=v.get("name");if(!this.newlineDisabled&&(p===""||p===`
|
||
`)){var g=new Yc;g.newline=!0,u.add(g);return}var y=n.getSeriesByName(p)[0];if(!h.get(p))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},x=m.getVisual("legendIcon"),b=m.getVisual("style"),S=this._createItem(y,p,d,v,i,e,_,b,x,c,a);S.on("click",jo(YA,p,null,a,f)).on("mouseover",jo(d0,y.name,null,a,f)).on("mouseout",jo(p0,y.name,null,a,f)),n.ssr&&S.eachChild(function(w){var T=ot(w);T.seriesIndex=y.seriesIndex,T.dataIndex=d,T.ssrType="legend"}),h.set(p,!0)}else n.eachRawSeries(function(w){if(!h.get(p)&&w.legendVisualProvider){var T=w.legendVisualProvider;if(!T.containName(p))return;var M=T.indexOfName(p),C=T.getItemVisual(M,"style"),D=T.getItemVisual(M,"legendIcon"),L=Ze(C.fill);L&&L[3]===0&&(L[3]=.2,C=z(z({},C),{fill:Kr(L,"rgba")}));var I=this._createItem(w,p,d,v,i,e,{},C,D,c,a);I.on("click",jo(YA,null,p,a,f)).on("mouseover",jo(d0,null,p,a,f)).on("mouseout",jo(p0,null,p,a,f)),n.ssr&&I.eachChild(function(P){var k=ot(P);k.seriesIndex=w.seriesIndex,k.dataIndex=d,k.ssrType="legend"}),h.set(p,!0)}},this)},this),o&&this._createSelector(o,i,a,s,l)},t.prototype._createSelector=function(e,i,n,a,o){var s=this.getSelectorGroup();v0(e,function(u){var h=u.type,c=new St({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:h==="all"?"legendAllSelect":"legendInverseSelect",legendId:i.id})}});s.add(c);var f=i.getModel("selectorLabel"),v=i.getModel(["emphasis","selectorLabel"]);Ae(c,{normal:f,emphasis:v},{defaultText:u.title}),Bn(c)})},t.prototype._createItem=function(e,i,n,a,o,s,l,u,h,c,f){var v=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(i),y=a.get("symbolRotate"),m=a.get("symbolKeepAspect"),_=a.get("icon");h=_||h||"roundRect";var x=htt(h,a,l,u,v,g,f),b=new Yc,S=a.getModel("textStyle");if(Q(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:h,iconRotate:y,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;b.add(ctt({itemWidth:d,itemHeight:p,icon:h,iconRotate:w,itemStyle:x.itemStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,M=s,C=o.get("formatter"),D=i;Y(C)&&C?D=C.replace("{name}",i??""):Q(C)&&(D=C(i));var L=g?S.getTextColor():a.get("inactiveColor");b.add(new St({style:Gt(S,{text:D,x:T,y:p/2,fill:L,align:M,verticalAlign:"middle"},{inheritColor:L})}));var I=new wt({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=a.getModel("tooltip");return P.get("show")&&So({el:I,componentModel:o,itemName:i,itemTooltipOption:P.option}),b.add(I),b.eachChild(function(k){k.silent=!0}),I.silent=!c,this.getContentGroup().add(b),Bn(b),b.__legendDataIndex=n,b},t.prototype.layoutInner=function(e,i,n,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();io(e.get("orient"),l,e.get("itemGap"),n.width,n.height);var h=l.getBoundingRect(),c=[-h.x,-h.y];if(u.markRedraw(),l.markRedraw(),o){io("horizontal",u,e.get("selectorItemGap",!0));var f=u.getBoundingRect(),v=[-f.x,-f.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"?v[p]+=h[g]+d:c[p]+=f[g]+d,v[1-p]+=h[y]/2-f[y]/2,u.x=v[0],u.y=v[1],l.x=c[0],l.y=c[1];var _={x:0,y:0};return _[g]=h[g]+d+f[g],_[y]=Math.max(h[y],f[y]),_[m]=Math.min(0,f[m]+v[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}(Yt);function htt(r,t,e,i,n,a,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),v0(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),h=r.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?i.decal:Ds(c,o),u.fill==="inherit"&&(u.fill=i[n]),u.stroke==="inherit"&&(u.stroke=i[h]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?i:e).opacity),s(u,i);var f=t.getModel("lineStyle"),v=f.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"&&(u.stroke=i.fill),v.stroke==="auto"&&(v.stroke=i.fill),!a){var d=t.get("inactiveBorderWidth"),p=u[h];u.lineWidth=d==="auto"?i.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=f.get("inactiveColor"),v.lineWidth=f.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function ctt(r){var t=r.icon||"roundRect",e=ae(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill="#fff",e.style.lineWidth=2),e}function YA(r,t,e,i){p0(r,t,e,i),e.dispatchAction({type:"legendToggleSelect",name:r??t}),d0(r,t,e,i)}function rO(r){for(var t=r.getZr().storage.getDisplayList(),e,i=0,n=t.length;i<n&&!(e=t[i].states.emphasis);)i++;return e&&e.hoverLayer}function d0(r,t,e,i){rO(e)||e.dispatchAction({type:"highlight",seriesName:r,name:t,excludeSeriesId:i})}function p0(r,t,e,i){rO(e)||e.dispatchAction({type:"downplay",seriesName:r,name:t,excludeSeriesId:i})}function ftt(r){var t=r.findComponents({mainType:"legend"});t&&t.length&&r.filterSeries(function(e){for(var i=0;i<t.length;i++)if(!t[i].isSelected(e.name))return!1;return!0})}function Pl(r,t,e){var i=r==="allSelect"||r==="inverseSelect",n={},a=[];e.eachComponent({mainType:"legend",query:t},function(s){i?s[r]():s[r](t.name),$A(s,n),a.push(s.componentIndex)});var o={};return e.eachComponent("legend",function(s){A(n,function(l,u){s[l?"select":"unSelect"](u)}),$A(s,o)}),i?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function $A(r,t){var e=t||{};return A(r.getData(),function(i){var n=i.get("name");if(!(n===`
|
||
`||n==="")){var a=r.isSelected(n);X(e,n)?e[n]=e[n]&&a:e[n]=a}}),e}function vtt(r){r.registerAction("legendToggleSelect","legendselectchanged",ut(Pl,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",ut(Pl,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",ut(Pl,"inverseSelect")),r.registerAction("legendSelect","legendselected",ut(Pl,"select")),r.registerAction("legendUnSelect","legendunselected",ut(Pl,"unSelect"))}function iO(r){r.registerComponentModel(f0),r.registerComponentView(eO),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,ftt),r.registerSubTypeDefaulter("legend",function(){return"plain"}),vtt(r)}var dtt=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,i,n){var a=Us(e);r.prototype.init.call(this,e,i,n),XA(this,e,a)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.call(this,e,i),XA(this,this.option,e)},t.type="legend.scroll",t.defaultOption=ea(f0.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(f0);function XA(r,t,e){var i=r.getOrient(),n=[1,1];n[i.index]=0,Zn(t,e,{type:"box",ignoreSize:!!n})}var ZA=at,ry=["width","height"],iy=["x","y"],ptt=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new ZA),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new ZA)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,i,n,a,o,s,l){var u=this;r.prototype.renderInner.call(this,e,i,n,a,o,s,l);var h=this._controllerGroup,c=i.get("pageIconSize",!0),f=V(c)?c:[c,c];d("pagePrev",0);var v=i.getModel("pageTextStyle");h.add(new St({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,g){var y=p+"DataIndex",m=Gs(i.get("pageIcons",!0)[i.getOrient().name][g],{onclick:$(u._pageGo,u,y,i,a)},{x:-f[0]/2,y:-f[1]/2,width:f[0],height:f[1]});m.name=p,h.add(m)}},t.prototype.layoutInner=function(e,i,n,a,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,h=ry[u],c=iy[u],f=ry[1-u],v=iy[1-u];o&&io("horizontal",l,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],y=it(n);o&&(y[h]=n[h]-p[h]-d);var m=this._layoutContentAndController(e,a,y,u,h,f,v,c);if(o){if(s==="end")g[u]+=m[h]+d;else{var _=p[h]+d;g[u]-=_,m[c]-=_}m[h]+=p[h]+d,g[1-u]+=m[v]+m[f]/2-p[f]/2,m[f]=Math.max(m[f],p[f]),m[v]=Math.min(m[v],p[v]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,i,n,a,o,s,l,u){var h=this.getContentGroup(),c=this._containerGroup,f=this._controllerGroup;io(e.get("orient"),h,e.get("itemGap"),a?n.width:null,a?null:n.height),io("horizontal",f,e.get("pageButtonItemGap",!0));var v=h.getBoundingRect(),d=f.getBoundingRect(),p=this._showController=v[o]>n[o],g=[-v.x,-v.y];i||(g[a]=h[u]);var y=[0,0],m=[-d.x,-d.y],_=lt(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var x=e.get("pageButtonPosition",!0);x==="end"?m[a]+=n[o]-d[o]:y[a]+=d[o]+_}m[1-a]+=v[s]/2-d[s]/2,h.setPosition(g),c.setPosition(y),f.setPosition(m);var b={x:0,y:0};if(b[o]=p?n[o]:v[o],b[s]=Math.max(v[s],d[s]),b[l]=Math.min(0,d[l]+m[1-a]),c.__rectSize=n[o],p){var S={x:0,y:0};S[o]=Math.max(n[o]-d[o]-_,0),S[s]=b[s],c.setClipPath(new wt({shape:S})),c.__rectSize=S[o]}else f.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(e);return w.pageIndex!=null&&At(h,{x:w.contentPosition[0],y:w.contentPosition[1]},p?e:null),this._updatePageInfoView(e,w),b},t.prototype._pageGo=function(e,i,n){var a=this._getPageInfo(i)[e];a!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:i.id})},t.prototype._updatePageInfoView=function(e,i){var n=this._controllerGroup;A(["pagePrev","pageNext"],function(h){var c=h+"DataIndex",f=i[c]!=null,v=n.childOfName(h);v&&(v.setStyle("fill",f?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=f?"pointer":"default")});var a=n.childOfName("pageText"),o=e.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;a&&o&&a.setStyle("text",Y(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var i=e.get("scrollDataIndex",!0),n=this.getContentGroup(),a=this._containerGroup.__rectSize,o=e.getOrient().index,s=ry[o],l=iy[o],u=this._findTargetItemIndex(i),h=n.children(),c=h[u],f=h.length,v=f?1:0,d={contentPosition:[n.x,n.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return d;var p=x(c);d.contentPosition[o]=-p.s;for(var g=u+1,y=p,m=p,_=null;g<=f;++g)_=x(h[g]),(!_&&m.e>y.s+a||_&&!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)_=x(h[g]),(!_||!b(m,_.s))&&y.i<m.i&&(m=y,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=y.i),++d.pageCount,++d.pageIndex),y=_;return d;function x(S){if(S){var w=S.getBoundingRect(),T=w[l]+S[l];return{s:T,e:T+w[s],i:S.__legendDataIndex}}}function b(S,w){return S.e>=w&&S.s<=w+a}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var i,n=this.getContentGroup(),a;return n.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===e&&(i=s)}),i??a},t.type="legend.scroll",t}(eO);function gtt(r){r.registerAction("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;i!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(i)})})}function ytt(r){pt(iO),r.registerComponentModel(dtt),r.registerComponentView(ptt),gtt(r)}function mtt(r){pt(iO),pt(ytt)}var _tt=function(r){E(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=ea(rh.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(rh),nb=Tt();function xtt(r,t,e){nb(r).coordSysRecordMap.each(function(i){var n=i.dataZoomInfoMap.get(t.uid);n&&(n.getRange=e)})}function btt(r,t){for(var e=nb(r).coordSysRecordMap,i=e.keys(),n=0;n<i.length;n++){var a=i[n],o=e.get(a),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||nO(e,o))}}}function nO(r,t){if(t){r.removeKey(t.model.uid);var e=t.controller;e&&e.dispose()}}function Stt(r,t){var e={model:t,containsPoint:ut(Ttt,t),dispatchAction:ut(wtt,r),dataZoomInfoMap:null,controller:null},i=e.controller=new Dh(r.getZr());return A(["pan","zoom","scrollMove"],function(n){i.on(n,function(a){var o=[];e.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[n],u=l&&l(s.dzReferCoordSysInfo,e.model.mainType,e.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&e.dispatchAction(o)})}),e}function wtt(r,t){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function Ttt(r,t,e,i){return r.coordinateSystem.containPoint([e,i])}function Mtt(r){var t,e="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},n=!0;return r.each(function(a){var o=a.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;i[e+s]>i[e+t]&&(t=s),n=n&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function Ctt(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var i=nb(e),n=i.coordSysRecordMap||(i.coordSysRecordMap=Z());n.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=FE(a);A(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,Stt(e,s.model)),h=u.dataZoomInfoMap||(u.dataZoomInfoMap=Z());h.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),n.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){nO(n,a);return}var h=Mtt(l);o.enable(h.controlType,h.opt),o.setPointerChecker(a.containsPoint),Zs(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Att=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,i,n){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),xtt(n,e,{pan:$(ny.pan,this),zoom:$(ny.zoom,this),scrollMove:$(ny.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){btt(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(jx),ny={zoom:function(r,t,e,i){var n=this.range,a=n.slice(),o=r.axisModels[0];if(o){var s=ay[t](null,[i.originX,i.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/i.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Do(0,a,[0,100],0,h.minSpan,h.maxSpan),this.range=a,n[0]!==a[0]||n[1]!==a[1])return a}},pan:jA(function(r,t,e,i,n,a){var o=ay[i]([a.oldX,a.oldY],[a.newX,a.newY],t,n,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:jA(function(r,t,e,i,n,a){var o=ay[i]([0,0],[a.scrollDelta,a.scrollDelta],t,n,e);return o.signal*(r[1]-r[0])*a.scrollDelta})};function jA(r){return function(t,e,i,n){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,i,n);if(Do(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var ay={grid:function(r,t,e,i,n){var a=e.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,t,e,i,n){var a=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=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,t,e,i,n){var a=e.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function aO(r){qx(r),r.registerComponentModel(_tt),r.registerComponentView(Att),Ctt(r)}var Dtt=function(r){E(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=ea(rh.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(rh),kl=wt,qA=7,Ltt=1,oy=30,Itt=7,Rl="horizontal",KA="vertical",Ptt=5,ktt=["line","bar","candlestick","scatter"],Rtt={easing:"cubicOut",duration:100,delay:0},Ett=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,i){this.api=i,this._onBrush=$(this._onBrush,this),this._onBrushEnd=$(this._onBrushEnd,this)},t.prototype.render=function(e,i,n,a){if(r.prototype.render.apply(this,arguments),Zs(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}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Wu(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var i=this._displayables.sliderGroup=new at;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(i),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,i=this.api,n=e.get("brushSelect"),a=n?Itt:0,o=this._findCoordRect(),s={width:i.getWidth(),height:i.getHeight()},l=this._orient===Rl?{right:s.width-o.x-o.width,top:s.height-oy-qA-a,width:o.width,height:oy}:{right:qA,top:o.y,width:oy,height:o.height},u=Us(e.option);A(["right","top","width","height"],function(c){u[c]==="ph"&&(u[c]=l[c])});var h=ue(u,s);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===KA&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,i=this._location,n=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===Rl&&!o?{scaleY:l?1:-1,scaleX:1}:n===Rl&&o?{scaleY:l?1:-1,scaleX:-1}:n===KA&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=i.x-u.x,e.y=i.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,i=this._size,n=this._displayables.sliderGroup,a=e.get("brushSelect");n.add(new kl({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new kl({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:$(this._onClickPanel,this)}),s=this.api.getZr();a?(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 i=this._size,n=this._shadowSize||[],a=e.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,h=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||i[0]!==n[0]||i[1]!==n[1]){var c=o.getDataExtent(l),f=(c[1]-c[0])*.3;c=[c[0]-f,c[1]+f];var v=[0,i[1]],d=[0,i[0]],p=[[i[0],0],[0,0]],g=[],y=d[1]/(o.count()-1),m=0,_=Math.round(o.count()/i[0]),x;o.each([l],function(M,C){if(_>0&&C%_){m+=y;return}var D=M==null||isNaN(M)||M==="",L=D?0:Pt(M,c,v,!0);D&&!x&&C?(p.push([p[p.length-1][0],0]),g.push([g[g.length-1][0],0])):!D&&x&&(p.push([m,0]),g.push([m,0])),p.push([m,L]),g.push([m,L]),m+=y,x=D}),u=this._shadowPolygonPts=p,h=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var b=this.dataZoomModel;function S(M){var C=b.getModel(M?"selectedDataBackground":"dataBackground"),D=new at,L=new Ge({shape:{points:u},segmentIgnoreThreshold:1,style:C.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),I=new We({shape:{points:h},segmentIgnoreThreshold:1,style:C.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return D.add(L),D.add(I),D}for(var w=0;w<3;w++){var T=S(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,i=e.get("showDataShadow");if(i!==!1){var n,a=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();A(l,function(u){if(!n&&!(i!==!0&&vt(ktt,u.get("type"))<0)){var h=a.getComponent(Rn(o),s).axis,c=Ott(o),f,v=u.coordinateSystem;c!=null&&v.getOtherAxis&&(f=v.getOtherAxis(h).inverse),c=u.getData().mapDimension(c),n={thisAxis:h,series:u,thisDim:o,otherDim:c,otherAxisInverse:f}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,i=this._displayables,n=i.handles=[null,null],a=i.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,h=l.get("borderRadius")||0,c=l.get("brushSelect"),f=i.filler=new kl({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(f),o.add(new kl({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:h},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Ltt,fill:"rgba(0,0,0,0)"}})),A([0,1],function(_){var x=l.get("handleIcon");!Kf[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x);var b=ae(x,-1,0,2,2,null,!0);b.attr({cursor:JA(this._orient),draggable:!0,drift:$(this._onDragMove,this,_),ondragend:$(this._onDragEnd,this),onmouseover:$(this._showDataInfo,this,!0),onmouseout:$(this._showDataInfo,this,!1),z2:5});var S=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=U(w,this._size[1]),this._handleWidth=S.width/S.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(),Bn(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(n[_]=b);var M=l.getModel("textStyle"),C=l.get("handleLabel")||{},D=C.show||!1;e.add(a[_]=new St({silent:!0,invisible:!D,style:Gt(M,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:M.getTextColor(),font:M.getFont()}),z2:10}))},this);var v=f;if(c){var d=U(l.get("moveHandleSize"),s[1]),p=i.moveHandle=new wt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,y=i.moveHandleIcon=ae(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!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));v=i.moveZone=new wt({invisible:!0,shape:{y:s[1]-m,height:d+m}}),v.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:JA(this._orient),drift:$(this._onDragMove,this,"all"),ondragstart:$(this._showDataInfo,this,!0),ondragend:$(this._onDragEnd,this),onmouseover:$(this._showDataInfo,this,!0),onmouseout:$(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[Pt(e[0],[0,100],i,!0),Pt(e[1],[0,100],i,!0)]},t.prototype._updateInterval=function(e,i){var n=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Do(i,a,o,n.get("zoomLock")?"all":e,s.minSpan!=null?Pt(s.minSpan,l,o,!0):null,s.maxSpan!=null?Pt(s.maxSpan,l,o,!0):null);var u=this._range,h=this._range=fr([Pt(a[0],o,l,!0),Pt(a[1],o,l,!0)]);return!u||u[0]!==h[0]||u[1]!==h[1]},t.prototype._updateView=function(e){var i=this._displayables,n=this._handleEnds,a=fr(n.slice()),o=this._size;A([0,1],function(v){var d=i.handles[v],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:n[v]+(v?-1:1),y:o[1]/2-p/2})},this),i.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};i.moveHandle&&(i.moveHandle.setShape(s),i.moveZone.setShape(s),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=i.dataShadowSegs,u=[0,a[0],a[1],o[0]],h=0;h<l.length;h++){var c=l[h],f=c.getClipPath();f||(f=new wt,c.setClipPath(f)),f.setShape({x:u[h],y:0,width:u[h+1]-u[h],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var i=this.dataZoomModel,n=this._displayables,a=n.handleLabels,o=this._orient,s=["",""];if(i.get("showDetail")){var l=i.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,h=this._range,c=e?l.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(c[0],u),this._formatLabel(c[1],u)]}}var f=fr(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(d){var p=zn(n.handles[d].parent,this.group),g=ed(d===0?"right":"left",p),y=this._handleWidth/2+Ptt,m=Jr([f[d]+(d===0?-y:y),this._size[1]/2],p);a[d].setStyle({x:m[0],y:m[1],verticalAlign:o===Rl?"middle":g,align:o===Rl?g:"center",text:s[d]})}},t.prototype._formatLabel=function(e,i){var n=this.dataZoomModel,a=n.get("labelFormatter"),o=n.get("labelPrecision");(o==null||o==="auto")&&(o=i.getPixelPrecision());var s=e==null||isNaN(e)?"":i.type==="category"||i.type==="time"?i.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return Q(a)?a(e,s):Y(a)?a.replace("{value}",s):s},t.prototype._showDataInfo=function(e){var i=this.dataZoomModel.get("handleLabel")||{},n=i.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=a.get("show")||!1,s=e||this._dragging?o:n,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},t.prototype._onDragMove=function(e,i,n,a){this._dragging=!0,qi(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Jr([i,n],o,!0),l=this._updateInterval(e,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var e=this.dataZoomModel.get("realtime");!e&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var i=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>i[0]||n[1]<0||n[1]>i[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var i=e.offsetX,n=e.offsetY;this._brushStart=new ct(i,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var n=i.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=fr([Pt(n.x,o,s,!0),Pt(n.x+n.width,o,s,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(qi(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,i){var n=this._displayables,a=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new kl({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,i),h=l.transformCoordToLocal(s.x,s.y),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:h[0],y:0,width:u[0]-h[0],height:c[1]})},t.prototype._dispatchZoomAction=function(e){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?Rtt:null,start:i[0],end:i[1]})},t.prototype._findCoordRect=function(){var e,i=FE(this.dataZoomModel).infoList;if(!e&&i.length){var n=i[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var a=this.api.getWidth(),o=this.api.getHeight();e={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return e},t.type="dataZoom.slider",t}(jx);function Ott(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function JA(r){return r==="vertical"?"ns-resize":"ew-resize"}function oO(r){r.registerComponentModel(Dtt),r.registerComponentView(Ett),qx(r)}function Ntt(r){pt(aO),pt(oO)}var sO={get:function(r,t,e){var i=it((Btt[r]||{})[t]);return e&&V(i)?i[i.length-1]:i}},Btt={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},QA=ye.mapVisual,ztt=ye.eachVisual,Vtt=V,tD=A,Ftt=fr,Gtt=Pt,wv=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,i){var n=this.option;!i&&qE(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var i=this.stateList;e=$(e,this),this.controllerVisuals=u0(this.option.controller,i,e),this.targetVisuals=u0(this.option.target,i,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,i=[];return e==null||e==="all"?this.ecModel.eachSeries(function(n,a){i.push(a)}):i=Bt(e),i},t.prototype.eachTargetSeries=function(e,i){A(this.getTargetSeriesIndices(),function(n){var a=this.ecModel.getSeriesByIndex(n);a&&e.call(i,a)},this)},t.prototype.isTargetSeries=function(e){var i=!1;return this.eachTargetSeries(function(n){n===e&&(i=!0)}),i},t.prototype.formatValueText=function(e,i,n){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;n=n||["<",">"],V(e)&&(e=e.slice(),u=!0);var h=i?e:u?[c(e[0]),c(e[1])]:c(e);if(Y(l))return l.replace("{value}",u?h[0]:h).replace("{value2}",u?h[1]:h);if(Q(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?n[0]+" "+h[1]:e[1]===s[1]?n[1]+" "+h[0]:h[0]+" - "+h[1];return h;function c(f){return f===s[0]?"min":f===s[1]?"max":(+f).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,i=Ftt([e.min,e.max]);this._dataExtent=i},t.prototype.getDataDimensionIndex=function(e){var i=this.option.dimension;if(i!=null)return e.getDimensionIndex(i);for(var n=e.dimensions,a=n.length-1;a>=0;a--){var o=n[a],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,i=this.option,n={inRange:i.inRange,outOfRange:i.outOfRange},a=i.target||(i.target={}),o=i.controller||(i.controller={});ht(a,n),ht(o,n);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),h.call(this,o);function l(c){Vtt(i.color)&&!c.inRange&&(c.inRange={color:i.color.slice().reverse()}),c.inRange=c.inRange||{color:e.get("gradientColor")}}function u(c,f,v){var d=c[f],p=c[v];d&&!p&&(p=c[v]={},tD(d,function(g,y){if(ye.isValidType(y)){var m=sO.get(y,"inactive",s);m!=null&&(p[y]=m,y==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function h(c){var f=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,v=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";tD(this.stateList,function(y){var m=this.itemSize,_=c[y];_||(_=c[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=f&&it(f)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=v&&it(v)||(s?m[0]:[m[0],m[0]])),_.symbol=QA(_.symbol,function(S){return S==="none"?g:S});var x=_.symbolSize;if(x!=null){var b=-1/0;ztt(x,function(S){S>b&&(b=S)}),_.symbolSize=QA(x,function(S){return Gtt(S,[0,b],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(yt),eD=[20,140],Htt=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(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]=eD[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=eD[1])},t.prototype._resetRange=function(){var e=this.getExtent(),i=this.option.range;!i||i.auto?(e.auto=1,this.option.range=e):V(i)&&(i[0]>i[1]&&i.reverse(),i[0]=Math.max(i[0],e[0]),i[1]=Math.min(i[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),A(this.stateList,function(e){var i=this.option.controller[e].symbolSize;i&&i[0]!==i[1]&&(i[0]=i[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),i=fr((this.get("range")||[]).slice());return i[0]>e[1]&&(i[0]=e[1]),i[1]>e[1]&&(i[1]=e[1]),i[0]<e[0]&&(i[0]=e[0]),i[1]<e[0]&&(i[1]=e[0]),i},t.prototype.getValueState=function(e){var i=this.option.range,n=this.getExtent();return(i[0]<=n[0]||i[0]<=e)&&(i[1]>=n[1]||e<=i[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var i=[];return this.eachTargetSeries(function(n){var a=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&a.push(l)},this),i.push({seriesId:n.id,dataIndex:a})},this),i},t.prototype.getVisualMeta=function(e){var i=rD(this,"outOfRange",this.getExtent()),n=rD(this,"inRange",this.option.range.slice()),a=[];function o(v,d){a.push({value:v,color:e(v,d)})}for(var s=0,l=0,u=n.length,h=i.length;l<h&&(!n.length||i[l]<=n[0]);l++)i[l]<n[s]&&o(i[l],"outOfRange");for(var c=1;s<u;s++,c=0)c&&a.length&&o(n[s],"outOfRange"),o(n[s],"inRange");for(var c=1;l<h;l++)(!n.length||n[n.length-1]<i[l])&&(c&&(a.length&&o(a[a.length-1].value,"outOfRange"),c=0),o(i[l],"outOfRange"));var f=a.length;return{stops:a,outerColors:[f?a[0].color:"transparent",f?a[f-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=ea(wv.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),t}(wv);function rD(r,t,e){if(e[0]===e[1])return e.slice();for(var i=200,n=(e[1]-e[0])/i,a=e[0],o=[],s=0;s<=i&&a<e[1];s++)o.push(a),a+=n;return o.push(e[1]),o}var lO=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.autoPositionValues={left:1,right:1,top:1,bottom:1},e}return t.prototype.init=function(e,i){this.ecModel=e,this.api=i},t.prototype.render=function(e,i,n,a){if(this.visualMapModel=e,e.get("show")===!1){this.group.removeAll();return}this.doRender(e,i,n,a)},t.prototype.renderBackground=function(e){var i=this.visualMapModel,n=To(i.get("padding")||0),a=e.getBoundingRect();e.add(new wt({z2:-1,silent:!0,shape:{x:a.x-n[3],y:a.y-n[0],width:a.width+n[3]+n[1],height:a.height+n[0]+n[2]},style:{fill:i.get("backgroundColor"),stroke:i.get("borderColor"),lineWidth:i.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,i,n){n=n||{};var a=n.forceState,o=this.visualMapModel,s={};if(i==="color"){var l=o.get("contentColor");s.color=l}function u(v){return s[v]}function h(v,d){s[v]=d}var c=o.controllerVisuals[a||o.getValueState(e)],f=ye.prepareVisualTypes(c);return A(f,function(v){var d=c[v];n.convertOpacityToAlpha&&v==="opacity"&&(v="colorAlpha",d=c.__alphaForOpacity),ye.dependsOn(v,i)&&d&&d.applyVisual(e,u,h)}),s[i]},t.prototype.positionGroup=function(e){var i=this.visualMapModel,n=this.api;sd(e,i.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},t.prototype.doRender=function(e,i,n,a){},t.type="visualMap",t}(Yt),iD=[["left","right","width"],["top","bottom","height"]];function uO(r,t,e){var i=r.option,n=i.align;if(n!=null&&n!=="auto")return n;for(var a={width:t.getWidth(),height:t.getHeight()},o=i.orient==="horizontal"?1:0,s=iD[o],l=[0,null,10],u={},h=0;h<3;h++)u[iD[1-o][h]]=l[h],u[s[h]]=h===2?e[0]:i[s[h]];var c=[["x","width",3],["y","height",0]][o],f=ue(u,a,i.padding);return s[(f.margin[c[2]]||0)+f[c[0]]+f[c[1]]*.5<a[c[1]]*.5?0:1]}function xf(r,t){return A(r||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),r}var ci=Pt,Wtt=A,nD=Math.min,sy=Math.max,Utt=12,Ytt=6,$tt=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return t.prototype.init=function(e,i){r.prototype.init.call(this,e,i),this._hoverLinkFromSeriesMouseOver=$(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=$(this._hideIndicator,this)},t.prototype.doRender=function(e,i,n,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,i=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(i);var n=e.get("text");this._renderEndsText(i,n,0),this._renderEndsText(i,n,1),this._updateView(!0),this.renderBackground(i),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(i)},t.prototype._renderEndsText=function(e,i,n){if(i){var a=i[1-n];a=a!=null?a+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,h=this._applyTransform([l[0]/2,n===0?-s:l[1]+s],u),c=this._applyTransform(n===0?"bottom":"top",u),f=this._orient,v=this.visualMapModel.textStyleModel;this.group.add(new St({style:Gt(v,{x:h[0],y:h[1],verticalAlign:f==="horizontal"?"middle":c,align:f==="horizontal"?c:"center",text:a})}))}},t.prototype._renderBar=function(e){var i=this.visualMapModel,n=this._shapes,a=i.itemSize,o=this._orient,s=this._useHandle,l=uO(i,this.api,a),u=n.mainGroup=this._createBarGroup(l),h=new at;u.add(h),h.add(n.outOfRange=aD()),h.add(n.inRange=aD(null,s?sD(this._orient):null,$(this._dragHandle,this,"all",!1),$(this._dragHandle,this,"all",!0))),h.setClipPath(new wt({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var c=i.textStyleModel.getTextRect("国"),f=sy(c.width,c.height);s&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(i,u,0,a,f,o),this._createHandle(i,u,1,a,f,o)),this._createIndicator(i,u,a,f,o),e.add(u)},t.prototype._createHandle=function(e,i,n,a,o,s){var l=$(this._dragHandle,this,n,!1),u=$(this._dragHandle,this,n,!0),h=ei(e.get("handleSize"),a[0]),c=ae(e.get("handleIcon"),-h/2,-h/2,h,h,null,!0),f=sD(this._orient);c.attr({cursor:f,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){qi(y.event)}}),c.x=a[0]/2,c.useStyle(e.getModel("handleStyle").getItemStyle()),c.setStyle({strokeNoScale:!0,strokeFirst:!0}),c.style.lineWidth*=2,c.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),$a(c,!0),i.add(c);var v=this.visualMapModel.textStyleModel,d=new St({cursor:f,draggable:!0,drift:l,onmousemove:function(y){qi(y.event)},ondragend:u,style:Gt(v,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var p=[h,0],g=this._shapes;g.handleThumbs[n]=c,g.handleLabelPoints[n]=p,g.handleLabels[n]=d},t.prototype._createIndicator=function(e,i,n,a,o){var s=ei(e.get("indicatorSize"),n[0]),l=ae(e.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var u=e.getModel("indicatorStyle").getItemStyle();if(l instanceof xe){var h=l.style;l.useStyle(z({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},u))}else l.useStyle(u);i.add(l);var c=this.visualMapModel.textStyleModel,f=new St({silent:!0,invisible:!0,style:Gt(c,{x:0,y:0,text:""})});this.group.add(f);var v=[(o==="horizontal"?a/2:Ytt)+n[0]/2,0],d=this._shapes;d.indicator=l,d.indicatorLabel=f,d.indicatorLabelPoint=v,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,i,n,a){if(this._useHandle){if(this._dragging=!i,!i){var o=this._applyTransform([n,a],this._shapes.mainGroup,!0);this._updateInterval(e,o[1]),this._hideIndicator(),this._updateView()}i===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),i?!this._hovering&&this._clearHoverLinkToSeries():oD(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,i=this._dataInterval=e.getSelected(),n=e.getExtent(),a=[0,e.itemSize[1]];this._handleEnds=[ci(i[0],n,a,!0),ci(i[1],n,a,!0)]},t.prototype._updateInterval=function(e,i){i=i||0;var n=this.visualMapModel,a=this._handleEnds,o=[0,n.itemSize[1]];Do(i,a,o,e,0);var s=n.getExtent();this._dataInterval=[ci(a[0],o,s,!0),ci(a[1],o,s,!0)]},t.prototype._updateView=function(e){var i=this.visualMapModel,n=i.getExtent(),a=this._shapes,o=[0,i.itemSize[1]],s=e?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,n,s,"inRange"),u=this._createBarVisual(n,n,o,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(e,i,n,a){var o={forceState:a,convertOpacityToAlpha:!0},s=this._makeColorGradient(e,o),l=[this.getControllerVisual(e[0],"symbolSize",o),this.getControllerVisual(e[1],"symbolSize",o)],u=this._createBarPoints(n,l);return{barColor:new Vs(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(e,i){var n=100,a=[],o=(e[1]-e[0])/n;a.push({color:this.getControllerVisual(e[0],"color",i),offset:0});for(var s=1;s<n;s++){var l=e[0]+o*s;if(l>e[1])break;a.push({color:this.getControllerVisual(l,"color",i),offset:s/n})}return a.push({color:this.getControllerVisual(e[1],"color",i),offset:1}),a},t.prototype._createBarPoints=function(e,i){var n=this.visualMapModel.itemSize;return[[n[0]-i[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-i[1],e[1]]]},t.prototype._createBarGroup=function(e){var i=this._orient,n=this.visualMapModel.get("inverse");return new at(i==="horizontal"&&!n?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:i==="horizontal"&&n?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:i==="vertical"&&!n?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,i){if(this._useHandle){var n=this._shapes,a=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=a.itemSize,u=a.getExtent(),h=this._applyTransform("left",n.mainGroup);Wtt([0,1],function(c){var f=o[c];f.setStyle("fill",i.handlesColor[c]),f.y=e[c];var v=ci(e[c],[0,l[1]],u,!0),d=this.getControllerVisual(v,"symbolSize");f.scaleX=f.scaleY=d/l[0],f.x=l[0]-d/2;var p=Jr(n.handleLabelPoints[c],zn(f,this.group));if(this._orient==="horizontal"){var g=h==="left"||h==="top"?(l[0]-d)/2:(l[0]-d)/-2;p[1]+=g}s[c].setStyle({x:p[0],y:p[1],text:a.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,i,n,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],h=this._shapes,c=h.indicator;if(c){c.attr("invisible",!1);var f={convertOpacityToAlpha:!0},v=this.getControllerVisual(e,"color",f),d=this.getControllerVisual(e,"symbolSize"),p=ci(e,s,u,!0),g=l[0]-d/2,y={x:c.x,y:c.y};c.y=p,c.x=g;var m=Jr(h.indicatorLabelPoint,zn(c,this.group)),_=h.indicatorLabel;_.attr("invisible",!1);var x=this._applyTransform("left",h.mainGroup),b=this._orient,S=b==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(i),verticalAlign:S?x:"middle",align:S?"center":x});var w={x:g,y:p,style:{fill:v}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var M={duration:100,easing:"cubicInOut",additive:!0};c.x=y.x,c.y=y.y,c.animateTo(w,M),_.animateTo(T,M)}else c.attr(w),_.attr(T);this._firstShowIndicator=!1;var C=this._shapes.handleLabels;if(C)for(var D=0;D<C.length;D++)this.api.enterBlur(C[D])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(i){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,a=e._applyTransform([i.offsetX,i.offsetY],e._shapes.mainGroup,!0,!0);a[1]=nD(sy(0,a[1]),n[1]),e._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=n[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,i){var n=this.visualMapModel,a=n.itemSize;if(n.option.hoverLink){var o=[0,a[1]],s=n.getExtent();e=nD(sy(o[0],e),o[1]);var l=Xtt(n,s,o),u=[e-l,e+l],h=ci(e,o,s,!0),c=[ci(u[0],o,s,!0),ci(u[1],o,s,!0)];u[0]<o[0]&&(c[0]=-1/0),u[1]>o[1]&&(c[1]=1/0),i&&(c[0]===-1/0?this._showIndicator(h,c[1],"< ",l):c[1]===1/0?this._showIndicator(h,c[0],"> ",l):this._showIndicator(h,h,"≈ ",l));var f=this._hoverLinkDataIndices,v=[];(i||oD(n))&&(v=this._hoverLinkDataIndices=n.findTargetDataIndices(c));var d=VG(f,v);this._dispatchHighDown("downplay",xf(d[0],n)),this._dispatchHighDown("highlight",xf(d[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var i;if(Za(e.target,function(l){var u=ot(l);if(u.dataIndex!=null)return i=u,!0},!0),!!i){var n=this.ecModel.getSeriesByIndex(i.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(n)){var o=n.getData(i.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),i.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var i=this._shapes.handleLabels;if(i)for(var n=0;n<i.length;n++)this.api.leaveBlur(i[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",xf(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,i,n,a){var o=zn(i,a?null:this.group);return V(e)?Jr(e,o,n):ed(e,o,n)},t.prototype._dispatchHighDown=function(e,i){i&&i.length&&this.api.dispatchAction({type:e,batch:i})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(lO);function aD(r,t,e,i){return new Ge({shape:{points:r},draggable:!!e,cursor:t,drift:e,onmousemove:function(n){qi(n.event)},ondragend:i})}function Xtt(r,t,e){var i=Utt/2,n=r.get("hoverLinkDataSize");return n&&(i=ci(n,t,e,!0)/2),i}function oD(r){var t=r.get("hoverLinkOnHandle");return!!(t??r.get("realtime"))}function sD(r){return r==="vertical"?"ns-resize":"ew-resize"}var Ztt={type:"selectDataRange",event:"dataRangeSelected",update:"update"},jtt=function(r,t){t.eachComponent({mainType:"visualMap",query:r},function(e){e.setSelected(r.selected)})},qtt=[{createOnAllSeries:!0,reset:function(r,t){var e=[];return t.eachComponent("visualMap",function(i){var n=r.pipelineContext;!i.isTargetSeries(r)||n&&n.large||e.push(mQ(i.stateList,i.targetVisuals,$(i.getValueState,i),i.getDataDimensionIndex(r.getData())))}),e}},{createOnAllSeries:!0,reset:function(r,t){var e=r.getData(),i=[];t.eachComponent("visualMap",function(n){if(n.isTargetSeries(r)){var a=n.getVisualMeta($(Ktt,null,r,n))||{stops:[],outerColors:[]},o=n.getDataDimensionIndex(e);o>=0&&(a.dimension=o,i.push(a))}}),r.getData().setVisual("visualMeta",i)}}];function Ktt(r,t,e,i){for(var n=t.targetVisuals[i],a=ye.prepareVisualTypes(n),o={color:xh(r.getData(),"color")},s=0,l=a.length;s<l;s++){var u=a[s],h=n[u==="opacity"?"__alphaForOpacity":u];h&&h.applyVisual(e,c,f)}return o.color;function c(v){return o[v]}function f(v,d){o[v]=d}}var lD=A;function Jtt(r){var t=r&&r.visualMap;V(t)||(t=t?[t]:[]),lD(t,function(e){if(e){qo(e,"splitList")&&!qo(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var i=e.pieces;i&&V(i)&&lD(i,function(n){et(n)&&(qo(n,"start")&&!qo(n,"min")&&(n.min=n.start),qo(n,"end")&&!qo(n,"max")&&(n.max=n.end))})}})}function qo(r,t){return r&&r.hasOwnProperty&&r.hasOwnProperty(t)}var uD=!1;function hO(r){uD||(uD=!0,r.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(Ztt,jtt),A(qtt,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(Jtt))}function cO(r){r.registerComponentModel(Htt),r.registerComponentView($tt),hO(r)}var Qtt=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],tet[this._mode].call(this,this._pieceList),this._resetSelected(e,i);var a=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=it(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=F(this._pieceList,function(l){return l=it(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,i={},n=ye.listVisualTypes(),a=this.isCategory();A(e.pieces,function(s){A(n,function(l){s.hasOwnProperty(l)&&(i[l]=1)})}),A(i,function(s,l){var u=!1;A(this.stateList,function(h){u=u||o(e,h,l)||o(e.target,h,l)},this),!u&&A(this.stateList,function(h){(e[h]||(e[h]={}))[l]=sO.get(l,h==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,i){var n=this.option,a=this._pieceList,o=(i?n:e).selected||{};if(n.selected=o,A(a,function(l,u){var h=this.getSelectedMapKey(l);o.hasOwnProperty(h)||(o[h]=!0)},this),n.selectedMode==="single"){var s=!1;A(a,function(l,u){var h=this.getSelectedMapKey(l);o[h]&&(s?o[h]=!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=it(e)},t.prototype.getValueState=function(e){var i=ye.findPieceIndex(e,this._pieceList);return i!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[i])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var i=[],n=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var h=ye.findPieceIndex(l,n);h===e&&o.push(u)},this),i.push({seriesId:a.id,dataIndex:o})},this),i},t.prototype.getRepresentValue=function(e){var i;if(this.isCategory())i=e.value;else if(e.value!=null)i=e.value;else{var n=e.interval||[];i=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return i},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var i=[],n=["",""],a=this;function o(h,c){var f=a.getRepresentValue({interval:h});c||(c=a.getValueState(f));var v=e(f,c);h[0]===-1/0?n[0]=v:h[1]===1/0?n[1]=v:i.push({value:h[0],color:v},{value:h[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return A(s,function(h){var c=h.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:i,outerColors:n}},t.type="visualMap.piecewise",t.defaultOption=ea(wv.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}(wv),tet={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),i=this.getExtent(),n=t.splitNumber;n=Math.max(parseInt(n,10),1),t.splitNumber=n;for(var a=(i[1]-i[0])/n;+a.toFixed(e)!==a&&e<5;)e++;t.precision=e,a=+a.toFixed(e),t.minOpen&&r.push({interval:[-1/0,i[0]],close:[0,0]});for(var o=0,s=i[0];o<n;s+=a,o++){var l=o===n-1?i[1]:s+a;r.push({interval:[s,l],close:[1,1]})}t.maxOpen&&r.push({interval:[i[1],1/0],close:[0,0]}),Jy(r),A(r,function(u,h){u.index=h,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var t=this.option;A(t.categories,function(e){r.push({text:this.formatValueText(e,!0),value:e})},this),hD(t,r)},pieces:function(r){var t=this.option;A(t.pieces,function(e,i){et(e)||(e={value:e});var n={text:"",index:i};if(e.label!=null&&(n.text=e.label),e.hasOwnProperty("value")){var a=n.value=e.value;n.interval=[a,a],n.close=[1,1]}else{for(var o=n.interval=[],s=n.close=[0,0],l=[1,0,1],u=[-1/0,1/0],h=[],c=0;c<2;c++){for(var f=[["gte","gt","min"],["lte","lt","max"]][c],v=0;v<3&&o[c]==null;v++)o[c]=e[f[v]],s[c]=l[v],h[c]=v===2;o[c]==null&&(o[c]=u[c])}h[0]&&o[1]===1/0&&(s[0]=0),h[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(n.value=o[0])}n.visual=ye.retrieveVisuals(e),r.push(n)},this),hD(t,r),Jy(r),A(r,function(e){var i=e.close,n=[["<","≤"][i[1]],[">","≥"][i[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,n)},this)}};function hD(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}var eet=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var i=this.visualMapModel,n=i.get("textGap"),a=i.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=i.itemSize,h=this._getViewData(),c=h.endsText,f=pe(i.get("showLabel",!0),!c),v=!i.get("selectedMode");c&&this._renderEndsText(e,c[0],u,f,l),A(h.viewPieceList,function(d){var p=d.piece,g=new at;g.onclick=$(this._onItemClick,this,p),this._enableHoverLink(g,d.indexInModelPieceList);var y=i.getRepresentValue(p);if(this._createItemSymbol(g,y,[0,0,u[0],u[1]],v),f){var m=this.visualMapModel.getValueState(y);g.add(new St({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1},silent:v}))}e.add(g)},this),c&&this._renderEndsText(e,c[1],u,f,l),io(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,i){var n=this;e.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:xf(s.findTargetDataIndices(i),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,i=e.option;if(i.orient==="vertical")return uO(e,this.api,e.itemSize);var n=i.align;return(!n||n==="auto")&&(n="left"),n},t.prototype._renderEndsText=function(e,i,n,a,o){if(i){var s=new at,l=this.visualMapModel.textStyleModel;s.add(new St({style:Gt(l,{x:a?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:a?o:"center",text:i})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,i=F(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=e.get("text"),a=e.get("orient"),o=e.get("inverse");return(a==="horizontal"?o:!o)?i.reverse():n&&(n=n.slice().reverse()),{viewPieceList:i,endsText:n}},t.prototype._createItemSymbol=function(e,i,n,a){var o=ae(this.getControllerVisual(i,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(i,"color"));o.silent=a,e.add(o)},t.prototype._onItemClick=function(e){var i=this.visualMapModel,n=i.option,a=n.selectedMode;if(a){var o=it(n.selected),s=i.getSelectedMapKey(e);a==="single"||a===!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}(lO);function fO(r){r.registerComponentModel(Qtt),r.registerComponentView(eet),hO(r)}function ret(r){pt(cO),pt(fO)}var iet={label:{enabled:!0},decal:{show:!1}},cD=Tt(),net={};function aet(r,t){var e=r.getModel("aria");if(!e.get("enabled"))return;var i=it(iet);ht(i.label,r.getLocaleModel().get("aria"),!1),ht(e.option,i,!1),n(),a();function n(){var u=e.getModel("decal"),h=u.get("show");if(h){var c=Z();r.eachSeries(function(f){if(!f.isColorBySeries()){var v=c.get(f.type);v||(v={},c.set(f.type,v)),cD(f).scope=v}}),r.eachRawSeries(function(f){if(r.isSeriesFiltered(f))return;if(Q(f.enableAriaDecal)){f.enableAriaDecal();return}var v=f.getData();if(f.isColorBySeries()){var m=dm(f.ecModel,f.name,net,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",x(_,m))}else{var d=f.getRawData(),p={},g=cD(f).scope;v.each(function(b){var S=v.getRawIndex(b);p[S]=b});var y=d.count();d.each(function(b){var S=p[b],w=d.getName(b)||b+"",T=dm(f.ecModel,w,g,y),M=v.getItemVisual(S,"decal");v.setItemVisual(S,"decal",x(M,T))})}function x(b,S){var w=b?z(z({},S),b):S;return w.dirty=!0,w}})}}function a(){var u=t.getZr().dom;if(u){var h=r.getLocaleModel().get("aria"),c=e.getModel("label");if(c.option=tt(c.option,h),!!c.get("enabled")){if(u.setAttribute("role","img"),c.get("description")){u.setAttribute("aria-label",c.get("description"));return}var f=r.getSeriesCount(),v=c.get(["data","maxCount"])||10,d=c.get(["series","maxCount"])||10,p=Math.min(f,d),g;if(!(f<1)){var y=s();if(y){var m=c.get(["general","withTitle"]);g=o(m,{title:y})}else g=c.get(["general","withoutTitle"]);var _=[],x=f>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(x,{seriesCount:f}),r.eachSeries(function(T,M){if(M<p){var C=void 0,D=T.get("name"),L=D?"withName":"withoutName";C=f>1?c.get(["series","multiple",L]):c.get(["series","single",L]),C=o(C,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var I=T.getData();if(I.count()>v){var P=c.get(["data","partialData"]);C+=o(P,{displayCnt:v})}else C+=c.get(["data","allData"]);for(var k=c.get(["data","separator","middle"]),R=c.get(["data","separator","end"]),N=c.get(["data","excludeDimensionId"]),O=[],B=0;B<I.count();B++)if(B<v){var G=I.getName(B),H=N?Dt(I.getValues(B),function(q,K){return vt(N,K)===-1}):I.getValues(B),W=c.get(["data",G?"withName":"withoutName"]);O.push(o(W,{name:G,value:H.join(k)}))}C+=O.join(k)+R,_.push(C)}});var b=c.getModel(["series","multiple","separator"]),S=b.get("middle"),w=b.get("end");g+=_.join(S)+w,u.setAttribute("aria-label",g)}}}}function o(u,h){if(!Y(u))return u;var c=u;return A(h,function(f,v){c=c.replace(new RegExp("\\{\\s*"+v+"\\s*\\}","g"),f)}),c}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var h=r.getLocaleModel().get(["series","typeNames"]);return h[u]||h.chart}}function oet(r){if(!(!r||!r.aria)){var t=r.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},A(["description","general","series","data"],function(e){t[e]!=null&&(t.label[e]=t[e])})}}function set(r){r.registerPreprocessor(oet),r.registerVisual(r.PRIORITY.VISUAL.ARIA,aet)}var fD={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},uet=function(){function r(t){var e=this._condVal=Y(t)?new RegExp(t):BL(t)?t:null;if(e==null){var i="";kt(i)}}return r.prototype.evaluate=function(t){var e=typeof t;return Y(e)?this._condVal.test(t):Mt(e)?this._condVal.test(t+""):!1},r}(),het=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),cet=function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(!t[e].evaluate())return!1;return!0},r}(),fet=function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].evaluate())return!0;return!1},r}(),vet=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),det=function(){function r(){}return r.prototype.evaluate=function(){for(var t=!!this.valueParser,e=this.getValue,i=e(this.valueGetterParam),n=t?this.valueParser(i):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(t?n:i))return!1;return!0},r}();function ab(r,t){if(r===!0||r===!1){var e=new het;return e.value=r,e}var i="";return vO(r)||kt(i),r.and?vD("and",r,t):r.or?vD("or",r,t):r.not?pet(r,t):get(r,t)}function vD(r,t,e){var i=t[r],n="";V(i)||kt(n),i.length||kt(n);var a=r==="and"?new cet:new fet;return a.children=F(i,function(o){return ab(o,e)}),a.children.length||kt(n),a}function pet(r,t){var e=r.not,i="";vO(e)||kt(i);var n=new vet;return n.child=ab(e,t),n.child||kt(i),n}function get(r,t){for(var e="",i=t.prepareGetValue(r),n=[],a=xt(r),o=r.parser,s=o?YI(o):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||t.valueGetterAttrMap.get(u))){var h=X(fD,u)?fD[u]:u,c=r[u],f=s?s(c):c,v=FW(h,f)||h==="reg"&&new uet(f);v||kt(e),n.push(v)}}n.length||kt(e);var d=new det;return d.valueGetterParam=i,d.valueParser=s,d.getValue=t.getValue,d.subCondList=n,d}function vO(r){return et(r)&&!Me(r)}var yet=function(){function r(t,e){this._cond=ab(t,e)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function met(r,t){return new yet(r,t)}var _et={type:"echarts:filter",transform:function(r){for(var t=r.upstream,e,i=met(r.config,{valueGetterAttrMap:Z({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;X(s,"dimension")||kt(l);var h=t.getDimensionInfo(u);return h||kt(l),{dimIdx:h.index}},getValue:function(s){return t.retrieveValueFromItem(e,s.dimIdx)}}),n=[],a=0,o=t.count();a<o;a++)e=t.getRawDataItem(a),i.evaluate()&&n.push(e);return{data:n}}},xet={type:"echarts:sort",transform:function(r){var t=r.upstream,e=r.config,i="",n=Bt(e);n.length||kt(i);var a=[];A(n,function(h){var c=h.dimension,f=h.order,v=h.parser,d=h.incomparable;if(c==null&&kt(i),f!=="asc"&&f!=="desc"&&kt(i),d&&d!=="min"&&d!=="max"){var p="";kt(p)}if(f!=="asc"&&f!=="desc"){var g="";kt(g)}var y=t.getDimensionInfo(c);y||kt(i);var m=v?YI(v):null;v&&!m&&kt(i),a.push({dimIdx:y.index,parser:m,comparator:new XI(f,d)})});var o=t.sourceFormat;o!==He&&o!==Nr&&kt(i);for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(h,c){for(var f=0;f<a.length;f++){var v=a[f],d=t.retrieveValueFromItem(h,v.dimIdx),p=t.retrieveValueFromItem(c,v.dimIdx);v.parser&&(d=v.parser(d),p=v.parser(p));var g=v.comparator.evaluate(d,p);if(g!==0)return g}return 0}),{data:s}}};function bet(r){r.registerTransform(_et),r.registerTransform(xet)}var wet=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.prototype.init=function(e,i,n){r.prototype.init.call(this,e,i,n),this._sourceManager=new KI(this),gw(this)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.call(this,e,i),gw(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:Si},t}(yt),Tet=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.type="dataset",t}(Yt);function Met(r){r.registerComponentModel(wet),r.registerComponentView(Tet)}var li=Ci.CMD;function ls(r,t){return Math.abs(r-t)<1e-5}function g0(r){var t=r.data,e=r.len(),i=[],n,a=0,o=0,s=0,l=0;function u(I,P){n&&n.length>2&&i.push(n),n=[I,P]}function h(I,P,k,R){ls(I,k)&&ls(P,R)||n.push(I,P,k,R,k,R)}function c(I,P,k,R,N,O){var B=Math.abs(P-I),G=Math.tan(B/4)*4/3,H=P<I?-1:1,W=Math.cos(I),q=Math.sin(I),K=Math.cos(P),nt=Math.sin(P),Ct=W*N+k,te=q*O+R,dt=K*N+k,rt=nt*O+R,gt=N*G*H,J=O*G*H;n.push(Ct-gt*q,te+J*W,dt+gt*nt,rt-J*K,dt,rt)}for(var f,v,d,p,g=0;g<e;){var y=t[g++],m=g===1;switch(m&&(a=t[g],o=t[g+1],s=a,l=o,(y===li.L||y===li.C||y===li.Q)&&(n=[s,l])),y){case li.M:a=s=t[g++],o=l=t[g++],u(s,l);break;case li.L:f=t[g++],v=t[g++],h(a,o,f,v),a=f,o=v;break;case li.C:n.push(t[g++],t[g++],t[g++],t[g++],a=t[g++],o=t[g++]);break;case li.Q:f=t[g++],v=t[g++],d=t[g++],p=t[g++],n.push(a+2/3*(f-a),o+2/3*(v-o),d+2/3*(f-d),p+2/3*(v-p),d,p),a=d,o=p;break;case li.A:var _=t[g++],x=t[g++],b=t[g++],S=t[g++],w=t[g++],T=t[g++]+w;g+=1;var M=!t[g++];f=Math.cos(w)*b+_,v=Math.sin(w)*S+x,m?(s=f,l=v,u(s,l)):h(a,o,f,v),a=Math.cos(T)*b+_,o=Math.sin(T)*S+x;for(var C=(M?-1:1)*Math.PI/2,D=w;M?D>T:D<T;D+=C){var L=M?Math.max(D+C,T):Math.min(D+C,T);c(D,L,_,x,b,S)}break;case li.R:s=a=t[g++],l=o=t[g++],f=s+t[g++],v=l+t[g++],u(f,l),h(f,l,f,v),h(f,v,s,v),h(s,v,s,l),h(s,l,f,l);break;case li.Z:n&&h(a,o,s,l),a=s,o=l;break}}return n&&n.length>2&&i.push(n),i}function y0(r,t,e,i,n,a,o,s,l,u){if(ls(r,e)&&ls(t,i)&&ls(n,o)&&ls(a,s)){l.push(o,s);return}var h=2/u,c=h*h,f=o-r,v=s-t,d=Math.sqrt(f*f+v*v);f/=d,v/=d;var p=e-r,g=i-t,y=n-o,m=a-s,_=p*p+g*g,x=y*y+m*m;if(_<c&&x<c){l.push(o,s);return}var b=f*p+v*g,S=-f*y-v*m,w=_-b*b,T=x-S*S;if(w<c&&b>=0&&T<c&&S>=0){l.push(o,s);return}var M=[],C=[];$n(r,e,n,o,.5,M),$n(t,i,a,s,.5,C),y0(M[0],C[0],M[1],C[1],M[2],C[2],M[3],C[3],l,u),y0(M[4],C[4],M[5],C[5],M[6],C[6],M[7],C[7],l,u)}function Cet(r,t){var e=g0(r),i=[];t=t||1;for(var n=0;n<e.length;n++){var a=e[n],o=[],s=a[0],l=a[1];o.push(s,l);for(var u=2;u<a.length;){var h=a[u++],c=a[u++],f=a[u++],v=a[u++],d=a[u++],p=a[u++];y0(s,l,h,c,f,v,d,p,o,t),s=d,l=p}i.push(o)}return i}function dO(r,t,e){var i=r[t],n=r[1-t],a=Math.abs(i/n),o=Math.ceil(Math.sqrt(a*e)),s=Math.floor(e/o);s===0&&(s=1,o=e);for(var l=[],u=0;u<o;u++)l.push(s);var h=o*s,c=e-h;if(c>0)for(var u=0;u<c;u++)l[u%o]+=1;return l}function dD(r,t,e){for(var i=r.r0,n=r.r,a=r.startAngle,o=r.endAngle,s=Math.abs(o-a),l=s*n,u=n-i,h=l>Math.abs(u),c=dO([l,u],h?0:1,t),f=(h?s:u)/c.length,v=0;v<c.length;v++)for(var d=(h?u:s)/c[v],p=0;p<c[v];p++){var g={};h?(g.startAngle=a+f*v,g.endAngle=a+f*(v+1),g.r0=i+d*p,g.r=i+d*(p+1)):(g.startAngle=a+d*p,g.endAngle=a+d*(p+1),g.r0=i+f*v,g.r=i+f*(v+1)),g.clockwise=r.clockwise,g.cx=r.cx,g.cy=r.cy,e.push(g)}}function Aet(r,t,e){for(var i=r.width,n=r.height,a=i>n,o=dO([i,n],a?0:1,t),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",h=a?"y":"x",c=r[s]/o.length,f=0;f<o.length;f++)for(var v=r[l]/o[f],d=0;d<o[f];d++){var p={};p[u]=f*c,p[h]=d*v,p[s]=c,p[l]=v,p.x+=r.x,p.y+=r.y,e.push(p)}}function pD(r,t,e,i){return r*i-e*t}function Det(r,t,e,i,n,a,o,s){var l=e-r,u=i-t,h=o-n,c=s-a,f=pD(h,c,l,u);if(Math.abs(f)<1e-6)return null;var v=r-n,d=t-a,p=pD(v,d,h,c)/f;return p<0||p>1?null:new ct(p*l+r,p*u+t)}function Let(r,t,e){var i=new ct;ct.sub(i,e,t),i.normalize();var n=new ct;ct.sub(n,r,t);var a=n.dot(i);return a}function Ko(r,t){var e=r[r.length-1];e&&e[0]===t[0]&&e[1]===t[1]||r.push(t)}function Iet(r,t,e){for(var i=r.length,n=[],a=0;a<i;a++){var o=r[a],s=r[(a+1)%i],l=Det(o[0],o[1],s[0],s[1],t.x,t.y,e.x,e.y);l&&n.push({projPt:Let(l,t,e),pt:l,idx:a})}if(n.length<2)return[{points:r},{points:r}];n.sort(function(g,y){return g.projPt-y.projPt});var u=n[0],h=n[n.length-1];if(h.idx<u.idx){var c=u;u=h,h=c}for(var f=[u.pt.x,u.pt.y],v=[h.pt.x,h.pt.y],d=[f],p=[v],a=u.idx+1;a<=h.idx;a++)Ko(d,r[a].slice());Ko(d,v),Ko(d,f);for(var a=h.idx+1;a<=u.idx+i;a++)Ko(p,r[a%i].slice());return Ko(p,f),Ko(p,v),[{points:d},{points:p}]}function gD(r){var t=r.points,e=[],i=[];qv(t,e,i);var n=new ft(e[0],e[1],i[0]-e[0],i[1]-e[1]),a=n.width,o=n.height,s=n.x,l=n.y,u=new ct,h=new ct;return a>o?(u.x=h.x=s+a/2,u.y=l,h.y=l+o):(u.y=h.y=l+o/2,u.x=s,h.x=s+a),Iet(t,u,h)}function Tv(r,t,e,i){if(e===1)i.push(t);else{var n=Math.floor(e/2),a=r(t);Tv(r,a[0],n,i),Tv(r,a[1],e-n,i)}return i}function Pet(r,t){for(var e=[],i=0;i<t;i++)e.push(c_(r));return e}function ket(r,t){t.setStyle(r.style),t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel}function Ret(r){for(var t=[],e=0;e<r.length;)t.push([r[e++],r[e++]]);return t}function Eet(r,t){var e=[],i=r.shape,n;switch(r.type){case"rect":Aet(i,t,e),n=wt;break;case"sector":dD(i,t,e),n=Fe;break;case"circle":dD({r0:0,r:i.r,startAngle:0,endAngle:Math.PI*2,cx:i.cx,cy:i.cy},t,e),n=Fe;break;default:var a=r.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=F(Cet(r.getUpdatedPathProxy(),o),function(y){return Ret(y)}),l=s.length;if(l===0)Tv(gD,{points:s[0]},t,e);else if(l===t)for(var u=0;u<l;u++)e.push({points:s[u]});else{var h=0,c=F(s,function(y){var m=[],_=[];qv(y,m,_);var x=(_[1]-m[1])*(_[0]-m[0]);return h+=x,{poly:y,area:x}});c.sort(function(y,m){return m.area-y.area});for(var f=t,u=0;u<l;u++){var v=c[u];if(f<=0)break;var d=u===l-1?f:Math.ceil(v.area/h*t);d<0||(Tv(gD,{points:v.poly},d,e),f-=d)}}n=Ge;break}if(!n)return Pet(r,t);for(var p=[],u=0;u<e.length;u++){var g=new n;g.setShape(e[u]),ket(r,g),p.push(g)}return p}function Oet(r,t){var e=r.length,i=t.length;if(e===i)return[r,t];for(var n=[],a=[],o=e<i?r:t,s=Math.min(e,i),l=Math.abs(i-e)/6,u=(s-2)/6,h=Math.ceil(l/u)+1,c=[o[0],o[1]],f=l,v=2;v<s;){var d=o[v-2],p=o[v-1],g=o[v++],y=o[v++],m=o[v++],_=o[v++],x=o[v++],b=o[v++];if(f<=0){c.push(g,y,m,_,x,b);continue}for(var S=Math.min(f,h-1)+1,w=1;w<=S;w++){var T=w/S;$n(d,g,m,x,T,n),$n(p,y,_,b,T,a),d=n[3],p=a[3],c.push(n[1],a[1],n[2],a[2],d,p),g=n[5],y=a[5],m=n[6],_=a[6]}f-=S-1}return o===r?[c,t]:[r,c]}function yD(r,t){for(var e=r.length,i=r[e-2],n=r[e-1],a=[],o=0;o<t.length;)a[o++]=i,a[o++]=n;return a}function Net(r,t){for(var e,i,n,a=[],o=[],s=0;s<Math.max(r.length,t.length);s++){var l=r[s],u=t[s],h=void 0,c=void 0;l?u?(e=Oet(l,u),h=e[0],c=e[1],i=h,n=c):(c=yD(n||l,l),h=l):(h=yD(i||u,u),c=u),a.push(h),o.push(c)}return[a,o]}function mD(r){for(var t=0,e=0,i=0,n=r.length,a=0,o=n-2;a<n;o=a,a+=2){var s=r[o],l=r[o+1],u=r[a],h=r[a+1],c=s*h-u*l;t+=c,e+=(s+u)*c,i+=(l+h)*c}return t===0?[r[0]||0,r[1]||0]:[e/t/3,i/t/3,t]}function Bet(r,t,e,i){for(var n=(r.length-2)/6,a=1/0,o=0,s=r.length,l=s-2,u=0;u<n;u++){for(var h=u*6,c=0,f=0;f<s;f+=2){var v=f===0?h:(h+f-2)%l+2,d=r[v]-e[0],p=r[v+1]-e[1],g=t[f]-i[0],y=t[f+1]-i[1],m=g-d,_=y-p;c+=m*m+_*_}c<a&&(a=c,o=u)}return o}function zet(r){for(var t=[],e=r.length,i=0;i<e;i+=2)t[i]=r[e-i-2],t[i+1]=r[e-i-1];return t}function Vet(r,t,e,i){for(var n=[],a,o=0;o<r.length;o++){var s=r[o],l=t[o],u=mD(s),h=mD(l);a==null&&(a=u[2]<0!=h[2]<0);var c=[],f=[],v=0,d=1/0,p=[],g=s.length;a&&(s=zet(s));for(var y=Bet(s,l,u,h)*6,m=g-2,_=0;_<m;_+=2){var x=(y+_)%m+2;c[_+2]=s[x]-u[0],c[_+3]=s[x+1]-u[1]}c[0]=s[y]-u[0],c[1]=s[y+1]-u[1];for(var b=i/e,S=-i/2;S<=i/2;S+=b){for(var w=Math.sin(S),T=Math.cos(S),M=0,_=0;_<s.length;_+=2){var C=c[_],D=c[_+1],L=l[_]-h[0],I=l[_+1]-h[1],P=L*T-I*w,k=L*w+I*T;p[_]=P,p[_+1]=k;var R=P-C,N=k-D;M+=R*R+N*N}if(M<d){d=M,v=S;for(var O=0;O<p.length;O++)f[O]=p[O]}}n.push({from:c,to:f,fromCp:u,toCp:h,rotation:-v})}return n}function Mv(r){return r.__isCombineMorphing}var pO="__mOriginal_";function Cv(r,t,e){var i=pO+t,n=r[i]||r[t];r[i]||(r[i]=r[t]);var a=e.replace,o=e.after,s=e.before;r[t]=function(){var l=arguments,u;return s&&s.apply(this,l),a?u=a.apply(this,l):u=n.apply(this,l),o&&o.apply(this,l),u}}function bu(r,t){var e=pO+t;r[e]&&(r[t]=r[e],r[e]=null)}function _D(r,t){for(var e=0;e<r.length;e++)for(var i=r[e],n=0;n<i.length;){var a=i[n],o=i[n+1];i[n++]=t[0]*a+t[2]*o+t[4],i[n++]=t[1]*a+t[3]*o+t[5]}}function gO(r,t){var e=r.getUpdatedPathProxy(),i=t.getUpdatedPathProxy(),n=Net(g0(e),g0(i)),a=n[0],o=n[1],s=r.getComputedTransform(),l=t.getComputedTransform();function u(){this.transform=null}s&&_D(a,s),l&&_D(o,l),Cv(t,"updateTransform",{replace:u}),t.transform=null;var h=Vet(a,o,10,Math.PI),c=[];Cv(t,"buildPath",{replace:function(f){for(var v=t.__morphT,d=1-v,p=[],g=0;g<h.length;g++){var y=h[g],m=y.from,_=y.to,x=y.rotation*v,b=y.fromCp,S=y.toCp,w=Math.sin(x),T=Math.cos(x);su(p,b,S,v);for(var M=0;M<m.length;M+=2){var C=m[M],D=m[M+1],L=_[M],I=_[M+1],P=C*d+L*v,k=D*d+I*v;c[M]=P*T-k*w+p[0],c[M+1]=P*w+k*T+p[1]}var R=c[0],N=c[1];f.moveTo(R,N);for(var M=2;M<m.length;){var L=c[M++],I=c[M++],O=c[M++],B=c[M++],G=c[M++],H=c[M++];R===L&&N===I&&O===G&&B===H?f.lineTo(G,H):f.bezierCurveTo(L,I,O,B,G,H),R=G,N=H}}}})}function ob(r,t,e){if(!r||!t)return t;var i=e.done,n=e.during;gO(r,t),t.__morphT=0;function a(){bu(t,"buildPath"),bu(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},tt({during:function(o){t.dirtyShape(),n&&n(o)},done:function(){a(),i&&i()}},e)),t}function Fet(r,t,e,i,n,a){var o=16;r=n===e?0:Math.round(32767*(r-e)/(n-e)),t=a===i?0:Math.round(32767*(t-i)/(a-i));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var h=0,c=0;(r&u)>0&&(h=1),(t&u)>0&&(c=1),s+=u*u*(3*h^c),c===0&&(h===1&&(r=u-1-r,t=u-1-t),l=r,r=t,t=l)}return s}function Av(r){var t=1/0,e=1/0,i=-1/0,n=-1/0,a=F(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),h=l.x+l.width/2+(u?u[4]:0),c=l.y+l.height/2+(u?u[5]:0);return t=Math.min(h,t),e=Math.min(c,e),i=Math.max(h,i),n=Math.max(c,n),[h,c]}),o=F(a,function(s,l){return{cp:s,z:Fet(s[0],s[1],t,e,i,n),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function yO(r){return Eet(r.path,r.count)}function m0(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Get(r,t,e){var i=[];function n(b){for(var S=0;S<b.length;S++){var w=b[S];Mv(w)?n(w.childrenRef()):w instanceof _t&&i.push(w)}}n(r);var a=i.length;if(!a)return m0();var o=e.dividePath||yO,s=o({path:t,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),m0();i=Av(i),s=Av(s);for(var l=e.done,u=e.during,h=e.individualDelay,c=new $i,f=0;f<a;f++){var v=i[f],d=s[f];d.parent=t,d.copyTransform(c),h||gO(v,d)}t.__isCombineMorphing=!0,t.childrenRef=function(){return s};function p(b){for(var S=0;S<s.length;S++)s[S].addSelfToZr(b)}Cv(t,"addSelfToZr",{after:function(b){p(b)}}),Cv(t,"removeSelfFromZr",{after:function(b){for(var S=0;S<s.length;S++)s[S].removeSelfFromZr(b)}});function g(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,bu(t,"addSelfToZr"),bu(t,"removeSelfFromZr")}var y=s.length;if(h)for(var m=y,_=function(){m--,m===0&&(g(),l&&l())},f=0;f<y;f++){var x=h?tt({delay:(e.delay||0)+h(f,y,i[f],s[f]),done:_},e):e;ob(i[f],s[f],x)}else t.__morphT=0,t.animateTo({__morphT:1},tt({during:function(b){for(var S=0;S<y;S++){var w=s[S];w.__morphT=t.__morphT,w.dirtyShape()}u&&u(b)},done:function(){g();for(var b=0;b<r.length;b++)bu(r[b],"updateTransform");l&&l()}},e));return t.__zr&&p(t.__zr),{fromIndividuals:i,toIndividuals:s,count:y}}function Het(r,t,e){var i=t.length,n=[],a=e.dividePath||yO;function o(v){for(var d=0;d<v.length;d++){var p=v[d];Mv(p)?o(p.childrenRef()):p instanceof _t&&n.push(p)}}if(Mv(r)){o(r.childrenRef());var s=n.length;if(s<i)for(var l=0,u=s;u<i;u++)n.push(c_(n[l++%s]));n.length=i}else{n=a({path:r,count:i});for(var h=r.getComputedTransform(),u=0;u<n.length;u++)n[u].setLocalTransform(h);if(n.length!==i)return console.error("Invalid morphing: unmatched splitted path"),m0()}n=Av(n),t=Av(t);for(var c=e.individualDelay,u=0;u<i;u++){var f=c?tt({delay:(e.delay||0)+c(u,i,n[u],t[u])},e):e;ob(n[u],t[u],f)}return{fromIndividuals:n,toIndividuals:t,count:t.length}}function xD(r){return V(r[0])}function bD(r,t){for(var e=[],i=r.length,n=0;n<i;n++)e.push({one:r[n],many:[]});for(var n=0;n<t.length;n++){var a=t[n].length,o=void 0;for(o=0;o<a;o++)e[o%i].many.push(t[n][o])}for(var s=0,n=i-1;n>=0;n--)if(!e[n].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var a=l.length,u=Math.ceil(a/2);e[n].many=l.slice(u,a),e[s].many=l.slice(0,u),s++}return e}var Wet={clone:function(r){for(var t=[],e=1-Math.pow(1-r.path.style.opacity,1/r.count),i=0;i<r.count;i++){var n=c_(r.path);n.setStyle("opacity",e),t.push(n)}return t},split:null};function ly(r,t,e,i,n,a){if(!r.length||!t.length)return;var o=Fs("update",i,n);if(!(o&&o.duration>0))return;var s=i.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,h;xD(r)&&(u=r,h=t),xD(t)&&(u=t,h=r);function c(y,m,_,x,b){var S=y.many,w=y.one;if(S.length===1&&!b){var T=m?S[0]:w,M=m?w:S[0];if(Mv(T))c({many:[T],one:M},!0,_,x,!0);else{var C=s?tt({delay:s(_,x)},l):l;ob(T,M,C),a(T,M,T,M,C)}}else for(var D=tt({dividePath:Wet[e],individualDelay:s&&function(N,O,B,G){return s(N+_,x)}},l),L=m?Get(S,w,D):Het(w,S,D),I=L.fromIndividuals,P=L.toIndividuals,k=I.length,R=0;R<k;R++){var C=s?tt({delay:s(R,k)},l):l;a(I[R],P[R],m?S[R]:y.one,m?y.one:S[R],C)}}for(var f=u?u===r:r.length>t.length,v=u?bD(h,u):bD(f?t:r,[f?r:t]),d=0,p=0;p<v.length;p++)d+=v[p].many.length;for(var g=0,p=0;p<v.length;p++)c(v[p],f,g,d),g+=v[p].many.length}function Va(r){if(!r)return[];if(V(r)){for(var t=[],e=0;e<r.length;e++)t.push(Va(r[e]));return t}var i=[];return r.traverse(function(n){n instanceof _t&&!n.disableMorphing&&!n.invisible&&!n.ignore&&i.push(n)}),i}var mO=1e4,Uet=0,SD=1,wD=2,Yet=Tt();function $et(r,t){for(var e=r.dimensions,i=0;i<e.length;i++){var n=r.getDimensionInfo(e[i]);if(n&&n.otherDims[t]===0)return e[i]}}function Xet(r,t,e){var i=r.getDimensionInfo(e),n=i&&i.ordinalMeta;if(i){var a=r.get(i.name,t);return n&&n.categories[a]||a+""}}function TD(r,t,e,i){var n=i?"itemChildGroupId":"itemGroupId",a=$et(r,n);if(a){var o=Xet(r,t,a);return o}var s=r.getRawDataItem(t),l=i?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!i)return e||r.getId(t)}function MD(r){var t=[];return A(r,function(e){var i=e.data,n=e.dataGroupId;if(!(i.count()>mO))for(var a=i.getIndices(),o=0;o<a.length;o++)t.push({data:i,groupId:TD(i,o,n,!1),childGroupId:TD(i,o,n,!0),divide:e.divide,dataIndex:o})}),t}function uy(r,t,e){r.traverse(function(i){i instanceof _t&&$t(i,{style:{opacity:0}},t,{dataIndex:e,isFrom:!0})})}function hy(r){if(r.parent){var t=r.getComputedTransform();r.setLocalTransform(t),r.parent.remove(r)}}function Jo(r){r.stopAnimation(),r.isGroup&&r.traverse(function(t){t.stopAnimation()})}function Zet(r,t,e){var i=Fs("update",e,t);i&&r.traverse(function(n){if(n instanceof kr){var a=TH(n);a&&n.animateFrom({style:a},i)}})}function jet(r,t){var e=r.length;if(e!==t.length)return!1;for(var i=0;i<e;i++){var n=r[i],a=t[i];if(n.data.getId(n.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function _O(r,t,e){var i=MD(r),n=MD(t);function a(_,x,b,S,w){(b||_)&&x.animateFrom({style:b&&b!==_?z(z({},b.style),_.style):_.style},w)}var o=!1,s=Uet,l=Z(),u=Z();i.forEach(function(_){_.groupId&&l.set(_.groupId,!0),_.childGroupId&&u.set(_.childGroupId,!0)});for(var h=0;h<n.length;h++){var c=n[h].groupId;if(u.get(c)){s=SD;break}var f=n[h].childGroupId;if(f&&l.get(f)){s=wD;break}}function v(_,x){return function(b){var S=b.data,w=b.dataIndex;return x?S.getId(w):_?s===SD?b.childGroupId:b.groupId:s===wD?b.childGroupId:b.groupId}}var d=jet(i,n),p={};if(!d)for(var h=0;h<n.length;h++){var g=n[h],y=g.data.getItemGraphicEl(g.dataIndex);y&&(p[y.id]=!0)}function m(_,x){var b=i[x],S=n[_],w=S.data.hostModel,T=b.data.getItemGraphicEl(b.dataIndex),M=S.data.getItemGraphicEl(S.dataIndex);if(T===M){M&&Zet(M,S.dataIndex,w);return}T&&p[T.id]||M&&(Jo(M),T?(Jo(T),hy(T),o=!0,ly(Va(T),Va(M),S.divide,w,_,a)):uy(M,w,_))}new Qi(i,n,v(!0,d),v(!1,d),null,"multiple").update(m).updateManyToOne(function(_,x){var b=n[_],S=b.data,w=S.hostModel,T=S.getItemGraphicEl(b.dataIndex),M=Dt(F(x,function(C){return i[C].data.getItemGraphicEl(i[C].dataIndex)}),function(C){return C&&C!==T&&!p[C.id]});T&&(Jo(T),M.length?(A(M,function(C){Jo(C),hy(C)}),o=!0,ly(Va(M),Va(T),b.divide,w,_,a)):uy(T,w,b.dataIndex))}).updateOneToMany(function(_,x){var b=i[x],S=b.data.getItemGraphicEl(b.dataIndex);if(!(S&&p[S.id])){var w=Dt(F(_,function(M){return n[M].data.getItemGraphicEl(n[M].dataIndex)}),function(M){return M&&M!==S}),T=n[_[0]].data.hostModel;w.length&&(A(w,function(M){return Jo(M)}),S?(Jo(S),hy(S),o=!0,ly(Va(S),Va(w),b.divide,T,_[0],a)):A(w,function(M){return uy(M,T,_[0])}))}}).updateManyToMany(function(_,x){new Qi(x,_,function(b){return i[b].data.getId(i[b].dataIndex)},function(b){return n[b].data.getId(n[b].dataIndex)}).update(function(b,S){m(_[b],x[S])}).execute()}).execute(),o&&A(t,function(_){var x=_.data,b=x.hostModel,S=b&&e.getViewOfSeriesModel(b),w=Fs("update",b,0);S&&b.isAnimationEnabled()&&w&&w.duration>0&&S.group.traverse(function(T){T instanceof _t&&!T.animators.length&&T.animateFrom({style:{opacity:0}},w)})})}function CD(r){var t=r.getModel("universalTransition").get("seriesKey");return t||r.id}function AD(r){return V(r)?r.sort().join(","):r}function xn(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function qet(r,t){var e=Z(),i=Z(),n=Z();return A(r.oldSeries,function(a,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=CD(a),h=AD(u);i.set(h,{dataGroupId:s,data:l}),V(u)&&A(u,function(c){n.set(c,{key:h,dataGroupId:s,data:l})})}),A(t.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=CD(a),u=AD(l),h=i.get(u);if(h)e.set(u,{oldSeries:[{dataGroupId:h.dataGroupId,divide:xn(h.data),data:h.data}],newSeries:[{dataGroupId:o,divide:xn(s),data:s}]});else if(V(l)){var c=[];A(l,function(d){var p=i.get(d);p.data&&c.push({dataGroupId:p.dataGroupId,divide:xn(p.data),data:p.data})}),c.length&&e.set(u,{oldSeries:c,newSeries:[{dataGroupId:o,data:s,divide:xn(s)}]})}else{var f=n.get(l);if(f){var v=e.get(f.key);v||(v={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:xn(f.data)}],newSeries:[]},e.set(f.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:xn(s)})}}}}),e}function DD(r,t){for(var e=0;e<r.length;e++){var i=t.seriesIndex!=null&&t.seriesIndex===r[e].seriesIndex||t.seriesId!=null&&t.seriesId===r[e].id;if(i)return e}}function Ket(r,t,e,i){var n=[],a=[];A(Bt(r.from),function(o){var s=DD(t.oldSeries,o);s>=0&&n.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:xn(t.oldData[s]),groupIdDim:o.dimension})}),A(Bt(r.to),function(o){var s=DD(e.updatedSeries,o);if(s>=0){var l=e.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:xn(l),groupIdDim:o.dimension})}}),n.length>0&&a.length>0&&_O(n,a,i)}function Jet(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,i){A(Bt(i.seriesTransition),function(n){A(Bt(n.to),function(a){for(var o=i.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][vf]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(t,e,i){var n=Yet(e);if(n.oldSeries&&i.updatedSeries&&i.optionChanged){var a=i.seriesTransition;if(a)A(Bt(a),function(v){Ket(v,n,i,e)});else{var o=qet(n,i);A(o.keys(),function(v){var d=o.get(v);_O(d.oldSeries,d.newSeries,e)})}A(i.updatedSeries,function(v){v[vf]&&(v[vf]=!1)})}for(var s=t.getSeries(),l=n.oldSeries=[],u=n.oldDataGroupIds=[],h=n.oldData=[],c=0;c<s.length;c++){var f=s[c].getData();f.count()<mO&&(l.push(s[c]),u.push(s[c].get("dataGroupId")),h.push(f))}})}pt([o8]);pt([e8]);pt([C8,G8,K8,I$,G$,A7,e9,z9,oX,fX,bX,pZ,FZ,KZ,vj,yj,Aj,Ej,Yj,Kj,sq,Uq]);pt(uK);pt(OK);pt(yR);pt(ZK);pt(rE);pt(JK);pt(sJ);pt(ZJ);pt(vQ);pt(Ih);pt(IQ);pt(RQ);pt(WQ);pt(qQ);pt(rtt);pt(ltt);pt(mtt);pt(Ntt);pt(aO);pt(oO);pt(ret);pt(cO);pt(fO);pt(set);pt(bet);pt(Met);pt(Jet);pt(bY);const Qet=Object.freeze(Object.defineProperty({__proto__:null,Axis:Br,ChartView:Ot,ComponentModel:yt,ComponentView:Yt,List:Be,Model:Lt,PRIORITY:CP,SeriesModel:zt,color:WF,connect:I6,dataTool:B6,dependencies:f6,disConnect:P6,disconnect:EP,dispose:k6,env:mt,extendChartView:lY,extendComponentModel:aY,extendComponentView:oY,extendSeriesModel:sY,format:ZU,getCoordinateSystemDimensions:E6,getInstanceByDom:H_,getInstanceById:R6,getMap:N6,graphic:XU,helper:VU,init:L6,innerDrawElementOnCanvas:z_,matrix:bF,number:YU,parseGeoJSON:Lm,parseGeoJson:Lm,registerAction:ii,registerCoordinateSystem:BP,registerLayout:zP,registerLoading:X_,registerLocale:x_,registerMap:VP,registerPostInit:OP,registerPostUpdate:NP,registerPreprocessor:U_,registerProcessor:Y_,registerTheme:W_,registerTransform:FP,registerUpdateLifecycle:vd,registerVisual:ra,setCanvasCreator:O6,setPlatformAPI:kL,throttle:cd,time:$U,use:pt,util:jU,vector:sF,version:c6,zrUtil:tF,zrender:TG},Symbol.toStringTag,{value:"Module"}));var so={},Hn={},xO={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var t=1,e=function(){return"".concat(t++)};r.default=e})(xO);var Cd={},Ad={},sb={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var t=function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,a=null;return function(){for(var o=this,s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];clearTimeout(a),a=setTimeout(function(){i.apply(o,l)},n)}};r.default=t})(sb);var wi={};Object.defineProperty(wi,"__esModule",{value:!0});wi.SizeSensorId=wi.SensorTabIndex=wi.SensorClassName=void 0;var trt="size-sensor-id";wi.SizeSensorId=trt;var ert="size-sensor-object";wi.SensorClassName=ert;var rrt="-1";wi.SensorTabIndex=rrt;Object.defineProperty(Ad,"__esModule",{value:!0});Ad.createSensor=void 0;var irt=nrt(sb),cy=wi;function nrt(r){return r&&r.__esModule?r:{default:r}}var art=function(t,e){var i=void 0,n=[],a=function(){getComputedStyle(t).position==="static"&&(t.style.position="relative");var c=document.createElement("object");return c.onload=function(){c.contentDocument.defaultView.addEventListener("resize",o),o()},c.style.display="block",c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.height="100%",c.style.width="100%",c.style.overflow="hidden",c.style.pointerEvents="none",c.style.zIndex="-1",c.style.opacity="0",c.setAttribute("class",cy.SensorClassName),c.setAttribute("tabindex",cy.SensorTabIndex),c.type="text/html",t.appendChild(c),c.data="about:blank",c},o=(0,irt.default)(function(){n.forEach(function(h){h(t)})}),s=function(c){i||(i=a()),n.indexOf(c)===-1&&n.push(c)},l=function(){i&&i.parentNode&&(i.contentDocument&&i.contentDocument.defaultView.removeEventListener("resize",o),i.parentNode.removeChild(i),t.removeAttribute(cy.SizeSensorId),i=void 0,n=[],e&&e())},u=function(c){var f=n.indexOf(c);f!==-1&&n.splice(f,1),n.length===0&&i&&l()};return{element:t,bind:s,destroy:l,unbind:u}};Ad.createSensor=art;var Dd={};Object.defineProperty(Dd,"__esModule",{value:!0});Dd.createSensor=void 0;var ort=wi,srt=lrt(sb);function lrt(r){return r&&r.__esModule?r:{default:r}}var urt=function(t,e){var i=void 0,n=[],a=(0,srt.default)(function(){n.forEach(function(h){h(t)})}),o=function(){var c=new ResizeObserver(a);return c.observe(t),a(),c},s=function(c){i||(i=o()),n.indexOf(c)===-1&&n.push(c)},l=function(){i.disconnect(),n=[],i=void 0,t.removeAttribute(ort.SizeSensorId),e&&e()},u=function(c){var f=n.indexOf(c);f!==-1&&n.splice(f,1),n.length===0&&i&&l()};return{element:t,bind:s,destroy:l,unbind:u}};Dd.createSensor=urt;Object.defineProperty(Cd,"__esModule",{value:!0});Cd.createSensor=void 0;var hrt=Ad,crt=Dd,frt=typeof ResizeObserver<"u"?crt.createSensor:hrt.createSensor;Cd.createSensor=frt;Object.defineProperty(Hn,"__esModule",{value:!0});Hn.removeSensor=Hn.getSensor=Hn.Sensors=void 0;var vrt=prt(xO),drt=Cd,_0=wi;function prt(r){return r&&r.__esModule?r:{default:r}}var ms={};Hn.Sensors=ms;function bO(r){r&&ms[r]&&delete ms[r]}var grt=function(t){var e=t.getAttribute(_0.SizeSensorId);if(e&&ms[e])return ms[e];var i=(0,vrt.default)();t.setAttribute(_0.SizeSensorId,i);var n=(0,drt.createSensor)(t,function(){return bO(i)});return ms[i]=n,n};Hn.getSensor=grt;var yrt=function(t){var e=t.element.getAttribute(_0.SizeSensorId);t.destroy(),bO(e)};Hn.removeSensor=yrt;Object.defineProperty(so,"__esModule",{value:!0});so.ver=wO=so.clear=SO=so.bind=void 0;var x0=Hn,mrt=function(t,e){var i=(0,x0.getSensor)(t);return i.bind(e),function(){i.unbind(e)}},SO=so.bind=mrt,_rt=function(t){var e=(0,x0.getSensor)(t);(0,x0.removeSensor)(e)},wO=so.clear=_rt,xrt="1.0.2";so.ver=xrt;function LD(r,t){var e={};return t.forEach(function(i){e[i]=r[i]}),e}function fy(r){return typeof r=="function"}function brt(r){return typeof r=="string"}var Srt=function r(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var i,n,a;if(Array.isArray(t)){if(i=t.length,i!=e.length)return!1;for(n=i;n--!==0;)if(!r(t[n],e[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(a=Object.keys(t),i=a.length,i!==Object.keys(e).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[n]))return!1;for(n=i;n--!==0;){var o=a[n];if(!r(t[o],e[o]))return!1}return!0}return t!==t&&e!==e};const Qo=CO(Srt);var wrt=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.echarts=e.echarts,i.ele=null,i.isInitialResize=!0,i}return t.prototype.componentDidMount=function(){this.renderNewEcharts()},t.prototype.componentDidUpdate=function(e){var i=this.props.shouldSetOption;if(!(fy(i)&&!i(e,this.props))){if(!Qo(e.theme,this.props.theme)||!Qo(e.opts,this.props.opts)||!Qo(e.onEvents,this.props.onEvents)){this.dispose(),this.renderNewEcharts();return}var n=["option","notMerge","lazyUpdate","showLoading","loadingOption"];Qo(LD(this.props,n),LD(e,n))||this.updateEChartsOption(),(!Qo(e.style,this.props.style)||!Qo(e.className,this.props.className))&&this.resize()}},t.prototype.componentWillUnmount=function(){this.dispose()},t.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)||this.echarts.init(this.ele,this.props.theme,this.props.opts)},t.prototype.dispose=function(){if(this.ele){try{wO(this.ele)}catch(e){console.warn(e)}this.echarts.dispose(this.ele)}},t.prototype.renderNewEcharts=function(){var e=this,i=this.props,n=i.onEvents,a=i.onChartReady,o=this.updateEChartsOption();this.bindEvents(o,n||{}),fy(a)&&a(o),this.ele&&SO(this.ele,function(){e.resize()})},t.prototype.bindEvents=function(e,i){function n(o,s){brt(o)&&fy(s)&&e.on(o,function(l){s(l,e)})}for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&n(a,i[a])},t.prototype.updateEChartsOption=function(){var e=this.props,i=e.option,n=e.notMerge,a=n===void 0?!1:n,o=e.lazyUpdate,s=o===void 0?!1:o,l=e.showLoading,u=e.loadingOption,h=u===void 0?null:u,c=this.getEchartsInstance();return c.setOption(i,a,s),l?c.showLoading(h):c.hideLoading(),c},t.prototype.resize=function(){var e=this.getEchartsInstance();if(!this.isInitialResize)try{e.resize()}catch(i){console.warn(i)}this.isInitialResize=!1},t.prototype.render=function(){var e=this,i=this.props,n=i.style,a=i.className,o=a===void 0?"":a,s=Iy({height:300},n);return b0.createElement("div",{ref:function(l){e.ele=l},style:s,className:"echarts-for-react "+o})},t}(Wr.PureComponent),Nrt=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.echarts=Qet,i}return t}(wrt);export{nL as A,Jt as B,B0 as C,Tn as D,an as E,Bl as F,tf as G,se as H,Ert as I,Nrt as J,T_ as K,krt as L,Ort as M,Rrt as N,wu as O,Qc as P,na as Q,iN as R,Ol as S,pb as T,It as U,Wt as V,Prt as W,Iy as _,wy as a,Ty as b,Mn as c,u5 as d,JV as e,jt as f,dy as g,Tu as h,Rt as i,ze as j,Nt as k,Lv as l,Un as m,Cu as n,Ja as o,t5 as p,ne as q,Zt as r,qt as s,Yr as t,Iv as u,bt as v,C0 as w,_s as x,de as y,ND as z};
|